]>
Commit | Line | Data |
---|---|---|
005537df | 1 | #! /bin/sh |
861bb6c1 JL |
2 | |
3 | # Guess values for system-dependent variables and create Makefiles. | |
b27d2bd5 | 4 | # Generated automatically using autoconf version 2.13 |
861bb6c1 JL |
5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
6 | # | |
7 | # This configure script is free software; the Free Software Foundation | |
8 | # gives unlimited permission to copy, distribute and modify it. | |
9 | ||
10 | # Defaults: | |
11 | ac_help= | |
12 | ac_default_prefix=/usr/local | |
13 | # Any additions from configure.in: | |
14 | ac_help="$ac_help | |
15 | --with-gnu-ld arrange to work with GNU ld." | |
ab339d62 | 16 | ac_help="$ac_help |
e8bec136 | 17 | --with-ld arrange to use the specified ld (full pathname)" |
861bb6c1 | 18 | ac_help="$ac_help |
e8bec136 | 19 | --with-gnu-as arrange to work with GNU as" |
ab339d62 | 20 | ac_help="$ac_help |
e8bec136 | 21 | --with-as arrange to use the specified as (full pathname)" |
861bb6c1 | 22 | ac_help="$ac_help |
e8bec136 | 23 | --with-stabs arrange to use stabs instead of host debug format" |
861bb6c1 | 24 | ac_help="$ac_help |
e8bec136 | 25 | --with-elf arrange to use ELF instead of host debug format" |
861bb6c1 | 26 | ac_help="$ac_help |
e8bec136 | 27 | --with-local-prefix=DIR specifies directory to put local include" |
861bb6c1 JL |
28 | ac_help="$ac_help |
29 | --with-gxx-include-dir=DIR | |
e8bec136 | 30 | specifies directory to put g++ header files" |
39d6f2e8 | 31 | ac_help="$ac_help |
e8bec136 | 32 | --enable-multilib enable library support for multiple ABIs" |
a494747c | 33 | ac_help="$ac_help |
f4524c9e ZW |
34 | --enable-checking[=LIST] |
35 | enable expensive run-time checks. With LIST, | |
36 | enable only specific categories of checks. | |
4c76f856 JJ |
37 | Categories are: misc,tree,rtl,rtlflag,gc,gcac; |
38 | default is misc,tree,gc,rtlflag" | |
3ecc3258 | 39 | ac_help="$ac_help |
e8bec136 | 40 | --disable-cpp don't provide a user-visible C preprocessor" |
3ecc3258 ZW |
41 | ac_help="$ac_help |
42 | --with-cpp-install-dir=DIR | |
43 | install the user visible C preprocessor in DIR | |
e8bec136 | 44 | (relative to PREFIX) as well as PREFIX/bin" |
c5c76735 | 45 | ac_help="$ac_help |
e8bec136 | 46 | --enable-c-mbchar enable multibyte characters for C and C++" |
861bb6c1 | 47 | ac_help="$ac_help |
e8bec136 RO |
48 | --enable-threads enable thread usage for target GCC |
49 | --enable-threads=LIB use LIB thread package for target GCC" | |
d8bb17c8 OP |
50 | ac_help="$ac_help |
51 | --enable-objc-gc enable the use of Boehm's garbage collector with | |
e8bec136 | 52 | the GNU Objective-C runtime" |
90e6a802 | 53 | ac_help="$ac_help |
e8bec136 | 54 | --with-dwarf2 force the default debug format to be DWARF 2" |
50503ac8 | 55 | ac_help="$ac_help |
e8bec136 | 56 | --disable-shared don't provide a shared libgcc" |
f91abfce TT |
57 | ac_help="$ac_help |
58 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" | |
ab87f8c8 | 59 | ac_help="$ac_help |
dc6746e7 | 60 | --enable-nls use Native Language Support (default)" |
71a94577 ZW |
61 | ac_help="$ac_help |
62 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" | |
ab87f8c8 JL |
63 | ac_help="$ac_help |
64 | --disable-nls do not use Native Language Support" | |
65 | ac_help="$ac_help | |
66 | --with-included-gettext use the GNU gettext library included here" | |
f4ab28e3 MK |
67 | ac_help="$ac_help |
68 | --disable-win32-registry | |
e8bec136 RO |
69 | disable lookup of installation paths in the |
70 | Registry on Windows hosts | |
71 | --enable-win32-registry enable registry lookup (default) | |
f4ab28e3 | 72 | --enable-win32-registry=KEY |
e8bec136 RO |
73 | use KEY instead of GCC version as the last portion |
74 | of the registry key" | |
81bf3d9e | 75 | ac_help="$ac_help |
e8bec136 RO |
76 | --with-gc={simple,page} choose the garbage collection mechanism to use |
77 | with the compiler" | |
3c809ba4 AG |
78 | ac_help="$ac_help |
79 | --with-system-zlib use installed libz" | |
dc6746e7 | 80 | ac_help="$ac_help |
e8bec136 RO |
81 | --enable-maintainer-mode |
82 | enable make rules and dependencies not useful | |
dc6746e7 | 83 | (and sometimes confusing) to the casual installer" |
531073e7 | 84 | ac_help="$ac_help |
e8bec136 RO |
85 | --enable-sjlj-exceptions |
86 | arrange to use setjmp/longjmp exception handling" | |
2bbea3a6 | 87 | ac_help="$ac_help |
e8bec136 RO |
88 | --enable-version-specific-runtime-libs |
89 | specify that runtime libraries should be | |
90 | installed in a compiler-specific directory" | |
5b15f277 RH |
91 | ac_help="$ac_help |
92 | --with-slibdir=DIR shared libraries in DIR [LIBDIR]" | |
861bb6c1 JL |
93 | |
94 | # Initialize some variables set by options. | |
95 | # The variables have the same names as the options, with | |
96 | # dashes changed to underlines. | |
97 | build=NONE | |
98 | cache_file=./config.cache | |
99 | exec_prefix=NONE | |
100 | host=NONE | |
101 | no_create= | |
102 | nonopt=NONE | |
103 | no_recursion= | |
104 | prefix=NONE | |
105 | program_prefix=NONE | |
106 | program_suffix=NONE | |
107 | program_transform_name=s,x,x, | |
108 | silent= | |
109 | site= | |
110 | srcdir= | |
111 | target=NONE | |
112 | verbose= | |
113 | x_includes=NONE | |
114 | x_libraries=NONE | |
115 | bindir='${exec_prefix}/bin' | |
116 | sbindir='${exec_prefix}/sbin' | |
117 | libexecdir='${exec_prefix}/libexec' | |
118 | datadir='${prefix}/share' | |
119 | sysconfdir='${prefix}/etc' | |
120 | sharedstatedir='${prefix}/com' | |
121 | localstatedir='${prefix}/var' | |
122 | libdir='${exec_prefix}/lib' | |
123 | includedir='${prefix}/include' | |
124 | oldincludedir='/usr/include' | |
125 | infodir='${prefix}/info' | |
126 | mandir='${prefix}/man' | |
127 | ||
128 | # Initialize some other variables. | |
129 | subdirs= | |
130 | MFLAGS= MAKEFLAGS= | |
6f144c9c | 131 | SHELL=${CONFIG_SHELL-/bin/sh} |
861bb6c1 JL |
132 | # Maximum number of lines to put in a shell here document. |
133 | ac_max_here_lines=12 | |
134 | ||
135 | ac_prev= | |
136 | for ac_option | |
137 | do | |
138 | ||
139 | # If the previous option needs an argument, assign it. | |
140 | if test -n "$ac_prev"; then | |
141 | eval "$ac_prev=\$ac_option" | |
142 | ac_prev= | |
143 | continue | |
144 | fi | |
145 | ||
146 | case "$ac_option" in | |
147 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
148 | *) ac_optarg= ;; | |
149 | esac | |
150 | ||
151 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
152 | ||
153 | case "$ac_option" in | |
154 | ||
155 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
156 | ac_prev=bindir ;; | |
157 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
158 | bindir="$ac_optarg" ;; | |
159 | ||
160 | -build | --build | --buil | --bui | --bu) | |
161 | ac_prev=build ;; | |
162 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
163 | build="$ac_optarg" ;; | |
164 | ||
165 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
166 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
167 | ac_prev=cache_file ;; | |
168 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
169 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
170 | cache_file="$ac_optarg" ;; | |
171 | ||
172 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
173 | ac_prev=datadir ;; | |
174 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
175 | | --da=*) | |
176 | datadir="$ac_optarg" ;; | |
177 | ||
178 | -disable-* | --disable-*) | |
179 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
180 | # Reject names that are not valid shell variable names. | |
181 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
182 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
183 | fi | |
184 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
185 | eval "enable_${ac_feature}=no" ;; | |
186 | ||
187 | -enable-* | --enable-*) | |
188 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
189 | # Reject names that are not valid shell variable names. | |
190 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
191 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
192 | fi | |
193 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
194 | case "$ac_option" in | |
195 | *=*) ;; | |
196 | *) ac_optarg=yes ;; | |
197 | esac | |
198 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
199 | ||
200 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
201 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
202 | | --exec | --exe | --ex) | |
203 | ac_prev=exec_prefix ;; | |
204 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
205 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
206 | | --exec=* | --exe=* | --ex=*) | |
207 | exec_prefix="$ac_optarg" ;; | |
208 | ||
209 | -gas | --gas | --ga | --g) | |
210 | # Obsolete; use --with-gas. | |
211 | with_gas=yes ;; | |
212 | ||
213 | -help | --help | --hel | --he) | |
214 | # Omit some internal or obsolete options to make the list less imposing. | |
215 | # This message is too long to be a string in the A/UX 3.1 sh. | |
216 | cat << EOF | |
217 | Usage: configure [options] [host] | |
218 | Options: [defaults in brackets after descriptions] | |
219 | Configuration: | |
220 | --cache-file=FILE cache test results in FILE | |
221 | --help print this message | |
222 | --no-create do not create output files | |
223 | --quiet, --silent do not print \`checking...' messages | |
224 | --version print the version of autoconf that created configure | |
225 | Directory and file names: | |
226 | --prefix=PREFIX install architecture-independent files in PREFIX | |
227 | [$ac_default_prefix] | |
228 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
229 | [same as prefix] | |
230 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
231 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
232 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
233 | --datadir=DIR read-only architecture-independent data in DIR | |
234 | [PREFIX/share] | |
235 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
236 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
237 | [PREFIX/com] | |
238 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
239 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
240 | --includedir=DIR C header files in DIR [PREFIX/include] | |
241 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
242 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
243 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
244 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
245 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
246 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
247 | --program-transform-name=PROGRAM | |
248 | run sed PROGRAM on installed program names | |
249 | EOF | |
250 | cat << EOF | |
251 | Host type: | |
252 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
253 | --host=HOST configure for HOST [guessed] | |
254 | --target=TARGET configure for TARGET [TARGET=HOST] | |
255 | Features and packages: | |
256 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
257 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
258 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
259 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
260 | --x-includes=DIR X include files are in DIR | |
261 | --x-libraries=DIR X library files are in DIR | |
262 | EOF | |
263 | if test -n "$ac_help"; then | |
264 | echo "--enable and --with options recognized:$ac_help" | |
265 | fi | |
266 | exit 0 ;; | |
267 | ||
268 | -host | --host | --hos | --ho) | |
269 | ac_prev=host ;; | |
270 | -host=* | --host=* | --hos=* | --ho=*) | |
271 | host="$ac_optarg" ;; | |
272 | ||
273 | -includedir | --includedir | --includedi | --included | --include \ | |
274 | | --includ | --inclu | --incl | --inc) | |
275 | ac_prev=includedir ;; | |
276 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
277 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
278 | includedir="$ac_optarg" ;; | |
279 | ||
280 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
281 | ac_prev=infodir ;; | |
282 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
283 | infodir="$ac_optarg" ;; | |
284 | ||
285 | -libdir | --libdir | --libdi | --libd) | |
286 | ac_prev=libdir ;; | |
287 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
288 | libdir="$ac_optarg" ;; | |
289 | ||
290 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
291 | | --libexe | --libex | --libe) | |
292 | ac_prev=libexecdir ;; | |
293 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
294 | | --libexe=* | --libex=* | --libe=*) | |
295 | libexecdir="$ac_optarg" ;; | |
296 | ||
297 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
298 | | --localstate | --localstat | --localsta | --localst \ | |
299 | | --locals | --local | --loca | --loc | --lo) | |
300 | ac_prev=localstatedir ;; | |
301 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
302 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
303 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
304 | localstatedir="$ac_optarg" ;; | |
305 | ||
306 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
307 | ac_prev=mandir ;; | |
308 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
309 | mandir="$ac_optarg" ;; | |
310 | ||
311 | -nfp | --nfp | --nf) | |
312 | # Obsolete; use --without-fp. | |
313 | with_fp=no ;; | |
314 | ||
315 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
316 | | --no-cr | --no-c) | |
317 | no_create=yes ;; | |
318 | ||
319 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
320 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
321 | no_recursion=yes ;; | |
322 | ||
323 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
324 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
325 | | --oldin | --oldi | --old | --ol | --o) | |
326 | ac_prev=oldincludedir ;; | |
327 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
328 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
329 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
330 | oldincludedir="$ac_optarg" ;; | |
331 | ||
332 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
333 | ac_prev=prefix ;; | |
334 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
335 | prefix="$ac_optarg" ;; | |
336 | ||
337 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
338 | | --program-pre | --program-pr | --program-p) | |
339 | ac_prev=program_prefix ;; | |
340 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
341 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
342 | program_prefix="$ac_optarg" ;; | |
343 | ||
344 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
345 | | --program-suf | --program-su | --program-s) | |
346 | ac_prev=program_suffix ;; | |
347 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
348 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
349 | program_suffix="$ac_optarg" ;; | |
350 | ||
351 | -program-transform-name | --program-transform-name \ | |
352 | | --program-transform-nam | --program-transform-na \ | |
353 | | --program-transform-n | --program-transform- \ | |
354 | | --program-transform | --program-transfor \ | |
355 | | --program-transfo | --program-transf \ | |
356 | | --program-trans | --program-tran \ | |
357 | | --progr-tra | --program-tr | --program-t) | |
358 | ac_prev=program_transform_name ;; | |
359 | -program-transform-name=* | --program-transform-name=* \ | |
360 | | --program-transform-nam=* | --program-transform-na=* \ | |
361 | | --program-transform-n=* | --program-transform-=* \ | |
362 | | --program-transform=* | --program-transfor=* \ | |
363 | | --program-transfo=* | --program-transf=* \ | |
364 | | --program-trans=* | --program-tran=* \ | |
365 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
366 | program_transform_name="$ac_optarg" ;; | |
367 | ||
368 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
369 | | -silent | --silent | --silen | --sile | --sil) | |
370 | silent=yes ;; | |
371 | ||
372 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
373 | ac_prev=sbindir ;; | |
374 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
375 | | --sbi=* | --sb=*) | |
376 | sbindir="$ac_optarg" ;; | |
377 | ||
378 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
379 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
380 | | --sharedst | --shareds | --shared | --share | --shar \ | |
381 | | --sha | --sh) | |
382 | ac_prev=sharedstatedir ;; | |
383 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
384 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
385 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
386 | | --sha=* | --sh=*) | |
387 | sharedstatedir="$ac_optarg" ;; | |
388 | ||
389 | -site | --site | --sit) | |
390 | ac_prev=site ;; | |
391 | -site=* | --site=* | --sit=*) | |
392 | site="$ac_optarg" ;; | |
393 | ||
394 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
395 | ac_prev=srcdir ;; | |
396 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
397 | srcdir="$ac_optarg" ;; | |
398 | ||
399 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
400 | | --syscon | --sysco | --sysc | --sys | --sy) | |
401 | ac_prev=sysconfdir ;; | |
402 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
403 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
404 | sysconfdir="$ac_optarg" ;; | |
405 | ||
406 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
407 | ac_prev=target ;; | |
408 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
409 | target="$ac_optarg" ;; | |
410 | ||
411 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
412 | verbose=yes ;; | |
413 | ||
414 | -version | --version | --versio | --versi | --vers) | |
b27d2bd5 | 415 | echo "configure generated by autoconf version 2.13" |
861bb6c1 JL |
416 | exit 0 ;; |
417 | ||
418 | -with-* | --with-*) | |
419 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
420 | # Reject names that are not valid shell variable names. | |
421 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
422 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
423 | fi | |
424 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
425 | case "$ac_option" in | |
426 | *=*) ;; | |
427 | *) ac_optarg=yes ;; | |
428 | esac | |
429 | eval "with_${ac_package}='$ac_optarg'" ;; | |
430 | ||
431 | -without-* | --without-*) | |
432 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
433 | # Reject names that are not valid shell variable names. | |
434 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
435 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
436 | fi | |
437 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
438 | eval "with_${ac_package}=no" ;; | |
439 | ||
440 | --x) | |
441 | # Obsolete; use --with-x. | |
442 | with_x=yes ;; | |
443 | ||
444 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
445 | | --x-incl | --x-inc | --x-in | --x-i) | |
446 | ac_prev=x_includes ;; | |
447 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
448 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
449 | x_includes="$ac_optarg" ;; | |
450 | ||
451 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
452 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
453 | ac_prev=x_libraries ;; | |
454 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
455 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
456 | x_libraries="$ac_optarg" ;; | |
457 | ||
458 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
459 | ;; | |
460 | ||
461 | *) | |
462 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
463 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
464 | fi | |
465 | if test "x$nonopt" != xNONE; then | |
466 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
467 | fi | |
468 | nonopt="$ac_option" | |
469 | ;; | |
470 | ||
471 | esac | |
472 | done | |
473 | ||
474 | if test -n "$ac_prev"; then | |
475 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
476 | fi | |
477 | ||
478 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
479 | ||
480 | # File descriptor usage: | |
481 | # 0 standard input | |
482 | # 1 file creation | |
483 | # 2 errors and warnings | |
484 | # 3 some systems may open it to /dev/tty | |
485 | # 4 used on the Kubota Titan | |
486 | # 6 checking for... messages and results | |
487 | # 5 compiler messages saved in config.log | |
488 | if test "$silent" = yes; then | |
489 | exec 6>/dev/null | |
490 | else | |
491 | exec 6>&1 | |
492 | fi | |
493 | exec 5>./config.log | |
494 | ||
495 | echo "\ | |
496 | This file contains any messages produced by compilers while | |
497 | running configure, to aid debugging if configure makes a mistake. | |
498 | " 1>&5 | |
499 | ||
500 | # Strip out --no-create and --no-recursion so they do not pile up. | |
501 | # Also quote any args containing shell metacharacters. | |
502 | ac_configure_args= | |
503 | for ac_arg | |
504 | do | |
505 | case "$ac_arg" in | |
506 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
507 | | --no-cr | --no-c) ;; | |
508 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
509 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
510 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
511 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
512 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
513 | esac | |
514 | done | |
515 | ||
516 | # NLS nuisances. | |
517 | # Only set these to C if already set. These must not be set unconditionally | |
518 | # because not all systems understand e.g. LANG=C (notably SCO). | |
519 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
520 | # Non-C LC_CTYPE values break the ctype check. | |
521 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
522 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
523 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
524 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
525 | ||
526 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
527 | rm -rf conftest* confdefs.h | |
528 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
529 | echo > confdefs.h | |
530 | ||
531 | # A filename unique to this package, relative to the directory that | |
532 | # configure is in, which we can look for to find out if srcdir is correct. | |
533 | ac_unique_file=tree.c | |
534 | ||
535 | # Find the source files, if location was not specified. | |
536 | if test -z "$srcdir"; then | |
537 | ac_srcdir_defaulted=yes | |
538 | # Try the directory containing this script, then its parent. | |
539 | ac_prog=$0 | |
540 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
541 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
542 | srcdir=$ac_confdir | |
543 | if test ! -r $srcdir/$ac_unique_file; then | |
544 | srcdir=.. | |
545 | fi | |
546 | else | |
547 | ac_srcdir_defaulted=no | |
548 | fi | |
549 | if test ! -r $srcdir/$ac_unique_file; then | |
550 | if test "$ac_srcdir_defaulted" = yes; then | |
551 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
552 | else | |
553 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
554 | fi | |
555 | fi | |
556 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
557 | ||
558 | # Prefer explicitly selected file to automatically selected ones. | |
e08f13ee JS |
559 | if test -z "$CONFIG_SITE"; then |
560 | if test "x$prefix" != xNONE; then | |
561 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
562 | else | |
563 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
861bb6c1 JL |
564 | fi |
565 | fi | |
566 | for ac_site_file in $CONFIG_SITE; do | |
567 | if test -r "$ac_site_file"; then | |
568 | echo "loading site script $ac_site_file" | |
569 | . "$ac_site_file" | |
570 | fi | |
571 | done | |
572 | ||
573 | if test -r "$cache_file"; then | |
574 | echo "loading cache $cache_file" | |
575 | . $cache_file | |
576 | else | |
577 | echo "creating cache $cache_file" | |
578 | > $cache_file | |
579 | fi | |
580 | ||
581 | ac_ext=c | |
582 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
583 | ac_cpp='$CPP $CPPFLAGS' | |
584 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
cd9e5e7c | 585 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
861bb6c1 JL |
586 | cross_compiling=$ac_cv_prog_cc_cross |
587 | ||
cd9e5e7c MK |
588 | ac_exeext= |
589 | ac_objext=o | |
861bb6c1 JL |
590 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then |
591 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
592 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
593 | ac_n= ac_c=' | |
594 | ' ac_t=' ' | |
595 | else | |
596 | ac_n=-n ac_c= ac_t= | |
597 | fi | |
598 | else | |
599 | ac_n= ac_c='\c' ac_t= | |
600 | fi | |
601 | ||
602 | ||
603 | ||
604 | ||
861bb6c1 JL |
605 | remove=rm |
606 | hard_link=ln | |
607 | symbolic_link='ln -s' | |
608 | copy=cp | |
609 | ||
75a39864 JL |
610 | # Check for bogus environment variables. |
611 | # Test if LIBRARY_PATH contains the notation for the current directory | |
612 | # since this would lead to problems installing/building glibc. | |
613 | # LIBRARY_PATH contains the current directory if one of the following | |
614 | # is true: | |
615 | # - one of the terminals (":" and ";") is the first or last sign | |
616 | # - two terminals occur directly after each other | |
617 | # - the path contains an element with a dot in it | |
618 | echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6 | |
e08f13ee | 619 | echo "configure:620: checking LIBRARY_PATH variable" >&5 |
75a39864 JL |
620 | case ${LIBRARY_PATH} in |
621 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
622 | library_path_setting="contains current directory" | |
623 | ;; | |
624 | *) | |
625 | library_path_setting="ok" | |
626 | ;; | |
627 | esac | |
628 | echo "$ac_t""$library_path_setting" 1>&6 | |
629 | if test "$library_path_setting" != "ok"; then | |
630 | { echo "configure: error: | |
631 | *** LIBRARY_PATH shouldn't contain the current directory when | |
079bd08e | 632 | *** building gcc. Please change the environment variable |
75a39864 JL |
633 | *** and run configure again." 1>&2; exit 1; } |
634 | fi | |
635 | ||
636 | # Test if GCC_EXEC_PREFIX contains the notation for the current directory | |
637 | # since this would lead to problems installing/building glibc. | |
638 | # GCC_EXEC_PREFIX contains the current directory if one of the following | |
639 | # is true: | |
640 | # - one of the terminals (":" and ";") is the first or last sign | |
641 | # - two terminals occur directly after each other | |
642 | # - the path contains an element with a dot in it | |
643 | echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6 | |
e08f13ee | 644 | echo "configure:645: checking GCC_EXEC_PREFIX variable" >&5 |
75a39864 JL |
645 | case ${GCC_EXEC_PREFIX} in |
646 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
647 | gcc_exec_prefix_setting="contains current directory" | |
648 | ;; | |
649 | *) | |
650 | gcc_exec_prefix_setting="ok" | |
651 | ;; | |
652 | esac | |
653 | echo "$ac_t""$gcc_exec_prefix_setting" 1>&6 | |
654 | if test "$gcc_exec_prefix_setting" != "ok"; then | |
655 | { echo "configure: error: | |
656 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when | |
079bd08e | 657 | *** building gcc. Please change the environment variable |
75a39864 JL |
658 | *** and run configure again." 1>&2; exit 1; } |
659 | fi | |
660 | ||
861bb6c1 JL |
661 | # Check for additional parameters |
662 | ||
663 | # With GNU ld | |
664 | # Check whether --with-gnu-ld or --without-gnu-ld was given. | |
665 | if test "${with_gnu_ld+set}" = set; then | |
666 | withval="$with_gnu_ld" | |
df6faf79 | 667 | gnu_ld_flag="$with_gnu_ld" |
861bb6c1 | 668 | else |
df6faf79 | 669 | gnu_ld_flag=no |
861bb6c1 JL |
670 | fi |
671 | ||
672 | ||
ab339d62 AO |
673 | # With pre-defined ld |
674 | # Check whether --with-ld or --without-ld was given. | |
675 | if test "${with_ld+set}" = set; then | |
676 | withval="$with_ld" | |
3ccc3a56 | 677 | DEFAULT_LINKER="$with_ld" |
ab339d62 AO |
678 | fi |
679 | ||
3ccc3a56 AO |
680 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
681 | if test ! -x "$DEFAULT_LINKER"; then | |
682 | echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2 | |
e154a394 | 683 | elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
ab339d62 AO |
684 | gnu_ld_flag=yes |
685 | fi | |
686 | cat >> confdefs.h <<EOF | |
3ccc3a56 | 687 | #define DEFAULT_LINKER "$DEFAULT_LINKER" |
ab339d62 AO |
688 | EOF |
689 | ||
690 | fi | |
691 | ||
861bb6c1 JL |
692 | # With GNU as |
693 | # Check whether --with-gnu-as or --without-gnu-as was given. | |
694 | if test "${with_gnu_as+set}" = set; then | |
695 | withval="$with_gnu_as" | |
df6faf79 | 696 | gas_flag="$with_gnu_as" |
861bb6c1 | 697 | else |
df6faf79 | 698 | gas_flag=no |
861bb6c1 JL |
699 | fi |
700 | ||
701 | ||
ab339d62 AO |
702 | # Check whether --with-as or --without-as was given. |
703 | if test "${with_as+set}" = set; then | |
704 | withval="$with_as" | |
3ccc3a56 | 705 | DEFAULT_ASSEMBLER="$with_as" |
ab339d62 AO |
706 | fi |
707 | ||
3ccc3a56 AO |
708 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
709 | if test ! -x "$DEFAULT_ASSEMBLER"; then | |
710 | echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2 | |
e154a394 | 711 | elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
ab339d62 AO |
712 | gas_flag=yes |
713 | fi | |
714 | cat >> confdefs.h <<EOF | |
3ccc3a56 | 715 | #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER" |
ab339d62 AO |
716 | EOF |
717 | ||
3ccc3a56 | 718 | fi |
ab339d62 | 719 | |
861bb6c1 JL |
720 | # With stabs |
721 | # Check whether --with-stabs or --without-stabs was given. | |
722 | if test "${with_stabs+set}" = set; then | |
723 | withval="$with_stabs" | |
535b86ce | 724 | stabs="$with_stabs" |
861bb6c1 JL |
725 | else |
726 | stabs=no | |
727 | fi | |
728 | ||
729 | ||
730 | # With ELF | |
731 | # Check whether --with-elf or --without-elf was given. | |
732 | if test "${with_elf+set}" = set; then | |
733 | withval="$with_elf" | |
535b86ce | 734 | elf="$with_elf" |
861bb6c1 JL |
735 | else |
736 | elf=no | |
737 | fi | |
738 | ||
739 | ||
740 | # Specify the local prefix | |
4e88d51b | 741 | local_prefix= |
861bb6c1 JL |
742 | # Check whether --with-local-prefix or --without-local-prefix was given. |
743 | if test "${with_local_prefix+set}" = set; then | |
744 | withval="$with_local_prefix" | |
4e88d51b JM |
745 | case "${withval}" in |
746 | yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;; | |
747 | no) ;; | |
748 | *) local_prefix=$with_local_prefix ;; | |
749 | esac | |
861bb6c1 JL |
750 | fi |
751 | ||
752 | ||
753 | # Default local prefix if it is empty | |
75bffa71 | 754 | if test x$local_prefix = x; then |
861bb6c1 JL |
755 | local_prefix=/usr/local |
756 | fi | |
757 | ||
8f8d3278 NC |
758 | # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only |
759 | # passed in by the toplevel make and thus we'd get different behavior | |
760 | # depending on where we built the sources. | |
761 | gcc_gxx_include_dir= | |
861bb6c1 JL |
762 | # Specify the g++ header file directory |
763 | # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. | |
764 | if test "${with_gxx_include_dir+set}" = set; then | |
765 | withval="$with_gxx_include_dir" | |
4e88d51b JM |
766 | case "${withval}" in |
767 | yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;; | |
768 | no) ;; | |
8f8d3278 | 769 | *) gcc_gxx_include_dir=$with_gxx_include_dir ;; |
4e88d51b | 770 | esac |
861bb6c1 JL |
771 | fi |
772 | ||
773 | ||
8f8d3278 | 774 | if test x${gcc_gxx_include_dir} = x; then |
4e88d51b | 775 | if test x${enable_version_specific_runtime_libs} = xyes; then |
8f8d3278 | 776 | gcc_gxx_include_dir='${libsubdir}/include/g++' |
4e88d51b | 777 | else |
a270b446 | 778 | topsrcdir=${srcdir}/.. . ${srcdir}/../config.if |
e2187d3b | 779 | gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir} |
4e88d51b JM |
780 | fi |
781 | fi | |
782 | ||
39d6f2e8 MM |
783 | # Determine whether or not multilibs are enabled. |
784 | # Check whether --enable-multilib or --disable-multilib was given. | |
785 | if test "${enable_multilib+set}" = set; then | |
786 | enableval="$enable_multilib" | |
787 | : | |
788 | else | |
789 | enable_multilib=yes | |
790 | fi | |
791 | ||
792 | ||
793 | ||
a494747c MM |
794 | # Enable expensive internal checks |
795 | # Check whether --enable-checking or --disable-checking was given. | |
796 | if test "${enable_checking+set}" = set; then | |
797 | enableval="$enable_checking" | |
119d24d1 KG |
798 | ac_checking= |
799 | ac_tree_checking= | |
800 | ac_rtl_checking= | |
4c76f856 | 801 | ac_rtlflag_checking= |
119d24d1 KG |
802 | ac_gc_checking= |
803 | ac_gc_always_collect= | |
804 | case "${enableval}" in | |
4c76f856 JJ |
805 | yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ; |
806 | ac_rtlflag_checking=1 ;; | |
4e88d51b | 807 | no) ;; |
59f406b7 | 808 | *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," |
f4524c9e ZW |
809 | set fnord $enableval; shift |
810 | IFS="$ac_save_IFS" | |
c62e45ad KG |
811 | for check |
812 | do | |
f4524c9e | 813 | case $check in |
119d24d1 KG |
814 | misc) ac_checking=1 ;; |
815 | tree) ac_tree_checking=1 ;; | |
4c76f856 | 816 | rtlflag) ac_rtlflag_checking=1 ;; |
119d24d1 KG |
817 | rtl) ac_rtl_checking=1 ;; |
818 | gc) ac_gc_checking=1 ;; | |
819 | gcac) ac_gc_always_collect=1 ;; | |
820 | *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;; | |
821 | esac | |
822 | done | |
823 | ;; | |
824 | esac | |
51d0e20c AJ |
825 | |
826 | else | |
827 | # Enable some checks by default for development versions of GCC | |
4c76f856 | 828 | ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1; |
51d0e20c AJ |
829 | fi |
830 | ||
119d24d1 KG |
831 | if test x$ac_checking != x ; then |
832 | cat >> confdefs.h <<\EOF | |
f4524c9e ZW |
833 | #define ENABLE_CHECKING 1 |
834 | EOF | |
119d24d1 KG |
835 | |
836 | fi | |
837 | if test x$ac_tree_checking != x ; then | |
838 | cat >> confdefs.h <<\EOF | |
f4524c9e ZW |
839 | #define ENABLE_TREE_CHECKING 1 |
840 | EOF | |
119d24d1 KG |
841 | |
842 | fi | |
843 | if test x$ac_rtl_checking != x ; then | |
844 | cat >> confdefs.h <<\EOF | |
f4524c9e ZW |
845 | #define ENABLE_RTL_CHECKING 1 |
846 | EOF | |
119d24d1 | 847 | |
4c76f856 JJ |
848 | fi |
849 | if test x$ac_rtlflag_checking != x ; then | |
850 | cat >> confdefs.h <<\EOF | |
851 | #define ENABLE_RTL_FLAG_CHECKING 1 | |
852 | EOF | |
853 | ||
119d24d1 KG |
854 | fi |
855 | if test x$ac_gc_checking != x ; then | |
856 | cat >> confdefs.h <<\EOF | |
f4524c9e ZW |
857 | #define ENABLE_GC_CHECKING 1 |
858 | EOF | |
119d24d1 KG |
859 | |
860 | fi | |
861 | if test x$ac_gc_always_collect != x ; then | |
862 | cat >> confdefs.h <<\EOF | |
f4524c9e ZW |
863 | #define ENABLE_GC_ALWAYS_COLLECT 1 |
864 | EOF | |
119d24d1 KG |
865 | |
866 | fi | |
867 | ||
a494747c | 868 | |
3ecc3258 ZW |
869 | # Check whether --enable-cpp or --disable-cpp was given. |
870 | if test "${enable_cpp+set}" = set; then | |
871 | enableval="$enable_cpp" | |
872 | : | |
873 | else | |
874 | enable_cpp=yes | |
875 | fi | |
876 | ||
877 | ||
878 | # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. | |
879 | if test "${with_cpp_install_dir+set}" = set; then | |
880 | withval="$with_cpp_install_dir" | |
881 | if test x$withval = xyes; then | |
882 | { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; } | |
883 | elif test x$withval != xno; then | |
884 | cpp_install_dir=$withval | |
885 | fi | |
886 | fi | |
887 | ||
888 | ||
c5c76735 JL |
889 | # Enable Multibyte Characters for C/C++ |
890 | # Check whether --enable-c-mbchar or --disable-c-mbchar was given. | |
891 | if test "${enable_c_mbchar+set}" = set; then | |
892 | enableval="$enable_c_mbchar" | |
2618c083 | 893 | if test x$enable_c_mbchar != xno; then |
9ec7291f ZW |
894 | cat >> confdefs.h <<\EOF |
895 | #define MULTIBYTE_CHARS 1 | |
896 | EOF | |
897 | ||
c5c76735 JL |
898 | fi |
899 | fi | |
900 | ||
901 | ||
861bb6c1 JL |
902 | # Enable threads |
903 | # Pass with no value to take the default | |
904 | # Pass with a value to specify a thread package | |
905 | # Check whether --enable-threads or --disable-threads was given. | |
906 | if test "${enable_threads+set}" = set; then | |
907 | enableval="$enable_threads" | |
981d4858 | 908 | : |
861bb6c1 JL |
909 | else |
910 | enable_threads='' | |
911 | fi | |
912 | ||
913 | ||
e445171e | 914 | enable_threads_flag=$enable_threads |
861bb6c1 | 915 | # Check if a valid thread package |
e445171e | 916 | case x${enable_threads_flag} in |
861bb6c1 JL |
917 | x | xno) |
918 | # No threads | |
a851212a | 919 | target_thread_file='single' |
861bb6c1 JL |
920 | ;; |
921 | xyes) | |
922 | # default | |
a851212a | 923 | target_thread_file='' |
861bb6c1 JL |
924 | ;; |
925 | xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \ | |
e08f13ee | 926 | xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix) |
e445171e | 927 | target_thread_file=$enable_threads_flag |
861bb6c1 JL |
928 | ;; |
929 | *) | |
930 | echo "$enable_threads is an unknown thread package" 1>&2 | |
931 | exit 1 | |
932 | ;; | |
933 | esac | |
934 | ||
d8bb17c8 OP |
935 | # Check whether --enable-objc-gc or --disable-objc-gc was given. |
936 | if test "${enable_objc_gc+set}" = set; then | |
937 | enableval="$enable_objc_gc" | |
2618c083 | 938 | if test x$enable_objc_gc = xno; then |
d8bb17c8 OP |
939 | objc_boehm_gc='' |
940 | else | |
941 | objc_boehm_gc=1 | |
942 | fi | |
943 | else | |
944 | objc_boehm_gc='' | |
945 | fi | |
946 | ||
947 | ||
90e6a802 RL |
948 | # Check whether --with-dwarf2 or --without-dwarf2 was given. |
949 | if test "${with_dwarf2+set}" = set; then | |
950 | withval="$with_dwarf2" | |
951 | dwarf2="$with_dwarf2" | |
952 | else | |
953 | dwarf2=no | |
954 | fi | |
955 | ||
956 | ||
50503ac8 RH |
957 | # Check whether --enable-shared or --disable-shared was given. |
958 | if test "${enable_shared+set}" = set; then | |
959 | enableval="$enable_shared" | |
c785e0fa AO |
960 | |
961 | case $enable_shared in | |
962 | yes | no) ;; | |
963 | *) | |
964 | enable_shared=no | |
965 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
966 | for pkg in $enableval; do | |
967 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
968 | enable_shared=yes | |
969 | fi | |
970 | done | |
971 | IFS="$ac_save_ifs" | |
972 | ;; | |
973 | esac | |
974 | ||
50503ac8 RH |
975 | else |
976 | enable_shared=yes | |
977 | fi | |
978 | ||
979 | ||
980 | ||
861bb6c1 JL |
981 | # Determine the host, build, and target systems |
982 | ac_aux_dir= | |
983 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do | |
984 | if test -f $ac_dir/install-sh; then | |
985 | ac_aux_dir=$ac_dir | |
986 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
987 | break | |
988 | elif test -f $ac_dir/install.sh; then | |
989 | ac_aux_dir=$ac_dir | |
990 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
991 | break | |
992 | fi | |
993 | done | |
994 | if test -z "$ac_aux_dir"; then | |
995 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } | |
996 | fi | |
997 | ac_config_guess=$ac_aux_dir/config.guess | |
998 | ac_config_sub=$ac_aux_dir/config.sub | |
999 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
1000 | ||
1001 | ||
1002 | # Do some error checking and defaulting for the host and target type. | |
1003 | # The inputs are: | |
1004 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
1005 | # | |
1006 | # The rules are: | |
1007 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1008 | # same time. | |
1009 | # 2. Host defaults to nonopt. | |
1010 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1011 | # as determined by config.guess. | |
1012 | # 4. Target and build default to nonopt. | |
1013 | # 5. If nonopt is not specified, then target and build default to host. | |
1014 | ||
1015 | # The aliases save the names the user supplied, while $host etc. | |
1016 | # will get canonicalized. | |
1017 | case $host---$target---$nonopt in | |
1018 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1019 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1020 | esac | |
1021 | ||
1022 | ||
1023 | # Make sure we can run config.sub. | |
6f144c9c | 1024 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : |
861bb6c1 JL |
1025 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } |
1026 | fi | |
1027 | ||
1028 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
4c76f856 | 1029 | echo "configure:1030: checking host system type" >&5 |
861bb6c1 JL |
1030 | |
1031 | host_alias=$host | |
1032 | case "$host_alias" in | |
1033 | NONE) | |
1034 | case $nonopt in | |
1035 | NONE) | |
6f144c9c | 1036 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : |
861bb6c1 JL |
1037 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } |
1038 | fi ;; | |
1039 | *) host_alias=$nonopt ;; | |
1040 | esac ;; | |
1041 | esac | |
1042 | ||
6f144c9c | 1043 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` |
861bb6c1 JL |
1044 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
1045 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1046 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1047 | echo "$ac_t""$host" 1>&6 | |
1048 | ||
1049 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
4c76f856 | 1050 | echo "configure:1051: checking target system type" >&5 |
861bb6c1 JL |
1051 | |
1052 | target_alias=$target | |
1053 | case "$target_alias" in | |
1054 | NONE) | |
1055 | case $nonopt in | |
1056 | NONE) target_alias=$host_alias ;; | |
1057 | *) target_alias=$nonopt ;; | |
1058 | esac ;; | |
1059 | esac | |
1060 | ||
6f144c9c | 1061 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` |
861bb6c1 JL |
1062 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
1063 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1064 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1065 | echo "$ac_t""$target" 1>&6 | |
1066 | ||
1067 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
4c76f856 | 1068 | echo "configure:1069: checking build system type" >&5 |
861bb6c1 JL |
1069 | |
1070 | build_alias=$build | |
1071 | case "$build_alias" in | |
1072 | NONE) | |
1073 | case $nonopt in | |
1074 | NONE) build_alias=$host_alias ;; | |
1075 | *) build_alias=$nonopt ;; | |
1076 | esac ;; | |
1077 | esac | |
1078 | ||
6f144c9c | 1079 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` |
861bb6c1 JL |
1080 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
1081 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1082 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1083 | echo "$ac_t""$build" 1>&6 | |
1084 | ||
1085 | test "$host_alias" != "$target_alias" && | |
1086 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1087 | NONENONEs,x,x, && | |
1088 | program_prefix=${target_alias}- | |
1089 | ||
1090 | ||
b21d216c AF |
1091 | # Set program_transform_name |
1092 | if test "$program_transform_name" = s,x,x,; then | |
1093 | program_transform_name= | |
1094 | else | |
1095 | # Double any \ or $. echo might interpret backslashes. | |
1096 | cat <<\EOF_SED > conftestsed | |
1097 | s,\\,\\\\,g; s,\$,$$,g | |
1098 | EOF_SED | |
1099 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
1100 | rm -f conftestsed | |
1101 | fi | |
1102 | test "$program_prefix" != NONE && | |
1103 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
1104 | # Use a double $ so make ignores it. | |
1105 | test "$program_suffix" != NONE && | |
1106 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
1107 | ||
1108 | # sed with no file args requires a program. | |
1109 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
1110 | ||
1111 | ||
e9a25f70 JL |
1112 | # Find the native compiler |
1113 | # Extract the first word of "gcc", so it can be a program name with args. | |
1114 | set dummy gcc; ac_word=$2 | |
1115 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
4c76f856 | 1116 | echo "configure:1117: checking for $ac_word" >&5 |
e9a25f70 JL |
1117 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1118 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1119 | else | |
1120 | if test -n "$CC"; then | |
1121 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1122 | else | |
cd9e5e7c | 1123 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
1124 | ac_dummy="$PATH" |
1125 | for ac_dir in $ac_dummy; do | |
e9a25f70 JL |
1126 | test -z "$ac_dir" && ac_dir=. |
1127 | if test -f $ac_dir/$ac_word; then | |
1128 | ac_cv_prog_CC="gcc" | |
1129 | break | |
1130 | fi | |
1131 | done | |
1132 | IFS="$ac_save_ifs" | |
1133 | fi | |
1134 | fi | |
1135 | CC="$ac_cv_prog_CC" | |
1136 | if test -n "$CC"; then | |
1137 | echo "$ac_t""$CC" 1>&6 | |
1138 | else | |
1139 | echo "$ac_t""no" 1>&6 | |
1140 | fi | |
1141 | ||
1142 | if test -z "$CC"; then | |
1143 | # Extract the first word of "cc", so it can be a program name with args. | |
1144 | set dummy cc; ac_word=$2 | |
1145 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
4c76f856 | 1146 | echo "configure:1147: checking for $ac_word" >&5 |
e9a25f70 JL |
1147 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1148 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1149 | else | |
1150 | if test -n "$CC"; then | |
1151 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1152 | else | |
cd9e5e7c | 1153 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
e9a25f70 | 1154 | ac_prog_rejected=no |
b27d2bd5 MK |
1155 | ac_dummy="$PATH" |
1156 | for ac_dir in $ac_dummy; do | |
e9a25f70 JL |
1157 | test -z "$ac_dir" && ac_dir=. |
1158 | if test -f $ac_dir/$ac_word; then | |
1159 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
1160 | ac_prog_rejected=yes | |
1161 | continue | |
1162 | fi | |
1163 | ac_cv_prog_CC="cc" | |
1164 | break | |
1165 | fi | |
1166 | done | |
1167 | IFS="$ac_save_ifs" | |
1168 | if test $ac_prog_rejected = yes; then | |
1169 | # We found a bogon in the path, so make sure we never use it. | |
1170 | set dummy $ac_cv_prog_CC | |
1171 | shift | |
1172 | if test $# -gt 0; then | |
1173 | # We chose a different compiler from the bogus one. | |
1174 | # However, it has the same basename, so the bogon will be chosen | |
1175 | # first if we set CC to just the basename; use the full file name. | |
1176 | shift | |
1177 | set dummy "$ac_dir/$ac_word" "$@" | |
1178 | shift | |
1179 | ac_cv_prog_CC="$@" | |
1180 | fi | |
1181 | fi | |
1182 | fi | |
1183 | fi | |
1184 | CC="$ac_cv_prog_CC" | |
1185 | if test -n "$CC"; then | |
1186 | echo "$ac_t""$CC" 1>&6 | |
1187 | else | |
1188 | echo "$ac_t""no" 1>&6 | |
1189 | fi | |
1190 | ||
cd9e5e7c MK |
1191 | if test -z "$CC"; then |
1192 | case "`uname -s`" in | |
1193 | *win32* | *WIN32*) | |
1194 | # Extract the first word of "cl", so it can be a program name with args. | |
1195 | set dummy cl; ac_word=$2 | |
1196 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
4c76f856 | 1197 | echo "configure:1198: checking for $ac_word" >&5 |
cd9e5e7c MK |
1198 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1199 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1200 | else | |
1201 | if test -n "$CC"; then | |
1202 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1203 | else | |
1204 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
b27d2bd5 MK |
1205 | ac_dummy="$PATH" |
1206 | for ac_dir in $ac_dummy; do | |
cd9e5e7c MK |
1207 | test -z "$ac_dir" && ac_dir=. |
1208 | if test -f $ac_dir/$ac_word; then | |
1209 | ac_cv_prog_CC="cl" | |
1210 | break | |
1211 | fi | |
1212 | done | |
1213 | IFS="$ac_save_ifs" | |
1214 | fi | |
1215 | fi | |
1216 | CC="$ac_cv_prog_CC" | |
1217 | if test -n "$CC"; then | |
1218 | echo "$ac_t""$CC" 1>&6 | |
1219 | else | |
1220 | echo "$ac_t""no" 1>&6 | |
1221 | fi | |
1222 | ;; | |
1223 | esac | |
1224 | fi | |
e9a25f70 JL |
1225 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
1226 | fi | |
1227 | ||
1228 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
4c76f856 | 1229 | echo "configure:1230: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
e9a25f70 JL |
1230 | |
1231 | ac_ext=c | |
1232 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1233 | ac_cpp='$CPP $CPPFLAGS' | |
1234 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
cd9e5e7c | 1235 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
e9a25f70 JL |
1236 | cross_compiling=$ac_cv_prog_cc_cross |
1237 | ||
b27d2bd5 MK |
1238 | cat > conftest.$ac_ext << EOF |
1239 | ||
4c76f856 | 1240 | #line 1241 "configure" |
e9a25f70 | 1241 | #include "confdefs.h" |
b27d2bd5 | 1242 | |
e9a25f70 JL |
1243 | main(){return(0);} |
1244 | EOF | |
4c76f856 | 1245 | if { (eval echo configure:1246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
e9a25f70 JL |
1246 | ac_cv_prog_cc_works=yes |
1247 | # If we can't run a trivial program, we are probably using a cross compiler. | |
1248 | if (./conftest; exit) 2>/dev/null; then | |
1249 | ac_cv_prog_cc_cross=no | |
1250 | else | |
1251 | ac_cv_prog_cc_cross=yes | |
1252 | fi | |
1253 | else | |
1254 | echo "configure: failed program was:" >&5 | |
1255 | cat conftest.$ac_ext >&5 | |
1256 | ac_cv_prog_cc_works=no | |
1257 | fi | |
1258 | rm -fr conftest* | |
b27d2bd5 MK |
1259 | ac_ext=c |
1260 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1261 | ac_cpp='$CPP $CPPFLAGS' | |
1262 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1263 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1264 | cross_compiling=$ac_cv_prog_cc_cross | |
e9a25f70 JL |
1265 | |
1266 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
1267 | if test $ac_cv_prog_cc_works = no; then | |
1268 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
1269 | fi | |
1270 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
4c76f856 | 1271 | echo "configure:1272: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
e9a25f70 JL |
1272 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
1273 | cross_compiling=$ac_cv_prog_cc_cross | |
1274 | ||
1275 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
4c76f856 | 1276 | echo "configure:1277: checking whether we are using GNU C" >&5 |
e9a25f70 JL |
1277 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
1278 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1279 | else | |
1280 | cat > conftest.c <<EOF | |
1281 | #ifdef __GNUC__ | |
1282 | yes; | |
1283 | #endif | |
1284 | EOF | |
4c76f856 | 1285 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
e9a25f70 JL |
1286 | ac_cv_prog_gcc=yes |
1287 | else | |
1288 | ac_cv_prog_gcc=no | |
1289 | fi | |
1290 | fi | |
1291 | ||
1292 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
1293 | ||
1294 | if test $ac_cv_prog_gcc = yes; then | |
1295 | GCC=yes | |
cd9e5e7c MK |
1296 | else |
1297 | GCC= | |
1298 | fi | |
1299 | ||
1300 | ac_test_CFLAGS="${CFLAGS+set}" | |
1301 | ac_save_CFLAGS="$CFLAGS" | |
1302 | CFLAGS= | |
1303 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
4c76f856 | 1304 | echo "configure:1305: checking whether ${CC-cc} accepts -g" >&5 |
e9a25f70 JL |
1305 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
1306 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1307 | else | |
1308 | echo 'void f(){}' > conftest.c | |
1309 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
1310 | ac_cv_prog_cc_g=yes | |
1311 | else | |
1312 | ac_cv_prog_cc_g=no | |
1313 | fi | |
1314 | rm -f conftest* | |
1315 | ||
1316 | fi | |
1317 | ||
1318 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
cd9e5e7c MK |
1319 | if test "$ac_test_CFLAGS" = set; then |
1320 | CFLAGS="$ac_save_CFLAGS" | |
1321 | elif test $ac_cv_prog_cc_g = yes; then | |
1322 | if test "$GCC" = yes; then | |
e9a25f70 JL |
1323 | CFLAGS="-g -O2" |
1324 | else | |
cd9e5e7c | 1325 | CFLAGS="-g" |
81814e35 | 1326 | fi |
3723cad9 | 1327 | else |
cd9e5e7c MK |
1328 | if test "$GCC" = yes; then |
1329 | CFLAGS="-O2" | |
1330 | else | |
1331 | CFLAGS= | |
1332 | fi | |
e9a25f70 JL |
1333 | fi |
1334 | ||
3ec83fc2 RH |
1335 | if test "x$CC" != xcc; then |
1336 | echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 | |
4c76f856 | 1337 | echo "configure:1338: checking whether $CC and cc understand -c and -o together" >&5 |
3ec83fc2 RH |
1338 | else |
1339 | echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 | |
4c76f856 | 1340 | echo "configure:1341: checking whether cc understands -c and -o together" >&5 |
3ec83fc2 RH |
1341 | fi |
1342 | set dummy $CC; ac_cc="`echo $2 | | |
1343 | sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" | |
1344 | if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then | |
1345 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1346 | else | |
1347 | echo 'foo(){}' > conftest.c | |
1348 | # Make sure it works both with $CC and with simple cc. | |
1349 | # We do the test twice because some compilers refuse to overwrite an | |
1350 | # existing .o file with -o, though they will create one. | |
1351 | ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' | |
4c76f856 JJ |
1352 | if { (eval echo configure:1353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && |
1353 | test -f conftest.o && { (eval echo configure:1354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; | |
3ec83fc2 RH |
1354 | then |
1355 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
1356 | if test "x$CC" != xcc; then | |
1357 | # Test first that cc exists at all. | |
4c76f856 | 1358 | if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then |
3ec83fc2 | 1359 | ac_try='cc -c conftest.c -o conftest.o 1>&5' |
4c76f856 JJ |
1360 | if { (eval echo configure:1361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && |
1361 | test -f conftest.o && { (eval echo configure:1362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; | |
3ec83fc2 RH |
1362 | then |
1363 | # cc works too. | |
1364 | : | |
1365 | else | |
1366 | # cc exists but doesn't like -o. | |
1367 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
1368 | fi | |
1369 | fi | |
1370 | fi | |
1371 | else | |
1372 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
1373 | fi | |
1374 | rm -f conftest* | |
1375 | ||
1376 | fi | |
1377 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then | |
1378 | echo "$ac_t""yes" 1>&6 | |
1379 | else | |
1380 | echo "$ac_t""no" 1>&6 | |
1381 | cat >> confdefs.h <<\EOF | |
1382 | #define NO_MINUS_C_MINUS_O 1 | |
1383 | EOF | |
1384 | ||
1385 | fi | |
1386 | ||
b8dad04b | 1387 | # autoconf is lame and doesn't give us any substitution variable for this. |
e38df833 | 1388 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then |
b4c7e567 | 1389 | NO_MINUS_C_MINUS_O=yes |
b8dad04b ZW |
1390 | else |
1391 | OUTPUT_OPTION='-o $@' | |
b4c7e567 | 1392 | fi |
3ec83fc2 RH |
1393 | |
1394 | ||
b8dad04b | 1395 | |
200ef634 GK |
1396 | # See if GNAT has been installed |
1397 | if test $host != $build; then | |
1398 | ac_tool_prefix=${host_alias}- | |
1399 | else | |
1400 | ac_tool_prefix= | |
1401 | fi | |
1402 | ||
1403 | ||
1404 | # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args. | |
1405 | set dummy ${ac_tool_prefix}gnatbind; ac_word=$2 | |
1406 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
4c76f856 | 1407 | echo "configure:1408: checking for $ac_word" >&5 |
200ef634 GK |
1408 | if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then |
1409 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1410 | else | |
1411 | if test -n "$GNATBIND"; then | |
1412 | ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test. | |
1413 | else | |
1414 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1415 | ac_dummy="$PATH" | |
1416 | for ac_dir in $ac_dummy; do | |
1417 | test -z "$ac_dir" && ac_dir=. | |
1418 | if test -f $ac_dir/$ac_word; then | |
1419 | ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind" | |
1420 | break | |
1421 | fi | |
1422 | done | |
1423 | IFS="$ac_save_ifs" | |
1424 | fi | |
1425 | fi | |
1426 | GNATBIND="$ac_cv_prog_GNATBIND" | |
1427 | if test -n "$GNATBIND"; then | |
1428 | echo "$ac_t""$GNATBIND" 1>&6 | |
1429 | else | |
1430 | echo "$ac_t""no" 1>&6 | |
1431 | fi | |
1432 | ||
1433 | ||
1434 | if test -z "$ac_cv_prog_GNATBIND"; then | |
1435 | if test -n "$ac_tool_prefix"; then | |
1436 | # Extract the first word of "gnatbind", so it can be a program name with args. | |
1437 | set dummy gnatbind; ac_word=$2 | |
1438 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
4c76f856 | 1439 | echo "configure:1440: checking for $ac_word" >&5 |
200ef634 GK |
1440 | if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then |
1441 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1442 | else | |
1443 | if test -n "$GNATBIND"; then | |
1444 | ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test. | |
1445 | else | |
1446 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1447 | ac_dummy="$PATH" | |
1448 | for ac_dir in $ac_dummy; do | |
1449 | test -z "$ac_dir" && ac_dir=. | |
1450 | if test -f $ac_dir/$ac_word; then | |
1451 | ac_cv_prog_GNATBIND="gnatbind" | |
1452 | break | |
1453 | fi | |
1454 | done | |
1455 | IFS="$ac_save_ifs" | |
1456 | test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no" | |
1457 | fi | |
1458 | fi | |
1459 | GNATBIND="$ac_cv_prog_GNATBIND" | |
1460 | if test -n "$GNATBIND"; then | |
1461 | echo "$ac_t""$GNATBIND" 1>&6 | |
1462 | else | |
1463 | echo "$ac_t""no" 1>&6 | |
1464 | fi | |
1465 | ||
1466 | else | |
1467 | GNATBIND="no" | |
1468 | fi | |
1469 | fi | |
1470 | ||
1471 | echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6 | |
4c76f856 | 1472 | echo "configure:1473: checking for compiler driver that understands Ada" >&5 |
200ef634 GK |
1473 | if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then |
1474 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1475 | else | |
1476 | cat >conftest.adb <<EOF | |
1477 | procedure conftest is begin null; end conftest; | |
1478 | EOF | |
1479 | gcc_cv_prog_adac=no | |
1480 | # Have to do ac_tool_prefix and user overrides by hand. | |
1481 | user_adac=$ADAC | |
1482 | user_cc=$CC | |
1483 | for cand in ${ac_tool_prefix}$user_adac $user_adac \ | |
1484 | ${ac_tool_prefix}$user_cc $user_cc \ | |
1485 | ${ac_tool_prefix}gcc gcc \ | |
1486 | ${ac_tool_prefix}cc cc \ | |
1487 | ${ac_tool_prefix}gnatgcc gnatgcc \ | |
1488 | ${ac_tool_prefix}gnatcc gnatcc \ | |
1489 | ${ac_tool_prefix}adagcc adagcc \ | |
1490 | ${ac_tool_prefix}adacc adacc ; do | |
1491 | # There is a bug in all released versions of GCC which causes the | |
1492 | # driver to exit successfully when the appropriate language module | |
1493 | # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1. | |
1494 | # Therefore we must check for the error message as well as an | |
1495 | # unsuccessful exit. | |
1496 | errors=`($cand -c conftest.adb) 2>&1 || echo failure` | |
1497 | if test x"$errors" = x; then | |
1498 | gcc_cv_prog_adac=$cand | |
1499 | break | |
1500 | fi | |
1501 | done | |
1502 | rm -f conftest.* | |
1503 | fi | |
1504 | ||
1505 | echo "$ac_t""$gcc_cv_prog_adac" 1>&6 | |
1506 | ADAC=$gcc_cv_prog_adac | |
1507 | ||
1508 | ||
1509 | if test x$GNATBIND != xno && test x$ADAC != xno; then | |
1510 | have_gnat=yes | |
1511 | else | |
1512 | have_gnat=no | |
1513 | fi | |
1514 | ||
1515 | ||
75e93faa | 1516 | echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6 |
4c76f856 | 1517 | echo "configure:1518: checking whether ${CC-cc} accepts -Wno-long-long" >&5 |
75e93faa ZW |
1518 | if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then |
1519 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1520 | else | |
1521 | save_CFLAGS="$CFLAGS" | |
1522 | CFLAGS="-Wno-long-long" | |
1523 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 1524 | #line 1525 "configure" |
75e93faa ZW |
1525 | #include "confdefs.h" |
1526 | ||
1527 | int main() { | |
1528 | ||
1529 | ; return 0; } | |
1530 | EOF | |
4c76f856 | 1531 | if { (eval echo configure:1532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1532 | rm -rf conftest* |
1533 | ac_cv_prog_cc_no_long_long=yes | |
1534 | else | |
1535 | echo "configure: failed program was:" >&5 | |
1536 | cat conftest.$ac_ext >&5 | |
1537 | rm -rf conftest* | |
1538 | ac_cv_prog_cc_no_long_long=no | |
1539 | fi | |
1540 | rm -f conftest* | |
1541 | CFLAGS="$save_CFLAGS" | |
1542 | fi | |
1543 | ||
1544 | echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6 | |
200ef634 GK |
1545 | |
1546 | if test x$have_gnat != xno ; then | |
1547 | echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6 | |
4c76f856 | 1548 | echo "configure:1549: checking whether ${ADAC} accepts -Wno-long-long" >&5 |
200ef634 GK |
1549 | if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then |
1550 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1551 | else | |
1552 | cat >conftest.adb <<EOF | |
1553 | procedure conftest is begin null; end conftest; | |
1554 | EOF | |
1555 | if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then | |
1556 | ac_cv_prog_adac_no_long_long=yes | |
1557 | else | |
1558 | ac_cv_prog_adac_no_long_long=no | |
1559 | fi | |
1560 | rm -f conftest* | |
1561 | fi | |
1562 | ||
1563 | echo "$ac_t""$ac_cv_prog_adac_no_long_long" 1>&6 | |
1564 | else | |
1565 | ac_cv_prog_adac_no_long_long=yes | |
1566 | fi | |
1567 | ||
75e93faa | 1568 | strict1_warn= |
200ef634 GK |
1569 | if test $ac_cv_prog_cc_no_long_long = yes && \ |
1570 | test $ac_cv_prog_adac_no_long_long = yes ; then | |
75e93faa ZW |
1571 | strict1_warn="-pedantic -Wno-long-long" |
1572 | fi | |
1573 | ||
1574 | ||
84c041a1 | 1575 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
4c76f856 | 1576 | echo "configure:1577: checking how to run the C preprocessor" >&5 |
84c041a1 ZW |
1577 | # On Suns, sometimes $CPP names a directory. |
1578 | if test -n "$CPP" && test -d "$CPP"; then | |
1579 | CPP= | |
1580 | fi | |
1581 | if test -z "$CPP"; then | |
1582 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
1583 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1584 | else | |
1585 | # This must be in double quotes, not single quotes, because CPP may get | |
1586 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
1587 | CPP="${CC-cc} -E" | |
1588 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
1589 | # not just through cpp. | |
1590 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 1591 | #line 1592 "configure" |
84c041a1 ZW |
1592 | #include "confdefs.h" |
1593 | #include <assert.h> | |
1594 | Syntax Error | |
1595 | EOF | |
1596 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4c76f856 | 1597 | { (eval echo configure:1598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
84c041a1 ZW |
1598 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1599 | if test -z "$ac_err"; then | |
1600 | : | |
1601 | else | |
1602 | echo "$ac_err" >&5 | |
1603 | echo "configure: failed program was:" >&5 | |
1604 | cat conftest.$ac_ext >&5 | |
1605 | rm -rf conftest* | |
1606 | CPP="${CC-cc} -E -traditional-cpp" | |
1607 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 1608 | #line 1609 "configure" |
84c041a1 ZW |
1609 | #include "confdefs.h" |
1610 | #include <assert.h> | |
1611 | Syntax Error | |
1612 | EOF | |
1613 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4c76f856 | 1614 | { (eval echo configure:1615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
84c041a1 ZW |
1615 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1616 | if test -z "$ac_err"; then | |
1617 | : | |
1618 | else | |
1619 | echo "$ac_err" >&5 | |
1620 | echo "configure: failed program was:" >&5 | |
1621 | cat conftest.$ac_ext >&5 | |
1622 | rm -rf conftest* | |
1623 | CPP="${CC-cc} -nologo -E" | |
1624 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 1625 | #line 1626 "configure" |
84c041a1 ZW |
1626 | #include "confdefs.h" |
1627 | #include <assert.h> | |
1628 | Syntax Error | |
1629 | EOF | |
1630 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4c76f856 | 1631 | { (eval echo configure:1632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
84c041a1 ZW |
1632 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1633 | if test -z "$ac_err"; then | |
1634 | : | |
1635 | else | |
1636 | echo "$ac_err" >&5 | |
1637 | echo "configure: failed program was:" >&5 | |
1638 | cat conftest.$ac_ext >&5 | |
1639 | rm -rf conftest* | |
1640 | CPP=/lib/cpp | |
1641 | fi | |
1642 | rm -f conftest* | |
1643 | fi | |
1644 | rm -f conftest* | |
1645 | fi | |
1646 | rm -f conftest* | |
1647 | ac_cv_prog_CPP="$CPP" | |
1648 | fi | |
1649 | CPP="$ac_cv_prog_CPP" | |
1650 | else | |
1651 | ac_cv_prog_CPP="$CPP" | |
1652 | fi | |
1653 | echo "$ac_t""$CPP" 1>&6 | |
1654 | ||
75e93faa | 1655 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
4c76f856 | 1656 | echo "configure:1657: checking for inline" >&5 |
75e93faa ZW |
1657 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1658 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1659 | else | |
1660 | ac_cv_c_inline=no | |
1661 | for ac_kw in inline __inline__ __inline; do | |
1662 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 1663 | #line 1664 "configure" |
75e93faa ZW |
1664 | #include "confdefs.h" |
1665 | ||
1666 | int main() { | |
1667 | } $ac_kw foo() { | |
1668 | ; return 0; } | |
1669 | EOF | |
4c76f856 | 1670 | if { (eval echo configure:1671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1671 | rm -rf conftest* |
1672 | ac_cv_c_inline=$ac_kw; break | |
1673 | else | |
1674 | echo "configure: failed program was:" >&5 | |
1675 | cat conftest.$ac_ext >&5 | |
1676 | fi | |
1677 | rm -f conftest* | |
1678 | done | |
1679 | ||
1680 | fi | |
1681 | ||
1682 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1683 | case "$ac_cv_c_inline" in | |
1684 | inline | yes) ;; | |
1685 | no) cat >> confdefs.h <<\EOF | |
1686 | #define inline | |
1687 | EOF | |
1688 | ;; | |
1689 | *) cat >> confdefs.h <<EOF | |
1690 | #define inline $ac_cv_c_inline | |
1691 | EOF | |
1692 | ;; | |
1693 | esac | |
1694 | ||
1695 | echo $ac_n "checking for volatile""... $ac_c" 1>&6 | |
4c76f856 | 1696 | echo "configure:1697: checking for volatile" >&5 |
75e93faa ZW |
1697 | if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then |
1698 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1699 | else | |
1700 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 1701 | #line 1702 "configure" |
75e93faa ZW |
1702 | #include "confdefs.h" |
1703 | ||
1704 | int main() { | |
1705 | volatile int foo; | |
1706 | ; return 0; } | |
1707 | EOF | |
4c76f856 | 1708 | if { (eval echo configure:1709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1709 | rm -rf conftest* |
1710 | gcc_cv_c_volatile=yes | |
1711 | else | |
1712 | echo "configure: failed program was:" >&5 | |
1713 | cat conftest.$ac_ext >&5 | |
1714 | rm -rf conftest* | |
1715 | gcc_cv_c_volatile=no | |
1716 | fi | |
1717 | rm -f conftest* | |
1718 | fi | |
1719 | ||
1720 | echo "$ac_t""$gcc_cv_c_volatile" 1>&6 | |
1721 | if test $gcc_cv_c_volatile = yes ; then | |
1722 | cat >> confdefs.h <<\EOF | |
1723 | #define HAVE_VOLATILE 1 | |
1724 | EOF | |
1725 | ||
1726 | fi | |
1727 | ||
1728 | ||
04cabffc | 1729 | echo $ac_n "checking for long double""... $ac_c" 1>&6 |
4c76f856 | 1730 | echo "configure:1731: checking for long double" >&5 |
04cabffc KG |
1731 | if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then |
1732 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1733 | else | |
1734 | if test "$GCC" = yes; then | |
1735 | gcc_cv_c_long_double=yes | |
1736 | else | |
1737 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 1738 | #line 1739 "configure" |
04cabffc KG |
1739 | #include "confdefs.h" |
1740 | ||
1741 | int main() { | |
1742 | /* The Stardent Vistra knows sizeof(long double), but does not support it. */ | |
1743 | long double foo = 0.0; | |
1744 | /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ | |
1745 | switch (0) case 0: case (sizeof(long double) >= sizeof(double)):; | |
1746 | ; return 0; } | |
1747 | EOF | |
4c76f856 | 1748 | if { (eval echo configure:1749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
04cabffc KG |
1749 | rm -rf conftest* |
1750 | gcc_cv_c_long_double=yes | |
1751 | else | |
1752 | echo "configure: failed program was:" >&5 | |
1753 | cat conftest.$ac_ext >&5 | |
1754 | rm -rf conftest* | |
1755 | gcc_cv_c_long_double=no | |
1756 | fi | |
1757 | rm -f conftest* | |
1758 | fi | |
1759 | fi | |
1760 | ||
1761 | echo "$ac_t""$gcc_cv_c_long_double" 1>&6 | |
1762 | if test $gcc_cv_c_long_double = yes; then | |
1763 | cat >> confdefs.h <<\EOF | |
1764 | #define HAVE_LONG_DOUBLE 1 | |
1765 | EOF | |
1766 | ||
1767 | fi | |
1768 | ||
75e93faa | 1769 | echo $ac_n "checking for long long int""... $ac_c" 1>&6 |
4c76f856 | 1770 | echo "configure:1771: checking for long long int" >&5 |
75e93faa ZW |
1771 | if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then |
1772 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1773 | else | |
1774 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 1775 | #line 1776 "configure" |
75e93faa | 1776 | #include "confdefs.h" |
61842080 | 1777 | |
75e93faa ZW |
1778 | int main() { |
1779 | long long int i; | |
1780 | ; return 0; } | |
1781 | EOF | |
4c76f856 | 1782 | if { (eval echo configure:1783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1783 | rm -rf conftest* |
1784 | ac_cv_c_long_long=yes | |
1785 | else | |
1786 | echo "configure: failed program was:" >&5 | |
1787 | cat conftest.$ac_ext >&5 | |
1788 | rm -rf conftest* | |
1789 | ac_cv_c_long_long=no | |
1790 | fi | |
1791 | rm -f conftest* | |
1792 | fi | |
1793 | ||
1794 | echo "$ac_t""$ac_cv_c_long_long" 1>&6 | |
1795 | if test $ac_cv_c_long_long = yes; then | |
1796 | cat >> confdefs.h <<\EOF | |
1797 | #define HAVE_LONG_LONG 1 | |
1798 | EOF | |
1799 | ||
1800 | fi | |
1801 | echo $ac_n "checking for __int64""... $ac_c" 1>&6 | |
4c76f856 | 1802 | echo "configure:1803: checking for __int64" >&5 |
75e93faa | 1803 | if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then |
5c3bc9fb GK |
1804 | echo $ac_n "(cached) $ac_c" 1>&6 |
1805 | else | |
75e93faa | 1806 | cat > conftest.$ac_ext <<EOF |
4c76f856 | 1807 | #line 1808 "configure" |
5c3bc9fb GK |
1808 | #include "confdefs.h" |
1809 | ||
1810 | int main() { | |
75e93faa ZW |
1811 | __int64 i; |
1812 | ; return 0; } | |
1813 | EOF | |
4c76f856 | 1814 | if { (eval echo configure:1815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1815 | rm -rf conftest* |
1816 | ac_cv_c___int64=yes | |
1817 | else | |
1818 | echo "configure: failed program was:" >&5 | |
1819 | cat conftest.$ac_ext >&5 | |
1820 | rm -rf conftest* | |
1821 | ac_cv_c___int64=no | |
1822 | fi | |
1823 | rm -f conftest* | |
1824 | fi | |
5c3bc9fb | 1825 | |
75e93faa ZW |
1826 | echo "$ac_t""$ac_cv_c___int64" 1>&6 |
1827 | if test $ac_cv_c___int64 = yes; then | |
1828 | cat >> confdefs.h <<\EOF | |
1829 | #define HAVE___INT64 1 | |
1830 | EOF | |
1831 | ||
1832 | fi | |
1833 | ||
827ae6cf | 1834 | echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6 |
4c76f856 | 1835 | echo "configure:1836: checking for built-in _Bool" >&5 |
827ae6cf RO |
1836 | if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then |
1837 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1838 | else | |
1839 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 1840 | #line 1841 "configure" |
827ae6cf RO |
1841 | #include "confdefs.h" |
1842 | ||
1843 | int main() { | |
1844 | _Bool foo; | |
1845 | ; return 0; } | |
1846 | EOF | |
4c76f856 | 1847 | if { (eval echo configure:1848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
827ae6cf RO |
1848 | rm -rf conftest* |
1849 | gcc_cv_c__bool=yes | |
1850 | else | |
1851 | echo "configure: failed program was:" >&5 | |
1852 | cat conftest.$ac_ext >&5 | |
1853 | rm -rf conftest* | |
1854 | gcc_cv_c__bool=no | |
1855 | fi | |
1856 | rm -f conftest* | |
1857 | ||
1858 | fi | |
1859 | ||
1860 | echo "$ac_t""$gcc_cv_c__bool" 1>&6 | |
1861 | if test $gcc_cv_c__bool = yes; then | |
1862 | cat >> confdefs.h <<\EOF | |
1863 | #define HAVE__BOOL 1 | |
1864 | EOF | |
1865 | ||
1866 | fi | |
1867 | ||
75e93faa ZW |
1868 | |
1869 | # sizeof(char) is 1 by definition. | |
1870 | echo $ac_n "checking size of short""... $ac_c" 1>&6 | |
4c76f856 | 1871 | echo "configure:1872: checking size of short" >&5 |
75e93faa ZW |
1872 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
1873 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1874 | else | |
1875 | for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. | |
1876 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 1877 | #line 1878 "configure" |
75e93faa ZW |
1878 | #include "confdefs.h" |
1879 | #include "confdefs.h" | |
1880 | #include <sys/types.h> | |
1881 | ||
1882 | ||
1883 | int main() { | |
1884 | switch (0) case 0: case (sizeof (short) == $ac_size):; | |
5c3bc9fb GK |
1885 | ; return 0; } |
1886 | EOF | |
4c76f856 | 1887 | if { (eval echo configure:1888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5c3bc9fb | 1888 | rm -rf conftest* |
75e93faa | 1889 | ac_cv_sizeof_short=$ac_size |
ff5def20 | 1890 | else |
5c3bc9fb GK |
1891 | echo "configure: failed program was:" >&5 |
1892 | cat conftest.$ac_ext >&5 | |
75e93faa ZW |
1893 | fi |
1894 | rm -f conftest* | |
1895 | if test x$ac_cv_sizeof_short != x ; then break; fi | |
1896 | done | |
1897 | ||
1898 | fi | |
1899 | ||
1900 | if test x$ac_cv_sizeof_short = x ; then | |
1901 | { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } | |
1902 | fi | |
1903 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 | |
1904 | cat >> confdefs.h <<EOF | |
1905 | #define SIZEOF_SHORT $ac_cv_sizeof_short | |
1906 | EOF | |
1907 | ||
1908 | ||
1909 | echo $ac_n "checking size of int""... $ac_c" 1>&6 | |
4c76f856 | 1910 | echo "configure:1911: checking size of int" >&5 |
75e93faa ZW |
1911 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
1912 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1913 | else | |
1914 | for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. | |
1915 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 1916 | #line 1917 "configure" |
75e93faa ZW |
1917 | #include "confdefs.h" |
1918 | #include "confdefs.h" | |
1919 | #include <sys/types.h> | |
1920 | ||
1921 | ||
1922 | int main() { | |
1923 | switch (0) case 0: case (sizeof (int) == $ac_size):; | |
1924 | ; return 0; } | |
1925 | EOF | |
4c76f856 | 1926 | if { (eval echo configure:1927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5c3bc9fb | 1927 | rm -rf conftest* |
75e93faa ZW |
1928 | ac_cv_sizeof_int=$ac_size |
1929 | else | |
1930 | echo "configure: failed program was:" >&5 | |
1931 | cat conftest.$ac_ext >&5 | |
ff5def20 DA |
1932 | fi |
1933 | rm -f conftest* | |
75e93faa ZW |
1934 | if test x$ac_cv_sizeof_int != x ; then break; fi |
1935 | done | |
1936 | ||
5c3bc9fb GK |
1937 | fi |
1938 | ||
75e93faa ZW |
1939 | if test x$ac_cv_sizeof_int = x ; then |
1940 | { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } | |
1941 | fi | |
1942 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 | |
1943 | cat >> confdefs.h <<EOF | |
1944 | #define SIZEOF_INT $ac_cv_sizeof_int | |
1945 | EOF | |
1946 | ||
1947 | ||
1948 | echo $ac_n "checking size of long""... $ac_c" 1>&6 | |
4c76f856 | 1949 | echo "configure:1950: checking size of long" >&5 |
75e93faa ZW |
1950 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
1951 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1952 | else | |
1953 | for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. | |
1954 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 1955 | #line 1956 "configure" |
75e93faa ZW |
1956 | #include "confdefs.h" |
1957 | #include "confdefs.h" | |
1958 | #include <sys/types.h> | |
1959 | ||
1960 | ||
1961 | int main() { | |
1962 | switch (0) case 0: case (sizeof (long) == $ac_size):; | |
1963 | ; return 0; } | |
1964 | EOF | |
4c76f856 | 1965 | if { (eval echo configure:1966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1966 | rm -rf conftest* |
1967 | ac_cv_sizeof_long=$ac_size | |
1968 | else | |
1969 | echo "configure: failed program was:" >&5 | |
1970 | cat conftest.$ac_ext >&5 | |
1971 | fi | |
1972 | rm -f conftest* | |
1973 | if test x$ac_cv_sizeof_long != x ; then break; fi | |
1974 | done | |
1975 | ||
1976 | fi | |
1977 | ||
1978 | if test x$ac_cv_sizeof_long = x ; then | |
1979 | { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } | |
1980 | fi | |
1981 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 | |
1982 | cat >> confdefs.h <<EOF | |
1983 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
1984 | EOF | |
1985 | ||
1986 | ||
1987 | if test $ac_cv_c_long_long = yes; then | |
1988 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 | |
4c76f856 | 1989 | echo "configure:1990: checking size of long long" >&5 |
75e93faa ZW |
1990 | if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then |
1991 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1992 | else | |
1993 | for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. | |
1994 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 1995 | #line 1996 "configure" |
75e93faa ZW |
1996 | #include "confdefs.h" |
1997 | #include "confdefs.h" | |
1998 | #include <sys/types.h> | |
1999 | ||
2000 | ||
2001 | int main() { | |
2002 | switch (0) case 0: case (sizeof (long long) == $ac_size):; | |
2003 | ; return 0; } | |
2004 | EOF | |
4c76f856 | 2005 | if { (eval echo configure:2006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
2006 | rm -rf conftest* |
2007 | ac_cv_sizeof_long_long=$ac_size | |
2008 | else | |
2009 | echo "configure: failed program was:" >&5 | |
2010 | cat conftest.$ac_ext >&5 | |
2011 | fi | |
2012 | rm -f conftest* | |
2013 | if test x$ac_cv_sizeof_long_long != x ; then break; fi | |
2014 | done | |
2015 | ||
2016 | fi | |
2017 | ||
2018 | if test x$ac_cv_sizeof_long_long = x ; then | |
2019 | { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; } | |
2020 | fi | |
2021 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 | |
2022 | cat >> confdefs.h <<EOF | |
2023 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
2024 | EOF | |
2025 | ||
2026 | ||
b8dad04b | 2027 | fi |
75e93faa ZW |
2028 | if test $ac_cv_c___int64 = yes; then |
2029 | echo $ac_n "checking size of __int64""... $ac_c" 1>&6 | |
4c76f856 | 2030 | echo "configure:2031: checking size of __int64" >&5 |
75e93faa ZW |
2031 | if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then |
2032 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2033 | else | |
2034 | for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. | |
2035 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 2036 | #line 2037 "configure" |
75e93faa ZW |
2037 | #include "confdefs.h" |
2038 | #include "confdefs.h" | |
2039 | #include <sys/types.h> | |
b8dad04b | 2040 | |
ff5def20 | 2041 | |
75e93faa ZW |
2042 | int main() { |
2043 | switch (0) case 0: case (sizeof (__int64) == $ac_size):; | |
2044 | ; return 0; } | |
2045 | EOF | |
4c76f856 | 2046 | if { (eval echo configure:2047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
2047 | rm -rf conftest* |
2048 | ac_cv_sizeof___int64=$ac_size | |
2049 | else | |
2050 | echo "configure: failed program was:" >&5 | |
2051 | cat conftest.$ac_ext >&5 | |
2052 | fi | |
2053 | rm -f conftest* | |
2054 | if test x$ac_cv_sizeof___int64 != x ; then break; fi | |
2055 | done | |
2056 | ||
2057 | fi | |
2058 | ||
2059 | if test x$ac_cv_sizeof___int64 = x ; then | |
2060 | { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; } | |
2061 | fi | |
2062 | echo "$ac_t""$ac_cv_sizeof___int64" 1>&6 | |
2063 | cat >> confdefs.h <<EOF | |
2064 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 | |
2065 | EOF | |
2066 | ||
2067 | ||
2068 | fi | |
2069 | ||
84c041a1 | 2070 | echo $ac_n "checking execution character set""... $ac_c" 1>&6 |
4c76f856 | 2071 | echo "configure:2072: checking execution character set" >&5 |
84c041a1 ZW |
2072 | if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then |
2073 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2074 | else | |
2075 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 2076 | #line 2077 "configure" |
84c041a1 ZW |
2077 | #include "confdefs.h" |
2078 | #if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \ | |
2079 | && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21 | |
2080 | ASCII | |
2081 | #endif | |
2082 | EOF | |
2083 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2084 | egrep "ASCII" >/dev/null 2>&1; then | |
2085 | rm -rf conftest* | |
2086 | ac_cv_c_charset=ASCII | |
2087 | fi | |
2088 | rm -f conftest* | |
2089 | ||
2090 | if test x${ac_cv_c_charset+set} != xset; then | |
2091 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 2092 | #line 2093 "configure" |
84c041a1 ZW |
2093 | #include "confdefs.h" |
2094 | #if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \ | |
2095 | && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A | |
2096 | EBCDIC | |
2097 | #endif | |
2098 | EOF | |
2099 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2100 | egrep "EBCDIC" >/dev/null 2>&1; then | |
2101 | rm -rf conftest* | |
2102 | ac_cv_c_charset=EBCDIC | |
2103 | fi | |
2104 | rm -f conftest* | |
2105 | ||
2106 | fi | |
2107 | if test x${ac_cv_c_charset+set} != xset; then | |
2108 | ac_cv_c_charset=unknown | |
2109 | fi | |
2110 | fi | |
2111 | ||
2112 | echo "$ac_t""$ac_cv_c_charset" 1>&6 | |
2113 | if test $ac_cv_c_charset = unknown; then | |
2114 | { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; } | |
2115 | elif test $ac_cv_c_charset = EBCDIC; then | |
2116 | cat >> confdefs.h <<\EOF | |
2117 | #define HOST_EBCDIC 1 | |
2118 | EOF | |
2119 | ||
2120 | fi | |
84c041a1 | 2121 | |
61842080 MM |
2122 | # If the native compiler is GCC, we can enable warnings even in stage1. |
2123 | # That's useful for people building cross-compilers, or just running a | |
2124 | # quick `make'. | |
b8dad04b ZW |
2125 | warn_cflags= |
2126 | if test "x$GCC" = "xyes"; then | |
2127 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
61842080 MM |
2128 | fi |
2129 | ||
b8dad04b | 2130 | |
5b67ad6f | 2131 | # Stage specific cflags for build. |
b8dad04b | 2132 | stage1_cflags= |
5b67ad6f DA |
2133 | case $build in |
2134 | vax-*-*) | |
2135 | if test x$GCC = xyes | |
2136 | then | |
b8dad04b | 2137 | stage1_cflags="-Wa,-J" |
5b67ad6f | 2138 | else |
b8dad04b | 2139 | stage1_cflags="-J" |
5b67ad6f DA |
2140 | fi |
2141 | ;; | |
5dd8a9b1 ZW |
2142 | powerpc-*-darwin*) |
2143 | # The spiffy cpp-precomp chokes on some legitimate constructs in GCC | |
2144 | # sources; use -no-cpp-precomp to get to GNU cpp. | |
2145 | # Apple's GCC has bugs in designated initializer handling, so disable | |
2146 | # that too. | |
2147 | stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0" | |
2148 | ;; | |
5b67ad6f DA |
2149 | esac |
2150 | ||
2151 | ||
e9a25f70 | 2152 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 |
4c76f856 | 2153 | echo "configure:2154: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
e9a25f70 JL |
2154 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
2155 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
2156 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2157 | else | |
2158 | cat > conftestmake <<\EOF | |
2159 | all: | |
2160 | @echo 'ac_maketemp="${MAKE}"' | |
2161 | EOF | |
2162 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
2163 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
2164 | if test -n "$ac_maketemp"; then | |
2165 | eval ac_cv_prog_make_${ac_make}_set=yes | |
2166 | else | |
2167 | eval ac_cv_prog_make_${ac_make}_set=no | |
2168 | fi | |
2169 | rm -f conftestmake | |
2170 | fi | |
2171 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
2172 | echo "$ac_t""yes" 1>&6 | |
2173 | SET_MAKE= | |
2174 | else | |
2175 | echo "$ac_t""no" 1>&6 | |
2176 | SET_MAKE="MAKE=${MAKE-make}" | |
2177 | fi | |
2178 | ||
2179 | ||
ab339d62 | 2180 | echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6 |
4c76f856 | 2181 | echo "configure:2182: checking whether a default assembler was specified" >&5 |
3ccc3a56 | 2182 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
e154a394 | 2183 | if test x"$gas_flag" = x"no"; then |
3ccc3a56 | 2184 | echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6 |
ab339d62 | 2185 | else |
3ccc3a56 | 2186 | echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6 |
ab339d62 AO |
2187 | fi |
2188 | else | |
2189 | echo "$ac_t""no" 1>&6 | |
2190 | fi | |
2191 | ||
2192 | echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6 | |
4c76f856 | 2193 | echo "configure:2194: checking whether a default linker was specified" >&5 |
3ccc3a56 | 2194 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
e154a394 | 2195 | if test x"$gnu_ld_flag" = x"no"; then |
3ccc3a56 | 2196 | echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6 |
ab339d62 | 2197 | else |
3ccc3a56 | 2198 | echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6 |
ab339d62 AO |
2199 | fi |
2200 | else | |
2201 | echo "$ac_t""no" 1>&6 | |
2202 | fi | |
2203 | ||
4070d885 | 2204 | echo $ac_n "checking for GNU C library""... $ac_c" 1>&6 |
4c76f856 | 2205 | echo "configure:2206: checking for GNU C library" >&5 |
4070d885 AJ |
2206 | if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then |
2207 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2208 | else | |
2209 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 2210 | #line 2211 "configure" |
4070d885 AJ |
2211 | #include "confdefs.h" |
2212 | #include <features.h> | |
2213 | int main() { | |
2214 | ||
2215 | #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
2216 | #error Not a GNU C library system | |
2217 | #endif | |
2218 | ; return 0; } | |
2219 | EOF | |
4c76f856 | 2220 | if { (eval echo configure:2221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
4070d885 AJ |
2221 | rm -rf conftest* |
2222 | gcc_cv_glibc=yes | |
2223 | else | |
2224 | echo "configure: failed program was:" >&5 | |
2225 | cat conftest.$ac_ext >&5 | |
2226 | rm -rf conftest* | |
2227 | gcc_cv_glibc=no | |
2228 | fi | |
2229 | rm -f conftest* | |
2230 | fi | |
2231 | ||
2232 | echo "$ac_t""$gcc_cv_glibc" 1>&6 | |
c2f7d403 | 2233 | if test $gcc_cv_glibc = yes; then |
4070d885 AJ |
2234 | cat >> confdefs.h <<\EOF |
2235 | #define _GNU_SOURCE 1 | |
2236 | EOF | |
2237 | ||
2238 | fi | |
2239 | ||
861bb6c1 | 2240 | # Find some useful tools |
a15135c9 | 2241 | for ac_prog in gawk mawk nawk awk |
861bb6c1 JL |
2242 | do |
2243 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2244 | set dummy $ac_prog; ac_word=$2 | |
2245 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
4c76f856 | 2246 | echo "configure:2247: checking for $ac_word" >&5 |
861bb6c1 JL |
2247 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
2248 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2249 | else | |
2250 | if test -n "$AWK"; then | |
2251 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
2252 | else | |
cd9e5e7c | 2253 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
2254 | ac_dummy="$PATH" |
2255 | for ac_dir in $ac_dummy; do | |
861bb6c1 JL |
2256 | test -z "$ac_dir" && ac_dir=. |
2257 | if test -f $ac_dir/$ac_word; then | |
2258 | ac_cv_prog_AWK="$ac_prog" | |
2259 | break | |
2260 | fi | |
2261 | done | |
2262 | IFS="$ac_save_ifs" | |
2263 | fi | |
2264 | fi | |
2265 | AWK="$ac_cv_prog_AWK" | |
2266 | if test -n "$AWK"; then | |
2267 | echo "$ac_t""$AWK" 1>&6 | |
2268 | else | |
2269 | echo "$ac_t""no" 1>&6 | |
2270 | fi | |
2271 | ||
2272 | test -n "$AWK" && break | |
2273 | done | |
2274 | ||
0a4b6309 | 2275 | echo $ac_n "checking whether ln works""... $ac_c" 1>&6 |
4c76f856 | 2276 | echo "configure:2277: checking whether ln works" >&5 |
0a4b6309 RL |
2277 | if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then |
2278 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2279 | else | |
2280 | rm -f conftestdata_t | |
2281 | echo >conftestdata_f | |
2282 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
2283 | then | |
2284 | gcc_cv_prog_LN="ln" | |
2285 | else | |
2286 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
2287 | then | |
2288 | gcc_cv_prog_LN="ln -s" | |
2289 | else | |
2290 | gcc_cv_prog_LN=cp | |
2291 | fi | |
2292 | fi | |
2293 | rm -f conftestdata_f conftestdata_t | |
2294 | ||
2295 | fi | |
2296 | LN="$gcc_cv_prog_LN" | |
2297 | if test "$gcc_cv_prog_LN" = "ln"; then | |
2298 | echo "$ac_t""yes" 1>&6 | |
2299 | else | |
2300 | if test "$gcc_cv_prog_LN" = "ln -s"; then | |
2301 | echo "$ac_t""no, using ln -s" 1>&6 | |
2302 | else | |
2303 | echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6 | |
2304 | fi | |
2305 | fi | |
2306 | ||
2307 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 | |
4c76f856 | 2308 | echo "configure:2309: checking whether ln -s works" >&5 |
0a4b6309 RL |
2309 | if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then |
2310 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2311 | else | |
2312 | rm -f conftestdata_t | |
2313 | echo >conftestdata_f | |
2314 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
2315 | then | |
2316 | gcc_cv_prog_LN_S="ln -s" | |
2317 | else | |
2318 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
2319 | then | |
2320 | gcc_cv_prog_LN_S=ln | |
2321 | else | |
2322 | gcc_cv_prog_LN_S=cp | |
2323 | fi | |
2324 | fi | |
2325 | rm -f conftestdata_f conftestdata_t | |
2326 | ||
2327 | fi | |
2328 | LN_S="$gcc_cv_prog_LN_S" | |
2329 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
2330 | echo "$ac_t""yes" 1>&6 | |
2331 | else | |
2332 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
2333 | echo "$ac_t""no, using ln" 1>&6 | |
2334 | else | |
2335 | echo "$ac_t""no, and neither does ln, so using cp" 1>&6 | |
2336 | fi | |
2337 | fi | |
2338 | ||
861bb6c1 JL |
2339 | # Extract the first word of "ranlib", so it can be a program name with args. |
2340 | set dummy ranlib; ac_word=$2 | |
2341 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
4c76f856 | 2342 | echo "configure:2343: checking for $ac_word" >&5 |
861bb6c1 JL |
2343 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
2344 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2345 | else | |
2346 | if test -n "$RANLIB"; then | |
2347 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2348 | else | |
cd9e5e7c | 2349 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
2350 | ac_dummy="$PATH" |
2351 | for ac_dir in $ac_dummy; do | |
861bb6c1 JL |
2352 | test -z "$ac_dir" && ac_dir=. |
2353 | if test -f $ac_dir/$ac_word; then | |
2354 | ac_cv_prog_RANLIB="ranlib" | |
2355 | break | |
2356 | fi | |
2357 | done | |
2358 | IFS="$ac_save_ifs" | |
2359 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
2360 | fi | |
2361 | fi | |
2362 | RANLIB="$ac_cv_prog_RANLIB" | |
2363 | if test -n "$RANLIB"; then | |
2364 | echo "$ac_t""$RANLIB" 1>&6 | |
2365 | else | |
2366 | echo "$ac_t""no" 1>&6 | |
2367 | fi | |
2368 | ||
0a4b6309 RL |
2369 | # Find a good install program. We prefer a C program (faster), |
2370 | # so one script is as good as another. But avoid the broken or | |
2371 | # incompatible versions: | |
2372 | # SysV /etc/install, /usr/sbin/install | |
2373 | # SunOS /usr/etc/install | |
2374 | # IRIX /sbin/install | |
2375 | # AIX /bin/install | |
2376 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2377 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2378 | # ./install, which can be erroneously created by make from ./install.sh. | |
2379 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
4c76f856 | 2380 | echo "configure:2381: checking for a BSD compatible install" >&5 |
0a4b6309 RL |
2381 | if test -z "$INSTALL"; then |
2382 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
2383 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2384 | else | |
2385 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
2386 | for ac_dir in $PATH; do | |
2387 | # Account for people who put trailing slashes in PATH elements. | |
2388 | case "$ac_dir/" in | |
2389 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
2390 | *) | |
2391 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2392 | for ac_prog in ginstall scoinst install; do | |
2393 | if test -f $ac_dir/$ac_prog; then | |
2394 | if test $ac_prog = install && | |
2395 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
2396 | # AIX install. It has an incompatible calling convention. | |
2397 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
2398 | : | |
2399 | else | |
2400 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
2401 | break 2 | |
2402 | fi | |
2403 | fi | |
2404 | done | |
2405 | ;; | |
2406 | esac | |
2407 | done | |
2408 | IFS="$ac_save_IFS" | |
2409 | ||
2410 | fi | |
2411 | if test "${ac_cv_path_install+set}" = set; then | |
2412 | INSTALL="$ac_cv_path_install" | |
2413 | else | |
2414 | # As a last resort, use the slow shell script. We don't cache a | |
2415 | # path for INSTALL within a source directory, because that will | |
2416 | # break other packages using the cache if that directory is | |
2417 | # removed, or if the path is relative. | |
2418 | INSTALL="$ac_install_sh" | |
2419 | fi | |
2420 | fi | |
2421 | echo "$ac_t""$INSTALL" 1>&6 | |
2422 | ||
2423 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
2424 | # It thinks the first close brace ends the variable substitution. | |
2425 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
2426 | ||
2427 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
2428 | ||
861bb6c1 | 2429 | |
956d6950 | 2430 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
4c76f856 | 2431 | echo "configure:2432: checking for ANSI C header files" >&5 |
956d6950 JL |
2432 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
2433 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2434 | else | |
2435 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 2436 | #line 2437 "configure" |
956d6950 JL |
2437 | #include "confdefs.h" |
2438 | #include <stdlib.h> | |
2439 | #include <stdarg.h> | |
2440 | #include <string.h> | |
2441 | #include <float.h> | |
2442 | EOF | |
2443 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4c76f856 | 2444 | { (eval echo configure:2445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 2445 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
956d6950 JL |
2446 | if test -z "$ac_err"; then |
2447 | rm -rf conftest* | |
2448 | ac_cv_header_stdc=yes | |
2449 | else | |
2450 | echo "$ac_err" >&5 | |
2451 | echo "configure: failed program was:" >&5 | |
2452 | cat conftest.$ac_ext >&5 | |
2453 | rm -rf conftest* | |
2454 | ac_cv_header_stdc=no | |
2455 | fi | |
2456 | rm -f conftest* | |
2457 | ||
2458 | if test $ac_cv_header_stdc = yes; then | |
2459 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
2460 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 2461 | #line 2462 "configure" |
956d6950 JL |
2462 | #include "confdefs.h" |
2463 | #include <string.h> | |
2464 | EOF | |
2465 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2466 | egrep "memchr" >/dev/null 2>&1; then | |
2467 | : | |
2468 | else | |
2469 | rm -rf conftest* | |
2470 | ac_cv_header_stdc=no | |
2471 | fi | |
2472 | rm -f conftest* | |
2473 | ||
2474 | fi | |
2475 | ||
2476 | if test $ac_cv_header_stdc = yes; then | |
2477 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
2478 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 2479 | #line 2480 "configure" |
956d6950 JL |
2480 | #include "confdefs.h" |
2481 | #include <stdlib.h> | |
2482 | EOF | |
2483 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2484 | egrep "free" >/dev/null 2>&1; then | |
2485 | : | |
2486 | else | |
2487 | rm -rf conftest* | |
2488 | ac_cv_header_stdc=no | |
2489 | fi | |
2490 | rm -f conftest* | |
2491 | ||
2492 | fi | |
2493 | ||
2494 | if test $ac_cv_header_stdc = yes; then | |
2495 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
2496 | if test "$cross_compiling" = yes; then | |
2497 | : | |
2498 | else | |
2499 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 2500 | #line 2501 "configure" |
956d6950 JL |
2501 | #include "confdefs.h" |
2502 | #include <ctype.h> | |
2503 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
2504 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
2505 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
2506 | int main () { int i; for (i = 0; i < 256; i++) | |
2507 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
2508 | exit (0); } | |
2509 | ||
2510 | EOF | |
4c76f856 | 2511 | if { (eval echo configure:2512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
956d6950 JL |
2512 | then |
2513 | : | |
2514 | else | |
2515 | echo "configure: failed program was:" >&5 | |
2516 | cat conftest.$ac_ext >&5 | |
2517 | rm -fr conftest* | |
2518 | ac_cv_header_stdc=no | |
2519 | fi | |
2520 | rm -fr conftest* | |
2521 | fi | |
2522 | ||
2523 | fi | |
2524 | fi | |
2525 | ||
2526 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
2527 | if test $ac_cv_header_stdc = yes; then | |
2528 | cat >> confdefs.h <<\EOF | |
2529 | #define STDC_HEADERS 1 | |
2530 | EOF | |
2531 | ||
2532 | fi | |
2533 | ||
2534 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 | |
4c76f856 | 2535 | echo "configure:2536: checking whether time.h and sys/time.h may both be included" >&5 |
956d6950 JL |
2536 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
2537 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2538 | else | |
2539 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 2540 | #line 2541 "configure" |
956d6950 JL |
2541 | #include "confdefs.h" |
2542 | #include <sys/types.h> | |
2543 | #include <sys/time.h> | |
2544 | #include <time.h> | |
2545 | int main() { | |
2546 | struct tm *tp; | |
2547 | ; return 0; } | |
2548 | EOF | |
4c76f856 | 2549 | if { (eval echo configure:2550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
956d6950 JL |
2550 | rm -rf conftest* |
2551 | ac_cv_header_time=yes | |
2552 | else | |
2553 | echo "configure: failed program was:" >&5 | |
2554 | cat conftest.$ac_ext >&5 | |
2555 | rm -rf conftest* | |
2556 | ac_cv_header_time=no | |
2557 | fi | |
2558 | rm -f conftest* | |
2559 | fi | |
2560 | ||
2561 | echo "$ac_t""$ac_cv_header_time" 1>&6 | |
2562 | if test $ac_cv_header_time = yes; then | |
2563 | cat >> confdefs.h <<\EOF | |
2564 | #define TIME_WITH_SYS_TIME 1 | |
2565 | EOF | |
2566 | ||
2567 | fi | |
2568 | ||
827ae6cf | 2569 | echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6 |
4c76f856 | 2570 | echo "configure:2571: checking for working stdbool.h" >&5 |
827ae6cf RO |
2571 | if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then |
2572 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2573 | else | |
2574 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 2575 | #line 2576 "configure" |
827ae6cf RO |
2576 | #include "confdefs.h" |
2577 | #include <stdbool.h> | |
2578 | int main() { | |
2579 | bool foo = false; | |
2580 | ; return 0; } | |
2581 | EOF | |
4c76f856 | 2582 | if { (eval echo configure:2583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
827ae6cf RO |
2583 | rm -rf conftest* |
2584 | ac_cv_header_stdbool_h=yes | |
2585 | else | |
2586 | echo "configure: failed program was:" >&5 | |
2587 | cat conftest.$ac_ext >&5 | |
2588 | rm -rf conftest* | |
2589 | ac_cv_header_stdbool_h=no | |
2590 | fi | |
2591 | rm -f conftest* | |
2592 | fi | |
2593 | ||
2594 | echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6 | |
2595 | if test $ac_cv_header_stdbool_h = yes; then | |
2596 | cat >> confdefs.h <<\EOF | |
2597 | #define HAVE_STDBOOL_H 1 | |
2598 | EOF | |
2599 | ||
2600 | fi | |
2601 | ||
0a4b6309 | 2602 | echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6 |
4c76f856 | 2603 | echo "configure:2604: checking whether string.h and strings.h may both be included" >&5 |
0a4b6309 RL |
2604 | if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then |
2605 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2606 | else | |
2607 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 2608 | #line 2609 "configure" |
0a4b6309 RL |
2609 | #include "confdefs.h" |
2610 | #include <string.h> | |
2611 | #include <strings.h> | |
2612 | int main() { | |
2613 | ||
2614 | ; return 0; } | |
2615 | EOF | |
4c76f856 | 2616 | if { (eval echo configure:2617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0a4b6309 RL |
2617 | rm -rf conftest* |
2618 | gcc_cv_header_string=yes | |
2619 | else | |
2620 | echo "configure: failed program was:" >&5 | |
2621 | cat conftest.$ac_ext >&5 | |
2622 | rm -rf conftest* | |
2623 | gcc_cv_header_string=no | |
2624 | fi | |
2625 | rm -f conftest* | |
2626 | fi | |
2627 | ||
2628 | echo "$ac_t""$gcc_cv_header_string" 1>&6 | |
2629 | if test $gcc_cv_header_string = yes; then | |
2630 | cat >> confdefs.h <<\EOF | |
2631 | #define STRING_WITH_STRINGS 1 | |
2632 | EOF | |
2633 | ||
2634 | fi | |
2635 | ||
e9831ca0 | 2636 | echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 |
4c76f856 | 2637 | echo "configure:2638: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
e9831ca0 KG |
2638 | if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then |
2639 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2640 | else | |
2641 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 2642 | #line 2643 "configure" |
e9831ca0 KG |
2643 | #include "confdefs.h" |
2644 | #include <sys/types.h> | |
2645 | #include <sys/wait.h> | |
2646 | #ifndef WEXITSTATUS | |
2647 | #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) | |
2648 | #endif | |
2649 | #ifndef WIFEXITED | |
2650 | #define WIFEXITED(stat_val) (((stat_val) & 255) == 0) | |
2651 | #endif | |
2652 | int main() { | |
2653 | int s; | |
2654 | wait (&s); | |
2655 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
2656 | ; return 0; } | |
2657 | EOF | |
4c76f856 | 2658 | if { (eval echo configure:2659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
e9831ca0 KG |
2659 | rm -rf conftest* |
2660 | ac_cv_header_sys_wait_h=yes | |
2661 | else | |
2662 | echo "configure: failed program was:" >&5 | |
2663 | cat conftest.$ac_ext >&5 | |
2664 | rm -rf conftest* | |
2665 | ac_cv_header_sys_wait_h=no | |
2666 | fi | |
2667 | rm -f conftest* | |
2668 | fi | |
2669 | ||
2670 | echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 | |
2671 | if test $ac_cv_header_sys_wait_h = yes; then | |
2672 | cat >> confdefs.h <<\EOF | |
2673 | #define HAVE_SYS_WAIT_H 1 | |
2674 | EOF | |
2675 | ||
2676 | fi | |
2677 | ||
03c41c05 | 2678 | for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \ |
7719ffbf | 2679 | fcntl.h unistd.h sys/file.h sys/time.h \ |
03c41c05 | 2680 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
f91abfce | 2681 | direct.h malloc.h langinfo.h |
861bb6c1 JL |
2682 | do |
2683 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2684 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
4c76f856 | 2685 | echo "configure:2686: checking for $ac_hdr" >&5 |
861bb6c1 JL |
2686 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2687 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2688 | else | |
2689 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 2690 | #line 2691 "configure" |
861bb6c1 JL |
2691 | #include "confdefs.h" |
2692 | #include <$ac_hdr> | |
2693 | EOF | |
956d6950 | 2694 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
4c76f856 | 2695 | { (eval echo configure:2696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 2696 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
956d6950 JL |
2697 | if test -z "$ac_err"; then |
2698 | rm -rf conftest* | |
2699 | eval "ac_cv_header_$ac_safe=yes" | |
2700 | else | |
2701 | echo "$ac_err" >&5 | |
2702 | echo "configure: failed program was:" >&5 | |
2703 | cat conftest.$ac_ext >&5 | |
2704 | rm -rf conftest* | |
2705 | eval "ac_cv_header_$ac_safe=no" | |
2706 | fi | |
2707 | rm -f conftest* | |
2708 | fi | |
2709 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2710 | echo "$ac_t""yes" 1>&6 | |
2711 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2712 | cat >> confdefs.h <<EOF | |
2713 | #define $ac_tr_hdr 1 | |
2714 | EOF | |
2715 | ||
2716 | else | |
2717 | echo "$ac_t""no" 1>&6 | |
2718 | fi | |
2719 | done | |
2720 | ||
2721 | ||
f24af81b TT |
2722 | # Check for thread headers. |
2723 | ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'` | |
2724 | echo $ac_n "checking for thread.h""... $ac_c" 1>&6 | |
4c76f856 | 2725 | echo "configure:2726: checking for thread.h" >&5 |
f24af81b TT |
2726 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2727 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2728 | else | |
2729 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 2730 | #line 2731 "configure" |
f24af81b TT |
2731 | #include "confdefs.h" |
2732 | #include <thread.h> | |
2733 | EOF | |
2734 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4c76f856 | 2735 | { (eval echo configure:2736: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 2736 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
f24af81b TT |
2737 | if test -z "$ac_err"; then |
2738 | rm -rf conftest* | |
2739 | eval "ac_cv_header_$ac_safe=yes" | |
2740 | else | |
2741 | echo "$ac_err" >&5 | |
2742 | echo "configure: failed program was:" >&5 | |
2743 | cat conftest.$ac_ext >&5 | |
2744 | rm -rf conftest* | |
2745 | eval "ac_cv_header_$ac_safe=no" | |
2746 | fi | |
2747 | rm -f conftest* | |
2748 | fi | |
2749 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2750 | echo "$ac_t""yes" 1>&6 | |
2751 | have_thread_h=yes | |
2752 | else | |
2753 | echo "$ac_t""no" 1>&6 | |
2754 | have_thread_h= | |
2755 | fi | |
2756 | ||
2757 | ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'` | |
2758 | echo $ac_n "checking for pthread.h""... $ac_c" 1>&6 | |
4c76f856 | 2759 | echo "configure:2760: checking for pthread.h" >&5 |
f24af81b TT |
2760 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2761 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2762 | else | |
2763 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 2764 | #line 2765 "configure" |
f24af81b TT |
2765 | #include "confdefs.h" |
2766 | #include <pthread.h> | |
2767 | EOF | |
2768 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4c76f856 | 2769 | { (eval echo configure:2770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 2770 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
f24af81b TT |
2771 | if test -z "$ac_err"; then |
2772 | rm -rf conftest* | |
2773 | eval "ac_cv_header_$ac_safe=yes" | |
2774 | else | |
2775 | echo "$ac_err" >&5 | |
2776 | echo "configure: failed program was:" >&5 | |
2777 | cat conftest.$ac_ext >&5 | |
2778 | rm -rf conftest* | |
2779 | eval "ac_cv_header_$ac_safe=no" | |
2780 | fi | |
2781 | rm -f conftest* | |
2782 | fi | |
2783 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2784 | echo "$ac_t""yes" 1>&6 | |
2785 | have_pthread_h=yes | |
2786 | else | |
2787 | echo "$ac_t""no" 1>&6 | |
2788 | have_pthread_h= | |
2789 | fi | |
2790 | ||
2791 | ||
84c041a1 | 2792 | # These tests can't be done till we know if we have limits.h. |
75e93faa | 2793 | echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6 |
4c76f856 | 2794 | echo "configure:2795: checking for CHAR_BIT" >&5 |
75e93faa ZW |
2795 | if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then |
2796 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2797 | else | |
2798 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 2799 | #line 2800 "configure" |
75e93faa ZW |
2800 | #include "confdefs.h" |
2801 | #ifdef HAVE_LIMITS_H | |
2802 | #include <limits.h> | |
2803 | #endif | |
2804 | #ifdef CHAR_BIT | |
2805 | found | |
2806 | #endif | |
2807 | EOF | |
2808 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2809 | egrep "found" >/dev/null 2>&1; then | |
2810 | rm -rf conftest* | |
2811 | gcc_cv_decl_char_bit=yes | |
2812 | else | |
2813 | rm -rf conftest* | |
2814 | gcc_cv_decl_char_bit=no | |
2815 | fi | |
2816 | rm -f conftest* | |
2817 | ||
2818 | ||
2819 | fi | |
2820 | ||
2821 | echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6 | |
2822 | if test $gcc_cv_decl_char_bit = no; then | |
2823 | echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6 | |
4c76f856 | 2824 | echo "configure:2825: checking number of bits in a byte" >&5 |
75e93faa ZW |
2825 | if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then |
2826 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2827 | else | |
2828 | i=8 | |
2829 | gcc_cv_c_nbby= | |
2830 | while test $i -lt 65; do | |
2831 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 2832 | #line 2833 "configure" |
75e93faa ZW |
2833 | #include "confdefs.h" |
2834 | ||
2835 | int main() { | |
4e70264f ZW |
2836 | switch(0) { |
2837 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
2838 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
2839 | ; } | |
75e93faa ZW |
2840 | ; return 0; } |
2841 | EOF | |
4c76f856 | 2842 | if { (eval echo configure:2843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa | 2843 | rm -rf conftest* |
4e70264f | 2844 | gcc_cv_c_nbby=$i; break |
75e93faa ZW |
2845 | else |
2846 | echo "configure: failed program was:" >&5 | |
2847 | cat conftest.$ac_ext >&5 | |
2848 | fi | |
2849 | rm -f conftest* | |
2850 | i=`expr $i + 1` | |
2851 | done | |
2852 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
2853 | ||
2854 | fi | |
2855 | ||
2856 | echo "$ac_t""$gcc_cv_c_nbby" 1>&6 | |
2857 | if test $gcc_cv_c_nbby = failed; then | |
2858 | { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; } | |
2859 | else | |
2860 | cat >> confdefs.h <<EOF | |
2861 | #define CHAR_BIT $gcc_cv_c_nbby | |
2862 | EOF | |
2863 | ||
2864 | fi | |
2865 | fi | |
2d6eb5bf | 2866 | echo $ac_n "checking byte ordering""... $ac_c" 1>&6 |
4c76f856 | 2867 | echo "configure:2868: checking byte ordering" >&5 |
2d6eb5bf | 2868 | if eval "test \"`echo '$''{'ac_cv_c_compile_endian'+set}'`\" = set"; then |
84c041a1 ZW |
2869 | echo $ac_n "(cached) $ac_c" 1>&6 |
2870 | else | |
2d6eb5bf ZW |
2871 | ac_cv_c_compile_endian=unknown |
2872 | ||
2873 | ac_ext=c | |
2874 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2875 | ac_cpp='$CPP $CPPFLAGS' | |
2876 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2877 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2878 | cross_compiling=$ac_cv_prog_cc_cross | |
2879 | ||
2880 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 2881 | #line 2882 "configure" |
84c041a1 | 2882 | #include "confdefs.h" |
2d6eb5bf | 2883 | |
84c041a1 | 2884 | #ifdef HAVE_LIMITS_H |
2d6eb5bf | 2885 | # include <limits.h> |
84c041a1 ZW |
2886 | #endif |
2887 | /* This structure must have no internal padding. */ | |
2888 | struct { | |
2d6eb5bf | 2889 | char prefix[sizeof "\nendian:" - 1]; |
84c041a1 | 2890 | short word; |
2d6eb5bf | 2891 | char postfix[2]; |
84c041a1 | 2892 | } tester = { |
2d6eb5bf | 2893 | "\nendian:", |
84c041a1 ZW |
2894 | #if SIZEOF_SHORT == 4 |
2895 | ('A' << (CHAR_BIT * 3)) | ('B' << (CHAR_BIT * 2)) | | |
2896 | #endif | |
2d6eb5bf ZW |
2897 | ('A' << CHAR_BIT) | 'B', |
2898 | 'X', '\n' | |
84c041a1 ZW |
2899 | }; |
2900 | EOF | |
4c76f856 | 2901 | if { (eval echo configure:2902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
2d6eb5bf | 2902 | od -c conftest.o | |
e48cd290 | 2903 | sed 's/^[0-7]*[ ]*/ / |
2d6eb5bf ZW |
2904 | s/\*/./g |
2905 | s/ \\n/*/g | |
2906 | s/ [0-9][0-9][0-9]/./g | |
2907 | s/ \\[^ ]/./g' | | |
2908 | tr -d ' | |
2909 | ' | tr -s '*' ' | |
2910 | ' | fold | sed '$a\ | |
2911 | ' > conftest.dmp | |
2912 | if grep 'endian:AB' conftest.dmp >/dev/null 2>&1; then | |
2913 | ac_cv_c_compile_endian=big-endian | |
2914 | elif grep 'endian:BA' conftest.dmp >/dev/null 2>&1; then | |
2915 | ac_cv_c_compile_endian=little-endian | |
84c041a1 ZW |
2916 | fi |
2917 | fi | |
84c041a1 | 2918 | rm -rf conftest* |
2d6eb5bf ZW |
2919 | ac_ext=c |
2920 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2921 | ac_cpp='$CPP $CPPFLAGS' | |
2922 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2923 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2924 | cross_compiling=$ac_cv_prog_cc_cross | |
2925 | ||
2926 | ||
84c041a1 ZW |
2927 | fi |
2928 | ||
2d6eb5bf ZW |
2929 | echo "$ac_t""$ac_cv_c_compile_endian" 1>&6 |
2930 | if test $ac_cv_c_compile_endian = unknown; then | |
2931 | { echo "configure: error: *** unable to determine endianness" 1>&2; exit 1; } | |
2932 | elif test $ac_cv_c_compile_endian = big-endian; then | |
84c041a1 ZW |
2933 | cat >> confdefs.h <<\EOF |
2934 | #define HOST_WORDS_BIG_ENDIAN 1 | |
2935 | EOF | |
2936 | ||
2937 | fi | |
2938 | ||
2d6eb5bf | 2939 | echo $ac_n "checking floating point format""... $ac_c" 1>&6 |
4c76f856 | 2940 | echo "configure:2941: checking floating point format" >&5 |
2d6eb5bf ZW |
2941 | if eval "test \"`echo '$''{'ac_cv_c_float_format'+set}'`\" = set"; then |
2942 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2943 | else | |
2944 | ||
2945 | ac_ext=c | |
2946 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2947 | ac_cpp='$CPP $CPPFLAGS' | |
2948 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2949 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2950 | cross_compiling=$ac_cv_prog_cc_cross | |
2951 | ||
2952 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 2953 | #line 2954 "configure" |
2d6eb5bf ZW |
2954 | #include "confdefs.h" |
2955 | /* This will not work unless sizeof(double) == 8. */ | |
2956 | extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1]; | |
2957 | ||
2958 | /* This structure must have no internal padding. */ | |
2959 | struct possibility { | |
2960 | char prefix[8]; | |
2961 | double candidate; | |
2962 | char postfix[8]; | |
2963 | }; | |
2964 | ||
2965 | #define C(cand) { "\nformat:", cand, ":tamrof\n" } | |
2966 | struct possibility table [] = | |
2967 | { | |
2968 | C( 3.25724264705901305206e+01), /* @@IEEEFP - IEEE 754 */ | |
2969 | C( 3.53802595280598432000e+18), /* D__float - VAX */ | |
2970 | C( 5.32201830133125317057e-19), /* D.PDP-10 - PDP-10 - the dot is 0x13a */ | |
2971 | C( 1.77977764695171661377e+10), /* IBMHEXFP - s/390 format, ascii */ | |
2972 | C(-5.22995989424860458374e+10) /* IBMHEXFP - s/390 format, EBCDIC */ | |
2973 | }; | |
2974 | EOF | |
4c76f856 | 2975 | if { (eval echo configure:2976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
2d6eb5bf | 2976 | od -c conftest.o | |
e48cd290 | 2977 | sed 's/^[0-7]*[ ]*/ / |
2d6eb5bf ZW |
2978 | s/\*/./g |
2979 | s/ \\n/*/g | |
2980 | s/ [0-9][0-9][0-9]/./g | |
2981 | s/ \\[^ ]/./g' | | |
2982 | tr -d ' | |
2983 | ' | tr -s '*' ' | |
2984 | ' | fold | sed '$a\ | |
2985 | ' > conftest.dmp | |
2986 | if grep 'format:.@IEEEF.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2987 | ac_cv_c_float_format='IEEE (big-endian)' | |
2988 | elif grep 'format:.I@@PFE.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2989 | ac_cv_c_float_format='IEEE (big-endian)' | |
2990 | elif grep 'format:.FEEEI@.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2991 | ac_cv_c_float_format='IEEE (little-endian)' | |
2992 | elif grep 'format:.EFP@@I.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2993 | ac_cv_c_float_format='IEEE (little-endian)' | |
2994 | elif grep 'format:.__floa.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2995 | ac_cv_c_float_format='VAX D-float' | |
2996 | elif grep 'format:..PDP-1.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2997 | ac_cv_c_float_format='PDP-10' | |
2998 | elif grep 'format:.BMHEXF.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2999 | ac_cv_c_float_format='IBM 370 hex' | |
3000 | else | |
3001 | { echo "configure: error: Unknown floating point format" 1>&2; exit 1; } | |
3002 | fi | |
3003 | else | |
3004 | { echo "configure: error: compile failed" 1>&2; exit 1; } | |
3005 | fi | |
3006 | rm -rf conftest* | |
3007 | ac_ext=c | |
3008 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
3009 | ac_cpp='$CPP $CPPFLAGS' | |
3010 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
3011 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
3012 | cross_compiling=$ac_cv_prog_cc_cross | |
3013 | ||
3014 | ||
3015 | fi | |
3016 | ||
3017 | echo "$ac_t""$ac_cv_c_float_format" 1>&6 | |
3018 | # IEEE is the default format. If the float endianness isn't the same | |
3019 | # as the integer endianness, we have to set FLOAT_WORDS_BIG_ENDIAN | |
3020 | # (which is a tristate: yes, no, default). This is only an issue with | |
3021 | # IEEE; the other formats are only supported by a few machines each, | |
3022 | # all with the same endianness. | |
3023 | format= | |
3024 | fbigend= | |
3025 | case $ac_cv_c_float_format in | |
3026 | 'IEEE (big-endian)' ) | |
3027 | if test $ac_cv_c_compile_endian = little-endian; then | |
3028 | fbigend=1 | |
3029 | fi | |
3030 | ;; | |
3031 | 'IEEE (little-endian)' ) | |
3032 | if test $ac_cv_c_compile_endian = big-endian; then | |
3033 | fbigend=0 | |
3034 | fi | |
3035 | ;; | |
3036 | 'VAX D-float' ) | |
3037 | format=VAX_FLOAT_FORMAT | |
3038 | ;; | |
3039 | 'PDP-10' ) | |
3040 | format=PDP10_FLOAT_FORMAT | |
3041 | ;; | |
3042 | 'IBM 370 hex' ) | |
3043 | format=IBM_FLOAT_FORMAT | |
3044 | ;; | |
3045 | esac | |
3046 | if test -n "$format"; then | |
3047 | cat >> confdefs.h <<EOF | |
3048 | #define HOST_FLOAT_FORMAT $format | |
3049 | EOF | |
3050 | ||
3051 | fi | |
3052 | if test -n "$fbigend"; then | |
3053 | cat >> confdefs.h <<EOF | |
3054 | #define HOST_FLOAT_WORDS_BIG_ENDIAN $fbigend | |
3055 | EOF | |
3056 | ||
3057 | fi | |
3058 | ||
75e93faa | 3059 | |
955be633 JM |
3060 | # See if we have the mktemp command. |
3061 | # Extract the first word of "mktemp", so it can be a program name with args. | |
3062 | set dummy mktemp; ac_word=$2 | |
3063 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
4c76f856 | 3064 | echo "configure:3065: checking for $ac_word" >&5 |
955be633 JM |
3065 | if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then |
3066 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3067 | else | |
3068 | if test -n "$have_mktemp_command"; then | |
3069 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
3070 | else | |
3071 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3072 | ac_dummy="$PATH" | |
3073 | for ac_dir in $ac_dummy; do | |
3074 | test -z "$ac_dir" && ac_dir=. | |
3075 | if test -f $ac_dir/$ac_word; then | |
3076 | ac_cv_prog_have_mktemp_command="yes" | |
3077 | break | |
3078 | fi | |
3079 | done | |
3080 | IFS="$ac_save_ifs" | |
3081 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" | |
3082 | fi | |
3083 | fi | |
3084 | have_mktemp_command="$ac_cv_prog_have_mktemp_command" | |
3085 | if test -n "$have_mktemp_command"; then | |
3086 | echo "$ac_t""$have_mktemp_command" 1>&6 | |
3087 | else | |
3088 | echo "$ac_t""no" 1>&6 | |
3089 | fi | |
3090 | ||
3091 | ||
09fa0705 ZW |
3092 | # Do we have a single-tree copy of texinfo? |
3093 | if test -f $srcdir/../texinfo/Makefile.in; then | |
3094 | MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo' | |
3095 | gcc_cv_prog_makeinfo_modern=yes | |
3096 | echo "$ac_t""Using makeinfo from the unified source tree." 1>&6 | |
3097 | else | |
3098 | # See if makeinfo has been installed and is modern enough | |
3099 | # that we can use it. | |
3100 | # Extract the first word of "makeinfo", so it can be a program name with args. | |
3101 | set dummy makeinfo; ac_word=$2 | |
3102 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
4c76f856 | 3103 | echo "configure:3104: checking for $ac_word" >&5 |
09fa0705 ZW |
3104 | if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then |
3105 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3106 | else | |
3107 | if test -n "$MAKEINFO"; then | |
3108 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
3109 | else | |
3110 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3111 | ac_dummy="$PATH" | |
3112 | for ac_dir in $ac_dummy; do | |
3113 | test -z "$ac_dir" && ac_dir=. | |
3114 | if test -f $ac_dir/$ac_word; then | |
3115 | ac_cv_prog_MAKEINFO="makeinfo" | |
3116 | break | |
3117 | fi | |
3118 | done | |
3119 | IFS="$ac_save_ifs" | |
3120 | fi | |
3121 | fi | |
3122 | MAKEINFO="$ac_cv_prog_MAKEINFO" | |
3123 | if test -n "$MAKEINFO"; then | |
3124 | echo "$ac_t""$MAKEINFO" 1>&6 | |
3125 | else | |
3126 | echo "$ac_t""no" 1>&6 | |
3127 | fi | |
3128 | ||
3129 | if test -n "$MAKEINFO"; then | |
3130 | # Found it, now check the version. | |
3131 | echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6 | |
4c76f856 | 3132 | echo "configure:3133: checking for modern makeinfo" >&5 |
09fa0705 ZW |
3133 | if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then |
3134 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3135 | else | |
3136 | ac_prog_version=`$MAKEINFO --version 2>&1 | | |
3137 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
4c76f856 | 3138 | echo "configure:3139: version of makeinfo is $ac_prog_version" >&5 |
09fa0705 ZW |
3139 | case $ac_prog_version in |
3140 | '') gcc_cv_prog_makeinfo_modern=no;; | |
8e97db8f | 3141 | 4.[1-9]*) |
09fa0705 ZW |
3142 | gcc_cv_prog_makeinfo_modern=yes;; |
3143 | *) gcc_cv_prog_makeinfo_modern=no;; | |
3144 | esac | |
3145 | ||
3146 | fi | |
3147 | ||
3148 | echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6 | |
3149 | else | |
3150 | gcc_cv_prog_makeinfo_modern=no | |
3151 | fi | |
3152 | ||
3153 | fi | |
3154 | ||
3155 | if test $gcc_cv_prog_makeinfo_modern = no; then | |
3156 | echo "configure: warning: | |
3157 | *** Makeinfo is missing or too old. | |
17db6582 | 3158 | *** Info documentation will not be built." 1>&2 |
d21445e7 | 3159 | BUILD_INFO= |
09fa0705 ZW |
3160 | else |
3161 | BUILD_INFO=info | |
09fa0705 ZW |
3162 | fi |
3163 | ||
3f896fc2 JM |
3164 | # Is pod2man recent enough to regenerate manpages? |
3165 | echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6 | |
4c76f856 | 3166 | echo "configure:3167: checking for recent Pod::Man" >&5 |
7be33370 | 3167 | if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then |
fd939e46 JM |
3168 | echo "$ac_t""yes" 1>&6 |
3169 | GENERATED_MANPAGES=generated-manpages | |
3170 | else | |
3171 | echo "$ac_t""no" 1>&6 | |
3172 | GENERATED_MANPAGES= | |
3173 | fi | |
3174 | ||
1e608388 ZW |
3175 | # How about lex? |
3176 | if test -f $srcdir/../flex/skel.c; then | |
3177 | FLEX='$(objdir)/../flex/flex' | |
3178 | else | |
3179 | # Extract the first word of "flex", so it can be a program name with args. | |
3180 | set dummy flex; ac_word=$2 | |
3181 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
4c76f856 | 3182 | echo "configure:3183: checking for $ac_word" >&5 |
1e608388 ZW |
3183 | if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then |
3184 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3185 | else | |
3186 | if test -n "$FLEX"; then | |
3187 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
3188 | else | |
3189 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3190 | ac_dummy="$PATH" | |
3191 | for ac_dir in $ac_dummy; do | |
3192 | test -z "$ac_dir" && ac_dir=. | |
3193 | if test -f $ac_dir/$ac_word; then | |
3194 | ac_cv_prog_FLEX="flex" | |
3195 | break | |
3196 | fi | |
3197 | done | |
3198 | IFS="$ac_save_ifs" | |
3199 | test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="false" | |
3200 | fi | |
3201 | fi | |
3202 | FLEX="$ac_cv_prog_FLEX" | |
3203 | if test -n "$FLEX"; then | |
3204 | echo "$ac_t""$FLEX" 1>&6 | |
3205 | else | |
3206 | echo "$ac_t""no" 1>&6 | |
3207 | fi | |
3208 | ||
3209 | fi | |
3210 | ||
3211 | # Bison? | |
3212 | # The -L switch is so bison can find its skeleton file. | |
3213 | if test -f $srcdir/../bison/bison.simple; then | |
3214 | BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/' | |
3215 | else | |
3216 | # Extract the first word of "bison", so it can be a program name with args. | |
3217 | set dummy bison; ac_word=$2 | |
3218 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
4c76f856 | 3219 | echo "configure:3220: checking for $ac_word" >&5 |
1e608388 ZW |
3220 | if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then |
3221 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3222 | else | |
3223 | if test -n "$BISON"; then | |
3224 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
3225 | else | |
3226 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3227 | ac_dummy="$PATH" | |
3228 | for ac_dir in $ac_dummy; do | |
3229 | test -z "$ac_dir" && ac_dir=. | |
3230 | if test -f $ac_dir/$ac_word; then | |
3231 | ac_cv_prog_BISON="bison" | |
3232 | break | |
3233 | fi | |
3234 | done | |
3235 | IFS="$ac_save_ifs" | |
3236 | test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="false" | |
3237 | fi | |
3238 | fi | |
3239 | BISON="$ac_cv_prog_BISON" | |
3240 | if test -n "$BISON"; then | |
3241 | echo "$ac_t""$BISON" 1>&6 | |
3242 | else | |
3243 | echo "$ac_t""no" 1>&6 | |
3244 | fi | |
3245 | ||
3246 | fi | |
3247 | ||
4e70264f ZW |
3248 | # These libraries may be used by collect2. |
3249 | # We may need a special search path to get them linked. | |
3250 | echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6 | |
4c76f856 | 3251 | echo "configure:3252: checking for collect2 libraries" >&5 |
4e70264f ZW |
3252 | if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then |
3253 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3254 | else | |
3255 | save_LIBS="$LIBS" | |
7f2749d4 | 3256 | for libs in '' -lld -lmld \ |
4e70264f ZW |
3257 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
3258 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
3259 | do | |
3260 | LIBS="$libs" | |
3261 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 3262 | #line 3263 "configure" |
4e70264f ZW |
3263 | #include "confdefs.h" |
3264 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3265 | /* We use char because int might match the return type of a gcc2 | |
3266 | builtin and then its argument prototype would still apply. */ | |
3267 | char ldopen(); | |
3268 | ||
3269 | int main() { | |
3270 | ldopen() | |
3271 | ; return 0; } | |
3272 | EOF | |
4c76f856 | 3273 | if { (eval echo configure:3274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4e70264f ZW |
3274 | rm -rf conftest* |
3275 | gcc_cv_collect2_libs="$libs"; break | |
3276 | else | |
3277 | echo "configure: failed program was:" >&5 | |
3278 | cat conftest.$ac_ext >&5 | |
3279 | fi | |
3280 | rm -f conftest* | |
3281 | done | |
3282 | LIBS="$save_LIBS" | |
3283 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
3284 | fi | |
3285 | ||
3286 | echo "$ac_t""$gcc_cv_collect2_libs" 1>&6 | |
3287 | case $gcc_cv_collect2_libs in | |
3288 | "none required") ;; | |
3289 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
3290 | esac | |
3291 | ||
3292 | ||
7f2749d4 RK |
3293 | # When building Ada code on Alpha, we need exc_resume which is usually in |
3294 | # -lexc. So test for it. | |
3295 | save_LIBS="$LIBS" | |
3296 | LIBS= | |
3297 | ||
3298 | echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6 | |
4c76f856 | 3299 | echo "configure:3300: checking for library containing exc_resume" >&5 |
7f2749d4 RK |
3300 | if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then |
3301 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3302 | else | |
3303 | ac_func_search_save_LIBS="$LIBS" | |
3304 | ac_cv_search_exc_resume="no" | |
3305 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 3306 | #line 3307 "configure" |
7f2749d4 RK |
3307 | #include "confdefs.h" |
3308 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3309 | /* We use char because int might match the return type of a gcc2 | |
3310 | builtin and then its argument prototype would still apply. */ | |
3311 | char exc_resume(); | |
3312 | ||
3313 | int main() { | |
3314 | exc_resume() | |
3315 | ; return 0; } | |
3316 | EOF | |
4c76f856 | 3317 | if { (eval echo configure:3318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7f2749d4 RK |
3318 | rm -rf conftest* |
3319 | ac_cv_search_exc_resume="none required" | |
3320 | else | |
3321 | echo "configure: failed program was:" >&5 | |
3322 | cat conftest.$ac_ext >&5 | |
3323 | fi | |
3324 | rm -f conftest* | |
3325 | test "$ac_cv_search_exc_resume" = "no" && for i in exc; do | |
3326 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3327 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 3328 | #line 3329 "configure" |
7f2749d4 RK |
3329 | #include "confdefs.h" |
3330 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3331 | /* We use char because int might match the return type of a gcc2 | |
3332 | builtin and then its argument prototype would still apply. */ | |
3333 | char exc_resume(); | |
3334 | ||
3335 | int main() { | |
3336 | exc_resume() | |
3337 | ; return 0; } | |
3338 | EOF | |
4c76f856 | 3339 | if { (eval echo configure:3340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7f2749d4 RK |
3340 | rm -rf conftest* |
3341 | ac_cv_search_exc_resume="-l$i" | |
3342 | break | |
3343 | else | |
3344 | echo "configure: failed program was:" >&5 | |
3345 | cat conftest.$ac_ext >&5 | |
3346 | fi | |
3347 | rm -f conftest* | |
3348 | done | |
3349 | LIBS="$ac_func_search_save_LIBS" | |
3350 | fi | |
3351 | ||
3352 | echo "$ac_t""$ac_cv_search_exc_resume" 1>&6 | |
3353 | if test "$ac_cv_search_exc_resume" != "no"; then | |
3354 | test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS" | |
3355 | ||
3356 | else : | |
3357 | ||
3358 | fi | |
3359 | GNAT_LIBEXC="$LIBS" | |
3360 | LIBS="$save_LIBS" | |
3361 | ||
3362 | ||
890ad3ea | 3363 | # See if the stage1 system preprocessor understands the ANSI C |
4bc5fbd4 | 3364 | # preprocessor stringification operator. (Used by symcat.h.) |
890ad3ea KG |
3365 | |
3366 | ||
3367 | echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6 | |
4c76f856 | 3368 | echo "configure:3369: checking for preprocessor stringizing operator" >&5 |
890ad3ea | 3369 | if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then |
76844337 RH |
3370 | echo $ac_n "(cached) $ac_c" 1>&6 |
3371 | else | |
3372 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 3373 | #line 3374 "configure" |
76844337 RH |
3374 | #include "confdefs.h" |
3375 | ||
890ad3ea KG |
3376 | #define x(y) #y |
3377 | ||
3378 | char *s = x(teststring); | |
3379 | ||
76844337 | 3380 | EOF |
890ad3ea KG |
3381 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
3382 | egrep "#teststring" >/dev/null 2>&1; then | |
76844337 | 3383 | rm -rf conftest* |
890ad3ea | 3384 | ac_cv_c_stringize=no |
76844337 | 3385 | else |
76844337 | 3386 | rm -rf conftest* |
890ad3ea | 3387 | ac_cv_c_stringize=yes |
76844337 RH |
3388 | fi |
3389 | rm -f conftest* | |
890ad3ea | 3390 | |
76844337 RH |
3391 | fi |
3392 | ||
890ad3ea KG |
3393 | if test "${ac_cv_c_stringize}" = yes |
3394 | then | |
3395 | cat >> confdefs.h <<\EOF | |
3396 | #define HAVE_STRINGIZE 1 | |
76844337 RH |
3397 | EOF |
3398 | ||
3399 | fi | |
890ad3ea KG |
3400 | echo "$ac_t""${ac_cv_c_stringize}" 1>&6 |
3401 | ||
76844337 | 3402 | |
956d6950 JL |
3403 | # Use <inttypes.h> only if it exists, |
3404 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
3405 | echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6 | |
4c76f856 | 3406 | echo "configure:3407: checking for inttypes.h" >&5 |
956d6950 JL |
3407 | if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then |
3408 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3409 | else | |
3410 | cat > conftest.$ac_ext <<EOF | |
4c76f856 | 3411 | #line 3412 "configure" |
956d6950 JL |
3412 | #include "confdefs.h" |
3413 | #include <sys/types.h> | |
3414 | #include <inttypes.h> | |
3415 | int main() { | |
3416 | intmax_t i = -1; | |
3417 | ; return 0; } | |
3418 | EOF | |
4c76f856 | 3419 | if { (eval echo configure:3420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
956d6950 | 3420 | rm -rf conftest* |
0056a9b5 | 3421 | gcc_cv_header_inttypes_h=yes |
956d6950 JL |
3422 | else |
3423 | echo "configure: failed program was:" >&5 | |
3424 | cat conftest.$ac_ext >&5 | |
3425 | rm -rf conftest* | |
3426 | gcc_cv_header_inttypes_h=no | |
3427 | fi | |
3428 | rm -f conftest* | |
3429 | fi | |
3430 | ||
3431 | echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6 | |
0056a9b5 KG |
3432 | if test $gcc_cv_header_inttypes_h = yes; then |
3433 | cat >> confdefs.h <<\EOF | |
3434 | #define HAVE_INTTYPES_H 1 | |
3435 | EOF | |
3436 | ||
3437 | fi | |
956d6950 | 3438 | |
c149cc37 | 3439 | |
6af8c740 KG |
3440 | for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \ |
3441 | sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \ | |
a15135c9 MM |
3442 | fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \ |
3443 | scandir alphasort | |
956d6950 JL |
3444 | do |
3445 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
a15135c9 | 3446 | echo "configure:3447: checking for $ac_func" >&5 |
956d6950 JL |
3447 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3448 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3449 | else | |
3450 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 3451 | #line 3452 "configure" |
956d6950 JL |
3452 | #include "confdefs.h" |
3453 | /* System header to define __stub macros and hopefully few prototypes, | |
3454 | which can conflict with char $ac_func(); below. */ | |
3455 | #include <assert.h> | |
3456 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3457 | /* We use char because int might match the return type of a gcc2 | |
3458 | builtin and then its argument prototype would still apply. */ | |
3459 | char $ac_func(); | |
3460 | ||
3461 | int main() { | |
3462 | ||
3463 | /* The GNU C library defines this for functions which it implements | |
3464 | to always fail with ENOSYS. Some functions are actually named | |
3465 | something starting with __ and the normal name is an alias. */ | |
3466 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3467 | choke me | |
3468 | #else | |
99b09ff3 | 3469 | $ac_func(); |
956d6950 JL |
3470 | #endif |
3471 | ||
3472 | ; return 0; } | |
3473 | EOF | |
a15135c9 | 3474 | if { (eval echo configure:3475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
956d6950 JL |
3475 | rm -rf conftest* |
3476 | eval "ac_cv_func_$ac_func=yes" | |
3477 | else | |
3478 | echo "configure: failed program was:" >&5 | |
3479 | cat conftest.$ac_ext >&5 | |
3480 | rm -rf conftest* | |
3481 | eval "ac_cv_func_$ac_func=no" | |
3482 | fi | |
3483 | rm -f conftest* | |
3484 | fi | |
3485 | ||
3486 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3487 | echo "$ac_t""yes" 1>&6 | |
3488 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3489 | cat >> confdefs.h <<EOF | |
3490 | #define $ac_tr_func 1 | |
3491 | EOF | |
3492 | ||
3493 | else | |
3494 | echo "$ac_t""no" 1>&6 | |
3495 | fi | |
3496 | done | |
3497 | ||
6885fc87 | 3498 | |
f12bc141 | 3499 | echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 |
a15135c9 | 3500 | echo "configure:3501: checking for ssize_t" >&5 |
f12bc141 ZW |
3501 | if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then |
3502 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3503 | else | |
3504 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 3505 | #line 3506 "configure" |
f12bc141 ZW |
3506 | #include "confdefs.h" |
3507 | #include <sys/types.h> | |
3508 | #if STDC_HEADERS | |
3509 | #include <stdlib.h> | |
3510 | #include <stddef.h> | |
3511 | #endif | |
3512 | EOF | |
3513 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3514 | egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
3515 | rm -rf conftest* | |
cb65112a | 3516 | ac_cv_type_ssize_t=yes |
f12bc141 ZW |
3517 | else |
3518 | rm -rf conftest* | |
cb65112a | 3519 | ac_cv_type_ssize_t=no |
f12bc141 ZW |
3520 | fi |
3521 | rm -f conftest* | |
3522 | ||
3523 | fi | |
cb65112a AO |
3524 | echo "$ac_t""$ac_cv_type_ssize_t" 1>&6 |
3525 | if test $ac_cv_type_ssize_t = no; then | |
3526 | cat >> confdefs.h <<\EOF | |
f12bc141 ZW |
3527 | #define ssize_t int |
3528 | EOF | |
3529 | ||
3530 | fi | |
3531 | ||
0b9d02c6 | 3532 | |
e256b8b6 DA |
3533 | # Try to determine the array type of the second argument of getgroups |
3534 | # for the target system (int or gid_t). | |
3535 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 | |
a15135c9 | 3536 | echo "configure:3537: checking for uid_t in sys/types.h" >&5 |
e256b8b6 DA |
3537 | if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then |
3538 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3539 | else | |
3540 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 3541 | #line 3542 "configure" |
e256b8b6 DA |
3542 | #include "confdefs.h" |
3543 | #include <sys/types.h> | |
3544 | EOF | |
3545 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3546 | egrep "uid_t" >/dev/null 2>&1; then | |
3547 | rm -rf conftest* | |
3548 | ac_cv_type_uid_t=yes | |
3549 | else | |
3550 | rm -rf conftest* | |
3551 | ac_cv_type_uid_t=no | |
3552 | fi | |
3553 | rm -f conftest* | |
3554 | ||
3555 | fi | |
3556 | ||
3557 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 | |
3558 | if test $ac_cv_type_uid_t = no; then | |
3559 | cat >> confdefs.h <<\EOF | |
3560 | #define uid_t int | |
3561 | EOF | |
3562 | ||
3563 | cat >> confdefs.h <<\EOF | |
3564 | #define gid_t int | |
3565 | EOF | |
3566 | ||
3567 | fi | |
3568 | ||
3569 | echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 | |
a15135c9 | 3570 | echo "configure:3571: checking type of array argument to getgroups" >&5 |
e256b8b6 DA |
3571 | if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then |
3572 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3573 | else | |
3574 | if test "$cross_compiling" = yes; then | |
3575 | ac_cv_type_getgroups=cross | |
3576 | else | |
3577 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 3578 | #line 3579 "configure" |
e256b8b6 DA |
3579 | #include "confdefs.h" |
3580 | ||
3581 | /* Thanks to Mike Rendell for this test. */ | |
3582 | #include <sys/types.h> | |
3583 | #define NGID 256 | |
3584 | #undef MAX | |
3585 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
3586 | main() | |
3587 | { | |
3588 | gid_t gidset[NGID]; | |
3589 | int i, n; | |
3590 | union { gid_t gval; long lval; } val; | |
3591 | ||
3592 | val.lval = -1; | |
3593 | for (i = 0; i < NGID; i++) | |
3594 | gidset[i] = val.gval; | |
3595 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
3596 | gidset); | |
3597 | /* Exit non-zero if getgroups seems to require an array of ints. This | |
3598 | happens when gid_t is short but getgroups modifies an array of ints. */ | |
3599 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
3600 | } | |
3601 | ||
3602 | EOF | |
a15135c9 | 3603 | if { (eval echo configure:3604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
e256b8b6 DA |
3604 | then |
3605 | ac_cv_type_getgroups=gid_t | |
3606 | else | |
3607 | echo "configure: failed program was:" >&5 | |
3608 | cat conftest.$ac_ext >&5 | |
3609 | rm -fr conftest* | |
3610 | ac_cv_type_getgroups=int | |
3611 | fi | |
3612 | rm -fr conftest* | |
3613 | fi | |
3614 | ||
3615 | if test $ac_cv_type_getgroups = cross; then | |
3616 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 3617 | #line 3618 "configure" |
e256b8b6 DA |
3618 | #include "confdefs.h" |
3619 | #include <unistd.h> | |
3620 | EOF | |
3621 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3622 | egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then | |
3623 | rm -rf conftest* | |
3624 | ac_cv_type_getgroups=gid_t | |
3625 | else | |
3626 | rm -rf conftest* | |
3627 | ac_cv_type_getgroups=int | |
3628 | fi | |
3629 | rm -f conftest* | |
3630 | ||
3631 | fi | |
3632 | fi | |
3633 | ||
3634 | echo "$ac_t""$ac_cv_type_getgroups" 1>&6 | |
3635 | cat >> confdefs.h <<EOF | |
3636 | #define GETGROUPS_T $ac_cv_type_getgroups | |
3637 | EOF | |
3638 | ||
3639 | ||
3640 | if test "${target}" = "${build}"; then | |
3641 | TARGET_GETGROUPS_T=$ac_cv_type_getgroups | |
3642 | else | |
3643 | case "${target}" in | |
3644 | # This condition may need some tweaking. It should include all | |
3645 | # targets where the array type of the second argument of getgroups | |
3646 | # is int and the type of gid_t is not equivalent to int. | |
3647 | *-*-sunos* | *-*-ultrix*) | |
3648 | TARGET_GETGROUPS_T=int | |
3649 | ;; | |
3650 | *) | |
3651 | TARGET_GETGROUPS_T=gid_t | |
3652 | ;; | |
3653 | esac | |
3654 | fi | |
3655 | ||
3656 | ||
0a4b6309 | 3657 | echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6 |
a15135c9 | 3658 | echo "configure:3659: checking whether the printf functions support %p" >&5 |
0a4b6309 RL |
3659 | if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then |
3660 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3661 | else | |
3662 | if test "$cross_compiling" = yes; then | |
3663 | gcc_cv_func_printf_ptr=no | |
3664 | else | |
3665 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 3666 | #line 3667 "configure" |
0a4b6309 RL |
3667 | #include "confdefs.h" |
3668 | #include <stdio.h> | |
3669 | ||
86cf1cbd | 3670 | int main() |
0a4b6309 RL |
3671 | { |
3672 | char buf[64]; | |
3673 | char *p = buf, *q = NULL; | |
3674 | sprintf(buf, "%p", p); | |
3675 | sscanf(buf, "%p", &q); | |
86cf1cbd | 3676 | return (p != q); |
0a4b6309 RL |
3677 | } |
3678 | EOF | |
a15135c9 | 3679 | if { (eval echo configure:3680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
0a4b6309 RL |
3680 | then |
3681 | gcc_cv_func_printf_ptr=yes | |
3682 | else | |
3683 | echo "configure: failed program was:" >&5 | |
3684 | cat conftest.$ac_ext >&5 | |
3685 | rm -fr conftest* | |
3686 | gcc_cv_func_printf_ptr=no | |
3687 | fi | |
3688 | rm -fr conftest* | |
3689 | fi | |
3690 | ||
3691 | rm -f core core.* *.core | |
3692 | fi | |
3693 | ||
3694 | echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6 | |
3695 | if test $gcc_cv_func_printf_ptr = yes ; then | |
3696 | cat >> confdefs.h <<\EOF | |
3697 | #define HAVE_PRINTF_PTR 1 | |
3698 | EOF | |
3699 | ||
3700 | fi | |
3701 | ||
b27d2bd5 MK |
3702 | |
3703 | case "${host}" in | |
3704 | *-*-uwin*) | |
34fa3e7d MM |
3705 | { echo "configure: error: |
3706 | *** UWIN may not be used as a host platform because | |
3707 | *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; } | |
b27d2bd5 | 3708 | ;; |
ee262b6f DR |
3709 | *-*-*vms*) |
3710 | # Under VMS, vfork works very different than on Unix. The standard test | |
3711 | # won't work, and it isn't easily adaptable. It makes more sense to | |
3712 | # just force it. | |
3713 | ac_cv_func_vfork_works=yes | |
3714 | ;; | |
b27d2bd5 | 3715 | esac |
c375c43b | 3716 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
a15135c9 | 3717 | echo "configure:3718: checking for pid_t" >&5 |
c375c43b KG |
3718 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
3719 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3720 | else | |
3721 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 3722 | #line 3723 "configure" |
c375c43b KG |
3723 | #include "confdefs.h" |
3724 | #include <sys/types.h> | |
3725 | #if STDC_HEADERS | |
3726 | #include <stdlib.h> | |
3727 | #include <stddef.h> | |
3728 | #endif | |
3729 | EOF | |
3730 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
b27d2bd5 | 3731 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
c375c43b | 3732 | rm -rf conftest* |
cb65112a | 3733 | ac_cv_type_pid_t=yes |
c375c43b KG |
3734 | else |
3735 | rm -rf conftest* | |
cb65112a | 3736 | ac_cv_type_pid_t=no |
c375c43b KG |
3737 | fi |
3738 | rm -f conftest* | |
3739 | ||
3740 | fi | |
cb65112a AO |
3741 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
3742 | if test $ac_cv_type_pid_t = no; then | |
3743 | cat >> confdefs.h <<\EOF | |
c375c43b KG |
3744 | #define pid_t int |
3745 | EOF | |
3746 | ||
3747 | fi | |
3748 | ||
3749 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` | |
3750 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
a15135c9 | 3751 | echo "configure:3752: checking for vfork.h" >&5 |
c375c43b KG |
3752 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3753 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3754 | else | |
3755 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 3756 | #line 3757 "configure" |
c375c43b KG |
3757 | #include "confdefs.h" |
3758 | #include <vfork.h> | |
3759 | EOF | |
3760 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
a15135c9 | 3761 | { (eval echo configure:3762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 3762 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
c375c43b KG |
3763 | if test -z "$ac_err"; then |
3764 | rm -rf conftest* | |
3765 | eval "ac_cv_header_$ac_safe=yes" | |
3766 | else | |
3767 | echo "$ac_err" >&5 | |
3768 | echo "configure: failed program was:" >&5 | |
3769 | cat conftest.$ac_ext >&5 | |
3770 | rm -rf conftest* | |
3771 | eval "ac_cv_header_$ac_safe=no" | |
3772 | fi | |
3773 | rm -f conftest* | |
3774 | fi | |
3775 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3776 | echo "$ac_t""yes" 1>&6 | |
3777 | cat >> confdefs.h <<\EOF | |
3778 | #define HAVE_VFORK_H 1 | |
3779 | EOF | |
3780 | ||
3781 | else | |
3782 | echo "$ac_t""no" 1>&6 | |
3783 | fi | |
3784 | ||
3785 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 | |
a15135c9 | 3786 | echo "configure:3787: checking for working vfork" >&5 |
c375c43b KG |
3787 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
3788 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3789 | else | |
3790 | if test "$cross_compiling" = yes; then | |
3791 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
a15135c9 | 3792 | echo "configure:3793: checking for vfork" >&5 |
c375c43b KG |
3793 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
3794 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3795 | else | |
3796 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 3797 | #line 3798 "configure" |
c375c43b KG |
3798 | #include "confdefs.h" |
3799 | /* System header to define __stub macros and hopefully few prototypes, | |
3800 | which can conflict with char vfork(); below. */ | |
3801 | #include <assert.h> | |
3802 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3803 | /* We use char because int might match the return type of a gcc2 | |
3804 | builtin and then its argument prototype would still apply. */ | |
3805 | char vfork(); | |
3806 | ||
3807 | int main() { | |
3808 | ||
3809 | /* The GNU C library defines this for functions which it implements | |
3810 | to always fail with ENOSYS. Some functions are actually named | |
3811 | something starting with __ and the normal name is an alias. */ | |
3812 | #if defined (__stub_vfork) || defined (__stub___vfork) | |
3813 | choke me | |
3814 | #else | |
99b09ff3 | 3815 | vfork(); |
c375c43b KG |
3816 | #endif |
3817 | ||
3818 | ; return 0; } | |
3819 | EOF | |
a15135c9 | 3820 | if { (eval echo configure:3821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c375c43b KG |
3821 | rm -rf conftest* |
3822 | eval "ac_cv_func_vfork=yes" | |
3823 | else | |
3824 | echo "configure: failed program was:" >&5 | |
3825 | cat conftest.$ac_ext >&5 | |
3826 | rm -rf conftest* | |
3827 | eval "ac_cv_func_vfork=no" | |
3828 | fi | |
3829 | rm -f conftest* | |
3830 | fi | |
3831 | ||
3832 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then | |
3833 | echo "$ac_t""yes" 1>&6 | |
3834 | : | |
3835 | else | |
3836 | echo "$ac_t""no" 1>&6 | |
3837 | fi | |
3838 | ||
3839 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
3840 | else | |
3841 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 3842 | #line 3843 "configure" |
c375c43b KG |
3843 | #include "confdefs.h" |
3844 | /* Thanks to Paul Eggert for this test. */ | |
3845 | #include <stdio.h> | |
3846 | #include <sys/types.h> | |
3847 | #include <sys/stat.h> | |
3848 | #ifdef HAVE_UNISTD_H | |
3849 | #include <unistd.h> | |
3850 | #endif | |
3851 | #ifdef HAVE_VFORK_H | |
3852 | #include <vfork.h> | |
3853 | #endif | |
3854 | /* On some sparc systems, changes by the child to local and incoming | |
3855 | argument registers are propagated back to the parent. | |
3856 | The compiler is told about this with #include <vfork.h>, | |
3857 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
3858 | Test for this by using a static variable whose address | |
3859 | is put into a register that is clobbered by the vfork. */ | |
3860 | static | |
3861 | #ifdef __cplusplus | |
3862 | sparc_address_test (int arg) | |
3863 | #else | |
3864 | sparc_address_test (arg) int arg; | |
3865 | #endif | |
3866 | { | |
3867 | static pid_t child; | |
3868 | if (!child) { | |
3869 | child = vfork (); | |
3870 | if (child < 0) { | |
3871 | perror ("vfork"); | |
3872 | _exit(2); | |
3873 | } | |
3874 | if (!child) { | |
3875 | arg = getpid(); | |
3876 | write(-1, "", 0); | |
3877 | _exit (arg); | |
3878 | } | |
3879 | } | |
3880 | } | |
3881 | main() { | |
3882 | pid_t parent = getpid (); | |
3883 | pid_t child; | |
3884 | ||
3885 | sparc_address_test (); | |
3886 | ||
3887 | child = vfork (); | |
3888 | ||
3889 | if (child == 0) { | |
3890 | /* Here is another test for sparc vfork register problems. | |
3891 | This test uses lots of local variables, at least | |
3892 | as many local variables as main has allocated so far | |
3893 | including compiler temporaries. 4 locals are enough for | |
3894 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
3895 | A buggy compiler should reuse the register of parent | |
3896 | for one of the local variables, since it will think that | |
3897 | parent can't possibly be used any more in this routine. | |
3898 | Assigning to the local variable will thus munge parent | |
3899 | in the parent process. */ | |
3900 | pid_t | |
3901 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
3902 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
3903 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
3904 | use the same hardware register for all 8 local variables. */ | |
3905 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
3906 | || p != p5 || p != p6 || p != p7) | |
3907 | _exit(1); | |
3908 | ||
3909 | /* On some systems (e.g. IRIX 3.3), | |
3910 | vfork doesn't separate parent from child file descriptors. | |
3911 | If the child closes a descriptor before it execs or exits, | |
3912 | this munges the parent's descriptor as well. | |
3913 | Test for this by closing stdout in the child. */ | |
3914 | _exit(close(fileno(stdout)) != 0); | |
3915 | } else { | |
3916 | int status; | |
3917 | struct stat st; | |
3918 | ||
3919 | while (wait(&status) != child) | |
3920 | ; | |
3921 | exit( | |
3922 | /* Was there some problem with vforking? */ | |
3923 | child < 0 | |
3924 | ||
3925 | /* Did the child fail? (This shouldn't happen.) */ | |
3926 | || status | |
3927 | ||
3928 | /* Did the vfork/compiler bug occur? */ | |
3929 | || parent != getpid() | |
3930 | ||
3931 | /* Did the file descriptor bug occur? */ | |
3932 | || fstat(fileno(stdout), &st) != 0 | |
3933 | ); | |
3934 | } | |
3935 | } | |
3936 | EOF | |
a15135c9 | 3937 | if { (eval echo configure:3938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c375c43b KG |
3938 | then |
3939 | ac_cv_func_vfork_works=yes | |
3940 | else | |
3941 | echo "configure: failed program was:" >&5 | |
3942 | cat conftest.$ac_ext >&5 | |
3943 | rm -fr conftest* | |
3944 | ac_cv_func_vfork_works=no | |
3945 | fi | |
3946 | rm -fr conftest* | |
3947 | fi | |
3948 | ||
3949 | fi | |
3950 | ||
3951 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 | |
3952 | if test $ac_cv_func_vfork_works = no; then | |
3953 | cat >> confdefs.h <<\EOF | |
3954 | #define vfork fork | |
3955 | EOF | |
3956 | ||
3957 | fi | |
3958 | ||
81bf3d9e | 3959 | for ac_func in getpagesize |
0a4b6309 | 3960 | do |
81bf3d9e | 3961 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
a15135c9 | 3962 | echo "configure:3963: checking for $ac_func" >&5 |
81bf3d9e | 3963 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
0a4b6309 RL |
3964 | echo $ac_n "(cached) $ac_c" 1>&6 |
3965 | else | |
3966 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 3967 | #line 3968 "configure" |
0a4b6309 | 3968 | #include "confdefs.h" |
81bf3d9e RH |
3969 | /* System header to define __stub macros and hopefully few prototypes, |
3970 | which can conflict with char $ac_func(); below. */ | |
3971 | #include <assert.h> | |
3972 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3973 | /* We use char because int might match the return type of a gcc2 | |
3974 | builtin and then its argument prototype would still apply. */ | |
3975 | char $ac_func(); | |
8fa1f09f | 3976 | |
81bf3d9e RH |
3977 | int main() { |
3978 | ||
3979 | /* The GNU C library defines this for functions which it implements | |
3980 | to always fail with ENOSYS. Some functions are actually named | |
3981 | something starting with __ and the normal name is an alias. */ | |
3982 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3983 | choke me | |
c5c76735 | 3984 | #else |
99b09ff3 | 3985 | $ac_func(); |
c5c76735 JL |
3986 | #endif |
3987 | ||
c5c76735 JL |
3988 | ; return 0; } |
3989 | EOF | |
a15135c9 | 3990 | if { (eval echo configure:3991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c5c76735 | 3991 | rm -rf conftest* |
81bf3d9e | 3992 | eval "ac_cv_func_$ac_func=yes" |
c5c76735 JL |
3993 | else |
3994 | echo "configure: failed program was:" >&5 | |
3995 | cat conftest.$ac_ext >&5 | |
3996 | rm -rf conftest* | |
81bf3d9e | 3997 | eval "ac_cv_func_$ac_func=no" |
c5c76735 JL |
3998 | fi |
3999 | rm -f conftest* | |
4000 | fi | |
4001 | ||
81bf3d9e | 4002 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
c5c76735 | 4003 | echo "$ac_t""yes" 1>&6 |
81bf3d9e | 4004 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
c5c76735 | 4005 | cat >> confdefs.h <<EOF |
81bf3d9e | 4006 | #define $ac_tr_func 1 |
c5c76735 | 4007 | EOF |
81bf3d9e | 4008 | |
c5c76735 JL |
4009 | else |
4010 | echo "$ac_t""no" 1>&6 | |
4011 | fi | |
c5c76735 JL |
4012 | done |
4013 | ||
825b6926 ZW |
4014 | # The test program for the next two tests is the same except for one |
4015 | # set of ifdefs. | |
4016 | cat >ct-mmap.inc <<'EOF' | |
d2cabf16 | 4017 | #include <sys/types.h> |
81bf3d9e | 4018 | #include <sys/mman.h> |
825b6926 ZW |
4019 | #include <fcntl.h> |
4020 | #include <signal.h> | |
4021 | #include <setjmp.h> | |
4022 | #include <stdio.h> | |
0a4b6309 | 4023 | |
4c1331d6 DA |
4024 | #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON) |
4025 | # define MAP_ANONYMOUS MAP_ANON | |
4026 | #endif | |
4027 | ||
81bf3d9e RH |
4028 | /* This mess was copied from the GNU getpagesize.h. */ |
4029 | #ifndef HAVE_GETPAGESIZE | |
4030 | # ifdef HAVE_UNISTD_H | |
4031 | # include <unistd.h> | |
4032 | # endif | |
0a4b6309 | 4033 | |
81bf3d9e RH |
4034 | /* Assume that all systems that can run configure have sys/param.h. */ |
4035 | # ifndef HAVE_SYS_PARAM_H | |
4036 | # define HAVE_SYS_PARAM_H 1 | |
4037 | # endif | |
0a4b6309 | 4038 | |
81bf3d9e RH |
4039 | # ifdef _SC_PAGESIZE |
4040 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
4041 | # else /* no _SC_PAGESIZE */ | |
4042 | # ifdef HAVE_SYS_PARAM_H | |
4043 | # include <sys/param.h> | |
4044 | # ifdef EXEC_PAGESIZE | |
4045 | # define getpagesize() EXEC_PAGESIZE | |
4046 | # else /* no EXEC_PAGESIZE */ | |
4047 | # ifdef NBPG | |
4048 | # define getpagesize() NBPG * CLSIZE | |
4049 | # ifndef CLSIZE | |
4050 | # define CLSIZE 1 | |
4051 | # endif /* no CLSIZE */ | |
4052 | # else /* no NBPG */ | |
4053 | # ifdef NBPC | |
4054 | # define getpagesize() NBPC | |
4055 | # else /* no NBPC */ | |
4056 | # ifdef PAGESIZE | |
4057 | # define getpagesize() PAGESIZE | |
4058 | # endif /* PAGESIZE */ | |
4059 | # endif /* no NBPC */ | |
4060 | # endif /* no NBPG */ | |
4061 | # endif /* no EXEC_PAGESIZE */ | |
4062 | # else /* no HAVE_SYS_PARAM_H */ | |
4063 | # define getpagesize() 8192 /* punt totally */ | |
4064 | # endif /* no HAVE_SYS_PARAM_H */ | |
4065 | # endif /* no _SC_PAGESIZE */ | |
0a4b6309 | 4066 | |
81bf3d9e | 4067 | #endif /* no HAVE_GETPAGESIZE */ |
0a4b6309 | 4068 | |
825b6926 ZW |
4069 | #ifndef MAP_FAILED |
4070 | # define MAP_FAILED -1 | |
4c1331d6 | 4071 | #endif |
81bf3d9e | 4072 | |
825b6926 ZW |
4073 | #undef perror_exit |
4074 | #define perror_exit(str, val) \ | |
4075 | do { perror(str); exit(val); } while (0) | |
4076 | ||
4077 | /* Some versions of cygwin mmap require that munmap is called with the | |
4078 | same parameters as mmap. GCC expects that this is not the case. | |
4079 | Test for various forms of this problem. Warning - icky signal games. */ | |
4080 | ||
4081 | static sigset_t unblock_sigsegv; | |
4082 | static jmp_buf r; | |
4083 | static size_t pg; | |
4084 | static int devzero; | |
4085 | ||
4086 | static char * | |
4087 | anonmap (size) | |
4088 | size_t size; | |
4089 | { | |
4090 | #ifdef USE_MAP_ANON | |
4091 | return (char *) mmap (0, size, PROT_READ|PROT_WRITE, | |
4092 | MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); | |
4c1331d6 | 4093 | #else |
825b6926 ZW |
4094 | return (char *) mmap (0, size, PROT_READ|PROT_WRITE, |
4095 | MAP_PRIVATE, devzero, 0); | |
4c1331d6 | 4096 | #endif |
825b6926 ZW |
4097 | } |
4098 | ||
4099 | static void | |
4100 | sigsegv (unused) | |
4101 | int unused; | |
4102 | { | |
4103 | sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0); | |
4104 | longjmp (r, 1); | |
4105 | } | |
4106 | ||
4107 | /* Basic functionality test. */ | |
4108 | void | |
4109 | test_0 () | |
4110 | { | |
4111 | char *x = anonmap (pg); | |
4112 | if (x == (char *) MAP_FAILED) | |
4113 | perror_exit("test 0 mmap", 2); | |
81bf3d9e | 4114 | |
4acab94b | 4115 | *(int *)x += 1; |
81bf3d9e | 4116 | |
4acab94b | 4117 | if (munmap(x, pg) < 0) |
825b6926 ZW |
4118 | perror_exit("test 0 munmap", 3); |
4119 | } | |
4120 | ||
4121 | /* 1. If we map a 2-page region and unmap its second page, the first page | |
4122 | must remain. */ | |
4123 | static void | |
4124 | test_1 () | |
4125 | { | |
4126 | char *x = anonmap (pg * 2); | |
4127 | if (x == (char *)MAP_FAILED) | |
4128 | perror_exit ("test 1 mmap", 4); | |
4129 | ||
4130 | signal (SIGSEGV, sigsegv); | |
4131 | if (setjmp (r)) | |
4132 | perror_exit ("test 1 fault", 5); | |
4133 | ||
4134 | x[0] = 1; | |
4135 | x[pg] = 1; | |
4136 | ||
4137 | if (munmap (x + pg, pg) < 0) | |
4138 | perror_exit ("test 1 munmap 1", 6); | |
4139 | x[0] = 2; | |
4140 | ||
4141 | if (setjmp (r) == 0) | |
4142 | { | |
4143 | x[pg] = 1; | |
4144 | perror_exit ("test 1 no fault", 7); | |
4145 | } | |
4146 | if (munmap (x, pg) < 0) | |
4147 | perror_exit ("test 1 munmap 2", 8); | |
4148 | } | |
4149 | ||
4150 | /* 2. If we map a 2-page region and unmap its first page, the second | |
4151 | page must remain. */ | |
4152 | static void | |
4153 | test_2 () | |
4154 | { | |
4155 | char *x = anonmap (pg * 2); | |
4156 | if (x == (char *)MAP_FAILED) | |
4157 | perror_exit ("test 2 mmap", 9); | |
4158 | ||
4159 | signal (SIGSEGV, sigsegv); | |
4160 | if (setjmp (r)) | |
4161 | perror_exit ("test 2 fault", 10); | |
4162 | ||
4163 | x[0] = 1; | |
4164 | x[pg] = 1; | |
4165 | ||
4166 | if (munmap (x, pg) < 0) | |
4167 | perror_exit ("test 2 munmap 1", 11); | |
4168 | ||
4169 | x[pg] = 2; | |
4170 | ||
4171 | if (setjmp (r) == 0) | |
4172 | { | |
4173 | x[0] = 1; | |
4174 | perror_exit ("test 2 no fault", 12); | |
4175 | } | |
4176 | ||
4177 | if (munmap (x+pg, pg) < 0) | |
4178 | perror_exit ("test 2 munmap 2", 13); | |
4179 | } | |
4180 | ||
4181 | /* 3. If we map two adjacent 1-page regions and unmap them both with | |
4182 | one munmap, both must go away. | |
4183 | ||
4184 | Getting two adjacent 1-page regions with two mmap calls is slightly | |
4185 | tricky. All OS's tested skip over already-allocated blocks; therefore | |
4186 | we have been careful to unmap all allocated regions in previous tests. | |
4187 | HP/UX allocates pages backward in memory. No OS has yet been observed | |
4188 | to be so perverse as to leave unmapped space between consecutive calls | |
4189 | to mmap. */ | |
4190 | ||
4191 | static void | |
4192 | test_3 () | |
4193 | { | |
4194 | char *x, *y, *z; | |
4195 | ||
4196 | x = anonmap (pg); | |
4197 | if (x == (char *)MAP_FAILED) | |
4198 | perror_exit ("test 3 mmap 1", 14); | |
4199 | y = anonmap (pg); | |
4200 | if (y == (char *)MAP_FAILED) | |
4201 | perror_exit ("test 3 mmap 2", 15); | |
4202 | ||
4203 | if (y != x + pg) | |
4204 | { | |
4205 | if (y == x - pg) | |
4206 | z = y, y = x, x = z; | |
4207 | else | |
4208 | { | |
4209 | fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n", | |
4210 | (unsigned long)x, (unsigned long)y); | |
4211 | exit (16); | |
4212 | } | |
4213 | } | |
4214 | ||
4215 | signal (SIGSEGV, sigsegv); | |
4216 | if (setjmp (r)) | |
4217 | perror_exit ("test 3 fault", 17); | |
4218 | ||
4219 | x[0] = 1; | |
4220 | y[0] = 1; | |
4221 | ||
4222 | if (munmap (x, pg*2) < 0) | |
4223 | perror_exit ("test 3 munmap", 18); | |
4224 | ||
4225 | if (setjmp (r) == 0) | |
4226 | { | |
4227 | x[0] = 1; | |
4228 | perror_exit ("test 3 no fault 1", 19); | |
4229 | } | |
4230 | ||
4231 | signal (SIGSEGV, sigsegv); | |
4232 | if (setjmp (r) == 0) | |
4233 | { | |
4234 | y[0] = 1; | |
4235 | perror_exit ("test 3 no fault 2", 20); | |
4236 | } | |
4237 | } | |
4238 | ||
4239 | int | |
4240 | main () | |
4241 | { | |
4242 | sigemptyset (&unblock_sigsegv); | |
4243 | sigaddset (&unblock_sigsegv, SIGSEGV); | |
4244 | pg = getpagesize (); | |
4245 | #ifndef USE_MAP_ANON | |
4246 | devzero = open ("/dev/zero", O_RDWR); | |
4247 | if (devzero < 0) | |
4248 | perror_exit ("open /dev/zero", 1); | |
4249 | #endif | |
4250 | ||
4251 | test_0(); | |
4252 | test_1(); | |
4253 | test_2(); | |
4254 | test_3(); | |
81bf3d9e | 4255 | |
4acab94b AO |
4256 | exit(0); |
4257 | } | |
81bf3d9e | 4258 | EOF |
825b6926 ZW |
4259 | |
4260 | echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6 | |
a15135c9 | 4261 | echo "configure:4262: checking for working mmap from /dev/zero" >&5 |
825b6926 ZW |
4262 | if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then |
4263 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4264 | else | |
4265 | if test "$cross_compiling" = yes; then | |
4266 | # If this is not cygwin, and /dev/zero is a character device, it's probably | |
4267 | # safe to assume it works. | |
4268 | case "$host_os" in | |
4269 | cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;; | |
4270 | * ) if test -c /dev/zero | |
4271 | then ac_cv_func_mmap_dev_zero=yes | |
4272 | else ac_cv_func_mmap_dev_zero=no | |
4273 | fi ;; | |
4274 | esac | |
4275 | else | |
4276 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 4277 | #line 4278 "configure" |
825b6926 ZW |
4278 | #include "confdefs.h" |
4279 | #include "ct-mmap.inc" | |
4280 | EOF | |
a15135c9 | 4281 | if { (eval echo configure:4282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
825b6926 ZW |
4282 | then |
4283 | ac_cv_func_mmap_dev_zero=yes | |
4284 | else | |
4285 | echo "configure: failed program was:" >&5 | |
4286 | cat conftest.$ac_ext >&5 | |
4287 | rm -fr conftest* | |
4288 | if test $? -lt 4 | |
4289 | then ac_cv_func_mmap_dev_zero=no | |
4290 | else ac_cv_func_mmap_dev_zero=buggy | |
4291 | fi | |
4292 | fi | |
4293 | rm -fr conftest* | |
4294 | fi | |
4295 | ||
4296 | ||
4297 | fi | |
4298 | ||
4299 | echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6 | |
4300 | if test $ac_cv_func_mmap_dev_zero = yes; then | |
4301 | cat >> confdefs.h <<\EOF | |
4302 | #define HAVE_MMAP_DEV_ZERO 1 | |
4303 | EOF | |
4304 | ||
4305 | fi | |
4306 | ||
4307 | echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6 | |
a15135c9 | 4308 | echo "configure:4309: checking for working mmap with MAP_ANON(YMOUS)" >&5 |
825b6926 ZW |
4309 | if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then |
4310 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4311 | else | |
4312 | if test "$cross_compiling" = yes; then | |
4313 | # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works | |
4314 | # just because it's there. Some SCO Un*xen define it but don't implement it. | |
4315 | ac_cv_func_mmap_anon=no | |
4316 | else | |
4317 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 4318 | #line 4319 "configure" |
825b6926 ZW |
4319 | #include "confdefs.h" |
4320 | #define USE_MAP_ANON | |
4321 | #include "ct-mmap.inc" | |
4322 | EOF | |
a15135c9 | 4323 | if { (eval echo configure:4324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
81bf3d9e | 4324 | then |
825b6926 | 4325 | ac_cv_func_mmap_anon=yes |
81bf3d9e RH |
4326 | else |
4327 | echo "configure: failed program was:" >&5 | |
4328 | cat conftest.$ac_ext >&5 | |
4329 | rm -fr conftest* | |
825b6926 ZW |
4330 | if test $? -lt 4 |
4331 | then ac_cv_func_mmap_anon=no | |
4332 | else ac_cv_func_mmap_anon=buggy | |
4333 | fi | |
81bf3d9e RH |
4334 | fi |
4335 | rm -fr conftest* | |
4336 | fi | |
4337 | ||
825b6926 | 4338 | |
81bf3d9e RH |
4339 | fi |
4340 | ||
825b6926 ZW |
4341 | echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6 |
4342 | if test $ac_cv_func_mmap_anon = yes; then | |
81bf3d9e | 4343 | cat >> confdefs.h <<\EOF |
825b6926 | 4344 | #define HAVE_MMAP_ANON 1 |
81bf3d9e RH |
4345 | EOF |
4346 | ||
4347 | fi | |
825b6926 | 4348 | rm -f ct-mmap.inc |
81bf3d9e | 4349 | |
56f02b88 | 4350 | echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6 |
a15135c9 | 4351 | echo "configure:4352: checking for working mmap of a file" >&5 |
56f02b88 ZW |
4352 | if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then |
4353 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4354 | else | |
4355 | # Create a file one thousand bytes long. | |
4356 | for i in 1 2 3 4 5 6 7 8 9 0 | |
4357 | do for j in 1 2 3 4 5 6 7 8 9 0 | |
4358 | do echo $i $j xxxxx | |
4359 | done | |
4360 | done > conftestdata$$ | |
4361 | ||
4362 | if test "$cross_compiling" = yes; then | |
4363 | ac_cv_func_mmap_file=no | |
4364 | else | |
4365 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 4366 | #line 4367 "configure" |
56f02b88 ZW |
4367 | #include "confdefs.h" |
4368 | ||
4369 | /* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by | |
4370 | Richard Henderson and Alexandre Oliva. | |
4371 | Check whether read-only mmap of a plain file works. */ | |
4372 | #include <sys/types.h> | |
4373 | #include <sys/stat.h> | |
4374 | #include <fcntl.h> | |
4375 | #include <sys/mman.h> | |
4376 | ||
4377 | int main() | |
4378 | { | |
4379 | char *x; | |
4380 | int fd; | |
4381 | struct stat st; | |
4382 | ||
4383 | fd = open("conftestdata$$", O_RDONLY); | |
4384 | if (fd < 0) | |
4385 | exit(1); | |
4386 | ||
4387 | if (fstat (fd, &st)) | |
4388 | exit(2); | |
4389 | ||
4390 | x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); | |
4391 | if (x == (char *) -1) | |
4392 | exit(3); | |
4393 | ||
4394 | if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ') | |
4395 | exit(4); | |
4396 | ||
4397 | if (munmap(x, st.st_size) < 0) | |
4398 | exit(5); | |
4399 | ||
4400 | exit(0); | |
4401 | } | |
4402 | EOF | |
a15135c9 | 4403 | if { (eval echo configure:4404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
56f02b88 ZW |
4404 | then |
4405 | ac_cv_func_mmap_file=yes | |
4406 | else | |
4407 | echo "configure: failed program was:" >&5 | |
4408 | cat conftest.$ac_ext >&5 | |
4409 | rm -fr conftest* | |
4410 | ac_cv_func_mmap_file=no | |
4411 | fi | |
4412 | rm -fr conftest* | |
4413 | fi | |
4414 | ||
4415 | fi | |
4416 | ||
4417 | echo "$ac_t""$ac_cv_func_mmap_file" 1>&6 | |
4418 | if test $ac_cv_func_mmap_file = yes; then | |
4419 | cat >> confdefs.h <<\EOF | |
4420 | #define HAVE_MMAP_FILE 1 | |
4421 | EOF | |
4422 | ||
4423 | fi | |
4424 | ||
81bf3d9e | 4425 | |
f91abfce TT |
4426 | |
4427 | ||
b7f2fb96 | 4428 | am_cv_lib_iconv_ldpath= |
f91abfce TT |
4429 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. |
4430 | if test "${with_libiconv_prefix+set}" = set; then | |
4431 | withval="$with_libiconv_prefix" | |
4432 | ||
4433 | for dir in `echo "$withval" | tr : ' '`; do | |
4434 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
b7f2fb96 | 4435 | if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi |
f91abfce TT |
4436 | done |
4437 | ||
4438 | fi | |
4439 | ||
4440 | ||
4441 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 | |
a15135c9 | 4442 | echo "configure:4443: checking for iconv" >&5 |
f91abfce TT |
4443 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
4444 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4445 | else | |
4446 | ||
4447 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
4448 | am_cv_lib_iconv=no | |
4449 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 4450 | #line 4451 "configure" |
f91abfce TT |
4451 | #include "confdefs.h" |
4452 | #include <stdlib.h> | |
4453 | #include <iconv.h> | |
4454 | int main() { | |
4455 | iconv_t cd = iconv_open("",""); | |
4456 | iconv(cd,NULL,NULL,NULL,NULL); | |
4457 | iconv_close(cd); | |
4458 | ; return 0; } | |
4459 | EOF | |
a15135c9 | 4460 | if { (eval echo configure:4461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
f91abfce TT |
4461 | rm -rf conftest* |
4462 | am_cv_func_iconv=yes | |
4463 | else | |
4464 | echo "configure: failed program was:" >&5 | |
4465 | cat conftest.$ac_ext >&5 | |
4466 | fi | |
4467 | rm -f conftest* | |
4468 | if test "$am_cv_func_iconv" != yes; then | |
4469 | am_save_LIBS="$LIBS" | |
b7f2fb96 | 4470 | LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" |
f91abfce | 4471 | cat > conftest.$ac_ext <<EOF |
a15135c9 | 4472 | #line 4473 "configure" |
f91abfce TT |
4473 | #include "confdefs.h" |
4474 | #include <stdlib.h> | |
4475 | #include <iconv.h> | |
4476 | int main() { | |
4477 | iconv_t cd = iconv_open("",""); | |
4478 | iconv(cd,NULL,NULL,NULL,NULL); | |
4479 | iconv_close(cd); | |
4480 | ; return 0; } | |
4481 | EOF | |
a15135c9 | 4482 | if { (eval echo configure:4483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
f91abfce TT |
4483 | rm -rf conftest* |
4484 | am_cv_lib_iconv=yes | |
4485 | am_cv_func_iconv=yes | |
4486 | else | |
4487 | echo "configure: failed program was:" >&5 | |
4488 | cat conftest.$ac_ext >&5 | |
4489 | fi | |
4490 | rm -f conftest* | |
4491 | LIBS="$am_save_LIBS" | |
4492 | fi | |
4493 | ||
4494 | fi | |
4495 | ||
4496 | echo "$ac_t""$am_cv_func_iconv" 1>&6 | |
4497 | if test "$am_cv_func_iconv" = yes; then | |
4498 | cat >> confdefs.h <<\EOF | |
4499 | #define HAVE_ICONV 1 | |
4500 | EOF | |
4501 | ||
4502 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 | |
a15135c9 | 4503 | echo "configure:4504: checking for iconv declaration" >&5 |
f91abfce TT |
4504 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
4505 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4506 | else | |
4507 | ||
4508 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 4509 | #line 4510 "configure" |
f91abfce TT |
4510 | #include "confdefs.h" |
4511 | ||
4512 | #include <stdlib.h> | |
4513 | #include <iconv.h> | |
4514 | extern | |
4515 | #ifdef __cplusplus | |
4516 | "C" | |
4517 | #endif | |
4518 | #if defined(__STDC__) || defined(__cplusplus) | |
4519 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
4520 | #else | |
4521 | size_t iconv(); | |
4522 | #endif | |
4523 | ||
4524 | int main() { | |
4525 | ||
4526 | ; return 0; } | |
4527 | EOF | |
a15135c9 | 4528 | if { (eval echo configure:4529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
f91abfce TT |
4529 | rm -rf conftest* |
4530 | am_cv_proto_iconv_arg1="" | |
4531 | else | |
4532 | echo "configure: failed program was:" >&5 | |
4533 | cat conftest.$ac_ext >&5 | |
4534 | rm -rf conftest* | |
4535 | am_cv_proto_iconv_arg1="const" | |
4536 | fi | |
4537 | rm -f conftest* | |
4538 | 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);" | |
4539 | fi | |
4540 | ||
4541 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
4542 | echo "$ac_t""${ac_t:- | |
4543 | }$am_cv_proto_iconv" 1>&6 | |
4544 | cat >> confdefs.h <<EOF | |
4545 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
4546 | EOF | |
4547 | ||
4548 | fi | |
4549 | LIBICONV= | |
4550 | if test "$am_cv_lib_iconv" = yes; then | |
b7f2fb96 | 4551 | LIBICONV="$am_cv_lib_iconv_ldpath -liconv" |
f91abfce TT |
4552 | fi |
4553 | ||
4554 | ||
4555 | ||
86cf1cbd KG |
4556 | # We will need to find libiberty.h and ansidecl.h |
4557 | saved_CFLAGS="$CFLAGS" | |
4558 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
8e944909 | 4559 | for ac_func in getenv atol sbrk abort atof getcwd getwd \ |
3b681e9d | 4560 | strsignal putc_unlocked fputs_unlocked fwrite_unlocked \ |
df2c9a44 | 4561 | fprintf_unlocked strstr errno \ |
c1800ec8 | 4562 | malloc realloc calloc free basename getopt clock |
81bf3d9e | 4563 | do |
f31e826b KG |
4564 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
4565 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 | |
a15135c9 | 4566 | echo "configure:4567: checking whether $ac_func is declared" >&5 |
f31e826b | 4567 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
81bf3d9e RH |
4568 | echo $ac_n "(cached) $ac_c" 1>&6 |
4569 | else | |
4570 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 4571 | #line 4572 "configure" |
81bf3d9e | 4572 | #include "confdefs.h" |
7afe8c41 KG |
4573 | #undef $ac_tr_decl |
4574 | #define $ac_tr_decl 1 | |
4575 | ||
d02af173 | 4576 | #include "ansidecl.h" |
86cf1cbd | 4577 | #include "system.h" |
f31e826b | 4578 | |
81bf3d9e | 4579 | int main() { |
86cf1cbd KG |
4580 | #ifndef $ac_func |
4581 | char *(*pfn) = (char *(*)) $ac_func ; | |
4582 | #endif | |
81bf3d9e RH |
4583 | ; return 0; } |
4584 | EOF | |
a15135c9 | 4585 | if { (eval echo configure:4586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
81bf3d9e | 4586 | rm -rf conftest* |
f31e826b | 4587 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e RH |
4588 | else |
4589 | echo "configure: failed program was:" >&5 | |
4590 | cat conftest.$ac_ext >&5 | |
4591 | rm -rf conftest* | |
f31e826b | 4592 | eval "gcc_cv_have_decl_$ac_func=no" |
81bf3d9e RH |
4593 | fi |
4594 | rm -f conftest* | |
4595 | fi | |
4596 | ||
f31e826b KG |
4597 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
4598 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF | |
86cf1cbd | 4599 | #define $ac_tr_decl 1 |
81bf3d9e | 4600 | EOF |
86cf1cbd | 4601 | |
81bf3d9e | 4602 | else |
f31e826b KG |
4603 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
4604 | #define $ac_tr_decl 0 | |
4605 | EOF | |
4606 | ||
81bf3d9e RH |
4607 | fi |
4608 | ||
4609 | done | |
86cf1cbd | 4610 | if test x = y ; then |
05e12634 | 4611 | cat >> confdefs.h <<\EOF |
f31e826b | 4612 | #define HAVE_DECL_GETENV 1 |
86cf1cbd | 4613 | EOF |
05e12634 | 4614 | cat >> confdefs.h <<\EOF |
f31e826b | 4615 | #define HAVE_DECL_ATOL 1 |
86cf1cbd | 4616 | EOF |
05e12634 | 4617 | cat >> confdefs.h <<\EOF |
f31e826b | 4618 | #define HAVE_DECL_SBRK 1 |
86cf1cbd | 4619 | EOF |
05e12634 | 4620 | cat >> confdefs.h <<\EOF |
f31e826b | 4621 | #define HAVE_DECL_ABORT 1 |
86cf1cbd | 4622 | EOF |
05e12634 | 4623 | cat >> confdefs.h <<\EOF |
f31e826b | 4624 | #define HAVE_DECL_ATOF 1 |
86cf1cbd | 4625 | EOF |
05e12634 | 4626 | cat >> confdefs.h <<\EOF |
f31e826b | 4627 | #define HAVE_DECL_GETCWD 1 |
86cf1cbd | 4628 | EOF |
05e12634 | 4629 | cat >> confdefs.h <<\EOF |
f31e826b | 4630 | #define HAVE_DECL_GETWD 1 |
86cf1cbd KG |
4631 | EOF |
4632 | \ | |
05e12634 | 4633 | cat >> confdefs.h <<\EOF |
f31e826b | 4634 | #define HAVE_DECL_STRSIGNAL 1 |
86cf1cbd | 4635 | EOF |
05e12634 | 4636 | cat >> confdefs.h <<\EOF |
f31e826b | 4637 | #define HAVE_DECL_PUTC_UNLOCKED 1 |
86cf1cbd | 4638 | EOF |
05e12634 | 4639 | cat >> confdefs.h <<\EOF |
f31e826b | 4640 | #define HAVE_DECL_FPUTS_UNLOCKED 1 |
3b681e9d ZW |
4641 | EOF |
4642 | cat >> confdefs.h <<\EOF | |
4643 | #define HAVE_DECL_FWRITE_UNLOCKED 1 | |
4644 | EOF | |
4645 | \ | |
4646 | cat >> confdefs.h <<\EOF | |
4647 | #define HAVE_DECL_FPRINTF_UNLOCKED 1 | |
86cf1cbd | 4648 | EOF |
05e12634 | 4649 | cat >> confdefs.h <<\EOF |
f31e826b | 4650 | #define HAVE_DECL_STRSTR 1 |
6c889b67 | 4651 | EOF |
05e12634 | 4652 | cat >> confdefs.h <<\EOF |
6c889b67 | 4653 | #define HAVE_DECL_ERRNO 1 |
86cf1cbd KG |
4654 | EOF |
4655 | \ | |
05e12634 | 4656 | cat >> confdefs.h <<\EOF |
f31e826b KG |
4657 | #define HAVE_DECL_MALLOC 1 |
4658 | EOF | |
05e12634 | 4659 | cat >> confdefs.h <<\EOF |
f31e826b | 4660 | #define HAVE_DECL_REALLOC 1 |
86cf1cbd | 4661 | EOF |
05e12634 | 4662 | cat >> confdefs.h <<\EOF |
f31e826b | 4663 | #define HAVE_DECL_CALLOC 1 |
86cf1cbd | 4664 | EOF |
05e12634 | 4665 | cat >> confdefs.h <<\EOF |
f31e826b | 4666 | #define HAVE_DECL_FREE 1 |
86cf1cbd | 4667 | EOF |
05e12634 | 4668 | cat >> confdefs.h <<\EOF |
f31e826b KG |
4669 | #define HAVE_DECL_BASENAME 1 |
4670 | EOF | |
05e12634 | 4671 | cat >> confdefs.h <<\EOF |
f31e826b | 4672 | #define HAVE_DECL_GETOPT 1 |
c1800ec8 | 4673 | EOF |
05e12634 | 4674 | cat >> confdefs.h <<\EOF |
c1800ec8 | 4675 | #define HAVE_DECL_CLOCK 1 |
81bf3d9e | 4676 | EOF |
81bf3d9e RH |
4677 | fi |
4678 | ||
81bf3d9e RH |
4679 | |
4680 | for ac_func in getrlimit setrlimit getrusage | |
4681 | do | |
f31e826b KG |
4682 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
4683 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 | |
a15135c9 | 4684 | echo "configure:4685: checking whether $ac_func is declared" >&5 |
f31e826b | 4685 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
81bf3d9e RH |
4686 | echo $ac_n "(cached) $ac_c" 1>&6 |
4687 | else | |
4688 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 4689 | #line 4690 "configure" |
81bf3d9e | 4690 | #include "confdefs.h" |
7afe8c41 KG |
4691 | #undef $ac_tr_decl |
4692 | #define $ac_tr_decl 1 | |
4693 | ||
d02af173 | 4694 | #include "ansidecl.h" |
86cf1cbd | 4695 | #include "system.h" |
81bf3d9e RH |
4696 | #ifdef HAVE_SYS_RESOURCE_H |
4697 | #include <sys/resource.h> | |
4698 | #endif | |
4699 | ||
f31e826b | 4700 | |
81bf3d9e | 4701 | int main() { |
86cf1cbd KG |
4702 | #ifndef $ac_func |
4703 | char *(*pfn) = (char *(*)) $ac_func ; | |
4704 | #endif | |
81bf3d9e RH |
4705 | ; return 0; } |
4706 | EOF | |
a15135c9 | 4707 | if { (eval echo configure:4708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
81bf3d9e | 4708 | rm -rf conftest* |
f31e826b | 4709 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e RH |
4710 | else |
4711 | echo "configure: failed program was:" >&5 | |
4712 | cat conftest.$ac_ext >&5 | |
4713 | rm -rf conftest* | |
f31e826b | 4714 | eval "gcc_cv_have_decl_$ac_func=no" |
81bf3d9e RH |
4715 | fi |
4716 | rm -f conftest* | |
4717 | fi | |
4718 | ||
f31e826b KG |
4719 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
4720 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF | |
86cf1cbd | 4721 | #define $ac_tr_decl 1 |
81bf3d9e | 4722 | EOF |
86cf1cbd | 4723 | |
81bf3d9e | 4724 | else |
f31e826b KG |
4725 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
4726 | #define $ac_tr_decl 0 | |
4727 | EOF | |
4728 | ||
81bf3d9e RH |
4729 | fi |
4730 | ||
4731 | done | |
86cf1cbd | 4732 | if test x = y ; then |
05e12634 | 4733 | cat >> confdefs.h <<\EOF |
f31e826b | 4734 | #define HAVE_DECL_GETRLIMIT 1 |
86cf1cbd | 4735 | EOF |
05e12634 | 4736 | cat >> confdefs.h <<\EOF |
f31e826b | 4737 | #define HAVE_DECL_SETRLIMIT 1 |
86cf1cbd | 4738 | EOF |
05e12634 | 4739 | cat >> confdefs.h <<\EOF |
f31e826b | 4740 | #define HAVE_DECL_GETRUSAGE 1 |
86cf1cbd KG |
4741 | EOF |
4742 | fi | |
4743 | ||
81bf3d9e | 4744 | |
c1800ec8 ZW |
4745 | for ac_func in times |
4746 | do | |
4747 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4748 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 | |
a15135c9 | 4749 | echo "configure:4750: checking whether $ac_func is declared" >&5 |
c1800ec8 ZW |
4750 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4751 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4752 | else | |
4753 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 4754 | #line 4755 "configure" |
c1800ec8 ZW |
4755 | #include "confdefs.h" |
4756 | #undef $ac_tr_decl | |
4757 | #define $ac_tr_decl 1 | |
4758 | ||
4759 | #include "ansidecl.h" | |
4760 | #include "system.h" | |
4761 | #ifdef HAVE_SYS_TIMES_H | |
4762 | #include <sys/times.h> | |
4763 | #endif | |
4764 | ||
4765 | ||
4766 | int main() { | |
4767 | #ifndef $ac_func | |
4768 | char *(*pfn) = (char *(*)) $ac_func ; | |
4769 | #endif | |
4770 | ; return 0; } | |
4771 | EOF | |
a15135c9 | 4772 | if { (eval echo configure:4773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c1800ec8 ZW |
4773 | rm -rf conftest* |
4774 | eval "gcc_cv_have_decl_$ac_func=yes" | |
4775 | else | |
4776 | echo "configure: failed program was:" >&5 | |
4777 | cat conftest.$ac_ext >&5 | |
4778 | rm -rf conftest* | |
4779 | eval "gcc_cv_have_decl_$ac_func=no" | |
4780 | fi | |
4781 | rm -f conftest* | |
4782 | fi | |
4783 | ||
4784 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
4785 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF | |
4786 | #define $ac_tr_decl 1 | |
4787 | EOF | |
4788 | ||
4789 | else | |
4790 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF | |
4791 | #define $ac_tr_decl 0 | |
4792 | EOF | |
4793 | ||
4794 | fi | |
4795 | ||
4796 | done | |
4797 | if test x = y ; then | |
05e12634 | 4798 | cat >> confdefs.h <<\EOF |
c1800ec8 ZW |
4799 | #define HAVE_DECL_TIMES 1 |
4800 | EOF | |
4801 | fi | |
4802 | ||
4803 | ||
4804 | # More time-related stuff. | |
4805 | echo $ac_n "checking for struct tms""... $ac_c" 1>&6 | |
a15135c9 | 4806 | echo "configure:4807: checking for struct tms" >&5 |
c1800ec8 ZW |
4807 | if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then |
4808 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4809 | else | |
4810 | ||
4811 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 4812 | #line 4813 "configure" |
c1800ec8 ZW |
4813 | #include "confdefs.h" |
4814 | ||
4815 | #include "ansidecl.h" | |
4816 | #include "system.h" | |
4817 | #ifdef HAVE_SYS_TIMES_H | |
4818 | #include <sys/times.h> | |
4819 | #endif | |
4820 | ||
4821 | int main() { | |
4822 | struct tms tms; | |
4823 | ; return 0; } | |
4824 | EOF | |
a15135c9 | 4825 | if { (eval echo configure:4826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c1800ec8 ZW |
4826 | rm -rf conftest* |
4827 | ac_cv_struct_tms=yes | |
4828 | else | |
4829 | echo "configure: failed program was:" >&5 | |
4830 | cat conftest.$ac_ext >&5 | |
4831 | rm -rf conftest* | |
4832 | ac_cv_struct_tms=no | |
4833 | fi | |
4834 | rm -f conftest* | |
4835 | fi | |
4836 | ||
4837 | echo "$ac_t""$ac_cv_struct_tms" 1>&6 | |
4838 | if test $ac_cv_struct_tms = yes; then | |
4839 | cat >> confdefs.h <<\EOF | |
4840 | #define HAVE_STRUCT_TMS 1 | |
4841 | EOF | |
4842 | ||
4843 | fi | |
4844 | ||
4845 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
4846 | # revisit after autoconf 2.50. | |
4847 | echo $ac_n "checking for clock_t""... $ac_c" 1>&6 | |
a15135c9 | 4848 | echo "configure:4849: checking for clock_t" >&5 |
c1800ec8 ZW |
4849 | if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then |
4850 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4851 | else | |
4852 | ||
4853 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 4854 | #line 4855 "configure" |
c1800ec8 ZW |
4855 | #include "confdefs.h" |
4856 | ||
4857 | #include "ansidecl.h" | |
4858 | #include "system.h" | |
4859 | ||
4860 | int main() { | |
4861 | clock_t x; | |
4862 | ; return 0; } | |
4863 | EOF | |
a15135c9 | 4864 | if { (eval echo configure:4865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c1800ec8 ZW |
4865 | rm -rf conftest* |
4866 | gcc_cv_type_clock_t=yes | |
4867 | else | |
4868 | echo "configure: failed program was:" >&5 | |
4869 | cat conftest.$ac_ext >&5 | |
4870 | rm -rf conftest* | |
4871 | gcc_cv_type_clock_t=no | |
4872 | fi | |
4873 | rm -f conftest* | |
4874 | fi | |
4875 | ||
4876 | echo "$ac_t""$gcc_cv_type_clock_t" 1>&6 | |
4877 | if test $gcc_cv_type_clock_t = yes; then | |
4878 | cat >> confdefs.h <<\EOF | |
4879 | #define HAVE_CLOCK_T 1 | |
4880 | EOF | |
4881 | ||
4882 | fi | |
4883 | ||
86cf1cbd KG |
4884 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
4885 | CFLAGS="$saved_CFLAGS" | |
81bf3d9e | 4886 | |
75923b2f MK |
4887 | # mkdir takes a single argument on some systems. |
4888 | echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6 | |
a15135c9 | 4889 | echo "configure:4890: checking if mkdir takes one argument" >&5 |
75923b2f MK |
4890 | if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then |
4891 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4892 | else | |
4893 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 4894 | #line 4895 "configure" |
75923b2f MK |
4895 | #include "confdefs.h" |
4896 | ||
4897 | #include <sys/types.h> | |
4898 | #ifdef HAVE_SYS_STAT_H | |
4899 | # include <sys/stat.h> | |
4900 | #endif | |
4901 | #ifdef HAVE_UNISTD_H | |
4902 | # include <unistd.h> | |
4903 | #endif | |
4904 | #ifdef HAVE_DIRECT_H | |
4905 | # include <direct.h> | |
4906 | #endif | |
4907 | int main() { | |
4908 | mkdir ("foo", 0); | |
4909 | ; return 0; } | |
4910 | EOF | |
a15135c9 | 4911 | if { (eval echo configure:4912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75923b2f MK |
4912 | rm -rf conftest* |
4913 | gcc_cv_mkdir_takes_one_arg=no | |
4914 | else | |
4915 | echo "configure: failed program was:" >&5 | |
4916 | cat conftest.$ac_ext >&5 | |
4917 | rm -rf conftest* | |
4918 | gcc_cv_mkdir_takes_one_arg=yes | |
4919 | fi | |
4920 | rm -f conftest* | |
4921 | fi | |
4922 | ||
4923 | echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6 | |
4924 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then | |
4925 | cat >> confdefs.h <<\EOF | |
4926 | #define MKDIR_TAKES_ONE_ARG 1 | |
4927 | EOF | |
4928 | ||
4929 | fi | |
4930 | ||
4931 | ||
861bb6c1 JL |
4932 | # File extensions |
4933 | manext='.1' | |
4934 | objext='.o' | |
4935 | ||
4936 | ||
4937 | ||
4938 | build_xm_file= | |
f6cb0e63 | 4939 | build_xm_defines= |
861bb6c1 JL |
4940 | build_install_headers_dir=install-headers-tar |
4941 | build_exeext= | |
4942 | host_xm_file= | |
f6cb0e63 | 4943 | host_xm_defines= |
861bb6c1 JL |
4944 | host_xmake_file= |
4945 | host_truncate_target= | |
6e26218f | 4946 | host_exeext= |
861bb6c1 JL |
4947 | |
4948 | # Decode the host machine, then the target machine. | |
4949 | # For the host machine, we save the xm_file variable as host_xm_file; | |
4950 | # then we decode the target machine and forget everything else | |
4951 | # that came from the host machine. | |
4952 | for machine in $build $host $target; do | |
61ed06c3 | 4953 | . ${srcdir}/config.gcc |
861bb6c1 JL |
4954 | done |
4955 | ||
4956 | extra_objs="${host_extra_objs} ${extra_objs}" | |
4957 | ||
4958 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 4959 | if test x"$tm_file" = x |
861bb6c1 JL |
4960 | then tm_file=$cpu_type/$cpu_type.h; fi |
4961 | ||
6b2adea9 | 4962 | if test x"$extra_headers" = x |
861bb6c1 JL |
4963 | then extra_headers=; fi |
4964 | ||
75bffa71 | 4965 | if test x$md_file = x |
e98e406f | 4966 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 4967 | |
75bffa71 | 4968 | if test x$out_file = x |
861bb6c1 JL |
4969 | then out_file=$cpu_type/$cpu_type.c; fi |
4970 | ||
75bffa71 | 4971 | if test x"$tmake_file" = x |
861bb6c1 JL |
4972 | then tmake_file=$cpu_type/t-$cpu_type |
4973 | fi | |
4974 | ||
90e6a802 | 4975 | if test x"$dwarf2" = xyes |
756ee602 | 4976 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
4977 | fi |
4978 | ||
75bffa71 | 4979 | if test x$float_format = x |
861bb6c1 JL |
4980 | then float_format=i64 |
4981 | fi | |
4982 | ||
027ea2a7 JW |
4983 | if test $float_format = none |
4984 | then float_h_file=Makefile.in | |
4985 | else float_h_file=float-$float_format.h | |
4986 | fi | |
4987 | ||
9fc9b82a | 4988 | # Handle cpp installation. |
3ecc3258 | 4989 | if test x$enable_cpp != xno |
9fc9b82a L |
4990 | then |
4991 | tmake_file="$tmake_file t-install-cpp" | |
4992 | fi | |
4993 | ||
861bb6c1 | 4994 | # Say what files are being used for the output code and MD file. |
11642c3a | 4995 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
4996 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
4997 | ||
11642c3a | 4998 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
4999 | # about them and drop them. |
5000 | ||
11642c3a ZW |
5001 | bx= |
5002 | for x in $build_xm_file; do | |
5003 | if test -f $srcdir/config/$x | |
5004 | then bx="$bx $x" | |
11642c3a ZW |
5005 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
5006 | fi | |
5007 | done | |
5008 | build_xm_file="$bx" | |
5009 | ||
5010 | hx= | |
5011 | for x in $host_xm_file; do | |
5012 | if test -f $srcdir/config/$x | |
5013 | then hx="$hx $x" | |
11642c3a ZW |
5014 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
5015 | fi | |
5016 | done | |
5017 | host_xm_file="$hx" | |
5018 | ||
5019 | tx= | |
5020 | for x in $xm_file; do | |
5021 | if test -f $srcdir/config/$x | |
5022 | then tx="$tx $x" | |
11642c3a ZW |
5023 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
5024 | fi | |
5025 | done | |
5026 | xm_file="$tx" | |
5027 | ||
861bb6c1 JL |
5028 | count=a |
5029 | for f in $tm_file; do | |
5030 | count=${count}x | |
5031 | done | |
75bffa71 | 5032 | if test $count = ax; then |
861bb6c1 JL |
5033 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
5034 | else | |
5035 | echo "Using the following target machine macro files:" | |
5036 | for f in $tm_file; do | |
5037 | echo " $srcdir/config/$f" | |
5038 | done | |
5039 | fi | |
5040 | ||
5041 | count=a | |
5042 | for f in $host_xm_file; do | |
5043 | count=${count}x | |
5044 | done | |
11642c3a ZW |
5045 | if test $count = a; then |
5046 | : | |
5047 | elif test $count = ax; then | |
861bb6c1 JL |
5048 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
5049 | else | |
5050 | echo "Using the following host machine macro files:" | |
5051 | for f in $host_xm_file; do | |
5052 | echo " $srcdir/config/$f" | |
5053 | done | |
5054 | fi | |
5055 | ||
75bffa71 | 5056 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
5057 | count=a |
5058 | for f in $build_xm_file; do | |
5059 | count=${count}x | |
5060 | done | |
11642c3a ZW |
5061 | if test $count = a; then |
5062 | : | |
5063 | elif test $count = ax; then | |
861bb6c1 JL |
5064 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
5065 | else | |
5066 | echo "Using the following build machine macro files:" | |
5067 | for f in $build_xm_file; do | |
5068 | echo " $srcdir/config/$f" | |
5069 | done | |
5070 | fi | |
5071 | fi | |
5072 | ||
75bffa71 ILT |
5073 | if test x$thread_file = x; then |
5074 | if test x$target_thread_file != x; then | |
a851212a JW |
5075 | thread_file=$target_thread_file |
5076 | else | |
5077 | thread_file='single' | |
5078 | fi | |
861bb6c1 JL |
5079 | fi |
5080 | ||
b7cb92ad | 5081 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 5082 | # the first file included by config.h. |
b7cb92ad | 5083 | # If host=build, it is correct to have hconfig include auto-host.h |
db81d74a RH |
5084 | # as well. If host!=build, we are in error and need to do more |
5085 | # work to find out the build config parameters. | |
75bffa71 | 5086 | if test x$host = x$build |
db81d74a | 5087 | then |
eaf4e618 | 5088 | build_auto=auto-host.h |
06f0b04c | 5089 | FORBUILD=.. |
b7cb92ad JL |
5090 | else |
5091 | # We create a subdir, then run autoconf in the subdir. | |
5092 | # To prevent recursion we set host and build for the new | |
5093 | # invocation of configure to the build for this invocation | |
5094 | # of configure. | |
5095 | tempdir=build.$$ | |
5096 | rm -rf $tempdir | |
5097 | mkdir $tempdir | |
5098 | cd $tempdir | |
5099 | case ${srcdir} in | |
255b8a49 | 5100 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
5101 | *) realsrcdir=../${srcdir};; |
5102 | esac | |
d920e825 L |
5103 | saved_CFLAGS="${CFLAGS}" |
5104 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
5105 | ${realsrcdir}/configure \ | |
534d0cc0 | 5106 | --target=$target_alias --host=$build_alias --build=$build_alias |
d920e825 | 5107 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
5108 | |
5109 | # We just finished tests for the build machine, so rename | |
5110 | # the file auto-build.h in the gcc directory. | |
5111 | mv auto-host.h ../auto-build.h | |
5112 | cd .. | |
5113 | rm -rf $tempdir | |
eaf4e618 | 5114 | build_auto=auto-build.h |
06f0b04c | 5115 | FORBUILD=../$build |
db81d74a RH |
5116 | fi |
5117 | ||
06f0b04c | 5118 | |
eaf4e618 | 5119 | tm_file="${tm_file} defaults.h" |
d02af173 ZW |
5120 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file} ${tm_file}" |
5121 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file} ${tm_file}" | |
5122 | xm_file="ansidecl.h ${xm_file} ${tm_file}" | |
0056a9b5 | 5123 | |
861bb6c1 | 5124 | # Truncate the target if necessary |
75bffa71 | 5125 | if test x$host_truncate_target != x; then |
861bb6c1 JL |
5126 | target=`echo $target | sed -e 's/\(..............\).*/\1/'` |
5127 | fi | |
5128 | ||
f1943b77 | 5129 | # Get the version trigger filename from the toplevel |
75bffa71 | 5130 | if test "${with_gcc_version_trigger+set}" = set; then |
f1943b77 MH |
5131 | gcc_version_trigger=$with_gcc_version_trigger |
5132 | else | |
5133 | gcc_version_trigger=${srcdir}/version.c | |
5134 | fi | |
022dae81 | 5135 | gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'` |
8763704d | 5136 | gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` |
861bb6c1 | 5137 | |
cc1e60ea | 5138 | # Compile in configure arguments. |
8105825d | 5139 | if test -f configargs.h ; then |
cc1e60ea | 5140 | # Being re-configured. |
022dae81 | 5141 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
5142 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
5143 | else | |
5144 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
5145 | fi | |
5146 | cat > configargs.h <<EOF | |
5147 | /* Generated automatically. */ | |
5148 | static const char configuration_arguments[] = "$gcc_config_arguments"; | |
a6687d2b | 5149 | static const char thread_model[] = "$thread_file"; |
cc1e60ea JM |
5150 | EOF |
5151 | ||
ab87f8c8 JL |
5152 | # Internationalization |
5153 | PACKAGE=gcc | |
5154 | VERSION="$gcc_version" | |
861bb6c1 | 5155 | |
ab87f8c8 JL |
5156 | |
5157 | ||
dc6746e7 | 5158 | # Enable NLS support by default |
ab87f8c8 JL |
5159 | # Check whether --enable-nls or --disable-nls was given. |
5160 | if test "${enable_nls+set}" = set; then | |
5161 | enableval="$enable_nls" | |
5162 | : | |
861bb6c1 | 5163 | else |
dc6746e7 | 5164 | enable_nls=yes |
861bb6c1 | 5165 | fi |
861bb6c1 | 5166 | |
861bb6c1 | 5167 | |
dc6746e7 PT |
5168 | # if cross compiling, disable NLS support. |
5169 | # It's not worth the trouble, at least for now. | |
5170 | ||
063a4b85 | 5171 | if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then |
dc6746e7 PT |
5172 | echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2 |
5173 | enable_nls=no | |
5174 | fi | |
5175 | ||
861bb6c1 | 5176 | |
71a94577 ZW |
5177 | |
5178 | echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6 | |
a15135c9 | 5179 | echo "configure:5180: checking for library containing strerror" >&5 |
71a94577 | 5180 | if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then |
ab87f8c8 JL |
5181 | echo $ac_n "(cached) $ac_c" 1>&6 |
5182 | else | |
71a94577 ZW |
5183 | ac_func_search_save_LIBS="$LIBS" |
5184 | ac_cv_search_strerror="no" | |
ab87f8c8 | 5185 | cat > conftest.$ac_ext <<EOF |
a15135c9 | 5186 | #line 5187 "configure" |
ab87f8c8 JL |
5187 | #include "confdefs.h" |
5188 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5189 | /* We use char because int might match the return type of a gcc2 | |
5190 | builtin and then its argument prototype would still apply. */ | |
5191 | char strerror(); | |
861bb6c1 | 5192 | |
ab87f8c8 JL |
5193 | int main() { |
5194 | strerror() | |
5195 | ; return 0; } | |
5196 | EOF | |
a15135c9 | 5197 | if { (eval echo configure:5198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 5198 | rm -rf conftest* |
71a94577 | 5199 | ac_cv_search_strerror="none required" |
ab87f8c8 JL |
5200 | else |
5201 | echo "configure: failed program was:" >&5 | |
5202 | cat conftest.$ac_ext >&5 | |
861bb6c1 | 5203 | fi |
ab87f8c8 | 5204 | rm -f conftest* |
71a94577 ZW |
5205 | test "$ac_cv_search_strerror" = "no" && for i in cposix; do |
5206 | LIBS="-l$i $ac_func_search_save_LIBS" | |
5207 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 5208 | #line 5209 "configure" |
71a94577 ZW |
5209 | #include "confdefs.h" |
5210 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5211 | /* We use char because int might match the return type of a gcc2 | |
5212 | builtin and then its argument prototype would still apply. */ | |
5213 | char strerror(); | |
861bb6c1 | 5214 | |
71a94577 ZW |
5215 | int main() { |
5216 | strerror() | |
5217 | ; return 0; } | |
5218 | EOF | |
a15135c9 | 5219 | if { (eval echo configure:5220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
71a94577 ZW |
5220 | rm -rf conftest* |
5221 | ac_cv_search_strerror="-l$i" | |
5222 | break | |
861bb6c1 | 5223 | else |
71a94577 ZW |
5224 | echo "configure: failed program was:" >&5 |
5225 | cat conftest.$ac_ext >&5 | |
5226 | fi | |
5227 | rm -f conftest* | |
5228 | done | |
5229 | LIBS="$ac_func_search_save_LIBS" | |
861bb6c1 JL |
5230 | fi |
5231 | ||
71a94577 ZW |
5232 | echo "$ac_t""$ac_cv_search_strerror" 1>&6 |
5233 | if test "$ac_cv_search_strerror" != "no"; then | |
5234 | test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" | |
5235 | ||
5236 | else : | |
5237 | ||
5238 | fi | |
ab87f8c8 | 5239 | |
2ce3c6c6 | 5240 | |
ab87f8c8 | 5241 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
a15135c9 | 5242 | echo "configure:5243: checking for working const" >&5 |
ab87f8c8 JL |
5243 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
5244 | echo $ac_n "(cached) $ac_c" 1>&6 | |
861bb6c1 | 5245 | else |
ab87f8c8 | 5246 | cat > conftest.$ac_ext <<EOF |
a15135c9 | 5247 | #line 5248 "configure" |
ab87f8c8 | 5248 | #include "confdefs.h" |
861bb6c1 | 5249 | |
ab87f8c8 JL |
5250 | int main() { |
5251 | ||
5252 | /* Ultrix mips cc rejects this. */ | |
130fadbb | 5253 | typedef int charset[2]; const charset x; |
ab87f8c8 JL |
5254 | /* SunOS 4.1.1 cc rejects this. */ |
5255 | char const *const *ccp; | |
5256 | char **p; | |
5257 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
5258 | struct point {int x, y;}; | |
5259 | static struct point const zero = {0,0}; | |
5260 | /* AIX XL C 1.02.0.0 rejects this. | |
5261 | It does not let you subtract one const X* pointer from another in an arm | |
5262 | of an if-expression whose if-part is not a constant expression */ | |
5263 | const char *g = "string"; | |
5264 | ccp = &g + (g ? g-g : 0); | |
5265 | /* HPUX 7.0 cc rejects these. */ | |
5266 | ++ccp; | |
5267 | p = (char**) ccp; | |
5268 | ccp = (char const *const *) p; | |
5269 | { /* SCO 3.2v4 cc rejects this. */ | |
5270 | char *t; | |
5271 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5272 | ||
5273 | *t++ = 0; | |
5274 | } | |
5275 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
5276 | int x[] = {25, 17}; | |
5277 | const int *foo = &x[0]; | |
5278 | ++foo; | |
5279 | } | |
5280 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
5281 | typedef const int *iptr; | |
5282 | iptr p = 0; | |
5283 | ++p; | |
5284 | } | |
5285 | { /* AIX XL C 1.02.0.0 rejects this saying | |
5286 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
5287 | struct s { int j; const int *ap[3]; }; | |
5288 | struct s *b; b->j = 5; | |
5289 | } | |
5290 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
5291 | const int foo = 10; | |
5292 | } | |
5293 | ||
5294 | ; return 0; } | |
5295 | EOF | |
a15135c9 | 5296 | if { (eval echo configure:5297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
ab87f8c8 JL |
5297 | rm -rf conftest* |
5298 | ac_cv_c_const=yes | |
861bb6c1 | 5299 | else |
ab87f8c8 JL |
5300 | echo "configure: failed program was:" >&5 |
5301 | cat conftest.$ac_ext >&5 | |
5302 | rm -rf conftest* | |
5303 | ac_cv_c_const=no | |
5304 | fi | |
5305 | rm -f conftest* | |
861bb6c1 JL |
5306 | fi |
5307 | ||
ab87f8c8 JL |
5308 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
5309 | if test $ac_cv_c_const = no; then | |
5310 | cat >> confdefs.h <<\EOF | |
5311 | #define const | |
5312 | EOF | |
5313 | ||
861bb6c1 JL |
5314 | fi |
5315 | ||
ab87f8c8 | 5316 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
a15135c9 | 5317 | echo "configure:5318: checking for off_t" >&5 |
ab87f8c8 JL |
5318 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
5319 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5320 | else | |
5321 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 5322 | #line 5323 "configure" |
ab87f8c8 JL |
5323 | #include "confdefs.h" |
5324 | #include <sys/types.h> | |
5325 | #if STDC_HEADERS | |
5326 | #include <stdlib.h> | |
5327 | #include <stddef.h> | |
5328 | #endif | |
5329 | EOF | |
5330 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
b27d2bd5 | 5331 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
ab87f8c8 | 5332 | rm -rf conftest* |
cb65112a | 5333 | ac_cv_type_off_t=yes |
ab87f8c8 JL |
5334 | else |
5335 | rm -rf conftest* | |
cb65112a | 5336 | ac_cv_type_off_t=no |
ab87f8c8 JL |
5337 | fi |
5338 | rm -f conftest* | |
5339 | ||
5340 | fi | |
cb65112a AO |
5341 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 |
5342 | if test $ac_cv_type_off_t = no; then | |
5343 | cat >> confdefs.h <<\EOF | |
ab87f8c8 JL |
5344 | #define off_t long |
5345 | EOF | |
5346 | ||
5347 | fi | |
5348 | ||
5349 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
a15135c9 | 5350 | echo "configure:5351: checking for size_t" >&5 |
ab87f8c8 JL |
5351 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
5352 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5353 | else | |
5354 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 5355 | #line 5356 "configure" |
ab87f8c8 JL |
5356 | #include "confdefs.h" |
5357 | #include <sys/types.h> | |
5358 | #if STDC_HEADERS | |
5359 | #include <stdlib.h> | |
5360 | #include <stddef.h> | |
5361 | #endif | |
5362 | EOF | |
5363 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
b27d2bd5 | 5364 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
ab87f8c8 | 5365 | rm -rf conftest* |
cb65112a | 5366 | ac_cv_type_size_t=yes |
ab87f8c8 JL |
5367 | else |
5368 | rm -rf conftest* | |
cb65112a | 5369 | ac_cv_type_size_t=no |
ab87f8c8 JL |
5370 | fi |
5371 | rm -f conftest* | |
5372 | ||
5373 | fi | |
cb65112a AO |
5374 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 |
5375 | if test $ac_cv_type_size_t = no; then | |
5376 | cat >> confdefs.h <<\EOF | |
ab87f8c8 JL |
5377 | #define size_t unsigned |
5378 | EOF | |
5379 | ||
5380 | fi | |
5381 | ||
71a94577 ZW |
5382 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
5383 | # for constant arguments. Useless! | |
5384 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
a15135c9 | 5385 | echo "configure:5386: checking for working alloca.h" >&5 |
71a94577 | 5386 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
ab87f8c8 JL |
5387 | echo $ac_n "(cached) $ac_c" 1>&6 |
5388 | else | |
5389 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 5390 | #line 5391 "configure" |
ab87f8c8 | 5391 | #include "confdefs.h" |
71a94577 ZW |
5392 | #include <alloca.h> |
5393 | int main() { | |
5394 | char *p = alloca(2 * sizeof(int)); | |
5395 | ; return 0; } | |
ab87f8c8 | 5396 | EOF |
a15135c9 | 5397 | if { (eval echo configure:5398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 5398 | rm -rf conftest* |
71a94577 | 5399 | ac_cv_header_alloca_h=yes |
ab87f8c8 | 5400 | else |
ab87f8c8 JL |
5401 | echo "configure: failed program was:" >&5 |
5402 | cat conftest.$ac_ext >&5 | |
5403 | rm -rf conftest* | |
71a94577 | 5404 | ac_cv_header_alloca_h=no |
ab87f8c8 JL |
5405 | fi |
5406 | rm -f conftest* | |
5407 | fi | |
71a94577 ZW |
5408 | |
5409 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
5410 | if test $ac_cv_header_alloca_h = yes; then | |
5411 | cat >> confdefs.h <<\EOF | |
5412 | #define HAVE_ALLOCA_H 1 | |
ab87f8c8 | 5413 | EOF |
71a94577 | 5414 | |
ab87f8c8 | 5415 | fi |
ab87f8c8 | 5416 | |
71a94577 | 5417 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 |
a15135c9 | 5418 | echo "configure:5419: checking for alloca" >&5 |
71a94577 | 5419 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
ab87f8c8 JL |
5420 | echo $ac_n "(cached) $ac_c" 1>&6 |
5421 | else | |
5422 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 5423 | #line 5424 "configure" |
ab87f8c8 | 5424 | #include "confdefs.h" |
ab87f8c8 | 5425 | |
71a94577 ZW |
5426 | #ifdef __GNUC__ |
5427 | # define alloca __builtin_alloca | |
ab87f8c8 | 5428 | #else |
71a94577 ZW |
5429 | # ifdef _MSC_VER |
5430 | # include <malloc.h> | |
5431 | # define alloca _alloca | |
5432 | # else | |
5433 | # if HAVE_ALLOCA_H | |
5434 | # include <alloca.h> | |
5435 | # else | |
5436 | # ifdef _AIX | |
5437 | #pragma alloca | |
5438 | # else | |
5439 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
5440 | char *alloca (); | |
5441 | # endif | |
5442 | # endif | |
5443 | # endif | |
5444 | # endif | |
ab87f8c8 JL |
5445 | #endif |
5446 | ||
71a94577 ZW |
5447 | int main() { |
5448 | char *p = (char *) alloca(1); | |
ab87f8c8 JL |
5449 | ; return 0; } |
5450 | EOF | |
a15135c9 | 5451 | if { (eval echo configure:5452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 5452 | rm -rf conftest* |
71a94577 | 5453 | ac_cv_func_alloca_works=yes |
ab87f8c8 JL |
5454 | else |
5455 | echo "configure: failed program was:" >&5 | |
5456 | cat conftest.$ac_ext >&5 | |
5457 | rm -rf conftest* | |
71a94577 | 5458 | ac_cv_func_alloca_works=no |
ab87f8c8 JL |
5459 | fi |
5460 | rm -f conftest* | |
5461 | fi | |
5462 | ||
71a94577 ZW |
5463 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 |
5464 | if test $ac_cv_func_alloca_works = yes; then | |
5465 | cat >> confdefs.h <<\EOF | |
5466 | #define HAVE_ALLOCA 1 | |
ab87f8c8 | 5467 | EOF |
71a94577 ZW |
5468 | |
5469 | fi | |
5470 | ||
5471 | if test $ac_cv_func_alloca_works = no; then | |
5472 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
5473 | # that cause trouble. Some versions do not even contain alloca or | |
5474 | # contain a buggy version. If you still want to use their alloca, | |
5475 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
5476 | ALLOCA=alloca.${ac_objext} | |
5477 | cat >> confdefs.h <<\EOF | |
5478 | #define C_ALLOCA 1 | |
5479 | EOF | |
5480 | ||
5481 | ||
5482 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
a15135c9 | 5483 | echo "configure:5484: checking whether alloca needs Cray hooks" >&5 |
71a94577 ZW |
5484 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
5485 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 5486 | else |
71a94577 | 5487 | cat > conftest.$ac_ext <<EOF |
a15135c9 | 5488 | #line 5489 "configure" |
71a94577 ZW |
5489 | #include "confdefs.h" |
5490 | #if defined(CRAY) && ! defined(CRAY2) | |
5491 | webecray | |
5492 | #else | |
5493 | wenotbecray | |
5494 | #endif | |
5495 | ||
5496 | EOF | |
5497 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5498 | egrep "webecray" >/dev/null 2>&1; then | |
5499 | rm -rf conftest* | |
5500 | ac_cv_os_cray=yes | |
5501 | else | |
5502 | rm -rf conftest* | |
5503 | ac_cv_os_cray=no | |
ab87f8c8 | 5504 | fi |
71a94577 | 5505 | rm -f conftest* |
ab87f8c8 | 5506 | |
71a94577 | 5507 | fi |
ab87f8c8 | 5508 | |
71a94577 ZW |
5509 | echo "$ac_t""$ac_cv_os_cray" 1>&6 |
5510 | if test $ac_cv_os_cray = yes; then | |
5511 | for ac_func in _getb67 GETB67 getb67; do | |
5512 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
a15135c9 | 5513 | echo "configure:5514: checking for $ac_func" >&5 |
ab87f8c8 JL |
5514 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5515 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5516 | else | |
5517 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 5518 | #line 5519 "configure" |
ab87f8c8 JL |
5519 | #include "confdefs.h" |
5520 | /* System header to define __stub macros and hopefully few prototypes, | |
5521 | which can conflict with char $ac_func(); below. */ | |
5522 | #include <assert.h> | |
5523 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5524 | /* We use char because int might match the return type of a gcc2 | |
5525 | builtin and then its argument prototype would still apply. */ | |
5526 | char $ac_func(); | |
5527 | ||
5528 | int main() { | |
5529 | ||
5530 | /* The GNU C library defines this for functions which it implements | |
5531 | to always fail with ENOSYS. Some functions are actually named | |
5532 | something starting with __ and the normal name is an alias. */ | |
5533 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5534 | choke me | |
5535 | #else | |
99b09ff3 | 5536 | $ac_func(); |
ab87f8c8 JL |
5537 | #endif |
5538 | ||
5539 | ; return 0; } | |
5540 | EOF | |
a15135c9 | 5541 | if { (eval echo configure:5542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 JL |
5542 | rm -rf conftest* |
5543 | eval "ac_cv_func_$ac_func=yes" | |
5544 | else | |
5545 | echo "configure: failed program was:" >&5 | |
5546 | cat conftest.$ac_ext >&5 | |
5547 | rm -rf conftest* | |
5548 | eval "ac_cv_func_$ac_func=no" | |
5549 | fi | |
5550 | rm -f conftest* | |
5551 | fi | |
5552 | ||
5553 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5554 | echo "$ac_t""yes" 1>&6 | |
ab87f8c8 | 5555 | cat >> confdefs.h <<EOF |
71a94577 | 5556 | #define CRAY_STACKSEG_END $ac_func |
ab87f8c8 | 5557 | EOF |
71a94577 ZW |
5558 | |
5559 | break | |
ab87f8c8 JL |
5560 | else |
5561 | echo "$ac_t""no" 1>&6 | |
5562 | fi | |
ab87f8c8 | 5563 | |
71a94577 ZW |
5564 | done |
5565 | fi | |
ab87f8c8 | 5566 | |
71a94577 | 5567 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 |
a15135c9 | 5568 | echo "configure:5569: checking stack direction for C alloca" >&5 |
71a94577 | 5569 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
ab87f8c8 | 5570 | echo $ac_n "(cached) $ac_c" 1>&6 |
71a94577 ZW |
5571 | else |
5572 | if test "$cross_compiling" = yes; then | |
5573 | ac_cv_c_stack_direction=0 | |
ab87f8c8 JL |
5574 | else |
5575 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 5576 | #line 5577 "configure" |
ab87f8c8 | 5577 | #include "confdefs.h" |
71a94577 ZW |
5578 | find_stack_direction () |
5579 | { | |
5580 | static char *addr = 0; | |
5581 | auto char dummy; | |
5582 | if (addr == 0) | |
5583 | { | |
5584 | addr = &dummy; | |
5585 | return find_stack_direction (); | |
5586 | } | |
5587 | else | |
5588 | return (&dummy > addr) ? 1 : -1; | |
5589 | } | |
5590 | main () | |
5591 | { | |
5592 | exit (find_stack_direction() < 0); | |
5593 | } | |
ab87f8c8 | 5594 | EOF |
a15135c9 | 5595 | if { (eval echo configure:5596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
71a94577 ZW |
5596 | then |
5597 | ac_cv_c_stack_direction=1 | |
ab87f8c8 JL |
5598 | else |
5599 | echo "configure: failed program was:" >&5 | |
5600 | cat conftest.$ac_ext >&5 | |
71a94577 ZW |
5601 | rm -fr conftest* |
5602 | ac_cv_c_stack_direction=-1 | |
ab87f8c8 | 5603 | fi |
71a94577 | 5604 | rm -fr conftest* |
ab87f8c8 JL |
5605 | fi |
5606 | ||
71a94577 ZW |
5607 | fi |
5608 | ||
5609 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
5610 | cat >> confdefs.h <<EOF | |
5611 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
ab87f8c8 JL |
5612 | EOF |
5613 | ||
ab87f8c8 JL |
5614 | fi |
5615 | ||
ab87f8c8 | 5616 | |
71a94577 | 5617 | echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6 |
a15135c9 | 5618 | echo "configure:5619: checking whether we are using the GNU C Library 2.1 or newer" >&5 |
71a94577 ZW |
5619 | if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then |
5620 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5621 | else | |
5622 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 5623 | #line 5624 "configure" |
71a94577 | 5624 | #include "confdefs.h" |
ab87f8c8 | 5625 | |
71a94577 ZW |
5626 | #include <features.h> |
5627 | #ifdef __GNU_LIBRARY__ | |
5628 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) | |
5629 | Lucky GNU user | |
5630 | #endif | |
5631 | #endif | |
5632 | ||
ab87f8c8 | 5633 | EOF |
71a94577 ZW |
5634 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
5635 | egrep "Lucky GNU user" >/dev/null 2>&1; then | |
5636 | rm -rf conftest* | |
5637 | ac_cv_gnu_library_2_1=yes | |
ab87f8c8 | 5638 | else |
71a94577 ZW |
5639 | rm -rf conftest* |
5640 | ac_cv_gnu_library_2_1=no | |
ab87f8c8 | 5641 | fi |
71a94577 | 5642 | rm -f conftest* |
ab87f8c8 | 5643 | |
71a94577 ZW |
5644 | |
5645 | ||
5646 | fi | |
ab87f8c8 | 5647 | |
71a94577 ZW |
5648 | echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6 |
5649 | ||
5650 | GLIBC21="$ac_cv_gnu_library_2_1" | |
5651 | ||
ab87f8c8 | 5652 | |
71a94577 ZW |
5653 | |
5654 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ | |
5655 | stdlib.h string.h unistd.h sys/param.h | |
5656 | do | |
5657 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5658 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
a15135c9 | 5659 | echo "configure:5660: checking for $ac_hdr" >&5 |
ab87f8c8 JL |
5660 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5661 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5662 | else | |
5663 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 5664 | #line 5665 "configure" |
ab87f8c8 | 5665 | #include "confdefs.h" |
71a94577 | 5666 | #include <$ac_hdr> |
ab87f8c8 JL |
5667 | EOF |
5668 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
a15135c9 | 5669 | { (eval echo configure:5670: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 5670 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
ab87f8c8 JL |
5671 | if test -z "$ac_err"; then |
5672 | rm -rf conftest* | |
5673 | eval "ac_cv_header_$ac_safe=yes" | |
5674 | else | |
5675 | echo "$ac_err" >&5 | |
5676 | echo "configure: failed program was:" >&5 | |
5677 | cat conftest.$ac_ext >&5 | |
5678 | rm -rf conftest* | |
5679 | eval "ac_cv_header_$ac_safe=no" | |
5680 | fi | |
5681 | rm -f conftest* | |
5682 | fi | |
5683 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5684 | echo "$ac_t""yes" 1>&6 | |
71a94577 ZW |
5685 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5686 | cat >> confdefs.h <<EOF | |
5687 | #define $ac_tr_hdr 1 | |
ab87f8c8 | 5688 | EOF |
71a94577 | 5689 | |
ab87f8c8 | 5690 | else |
71a94577 | 5691 | echo "$ac_t""no" 1>&6 |
ab87f8c8 | 5692 | fi |
71a94577 | 5693 | done |
ab87f8c8 | 5694 | |
71a94577 ZW |
5695 | for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \ |
5696 | getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \ | |
5697 | strdup strtoul tsearch __argz_count __argz_stringify __argz_next | |
5698 | do | |
5699 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
a15135c9 | 5700 | echo "configure:5701: checking for $ac_func" >&5 |
71a94577 | 5701 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
ab87f8c8 JL |
5702 | echo $ac_n "(cached) $ac_c" 1>&6 |
5703 | else | |
71a94577 | 5704 | cat > conftest.$ac_ext <<EOF |
a15135c9 | 5705 | #line 5706 "configure" |
ab87f8c8 | 5706 | #include "confdefs.h" |
71a94577 ZW |
5707 | /* System header to define __stub macros and hopefully few prototypes, |
5708 | which can conflict with char $ac_func(); below. */ | |
5709 | #include <assert.h> | |
ab87f8c8 JL |
5710 | /* Override any gcc2 internal prototype to avoid an error. */ |
5711 | /* We use char because int might match the return type of a gcc2 | |
5712 | builtin and then its argument prototype would still apply. */ | |
71a94577 | 5713 | char $ac_func(); |
ab87f8c8 JL |
5714 | |
5715 | int main() { | |
71a94577 ZW |
5716 | |
5717 | /* The GNU C library defines this for functions which it implements | |
5718 | to always fail with ENOSYS. Some functions are actually named | |
5719 | something starting with __ and the normal name is an alias. */ | |
5720 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5721 | choke me | |
5722 | #else | |
5723 | $ac_func(); | |
5724 | #endif | |
5725 | ||
ab87f8c8 JL |
5726 | ; return 0; } |
5727 | EOF | |
a15135c9 | 5728 | if { (eval echo configure:5729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 5729 | rm -rf conftest* |
71a94577 | 5730 | eval "ac_cv_func_$ac_func=yes" |
ab87f8c8 JL |
5731 | else |
5732 | echo "configure: failed program was:" >&5 | |
5733 | cat conftest.$ac_ext >&5 | |
5734 | rm -rf conftest* | |
71a94577 | 5735 | eval "ac_cv_func_$ac_func=no" |
ab87f8c8 JL |
5736 | fi |
5737 | rm -f conftest* | |
ab87f8c8 | 5738 | fi |
71a94577 ZW |
5739 | |
5740 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
ab87f8c8 | 5741 | echo "$ac_t""yes" 1>&6 |
71a94577 ZW |
5742 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
5743 | cat >> confdefs.h <<EOF | |
5744 | #define $ac_tr_func 1 | |
5745 | EOF | |
5746 | ||
ab87f8c8 | 5747 | else |
71a94577 ZW |
5748 | echo "$ac_t""no" 1>&6 |
5749 | fi | |
5750 | done | |
5751 | ||
5752 | ||
5753 | ||
5754 | ||
b7f2fb96 | 5755 | am_cv_lib_iconv_ldpath= |
71a94577 ZW |
5756 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. |
5757 | if test "${with_libiconv_prefix+set}" = set; then | |
5758 | withval="$with_libiconv_prefix" | |
5759 | ||
5760 | for dir in `echo "$withval" | tr : ' '`; do | |
5761 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
b7f2fb96 | 5762 | if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi |
71a94577 ZW |
5763 | done |
5764 | ||
5765 | fi | |
ab87f8c8 | 5766 | |
71a94577 ZW |
5767 | |
5768 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 | |
a15135c9 | 5769 | echo "configure:5770: checking for iconv" >&5 |
71a94577 ZW |
5770 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
5771 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5772 | else | |
5773 | ||
5774 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
5775 | am_cv_lib_iconv=no | |
5776 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 5777 | #line 5778 "configure" |
71a94577 ZW |
5778 | #include "confdefs.h" |
5779 | #include <stdlib.h> | |
5780 | #include <iconv.h> | |
ab87f8c8 | 5781 | int main() { |
71a94577 ZW |
5782 | iconv_t cd = iconv_open("",""); |
5783 | iconv(cd,NULL,NULL,NULL,NULL); | |
5784 | iconv_close(cd); | |
ab87f8c8 JL |
5785 | ; return 0; } |
5786 | EOF | |
a15135c9 | 5787 | if { (eval echo configure:5788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 5788 | rm -rf conftest* |
71a94577 | 5789 | am_cv_func_iconv=yes |
ab87f8c8 JL |
5790 | else |
5791 | echo "configure: failed program was:" >&5 | |
5792 | cat conftest.$ac_ext >&5 | |
ab87f8c8 JL |
5793 | fi |
5794 | rm -f conftest* | |
71a94577 ZW |
5795 | if test "$am_cv_func_iconv" != yes; then |
5796 | am_save_LIBS="$LIBS" | |
b7f2fb96 | 5797 | LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" |
71a94577 | 5798 | cat > conftest.$ac_ext <<EOF |
a15135c9 | 5799 | #line 5800 "configure" |
71a94577 ZW |
5800 | #include "confdefs.h" |
5801 | #include <stdlib.h> | |
5802 | #include <iconv.h> | |
5803 | int main() { | |
5804 | iconv_t cd = iconv_open("",""); | |
5805 | iconv(cd,NULL,NULL,NULL,NULL); | |
5806 | iconv_close(cd); | |
5807 | ; return 0; } | |
5808 | EOF | |
a15135c9 | 5809 | if { (eval echo configure:5810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
71a94577 ZW |
5810 | rm -rf conftest* |
5811 | am_cv_lib_iconv=yes | |
5812 | am_cv_func_iconv=yes | |
ab87f8c8 | 5813 | else |
71a94577 ZW |
5814 | echo "configure: failed program was:" >&5 |
5815 | cat conftest.$ac_ext >&5 | |
ab87f8c8 | 5816 | fi |
71a94577 ZW |
5817 | rm -f conftest* |
5818 | LIBS="$am_save_LIBS" | |
5819 | fi | |
5820 | ||
ab87f8c8 JL |
5821 | fi |
5822 | ||
71a94577 ZW |
5823 | echo "$ac_t""$am_cv_func_iconv" 1>&6 |
5824 | if test "$am_cv_func_iconv" = yes; then | |
5825 | cat >> confdefs.h <<\EOF | |
5826 | #define HAVE_ICONV 1 | |
5827 | EOF | |
5828 | ||
5829 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 | |
a15135c9 | 5830 | echo "configure:5831: checking for iconv declaration" >&5 |
71a94577 ZW |
5831 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
5832 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 5833 | else |
71a94577 ZW |
5834 | |
5835 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 5836 | #line 5837 "configure" |
71a94577 | 5837 | #include "confdefs.h" |
ab87f8c8 | 5838 | |
71a94577 ZW |
5839 | #include <stdlib.h> |
5840 | #include <iconv.h> | |
5841 | extern | |
5842 | #ifdef __cplusplus | |
5843 | "C" | |
5844 | #endif | |
5845 | #if defined(__STDC__) || defined(__cplusplus) | |
5846 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
5847 | #else | |
5848 | size_t iconv(); | |
5849 | #endif | |
ab87f8c8 | 5850 | |
71a94577 | 5851 | int main() { |
380a627a | 5852 | |
71a94577 | 5853 | ; return 0; } |
ab87f8c8 | 5854 | EOF |
a15135c9 | 5855 | if { (eval echo configure:5856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
71a94577 ZW |
5856 | rm -rf conftest* |
5857 | am_cv_proto_iconv_arg1="" | |
ab87f8c8 | 5858 | else |
71a94577 ZW |
5859 | echo "configure: failed program was:" >&5 |
5860 | cat conftest.$ac_ext >&5 | |
5861 | rm -rf conftest* | |
5862 | am_cv_proto_iconv_arg1="const" | |
ab87f8c8 | 5863 | fi |
71a94577 ZW |
5864 | rm -f conftest* |
5865 | 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 | 5866 | fi |
71a94577 ZW |
5867 | |
5868 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
5869 | echo "$ac_t""${ac_t:- | |
5870 | }$am_cv_proto_iconv" 1>&6 | |
5871 | cat >> confdefs.h <<EOF | |
5872 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
5873 | EOF | |
5874 | ||
5875 | fi | |
5876 | LIBICONV= | |
5877 | if test "$am_cv_lib_iconv" = yes; then | |
b7f2fb96 | 5878 | LIBICONV="$am_cv_lib_iconv_ldpath -liconv" |
71a94577 ZW |
5879 | fi |
5880 | ||
5881 | ||
5882 | ||
5883 | echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6 | |
a15135c9 | 5884 | echo "configure:5885: checking for nl_langinfo and CODESET" >&5 |
71a94577 | 5885 | if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then |
ab87f8c8 JL |
5886 | echo $ac_n "(cached) $ac_c" 1>&6 |
5887 | else | |
5888 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 5889 | #line 5890 "configure" |
ab87f8c8 | 5890 | #include "confdefs.h" |
71a94577 | 5891 | #include <langinfo.h> |
ab87f8c8 | 5892 | int main() { |
71a94577 | 5893 | char* cs = nl_langinfo(CODESET); |
ab87f8c8 JL |
5894 | ; return 0; } |
5895 | EOF | |
a15135c9 | 5896 | if { (eval echo configure:5897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 5897 | rm -rf conftest* |
71a94577 | 5898 | am_cv_langinfo_codeset=yes |
ab87f8c8 JL |
5899 | else |
5900 | echo "configure: failed program was:" >&5 | |
5901 | cat conftest.$ac_ext >&5 | |
5902 | rm -rf conftest* | |
71a94577 | 5903 | am_cv_langinfo_codeset=no |
ab87f8c8 JL |
5904 | fi |
5905 | rm -f conftest* | |
71a94577 | 5906 | |
ab87f8c8 JL |
5907 | fi |
5908 | ||
71a94577 ZW |
5909 | echo "$ac_t""$am_cv_langinfo_codeset" 1>&6 |
5910 | if test $am_cv_langinfo_codeset = yes; then | |
5911 | cat >> confdefs.h <<\EOF | |
5912 | #define HAVE_LANGINFO_CODESET 1 | |
ab87f8c8 | 5913 | EOF |
ab87f8c8 | 5914 | |
71a94577 ZW |
5915 | fi |
5916 | ||
5917 | if test $ac_cv_header_locale_h = yes; then | |
5918 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
a15135c9 | 5919 | echo "configure:5920: checking for LC_MESSAGES" >&5 |
71a94577 | 5920 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
ab87f8c8 JL |
5921 | echo $ac_n "(cached) $ac_c" 1>&6 |
5922 | else | |
71a94577 | 5923 | cat > conftest.$ac_ext <<EOF |
a15135c9 | 5924 | #line 5925 "configure" |
71a94577 ZW |
5925 | #include "confdefs.h" |
5926 | #include <locale.h> | |
5927 | int main() { | |
5928 | return LC_MESSAGES | |
5929 | ; return 0; } | |
5930 | EOF | |
a15135c9 | 5931 | if { (eval echo configure:5932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
71a94577 ZW |
5932 | rm -rf conftest* |
5933 | am_cv_val_LC_MESSAGES=yes | |
5934 | else | |
5935 | echo "configure: failed program was:" >&5 | |
5936 | cat conftest.$ac_ext >&5 | |
5937 | rm -rf conftest* | |
5938 | am_cv_val_LC_MESSAGES=no | |
5939 | fi | |
5940 | rm -f conftest* | |
5941 | fi | |
5942 | ||
5943 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
5944 | if test $am_cv_val_LC_MESSAGES = yes; then | |
5945 | cat >> confdefs.h <<\EOF | |
5946 | #define HAVE_LC_MESSAGES 1 | |
5947 | EOF | |
5948 | ||
ab87f8c8 | 5949 | fi |
71a94577 ZW |
5950 | fi |
5951 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
a15135c9 | 5952 | echo "configure:5953: checking whether NLS is requested" >&5 |
71a94577 ZW |
5953 | # Check whether --enable-nls or --disable-nls was given. |
5954 | if test "${enable_nls+set}" = set; then | |
5955 | enableval="$enable_nls" | |
5956 | USE_NLS=$enableval | |
5957 | else | |
5958 | USE_NLS=yes | |
ab87f8c8 | 5959 | fi |
71a94577 ZW |
5960 | |
5961 | echo "$ac_t""$USE_NLS" 1>&6 | |
5962 | ||
5963 | ||
5964 | BUILD_INCLUDED_LIBINTL=no | |
5965 | USE_INCLUDED_LIBINTL=no | |
5966 | INTLLIBS= | |
77c06844 | 5967 | INTLDEPS= |
71a94577 ZW |
5968 | |
5969 | if test "$USE_NLS" = "yes"; then | |
5970 | cat >> confdefs.h <<\EOF | |
5971 | #define ENABLE_NLS 1 | |
5972 | EOF | |
5973 | ||
5974 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
a15135c9 | 5975 | echo "configure:5976: checking whether included gettext is requested" >&5 |
71a94577 ZW |
5976 | # Check whether --with-included-gettext or --without-included-gettext was given. |
5977 | if test "${with_included_gettext+set}" = set; then | |
5978 | withval="$with_included_gettext" | |
5979 | nls_cv_force_use_gnu_gettext=$withval | |
ab87f8c8 | 5980 | else |
71a94577 | 5981 | nls_cv_force_use_gnu_gettext=no |
ab87f8c8 JL |
5982 | fi |
5983 | ||
71a94577 ZW |
5984 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 |
5985 | ||
5986 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
5987 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
5988 | CATOBJEXT=NONE | |
5989 | ||
5990 | ||
5991 | ||
5992 | ||
5993 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
5994 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
a15135c9 | 5995 | echo "configure:5996: checking for libintl.h" >&5 |
71a94577 | 5996 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
ab87f8c8 JL |
5997 | echo $ac_n "(cached) $ac_c" 1>&6 |
5998 | else | |
71a94577 | 5999 | cat > conftest.$ac_ext <<EOF |
a15135c9 | 6000 | #line 6001 "configure" |
71a94577 ZW |
6001 | #include "confdefs.h" |
6002 | #include <libintl.h> | |
6003 | EOF | |
6004 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
a15135c9 | 6005 | { (eval echo configure:6006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
71a94577 ZW |
6006 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6007 | if test -z "$ac_err"; then | |
6008 | rm -rf conftest* | |
6009 | eval "ac_cv_header_$ac_safe=yes" | |
ab87f8c8 | 6010 | else |
71a94577 ZW |
6011 | echo "$ac_err" >&5 |
6012 | echo "configure: failed program was:" >&5 | |
6013 | cat conftest.$ac_ext >&5 | |
6014 | rm -rf conftest* | |
6015 | eval "ac_cv_header_$ac_safe=no" | |
ab87f8c8 | 6016 | fi |
71a94577 ZW |
6017 | rm -f conftest* |
6018 | fi | |
6019 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
6020 | echo "$ac_t""yes" 1>&6 | |
191bf464 ZW |
6021 | cat >> confdefs.h <<\EOF |
6022 | #define HAVE_LIBINTL_H 1 | |
6023 | EOF | |
6024 | ||
6025 | echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6 | |
a15135c9 | 6026 | echo "configure:6027: checking for GNU gettext in libc" >&5 |
71a94577 ZW |
6027 | if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then |
6028 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6029 | else | |
6030 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 6031 | #line 6032 "configure" |
ab87f8c8 | 6032 | #include "confdefs.h" |
71a94577 | 6033 | #include <libintl.h> |
ab87f8c8 | 6034 | extern int _nl_msg_cat_cntr; |
71a94577 ZW |
6035 | int main() { |
6036 | bindtextdomain ("", ""); | |
6037 | return (int) gettext ("") + _nl_msg_cat_cntr | |
ab87f8c8 JL |
6038 | ; return 0; } |
6039 | EOF | |
a15135c9 | 6040 | if { (eval echo configure:6041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 6041 | rm -rf conftest* |
71a94577 | 6042 | gt_cv_func_gnugettext1_libc=yes |
ab87f8c8 JL |
6043 | else |
6044 | echo "configure: failed program was:" >&5 | |
6045 | cat conftest.$ac_ext >&5 | |
6046 | rm -rf conftest* | |
71a94577 | 6047 | gt_cv_func_gnugettext1_libc=no |
ab87f8c8 JL |
6048 | fi |
6049 | rm -f conftest* | |
ab87f8c8 JL |
6050 | fi |
6051 | ||
71a94577 | 6052 | echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6 |
ab87f8c8 | 6053 | |
71a94577 ZW |
6054 | if test "$gt_cv_func_gnugettext1_libc" != "yes"; then |
6055 | echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6 | |
a15135c9 | 6056 | echo "configure:6057: checking for GNU gettext in libintl" >&5 |
71a94577 | 6057 | if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then |
ab87f8c8 JL |
6058 | echo $ac_n "(cached) $ac_c" 1>&6 |
6059 | else | |
71a94577 ZW |
6060 | gt_save_LIBS="$LIBS" |
6061 | LIBS="$LIBS -lintl $LIBICONV" | |
6062 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 6063 | #line 6064 "configure" |
ab87f8c8 | 6064 | #include "confdefs.h" |
71a94577 ZW |
6065 | #include <libintl.h> |
6066 | extern int _nl_msg_cat_cntr; | |
ab87f8c8 | 6067 | int main() { |
71a94577 ZW |
6068 | bindtextdomain ("", ""); |
6069 | return (int) gettext ("") + _nl_msg_cat_cntr | |
ab87f8c8 JL |
6070 | ; return 0; } |
6071 | EOF | |
a15135c9 | 6072 | if { (eval echo configure:6073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 6073 | rm -rf conftest* |
71a94577 | 6074 | gt_cv_func_gnugettext1_libintl=yes |
ab87f8c8 JL |
6075 | else |
6076 | echo "configure: failed program was:" >&5 | |
6077 | cat conftest.$ac_ext >&5 | |
6078 | rm -rf conftest* | |
71a94577 | 6079 | gt_cv_func_gnugettext1_libintl=no |
ab87f8c8 JL |
6080 | fi |
6081 | rm -f conftest* | |
71a94577 | 6082 | LIBS="$gt_save_LIBS" |
ab87f8c8 | 6083 | fi |
71a94577 ZW |
6084 | |
6085 | echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6 | |
6086 | fi | |
6087 | ||
6088 | if test "$gt_cv_func_gnugettext1_libc" = "yes" \ | |
6089 | || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \ | |
6090 | && test "$PACKAGE" != gettext; }; then | |
6091 | cat >> confdefs.h <<\EOF | |
6092 | #define HAVE_GETTEXT 1 | |
ab87f8c8 JL |
6093 | EOF |
6094 | ||
ab87f8c8 | 6095 | |
71a94577 ZW |
6096 | if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then |
6097 | INTLLIBS="-lintl $LIBICONV" | |
6098 | fi | |
ab87f8c8 | 6099 | |
71a94577 ZW |
6100 | gt_save_LIBS="$LIBS" |
6101 | LIBS="$LIBS $INTLLIBS" | |
6102 | for ac_func in dcgettext | |
6103 | do | |
6104 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
a15135c9 | 6105 | echo "configure:6106: checking for $ac_func" >&5 |
71a94577 | 6106 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
ab87f8c8 JL |
6107 | echo $ac_n "(cached) $ac_c" 1>&6 |
6108 | else | |
6109 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 6110 | #line 6111 "configure" |
ab87f8c8 JL |
6111 | #include "confdefs.h" |
6112 | /* System header to define __stub macros and hopefully few prototypes, | |
71a94577 | 6113 | which can conflict with char $ac_func(); below. */ |
ab87f8c8 JL |
6114 | #include <assert.h> |
6115 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6116 | /* We use char because int might match the return type of a gcc2 | |
6117 | builtin and then its argument prototype would still apply. */ | |
71a94577 | 6118 | char $ac_func(); |
ab87f8c8 JL |
6119 | |
6120 | int main() { | |
6121 | ||
6122 | /* The GNU C library defines this for functions which it implements | |
6123 | to always fail with ENOSYS. Some functions are actually named | |
6124 | something starting with __ and the normal name is an alias. */ | |
71a94577 | 6125 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
ab87f8c8 JL |
6126 | choke me |
6127 | #else | |
71a94577 | 6128 | $ac_func(); |
ab87f8c8 JL |
6129 | #endif |
6130 | ||
6131 | ; return 0; } | |
6132 | EOF | |
a15135c9 | 6133 | if { (eval echo configure:6134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 6134 | rm -rf conftest* |
71a94577 | 6135 | eval "ac_cv_func_$ac_func=yes" |
ab87f8c8 JL |
6136 | else |
6137 | echo "configure: failed program was:" >&5 | |
6138 | cat conftest.$ac_ext >&5 | |
6139 | rm -rf conftest* | |
71a94577 | 6140 | eval "ac_cv_func_$ac_func=no" |
ab87f8c8 JL |
6141 | fi |
6142 | rm -f conftest* | |
6143 | fi | |
6144 | ||
71a94577 | 6145 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
ab87f8c8 | 6146 | echo "$ac_t""yes" 1>&6 |
71a94577 ZW |
6147 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
6148 | cat >> confdefs.h <<EOF | |
6149 | #define $ac_tr_func 1 | |
ab87f8c8 | 6150 | EOF |
71a94577 ZW |
6151 | |
6152 | else | |
6153 | echo "$ac_t""no" 1>&6 | |
6154 | fi | |
6155 | done | |
ab87f8c8 | 6156 | |
71a94577 ZW |
6157 | LIBS="$gt_save_LIBS" |
6158 | ||
6159 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
6160 | set dummy msgfmt; ac_word=$2 | |
ab87f8c8 | 6161 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
a15135c9 | 6162 | echo "configure:6163: checking for $ac_word" >&5 |
71a94577 | 6163 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
ab87f8c8 JL |
6164 | echo $ac_n "(cached) $ac_c" 1>&6 |
6165 | else | |
71a94577 | 6166 | case "$MSGFMT" in |
ab87f8c8 | 6167 | /*) |
71a94577 | 6168 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6169 | ;; |
6170 | *) | |
71a94577 ZW |
6171 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
6172 | for ac_dir in $PATH; do | |
ab87f8c8 JL |
6173 | test -z "$ac_dir" && ac_dir=. |
6174 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6175 | if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then |
6176 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
6177 | break | |
6178 | fi | |
ab87f8c8 JL |
6179 | fi |
6180 | done | |
6181 | IFS="$ac_save_ifs" | |
71a94577 | 6182 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" |
ab87f8c8 JL |
6183 | ;; |
6184 | esac | |
6185 | fi | |
71a94577 ZW |
6186 | MSGFMT="$ac_cv_path_MSGFMT" |
6187 | if test "$MSGFMT" != ":"; then | |
6188 | echo "$ac_t""$MSGFMT" 1>&6 | |
ab87f8c8 JL |
6189 | else |
6190 | echo "$ac_t""no" 1>&6 | |
6191 | fi | |
71a94577 ZW |
6192 | |
6193 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
ab87f8c8 JL |
6194 | set dummy gmsgfmt; ac_word=$2 |
6195 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
a15135c9 | 6196 | echo "configure:6197: checking for $ac_word" >&5 |
71a94577 | 6197 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
ab87f8c8 JL |
6198 | echo $ac_n "(cached) $ac_c" 1>&6 |
6199 | else | |
6200 | case "$GMSGFMT" in | |
6201 | /*) | |
71a94577 | 6202 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6203 | ;; |
6204 | ?:/*) | |
71a94577 | 6205 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. |
ab87f8c8 JL |
6206 | ;; |
6207 | *) | |
cd9e5e7c | 6208 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
6209 | ac_dummy="$PATH" |
6210 | for ac_dir in $ac_dummy; do | |
ab87f8c8 JL |
6211 | test -z "$ac_dir" && ac_dir=. |
6212 | if test -f $ac_dir/$ac_word; then | |
71a94577 | 6213 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" |
ab87f8c8 JL |
6214 | break |
6215 | fi | |
6216 | done | |
6217 | IFS="$ac_save_ifs" | |
71a94577 | 6218 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" |
ab87f8c8 JL |
6219 | ;; |
6220 | esac | |
6221 | fi | |
71a94577 | 6222 | GMSGFMT="$ac_cv_path_GMSGFMT" |
ab87f8c8 JL |
6223 | if test -n "$GMSGFMT"; then |
6224 | echo "$ac_t""$GMSGFMT" 1>&6 | |
6225 | else | |
6226 | echo "$ac_t""no" 1>&6 | |
6227 | fi | |
6228 | ||
ab87f8c8 | 6229 | |
71a94577 | 6230 | # Extract the first word of "xgettext", so it can be a program name with args. |
ab87f8c8 JL |
6231 | set dummy xgettext; ac_word=$2 |
6232 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
a15135c9 | 6233 | echo "configure:6234: checking for $ac_word" >&5 |
71a94577 | 6234 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
ab87f8c8 JL |
6235 | echo $ac_n "(cached) $ac_c" 1>&6 |
6236 | else | |
6237 | case "$XGETTEXT" in | |
6238 | /*) | |
71a94577 | 6239 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. |
ab87f8c8 JL |
6240 | ;; |
6241 | *) | |
6242 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6243 | for ac_dir in $PATH; do | |
6244 | test -z "$ac_dir" && ac_dir=. | |
6245 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6246 | if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then |
6247 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
ab87f8c8 JL |
6248 | break |
6249 | fi | |
6250 | fi | |
6251 | done | |
6252 | IFS="$ac_save_ifs" | |
71a94577 | 6253 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" |
ab87f8c8 JL |
6254 | ;; |
6255 | esac | |
6256 | fi | |
71a94577 ZW |
6257 | XGETTEXT="$ac_cv_path_XGETTEXT" |
6258 | if test "$XGETTEXT" != ":"; then | |
ab87f8c8 JL |
6259 | echo "$ac_t""$XGETTEXT" 1>&6 |
6260 | else | |
6261 | echo "$ac_t""no" 1>&6 | |
6262 | fi | |
6263 | ||
71a94577 ZW |
6264 | |
6265 | CATOBJEXT=.gmo | |
6266 | fi | |
6267 | ||
ab87f8c8 JL |
6268 | else |
6269 | echo "$ac_t""no" 1>&6 | |
6270 | fi | |
6271 | ||
ab87f8c8 JL |
6272 | |
6273 | if test "$CATOBJEXT" = "NONE"; then | |
6274 | nls_cv_use_gnu_gettext=yes | |
6275 | fi | |
6276 | fi | |
6277 | ||
6278 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
6279 | INTLOBJS="\$(GETTOBJS)" | |
6280 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
6281 | set dummy msgfmt; ac_word=$2 | |
6282 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
a15135c9 | 6283 | echo "configure:6284: checking for $ac_word" >&5 |
71a94577 | 6284 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
ab87f8c8 JL |
6285 | echo $ac_n "(cached) $ac_c" 1>&6 |
6286 | else | |
6287 | case "$MSGFMT" in | |
6288 | /*) | |
71a94577 | 6289 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6290 | ;; |
6291 | *) | |
6292 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6293 | for ac_dir in $PATH; do | |
6294 | test -z "$ac_dir" && ac_dir=. | |
6295 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6296 | if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then |
6297 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
ab87f8c8 JL |
6298 | break |
6299 | fi | |
6300 | fi | |
6301 | done | |
6302 | IFS="$ac_save_ifs" | |
71a94577 | 6303 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" |
ab87f8c8 JL |
6304 | ;; |
6305 | esac | |
6306 | fi | |
71a94577 ZW |
6307 | MSGFMT="$ac_cv_path_MSGFMT" |
6308 | if test "$MSGFMT" != ":"; then | |
ab87f8c8 JL |
6309 | echo "$ac_t""$MSGFMT" 1>&6 |
6310 | else | |
6311 | echo "$ac_t""no" 1>&6 | |
6312 | fi | |
6313 | ||
6314 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
6315 | set dummy gmsgfmt; ac_word=$2 | |
6316 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
a15135c9 | 6317 | echo "configure:6318: checking for $ac_word" >&5 |
71a94577 | 6318 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
ab87f8c8 JL |
6319 | echo $ac_n "(cached) $ac_c" 1>&6 |
6320 | else | |
6321 | case "$GMSGFMT" in | |
6322 | /*) | |
71a94577 | 6323 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6324 | ;; |
6325 | ?:/*) | |
71a94577 | 6326 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. |
ab87f8c8 JL |
6327 | ;; |
6328 | *) | |
cd9e5e7c | 6329 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
6330 | ac_dummy="$PATH" |
6331 | for ac_dir in $ac_dummy; do | |
ab87f8c8 JL |
6332 | test -z "$ac_dir" && ac_dir=. |
6333 | if test -f $ac_dir/$ac_word; then | |
71a94577 | 6334 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" |
ab87f8c8 JL |
6335 | break |
6336 | fi | |
6337 | done | |
6338 | IFS="$ac_save_ifs" | |
71a94577 | 6339 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" |
ab87f8c8 JL |
6340 | ;; |
6341 | esac | |
6342 | fi | |
71a94577 | 6343 | GMSGFMT="$ac_cv_path_GMSGFMT" |
ab87f8c8 JL |
6344 | if test -n "$GMSGFMT"; then |
6345 | echo "$ac_t""$GMSGFMT" 1>&6 | |
6346 | else | |
6347 | echo "$ac_t""no" 1>&6 | |
6348 | fi | |
6349 | ||
6350 | # Extract the first word of "xgettext", so it can be a program name with args. | |
6351 | set dummy xgettext; ac_word=$2 | |
6352 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
a15135c9 | 6353 | echo "configure:6354: checking for $ac_word" >&5 |
71a94577 | 6354 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
ab87f8c8 JL |
6355 | echo $ac_n "(cached) $ac_c" 1>&6 |
6356 | else | |
6357 | case "$XGETTEXT" in | |
6358 | /*) | |
71a94577 | 6359 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. |
ab87f8c8 JL |
6360 | ;; |
6361 | *) | |
6362 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6363 | for ac_dir in $PATH; do | |
6364 | test -z "$ac_dir" && ac_dir=. | |
6365 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6366 | if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then |
6367 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
ab87f8c8 JL |
6368 | break |
6369 | fi | |
6370 | fi | |
6371 | done | |
6372 | IFS="$ac_save_ifs" | |
71a94577 | 6373 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" |
ab87f8c8 JL |
6374 | ;; |
6375 | esac | |
6376 | fi | |
71a94577 ZW |
6377 | XGETTEXT="$ac_cv_path_XGETTEXT" |
6378 | if test "$XGETTEXT" != ":"; then | |
ab87f8c8 JL |
6379 | echo "$ac_t""$XGETTEXT" 1>&6 |
6380 | else | |
6381 | echo "$ac_t""no" 1>&6 | |
6382 | fi | |
6383 | ||
6384 | ||
71a94577 | 6385 | BUILD_INCLUDED_LIBINTL=yes |
ab87f8c8 JL |
6386 | USE_INCLUDED_LIBINTL=yes |
6387 | CATOBJEXT=.gmo | |
71a94577 | 6388 | INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV" |
77c06844 | 6389 | INTLDEPS="\$(top_builddir)/intl/libintl.a" |
71a94577 ZW |
6390 | LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` |
6391 | fi | |
6392 | ||
6393 | if test "$GMSGFMT" != ":"; then | |
6394 | if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then | |
6395 | : ; | |
6396 | else | |
6397 | echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6 | |
6398 | GMSGFMT=":" | |
6399 | fi | |
ab87f8c8 JL |
6400 | fi |
6401 | ||
71a94577 ZW |
6402 | if test "$XGETTEXT" != ":"; then |
6403 | if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then | |
ab87f8c8 JL |
6404 | : ; |
6405 | else | |
6406 | echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6 | |
6407 | XGETTEXT=":" | |
6408 | fi | |
6409 | fi | |
6410 | ||
71a94577 ZW |
6411 | POSUB=po |
6412 | fi | |
6413 | ||
17297c41 PT |
6414 | |
6415 | ||
71a94577 ZW |
6416 | if test "$PACKAGE" = gettext; then |
6417 | BUILD_INCLUDED_LIBINTL=yes | |
ab87f8c8 | 6418 | fi |
ab87f8c8 | 6419 | |
71a94577 ZW |
6420 | for ac_prog in bison |
6421 | do | |
6422 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
6423 | set dummy $ac_prog; ac_word=$2 | |
6424 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
a15135c9 | 6425 | echo "configure:6426: checking for $ac_word" >&5 |
71a94577 ZW |
6426 | if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then |
6427 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6428 | else | |
6429 | if test -n "$INTLBISON"; then | |
6430 | ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test. | |
6431 | else | |
6432 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
6433 | ac_dummy="$PATH" | |
6434 | for ac_dir in $ac_dummy; do | |
6435 | test -z "$ac_dir" && ac_dir=. | |
6436 | if test -f $ac_dir/$ac_word; then | |
6437 | ac_cv_prog_INTLBISON="$ac_prog" | |
6438 | break | |
6439 | fi | |
6440 | done | |
6441 | IFS="$ac_save_ifs" | |
6442 | fi | |
6443 | fi | |
6444 | INTLBISON="$ac_cv_prog_INTLBISON" | |
6445 | if test -n "$INTLBISON"; then | |
6446 | echo "$ac_t""$INTLBISON" 1>&6 | |
6447 | else | |
6448 | echo "$ac_t""no" 1>&6 | |
6449 | fi | |
6450 | ||
6451 | test -n "$INTLBISON" && break | |
6452 | done | |
ab87f8c8 | 6453 | |
71a94577 ZW |
6454 | if test -z "$INTLBISON"; then |
6455 | ac_verc_fail=yes | |
6456 | else | |
6457 | echo $ac_n "checking version of bison""... $ac_c" 1>&6 | |
a15135c9 | 6458 | echo "configure:6459: checking version of bison" >&5 |
71a94577 ZW |
6459 | ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` |
6460 | case $ac_prog_version in | |
6461 | '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; | |
6462 | 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) | |
6463 | ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; | |
6464 | *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; | |
6465 | esac | |
6466 | echo "$ac_t""$ac_prog_version" 1>&6 | |
6467 | fi | |
6468 | if test $ac_verc_fail = yes; then | |
6469 | INTLBISON=: | |
ab87f8c8 JL |
6470 | fi |
6471 | ||
ab87f8c8 | 6472 | |
9f6682b7 | 6473 | |
ab87f8c8 JL |
6474 | |
6475 | ||
6476 | ||
6477 | ||
6478 | ||
6479 | ||
77c06844 | 6480 | |
191bf464 ZW |
6481 | if test $USE_INCLUDED_LIBINTL = yes; then |
6482 | cat >> confdefs.h <<\EOF | |
6483 | #define USE_INCLUDED_LIBINTL 1 | |
6484 | EOF | |
6485 | ||
6486 | fi | |
71a94577 ZW |
6487 | |
6488 | nls_cv_header_intl= | |
6489 | nls_cv_header_libgt= | |
6490 | ||
6491 | DATADIRNAME=share | |
ab87f8c8 | 6492 | |
71a94577 ZW |
6493 | |
6494 | INSTOBJEXT=.mo | |
ab87f8c8 | 6495 | |
ab87f8c8 | 6496 | |
71a94577 ZW |
6497 | GENCAT=gencat |
6498 | ||
6499 | ||
9fdf713f | 6500 | |
9f6682b7 ZW |
6501 | if test "x$CATOBJEXT" != x; then |
6502 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
a15135c9 | 6503 | echo "configure:6504: checking for catalogs to be installed" >&5 |
9f6682b7 ZW |
6504 | # Look for .po and .gmo files in the source directory. |
6505 | CATALOGS= | |
6506 | XLINGUAS= | |
6507 | for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do | |
6508 | # If there aren't any .gmo files the shell will give us the | |
6509 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
6510 | # weeded out. | |
6511 | case "$cat" in *\**) | |
6512 | continue;; | |
6513 | esac | |
6514 | # The quadruple backslash is collapsed to a double backslash | |
6515 | # by the backticks, then collapsed again by the double quotes, | |
6516 | # leaving us with one backslash in the sed expression (right | |
6517 | # before the dot that mustn't act as a wildcard). The dot to | |
6518 | # be escaped in the second expression is hiding inside CATOBJEXT. | |
6519 | cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"` | |
6520 | lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"` | |
6521 | # The user is allowed to set LINGUAS to a list of languages to | |
6522 | # install catalogs for. If it's empty that means "all of them." | |
6523 | if test "x$LINGUAS" = x; then | |
6524 | CATALOGS="$CATALOGS $cat" | |
6525 | XLINGUAS="$XLINGUAS $lang" | |
6526 | else | |
6527 | case "$LINGUAS" in *$lang*) | |
6528 | CATALOGS="$CATALOGS $cat" | |
6529 | XLINGUAS="$XLINGUAS $lang" | |
6530 | ;; | |
6531 | esac | |
6532 | fi | |
6533 | done | |
6534 | LINGUAS="$XLINGUAS" | |
6535 | echo "$ac_t""$LINGUAS" 1>&6 | |
ab87f8c8 JL |
6536 | fi |
6537 | ||
ab87f8c8 JL |
6538 | MKINSTALLDIRS= |
6539 | if test -n "$ac_aux_dir"; then | |
6540 | MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" | |
6541 | fi | |
6542 | if test -z "$MKINSTALLDIRS"; then | |
6543 | MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" | |
6544 | fi | |
6545 | ||
6546 | ||
71a94577 | 6547 | INTL_LIBTOOL_SUFFIX_PREFIX= |
ab87f8c8 | 6548 | |
ab87f8c8 | 6549 | |
ab87f8c8 | 6550 | |
f4ab28e3 MK |
6551 | # Windows32 Registry support for specifying GCC installation paths. |
6552 | # Check whether --enable-win32-registry or --disable-win32-registry was given. | |
6553 | if test "${enable_win32_registry+set}" = set; then | |
6554 | enableval="$enable_win32_registry" | |
6555 | : | |
6556 | fi | |
6557 | ||
4e70264f ZW |
6558 | case $host_os in |
6559 | win32 | pe | cygwin* | mingw32* | uwin*) | |
f4ab28e3 | 6560 | echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6 |
a15135c9 | 6561 | echo "configure:6562: checking whether windows registry support is requested" >&5 |
9dd53f2c | 6562 | if test "x$enable_win32_registry" != xno; then |
f4ab28e3 MK |
6563 | cat >> confdefs.h <<\EOF |
6564 | #define ENABLE_WIN32_REGISTRY 1 | |
6565 | EOF | |
6566 | ||
6567 | echo "$ac_t""yes" 1>&6 | |
4e70264f ZW |
6568 | |
6569 | echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6 | |
a15135c9 | 6570 | echo "configure:6571: checking for library containing RegOpenKeyExA" >&5 |
4e70264f ZW |
6571 | if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then |
6572 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6573 | else | |
6574 | ac_func_search_save_LIBS="$LIBS" | |
6575 | ac_cv_search_RegOpenKeyExA="no" | |
6576 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 6577 | #line 6578 "configure" |
4e70264f ZW |
6578 | #include "confdefs.h" |
6579 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6580 | /* We use char because int might match the return type of a gcc2 | |
6581 | builtin and then its argument prototype would still apply. */ | |
6582 | char RegOpenKeyExA(); | |
6583 | ||
6584 | int main() { | |
6585 | RegOpenKeyExA() | |
6586 | ; return 0; } | |
6587 | EOF | |
a15135c9 | 6588 | if { (eval echo configure:6589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4e70264f ZW |
6589 | rm -rf conftest* |
6590 | ac_cv_search_RegOpenKeyExA="none required" | |
6591 | else | |
6592 | echo "configure: failed program was:" >&5 | |
6593 | cat conftest.$ac_ext >&5 | |
6594 | fi | |
6595 | rm -f conftest* | |
6596 | test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do | |
6597 | LIBS="-l$i $ac_func_search_save_LIBS" | |
6598 | cat > conftest.$ac_ext <<EOF | |
a15135c9 | 6599 | #line 6600 "configure" |
4e70264f ZW |
6600 | #include "confdefs.h" |
6601 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6602 | /* We use char because int might match the return type of a gcc2 | |
6603 | builtin and then its argument prototype would still apply. */ | |
6604 | char RegOpenKeyExA(); | |
6605 | ||
6606 | int main() { | |
6607 | RegOpenKeyExA() | |
6608 | ; return 0; } | |
6609 | EOF | |
a15135c9 | 6610 | if { (eval echo configure:6611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4e70264f ZW |
6611 | rm -rf conftest* |
6612 | ac_cv_search_RegOpenKeyExA="-l$i" | |
6613 | break | |
6614 | else | |
6615 | echo "configure: failed program was:" >&5 | |
6616 | cat conftest.$ac_ext >&5 | |
6617 | fi | |
6618 | rm -f conftest* | |
6619 | done | |
6620 | LIBS="$ac_func_search_save_LIBS" | |
6621 | fi | |
6622 | ||
6623 | echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6 | |
6624 | if test "$ac_cv_search_RegOpenKeyExA" != "no"; then | |
6625 | test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS" | |
6626 | ||
6627 | else : | |
6628 | ||
6629 | fi | |
f4ab28e3 MK |
6630 | else |
6631 | echo "$ac_t""no" 1>&6 | |
6632 | fi | |
6633 | ||
6634 | # Check if user specified a different registry key. | |
9dd53f2c | 6635 | case "x${enable_win32_registry}" in |
f4ab28e3 MK |
6636 | x | xyes) |
6637 | # default. | |
6638 | gcc_cv_win32_registry_key="$VERSION" | |
6639 | ;; | |
6640 | xno) | |
6641 | # no registry lookup. | |
6642 | gcc_cv_win32_registry_key='' | |
6643 | ;; | |
6644 | *) | |
6645 | # user-specified key. | |
6646 | gcc_cv_win32_registry_key="$enable_win32_registry" | |
6647 | ;; | |
6648 | esac | |
6649 | ||
9dd53f2c | 6650 | if test "x$enable_win32_registry" != xno; then |
f4ab28e3 | 6651 | echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6 |
a15135c9 | 6652 | echo "configure:6653: checking registry key on windows hosts" >&5 |
f4ab28e3 MK |
6653 | cat >> confdefs.h <<EOF |
6654 | #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key" | |
6655 | EOF | |
6656 | ||
6657 | echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6 | |
6658 | fi | |
4e70264f ZW |
6659 | ;; |
6660 | esac | |
f4ab28e3 | 6661 | |
ab87f8c8 | 6662 | # Get an absolute path to the GCC top-level source directory |
1e6347d8 | 6663 | holddir=`${PWDCMD-pwd}` |
ab87f8c8 | 6664 | cd $srcdir |
1e6347d8 | 6665 | topdir=`${PWDCMD-pwd}` |
ab87f8c8 JL |
6666 | cd $holddir |
6667 | ||
6668 | # Conditionalize the makefile for this host machine. | |
6669 | # Make-host contains the concatenation of all host makefile fragments | |
6670 | # [there can be more than one]. This file is built by configure.frag. | |
6671 | host_overrides=Make-host | |
6672 | dep_host_xmake_file= | |
6673 | for f in .. ${host_xmake_file} | |
6674 | do | |
6675 | if test -f ${srcdir}/config/$f | |
6676 | then | |
6677 | dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f" | |
6678 | fi | |
6679 | done | |
6680 | ||
6681 | # Conditionalize the makefile for this target machine. | |
6682 | # Make-target contains the concatenation of all host makefile fragments | |
6683 | # [there can be more than one]. This file is built by configure.frag. | |
6684 | target_overrides=Make-target | |
6685 | dep_tmake_file= | |
6686 | for f in .. ${tmake_file} | |
6687 | do | |
6688 | if test -f ${srcdir}/config/$f | |
6689 | then | |
6690 | dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f" | |
6691 | fi | |
6692 | done | |
6693 | ||
6694 | # If the host doesn't support symlinks, modify CC in | |
6695 | # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. | |
6696 | # Otherwise, we can use "CC=$(CC)". | |
6697 | rm -f symtest.tem | |
6698 | if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null | |
6699 | then | |
6700 | cc_set_by_configure="\$(CC)" | |
5aa82ace | 6701 | quoted_cc_set_by_configure="\$(CC)" |
ab87f8c8 | 6702 | stage_prefix_set_by_configure="\$(STAGE_PREFIX)" |
596151e1 | 6703 | quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)" |
ab87f8c8 JL |
6704 | else |
6705 | rm -f symtest.tem | |
6706 | if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null | |
6707 | then | |
6708 | symbolic_link="cp -p" | |
6709 | else | |
6710 | symbolic_link="cp" | |
6711 | fi | |
6712 | cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" | |
5aa82ace | 6713 | quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`" |
ab87f8c8 | 6714 | stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" |
596151e1 | 6715 | 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 |
6716 | fi |
6717 | rm -f symtest.tem | |
6718 | ||
6719 | out_object_file=`basename $out_file .c`.o | |
6720 | ||
6721 | tm_file_list= | |
6722 | for f in $tm_file; do | |
64ccbc99 | 6723 | case $f in |
d02af173 ZW |
6724 | ansidecl.h ) |
6725 | tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
6726 | defaults.h ) | |
64ccbc99 KG |
6727 | tm_file_list="${tm_file_list} $f" ;; |
6728 | *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;; | |
6729 | esac | |
ab87f8c8 JL |
6730 | done |
6731 | ||
11642c3a ZW |
6732 | tm_p_file_list= |
6733 | for f in $tm_p_file; do | |
6734 | tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" | |
6735 | done | |
6736 | ||
ab87f8c8 JL |
6737 | host_xm_file_list= |
6738 | for f in $host_xm_file; do | |
64ccbc99 | 6739 | case $f in |
d02af173 ZW |
6740 | ansidecl.h ) |
6741 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
6742 | auto-host.h | defaults.h ) | |
64ccbc99 KG |
6743 | host_xm_file_list="${host_xm_file_list} $f" ;; |
6744 | *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;; | |
6745 | esac | |
ab87f8c8 JL |
6746 | done |
6747 | ||
6748 | build_xm_file_list= | |
6749 | for f in $build_xm_file; do | |
64ccbc99 | 6750 | case $f in |
d02af173 ZW |
6751 | ansidecl.h ) |
6752 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
6753 | auto-build.h | auto-host.h | defaults.h ) | |
64ccbc99 KG |
6754 | build_xm_file_list="${build_xm_file_list} $f" ;; |
6755 | *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;; | |
6756 | esac | |
ab87f8c8 JL |
6757 | done |
6758 | ||
a078a589 ZW |
6759 | # Define macro CROSS_COMPILE in compilation if this is a cross-compiler. |
6760 | # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR. | |
6761 | CROSS= | |
6762 | ALL=all.internal | |
6763 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
6764 | if test x$host != x$target |
6765 | then | |
a078a589 ZW |
6766 | CROSS="-DCROSS_COMPILE" |
6767 | ALL=all.cross | |
6768 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
343f59d9 AM |
6769 | case "$host","$target" in |
6770 | i?86-*-*,x86_64-*-* \ | |
6771 | | powerpc*-*-*,powerpc64*-*-*) | |
6772 | CROSS="$CROSS -DNATIVE_CROSS" ;; | |
6773 | esac | |
ab87f8c8 JL |
6774 | fi |
6775 | ||
b39d221a EC |
6776 | # If this is a cross-compiler that does not |
6777 | # have its own set of headers then define | |
6778 | # inhibit_libc | |
6779 | ||
fecd6201 ZW |
6780 | # If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS. |
6781 | # This prevents libgcc2 from containing any code which requires libc | |
6782 | # support. | |
b39d221a EC |
6783 | inhibit_libc= |
6784 | if test x$host != x$target && test x$with_headers = x; then | |
6785 | inhibit_libc=-Dinhibit_libc | |
6786 | else | |
6787 | if test x$with_newlib = xyes; then | |
6788 | inhibit_libc=-Dinhibit_libc | |
6789 | fi | |
6790 | fi | |
6791 | ||
6792 | ||
a078a589 ZW |
6793 | # When building gcc with a cross-compiler, we need to adjust things so |
6794 | # that the generator programs are still built with the native compiler. | |
6795 | # Also, we cannot run fixincludes or fix-header. | |
6796 | # Note that the terminology here is wrong; it should be BUILD_* throughout. | |
6797 | # FIXME. | |
6798 | ||
6799 | # These are the normal (build=host) settings: | |
6800 | HOST_PREFIX= | |
6801 | HOST_PREFIX_1=ignore- | |
6802 | HOST_CC='$(CC)' | |
6803 | HOST_CFLAGS='$(ALL_CFLAGS)' | |
6804 | ||
6805 | STMP_FIXINC=stmp-fixinc | |
6806 | STMP_FIXPROTO=stmp-fixproto | |
6807 | ||
6808 | # And these apply if build != host. | |
ab87f8c8 JL |
6809 | if test x$build != x$host |
6810 | then | |
a078a589 ZW |
6811 | HOST_PREFIX=build- |
6812 | HOST_PREFIX_1=build- | |
6813 | HOST_CC='$(CC_FOR_BUILD)' | |
6814 | HOST_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)' | |
6815 | ||
6816 | STMP_FIXINC= | |
6817 | STMP_FIXPROTO= | |
ab87f8c8 JL |
6818 | fi |
6819 | ||
6820 | # Expand extra_headers to include complete path. | |
6821 | # This substitutes for lots of t-* files. | |
6822 | extra_headers_list= | |
6823 | if test "x$extra_headers" = x | |
6824 | then true | |
6825 | else | |
29f7a208 | 6826 | # Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers. |
ab87f8c8 JL |
6827 | for file in $extra_headers; |
6828 | do | |
29f7a208 | 6829 | extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}" |
ab87f8c8 JL |
6830 | done |
6831 | fi | |
6832 | ||
6833 | if test x$use_collect2 = xno; then | |
6834 | use_collect2= | |
6835 | fi | |
6836 | ||
6837 | # Add a definition of USE_COLLECT2 if system wants one. | |
2cc07db4 | 6838 | if test x$use_collect2 != x |
ab87f8c8 | 6839 | then |
2cc07db4 RH |
6840 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
6841 | xm_defines="${xm_defines} USE_COLLECT2" | |
ab87f8c8 JL |
6842 | fi |
6843 | ||
ab87f8c8 JL |
6844 | # If we have gas in the build tree, make a link to it. |
6845 | if test -f ../gas/Makefile; then | |
6846 | rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null | |
6847 | fi | |
6848 | ||
3cae5780 | 6849 | # If we have nm and objdump in the build tree, make a link to them. |
ab87f8c8 JL |
6850 | if test -f ../binutils/Makefile; then |
6851 | rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null | |
3cae5780 | 6852 | rm -f objdump; $symbolic_link ../binutils/objdump$host_exeext objdump$host_exeext 2>/dev/null |
ab87f8c8 JL |
6853 | fi |
6854 | ||
6855 | # If we have ld in the build tree, make a link to it. | |
6856 | if test -f ../ld/Makefile; then | |
2cc07db4 | 6857 | rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null |
ab87f8c8 JL |
6858 | fi |
6859 | ||
981d4858 JM |
6860 | # Figure out what assembler we will be using. |
6861 | echo $ac_n "checking what assembler to use""... $ac_c" 1>&6 | |
343f59d9 | 6862 | echo "configure:6863: checking what assembler to use" >&5 |
ab87f8c8 | 6863 | gcc_cv_as= |
981d4858 JM |
6864 | gcc_cv_gas_major_version= |
6865 | gcc_cv_gas_minor_version= | |
ab87f8c8 | 6866 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas |
0936a455 | 6867 | gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd |
ab87f8c8 JL |
6868 | if test -x "$DEFAULT_ASSEMBLER"; then |
6869 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
6870 | elif test -x "$AS"; then | |
6871 | gcc_cv_as="$AS" | |
6872 | elif test -x as$host_exeext; then | |
6873 | # Build using assembler in the current directory. | |
6874 | gcc_cv_as=./as$host_exeext | |
6875 | elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then | |
6876 | # Single tree build which includes gas. | |
0936a455 | 6877 | for f in $gcc_cv_as_bfd_srcdir/configure $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in |
ab87f8c8 JL |
6878 | do |
6879 | gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` | |
6880 | if test x$gcc_cv_gas_version != x; then | |
6881 | break | |
6882 | fi | |
6883 | done | |
6884 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
6885 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
c72931a6 | 6886 | gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"` |
981d4858 | 6887 | fi |
9e423e6d | 6888 | |
534d0cc0 | 6889 | if test "x$gcc_cv_as" = x; then |
779243f7 JL |
6890 | # Search the same directories that the installed compiler will |
6891 | # search. Else we may find the wrong assembler and lose. If we | |
6892 | # do not find a suitable assembler binary, then try the user's | |
6893 | # path. | |
6894 | # | |
6895 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
6896 | # user's path. Unfortunately, there is no good way to get at the | |
6897 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
6898 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
6899 | # to be fixed as part of the make/configure rewrite too. | |
6900 | ||
6901 | if test "x$exec_prefix" = xNONE; then | |
6902 | if test "x$prefix" = xNONE; then | |
6903 | test_prefix=/usr/local | |
6904 | else | |
6905 | test_prefix=$prefix | |
6906 | fi | |
6907 | else | |
6908 | test_prefix=$exec_prefix | |
6909 | fi | |
6910 | ||
6911 | # If the loop below does not find an assembler, then use whatever | |
6912 | # one we can find in the users's path. | |
6913 | # user's path. | |
55a2ea2a AM |
6914 | if test "x$program_prefix" != xNONE; then |
6915 | gcc_cv_as=${program_prefix}as$host_exeext | |
6916 | else | |
6917 | gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext | |
6918 | fi | |
6919 | ||
6920 | test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \ | |
6921 | $test_prefix/lib/gcc-lib/$target_alias \ | |
6922 | /usr/lib/gcc/$target_alias/$gcc_version \ | |
6923 | /usr/lib/gcc/$target_alias \ | |
6924 | $test_prefix/$target_alias/bin/$target_alias/$gcc_version \ | |
6925 | $test_prefix/$target_alias/bin" | |
6926 | ||
6927 | if test x$host = x$target; then | |
6928 | test_dirs="$test_dirs \ | |
779243f7 JL |
6929 | /usr/libexec \ |
6930 | /usr/ccs/gcc \ | |
6931 | /usr/ccs/bin \ | |
6932 | /udk/usr/ccs/bin \ | |
6933 | /bsd43/usr/lib/cmplrs/cc \ | |
6934 | /usr/cross64/usr/bin \ | |
6935 | /usr/lib/cmplrs/cc \ | |
6936 | /sysv/usr/lib/cmplrs/cc \ | |
6937 | /svr4/usr/lib/cmplrs/cc \ | |
6938 | /usr/bin" | |
55a2ea2a | 6939 | fi |
779243f7 JL |
6940 | |
6941 | for dir in $test_dirs; do | |
55a2ea2a | 6942 | if test -x $dir/as$host_exeext; then |
779243f7 JL |
6943 | gcc_cv_as=$dir/as$host_exeext |
6944 | break; | |
6945 | fi | |
6946 | done | |
9e423e6d | 6947 | fi |
981d4858 JM |
6948 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
6949 | echo "$ac_t"""newly built gas"" 1>&6 | |
6950 | else | |
6951 | echo "$ac_t""$gcc_cv_as" 1>&6 | |
6952 | fi | |
6953 | ||
275b60d6 JJ |
6954 | # Figure out what linker we will be using. |
6955 | echo $ac_n "checking what linker to use""... $ac_c" 1>&6 | |
343f59d9 | 6956 | echo "configure:6957: checking what linker to use" >&5 |
275b60d6 JJ |
6957 | gcc_cv_ld= |
6958 | gcc_cv_gld_major_version= | |
6959 | gcc_cv_gld_minor_version= | |
6960 | gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld | |
6961 | gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
6962 | if test -x "$DEFAULT_LINKER"; then | |
6963 | gcc_cv_ld="$DEFAULT_LINKER" | |
6964 | elif test -x "$LD"; then | |
6965 | gcc_cv_ld="$LD" | |
6966 | elif test -x ld$host_exeext; then | |
6967 | # Build using linker in the current directory. | |
6968 | gcc_cv_ld=./ld$host_exeext | |
6969 | elif test -f $gcc_cv_ld_gld_srcdir/configure.in -a -f ../ld/Makefile; then | |
6970 | # Single tree build which includes ld. | |
6971 | 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 | |
6972 | do | |
6973 | gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` | |
6974 | if test x$gcc_cv_gld_version != x; then | |
6975 | break | |
6976 | fi | |
6977 | done | |
6978 | gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` | |
6979 | gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
6980 | fi | |
6981 | ||
534d0cc0 | 6982 | if test "x$gcc_cv_ld" = x; then |
275b60d6 JJ |
6983 | # Search the same directories that the installed compiler will |
6984 | # search. Else we may find the wrong linker and lose. If we | |
6985 | # do not find a suitable linker binary, then try the user's | |
6986 | # path. | |
6987 | # | |
6988 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
6989 | # user's path. Unfortunately, there is no good way to get at the | |
6990 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
6991 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
6992 | # to be fixed as part of the make/configure rewrite too. | |
6993 | ||
6994 | if test "x$exec_prefix" = xNONE; then | |
6995 | if test "x$prefix" = xNONE; then | |
6996 | test_prefix=/usr/local | |
6997 | else | |
6998 | test_prefix=$prefix | |
6999 | fi | |
7000 | else | |
7001 | test_prefix=$exec_prefix | |
7002 | fi | |
7003 | ||
7004 | # If the loop below does not find an linker, then use whatever | |
7005 | # one we can find in the users's path. | |
7006 | # user's path. | |
55a2ea2a AM |
7007 | if test "x$program_prefix" != xNONE; then |
7008 | gcc_cv_ld=${program_prefix}ld$host_exeext | |
7009 | else | |
7010 | gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext | |
7011 | fi | |
7012 | ||
7013 | test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \ | |
7014 | $test_prefix/lib/gcc-lib/$target_alias \ | |
7015 | /usr/lib/gcc/$target_alias/$gcc_version \ | |
7016 | /usr/lib/gcc/$target_alias \ | |
7017 | $test_prefix/$target_alias/bin/$target_alias/$gcc_version \ | |
7018 | $test_prefix/$target_alias/bin" | |
7019 | ||
7020 | if test x$host = x$target; then | |
7021 | test_dirs="$test_dirs \ | |
275b60d6 JJ |
7022 | /usr/libexec \ |
7023 | /usr/ccs/gcc \ | |
7024 | /usr/ccs/bin \ | |
7025 | /udk/usr/ccs/bin \ | |
7026 | /bsd43/usr/lib/cmplrs/cc \ | |
7027 | /usr/cross64/usr/bin \ | |
7028 | /usr/lib/cmplrs/cc \ | |
7029 | /sysv/usr/lib/cmplrs/cc \ | |
7030 | /svr4/usr/lib/cmplrs/cc \ | |
7031 | /usr/bin" | |
55a2ea2a | 7032 | fi |
275b60d6 JJ |
7033 | |
7034 | for dir in $test_dirs; do | |
55a2ea2a | 7035 | if test -x $dir/ld$host_exeext; then |
275b60d6 JJ |
7036 | gcc_cv_ld=$dir/ld$host_exeext |
7037 | break; | |
7038 | fi | |
7039 | done | |
7040 | fi | |
7041 | if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then | |
7042 | echo "$ac_t"""newly built ld"" 1>&6 | |
7043 | else | |
7044 | echo "$ac_t""$gcc_cv_ld" 1>&6 | |
7045 | fi | |
7046 | ||
981d4858 JM |
7047 | # Figure out what nm we will be using. |
7048 | echo $ac_n "checking what nm to use""... $ac_c" 1>&6 | |
343f59d9 | 7049 | echo "configure:7050: checking what nm to use" >&5 |
981d4858 JM |
7050 | if test -x nm$host_exeext; then |
7051 | gcc_cv_nm=./nm$host_exeext | |
534d0cc0 AM |
7052 | elif test "x$program_prefix" != xNONE; then |
7053 | gcc_cv_nm=${program_prefix}nm$host_exeext | |
7054 | else | |
7055 | gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext | |
981d4858 JM |
7056 | fi |
7057 | echo "$ac_t""$gcc_cv_nm" 1>&6 | |
7058 | ||
3cae5780 AS |
7059 | # Figure out what objdump we will be using. |
7060 | echo $ac_n "checking what objdump to use""... $ac_c" 1>&6 | |
343f59d9 | 7061 | echo "configure:7062: checking what objdump to use" >&5 |
3cae5780 AS |
7062 | if test -x objdump$host_exeext; then |
7063 | gcc_cv_objdump=./objdump$host_exeext | |
534d0cc0 AM |
7064 | elif test "x$program_prefix" != xNONE; then |
7065 | gcc_cv_objdump=${program_prefix}objdump$host_exeext | |
7066 | else | |
7067 | gcc_cv_objdump=`echo objdump | sed ${program_transform_name}`$host_exeext | |
3cae5780 AS |
7068 | fi |
7069 | echo "$ac_t""$gcc_cv_objdump" 1>&6 | |
7070 | ||
981d4858 JM |
7071 | # Figure out what assembler alignment features are present. |
7072 | echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6 | |
343f59d9 | 7073 | echo "configure:7074: checking assembler alignment features" >&5 |
9d147085 | 7074 | gcc_cv_as_alignment_features=none |
981d4858 JM |
7075 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
7076 | # Gas version 2.6 and later support for .balign and .p2align. | |
7077 | # bytes to skip when using .p2align. | |
7078 | if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 6 -o "$gcc_cv_gas_major_version" -gt 2; then | |
7079 | gcc_cv_as_alignment_features=".balign and .p2align" | |
7080 | cat >> confdefs.h <<\EOF | |
7081 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 | |
7082 | EOF | |
7083 | ||
7084 | fi | |
7085 | # Gas version 2.8 and later support specifying the maximum | |
7086 | # bytes to skip when using .p2align. | |
7087 | if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 8 -o "$gcc_cv_gas_major_version" -gt 2; then | |
7088 | gcc_cv_as_alignment_features=".p2align including maximum skip" | |
7089 | cat >> confdefs.h <<\EOF | |
7090 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 | |
7091 | EOF | |
7092 | ||
7093 | fi | |
7094 | elif test x$gcc_cv_as != x; then | |
00ccc16d JL |
7095 | # Check if we have .balign and .p2align |
7096 | echo ".balign 4" > conftest.s | |
7097 | echo ".p2align 2" >> conftest.s | |
7098 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7099 | gcc_cv_as_alignment_features=".balign and .p2align" | |
7100 | cat >> confdefs.h <<\EOF | |
7101 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 | |
7102 | EOF | |
7103 | ||
7104 | fi | |
7105 | rm -f conftest.s conftest.o | |
9e423e6d JW |
7106 | # Check if specifying the maximum bytes to skip when |
7107 | # using .p2align is supported. | |
7108 | echo ".p2align 4,,7" > conftest.s | |
7109 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7110 | gcc_cv_as_alignment_features=".p2align including maximum skip" | |
7111 | cat >> confdefs.h <<\EOF | |
7112 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 | |
7113 | EOF | |
7114 | ||
7115 | fi | |
7116 | rm -f conftest.s conftest.o | |
7117 | fi | |
7118 | echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6 | |
7119 | ||
d1accaa3 | 7120 | echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6 |
343f59d9 | 7121 | echo "configure:7122: checking assembler subsection support" >&5 |
9d147085 | 7122 | gcc_cv_as_subsections=no |
981d4858 JM |
7123 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
7124 | if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
7125 | gcc_cv_as_subsections="working .subsection -1" | |
7126 | fi | |
7127 | elif test x$gcc_cv_as != x; then | |
d1accaa3 JJ |
7128 | # Check if we have .subsection |
7129 | echo ".subsection 1" > conftest.s | |
7130 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7131 | gcc_cv_as_subsections=".subsection" | |
d1accaa3 JJ |
7132 | if test x$gcc_cv_nm != x; then |
7133 | cat > conftest.s <<EOF | |
7134 | conftest_label1: .word 0 | |
7135 | .subsection -1 | |
7136 | conftest_label2: .word 0 | |
7137 | .previous | |
7138 | EOF | |
7139 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7140 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
7141 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
1b015bec AO |
7142 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then |
7143 | : | |
7144 | else | |
d1accaa3 | 7145 | gcc_cv_as_subsections="working .subsection -1" |
d1accaa3 JJ |
7146 | fi |
7147 | fi | |
7148 | fi | |
7149 | fi | |
7150 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
981d4858 JM |
7151 | fi |
7152 | if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then | |
7153 | cat >> confdefs.h <<\EOF | |
7154 | #define HAVE_GAS_SUBSECTION_ORDERING 1 | |
7155 | EOF | |
7156 | ||
d1accaa3 JJ |
7157 | fi |
7158 | echo "$ac_t""$gcc_cv_as_subsections" 1>&6 | |
7159 | ||
12822146 | 7160 | echo $ac_n "checking assembler weak support""... $ac_c" 1>&6 |
343f59d9 | 7161 | echo "configure:7162: checking assembler weak support" >&5 |
9d147085 | 7162 | gcc_cv_as_weak=no |
981d4858 JM |
7163 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
7164 | if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 2 -o "$gcc_cv_gas_major_version" -gt 2; then | |
7165 | gcc_cv_as_weak="yes" | |
7166 | fi | |
7167 | elif test x$gcc_cv_as != x; then | |
12822146 JL |
7168 | # Check if we have .weak |
7169 | echo " .weak foobar" > conftest.s | |
7170 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
12822146 JL |
7171 | gcc_cv_as_weak="yes" |
7172 | fi | |
7173 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
981d4858 JM |
7174 | fi |
7175 | if test x"$gcc_cv_as_weak" = xyes; then | |
7176 | cat >> confdefs.h <<\EOF | |
7177 | #define HAVE_GAS_WEAK 1 | |
7178 | EOF | |
7179 | ||
12822146 JL |
7180 | fi |
7181 | echo "$ac_t""$gcc_cv_as_weak" 1>&6 | |
7182 | ||
6a9c5260 | 7183 | echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6 |
343f59d9 | 7184 | echo "configure:7185: checking assembler hidden support" >&5 |
9d147085 | 7185 | gcc_cv_as_hidden=no |
981d4858 | 7186 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
c72931a6 RH |
7187 | if test "$gcc_cv_gas_major_version" -eq 2 \ |
7188 | -a "$gcc_cv_gas_minor_version" -eq 12 \ | |
7189 | -a "$gcc_cv_gas_patch_version" -ge 1 \ | |
7190 | -o "$gcc_cv_gas_major_version" -eq 2 \ | |
7191 | -a "$gcc_cv_gas_minor_version" -gt 12 \ | |
7192 | -o "$gcc_cv_gas_major_version" -gt 2 \ | |
7193 | && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
981d4858 JM |
7194 | gcc_cv_as_hidden="yes" |
7195 | fi | |
7196 | elif test x$gcc_cv_as != x; then | |
6a9c5260 UD |
7197 | # Check if we have .hidden |
7198 | echo " .hidden foobar" > conftest.s | |
7199 | echo "foobar:" >> conftest.s | |
7200 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
6a9c5260 UD |
7201 | gcc_cv_as_hidden="yes" |
7202 | fi | |
7203 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
c72931a6 RH |
7204 | |
7205 | # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | |
7206 | # This is irritatingly difficult to feature test for. Look for | |
7207 | # the date string after the version number. | |
7208 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1` | |
7209 | if echo "$ld_ver" | grep GNU > /dev/null; then | |
4832c9e1 JJ |
7210 | ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\([ ].*\|\)$,\1,p'` |
7211 | 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 | 7212 | if test 0"$ld_date" -lt 20020404; then |
4832c9e1 JJ |
7213 | if test -n "$ld_date"; then |
7214 | # If there was date string, but was earlier than 2002-04-04, fail | |
7215 | gcc_cv_as_hidden="no" | |
7216 | elif test -z "$ld_vers"; then | |
7217 | # If there was no date string nor ld version number, something is wrong | |
7218 | gcc_cv_as_hidden="no" | |
7219 | else | |
7220 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` | |
7221 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
7222 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |
7223 | test -z "$ld_vers_patch" && ld_vers_patch=0 | |
7224 | if test "$ld_vers_major" -lt 2; then | |
7225 | gcc_cv_as_hidden="no" | |
7226 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
7227 | gcc_cv_as_hidden="no" | |
7228 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \ | |
7229 | -a "$ld_vers_patch" -eq 0; then | |
7230 | gcc_cv_as_hidden="no" | |
7231 | fi | |
7232 | fi | |
c72931a6 RH |
7233 | fi |
7234 | fi | |
981d4858 JM |
7235 | fi |
7236 | if test x"$gcc_cv_as_hidden" = xyes; then | |
7237 | cat >> confdefs.h <<\EOF | |
7238 | #define HAVE_GAS_HIDDEN 1 | |
7239 | EOF | |
7240 | ||
6a9c5260 UD |
7241 | fi |
7242 | echo "$ac_t""$gcc_cv_as_hidden" 1>&6 | |
9e944a16 JJ |
7243 | libgcc_visibility=$gcc_cv_as_hidden |
7244 | ||
6a9c5260 | 7245 | |
b7460f24 | 7246 | echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6 |
343f59d9 | 7247 | echo "configure:7228: checking assembler leb128 support" >&5 |
fbe42b1b | 7248 | gcc_cv_as_leb128=no |
b7460f24 | 7249 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
fbe42b1b | 7250 | if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 11 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then |
b7460f24 RH |
7251 | gcc_cv_as_leb128="yes" |
7252 | fi | |
7253 | elif test x$gcc_cv_as != x; then | |
7254 | # Check if we have .[us]leb128, and support symbol arithmetic with it. | |
7255 | cat > conftest.s <<EOF | |
7256 | .data | |
7257 | .uleb128 L2 - L1 | |
7258 | L1: | |
7259 | .uleb128 1280 | |
7260 | .sleb128 -1010 | |
7261 | L2: | |
7262 | EOF | |
7263 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
78e766a0 RH |
7264 | gcc_cv_as_leb128="yes" |
7265 | ||
7266 | # GAS versions before 2.11 do not support uleb128, | |
7267 | # despite appearing to. | |
7268 | # ??? There exists an elf-specific test that will crash | |
7269 | # the assembler. Perhaps it's better to figure out whether | |
7270 | # arbitrary sections are supported and try the test. | |
7271 | as_ver=`$gcc_cv_as --version 2>/dev/null | head -1` | |
7272 | if echo "$as_ver" | grep GNU > /dev/null; then | |
5fed851d | 7273 | as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` |
78e766a0 | 7274 | as_major=`echo $as_ver | sed 's/\..*//'` |
3d399d67 | 7275 | as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` |
78e766a0 RH |
7276 | if test $as_major -eq 2 -a $as_minor -lt 11; then |
7277 | gcc_cv_as_leb128="no" | |
7278 | fi | |
fbe42b1b | 7279 | fi |
b7460f24 RH |
7280 | fi |
7281 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
7282 | fi | |
7283 | if test x"$gcc_cv_as_leb128" = xyes; then | |
7284 | cat >> confdefs.h <<\EOF | |
7285 | #define HAVE_AS_LEB128 1 | |
7286 | EOF | |
7287 | ||
7288 | fi | |
7289 | echo "$ac_t""$gcc_cv_as_leb128" 1>&6 | |
7290 | ||
c64688ae | 7291 | echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6 |
343f59d9 | 7292 | echo "configure:7273: checking assembler eh_frame optimization" >&5 |
c64688ae RH |
7293 | gcc_cv_as_eh_frame=no |
7294 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then | |
7295 | if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
7296 | gcc_cv_as_eh_frame="yes" | |
7297 | fi | |
7298 | elif test x$gcc_cv_as != x; then | |
7299 | # Check if this is GAS. | |
41948db5 SS |
7300 | as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1` |
7301 | rm -f a.out 2> /dev/null | |
c64688ae RH |
7302 | if echo "$as_ver" | grep GNU > /dev/null; then |
7303 | # Versions up to and including 2.11.0 may mis-optimize | |
7304 | # .eh_frame data. Try something. | |
7305 | cat > conftest.s <<EOF | |
7306 | .text | |
7307 | .LFB1: | |
7308 | .4byte 0 | |
7309 | .L1: | |
7310 | .4byte 0 | |
7311 | .LFE1: | |
7312 | .section .eh_frame,"aw",@progbits | |
7313 | __FRAME_BEGIN__: | |
7314 | .4byte .LECIE1-.LSCIE1 | |
7315 | .LSCIE1: | |
7316 | .4byte 0x0 | |
7317 | .byte 0x1 | |
7318 | .ascii "z\0" | |
7319 | .byte 0x1 | |
7320 | .byte 0x78 | |
7321 | .byte 0x1a | |
7322 | .byte 0x0 | |
7323 | .byte 0x4 | |
7324 | .4byte 1 | |
7325 | .p2align 1 | |
7326 | .LECIE1: | |
7327 | .LSFDE1: | |
7328 | .4byte .LEFDE1-.LASFDE1 | |
7329 | .LASFDE1: | |
7330 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
7331 | .4byte .LFB1 | |
7332 | .4byte .LFE1-.LFB1 | |
7333 | .byte 0x4 | |
7334 | .4byte .LFE1-.LFB1 | |
7335 | .byte 0x4 | |
7336 | .4byte .L1-.LFB1 | |
7337 | .LEFDE1: | |
7338 | EOF | |
01efb963 | 7339 | cat > conftest.lit <<EOF |
c64688ae RH |
7340 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
7341 | 0010 01000000 12000000 18000000 00000000 ................ | |
7342 | 0020 08000000 04080000 0044 .........D | |
01efb963 AS |
7343 | EOF |
7344 | cat > conftest.big <<EOF | |
7345 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... | |
7346 | 0010 00000001 00000012 00000018 00000000 ................ | |
7347 | 0020 00000008 04000000 0844 .........D | |
c64688ae RH |
7348 | EOF |
7349 | # If the assembler didn't choke, and we can objdump, | |
7350 | # and we got the correct data, then succeed. | |
7351 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ | |
3cae5780 | 7352 | && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ |
c64688ae | 7353 | | tail -3 > conftest.got \ |
01efb963 AS |
7354 | && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ |
7355 | || cmp conftest.big conftest.got > /dev/null 2>&1; } | |
c64688ae RH |
7356 | then |
7357 | gcc_cv_as_eh_frame="yes" | |
7358 | else | |
7359 | gcc_cv_as_eh_frame="bad" | |
7360 | if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then | |
7361 | cat >> confdefs.h <<\EOF | |
7362 | #define USE_AS_TRADITIONAL_FORMAT 1 | |
7363 | EOF | |
7364 | ||
7365 | fi | |
7366 | fi | |
7367 | fi | |
7368 | rm -f conftest.* | |
7369 | fi | |
7370 | echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6 | |
7371 | ||
201556f0 | 7372 | echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6 |
343f59d9 | 7373 | echo "configure:7354: checking assembler section merging support" >&5 |
201556f0 JJ |
7374 | gcc_cv_as_shf_merge=no |
7375 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then | |
7376 | if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
a8b7afb9 | 7377 | gcc_cv_as_shf_merge=yes |
201556f0 JJ |
7378 | fi |
7379 | elif test x$gcc_cv_as != x; then | |
7380 | # Check if we support SHF_MERGE sections | |
7381 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s | |
a8b7afb9 | 7382 | if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then |
201556f0 JJ |
7383 | gcc_cv_as_shf_merge=yes |
7384 | fi | |
7385 | rm -f conftest.s conftest.o | |
7386 | fi | |
7387 | if test x"$gcc_cv_as_shf_merge" = xyes; then | |
7388 | cat >> confdefs.h <<\EOF | |
7389 | #define HAVE_GAS_SHF_MERGE 1 | |
7390 | EOF | |
7391 | ||
7392 | fi | |
7393 | echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6 | |
7394 | ||
3a37b08e RH |
7395 | case "$target" in |
7396 | # All TARGET_ABI_OSF targets. | |
7397 | alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) | |
7398 | echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6 | |
343f59d9 | 7399 | echo "configure:7380: checking assembler supports explicit relocations" >&5 |
3a37b08e RH |
7400 | if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then |
7401 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7402 | else | |
7403 | ||
7404 | gcc_cv_as_explicit_relocs=unknown | |
7405 | if test x$gcc_cv_gas_major_version != x \ | |
7406 | -a x$gcc_cv_gas_minor_version != x | |
7407 | then | |
7408 | if test "$gcc_cv_gas_major_version" -eq 2 \ | |
7409 | -a "$gcc_cv_gas_minor_version" -ge 12 \ | |
7410 | -o "$gcc_cv_gas_major_version" -gt 2; then | |
7411 | gcc_cv_as_explicit_relocs=yes | |
7412 | fi | |
7413 | elif test x$gcc_cv_as != x; then | |
7414 | cat > conftest.s << 'EOF' | |
7415 | .set nomacro | |
7416 | .text | |
7417 | extbl $3, $2, $3 !lituse_bytoff!1 | |
7418 | ldq $2, a($29) !literal!1 | |
7419 | ldq $4, b($29) !literal!2 | |
7420 | ldq_u $3, 0($2) !lituse_base!1 | |
7421 | ldq $27, f($29) !literal!5 | |
7422 | jsr $26, ($27), f !lituse_jsr!5 | |
7423 | ldah $29, 0($26) !gpdisp!3 | |
7424 | lda $0, c($29) !gprel | |
7425 | ldah $1, d($29) !gprelhigh | |
7426 | lda $1, d($1) !gprellow | |
7427 | lda $29, 0($29) !gpdisp!3 | |
7428 | EOF | |
7429 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7430 | gcc_cv_as_explicit_relocs=yes | |
7431 | else | |
7432 | gcc_cv_as_explicit_relocs=no | |
7433 | fi | |
7434 | rm -f conftest.s conftest.o | |
7435 | fi | |
7436 | ||
7437 | fi | |
7438 | ||
7439 | echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6 | |
7440 | if test "x$gcc_cv_as_explicit_relocs" = xyes; then | |
7441 | cat >> confdefs.h <<\EOF | |
7442 | #define HAVE_AS_EXPLICIT_RELOCS 1 | |
7443 | EOF | |
7444 | ||
7445 | fi | |
7446 | ;; | |
1cb36a98 RH |
7447 | sparc*-*-*) |
7448 | echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6 | |
343f59d9 | 7449 | echo "configure:7430: checking assembler .register pseudo-op support" >&5 |
5b68c389 AO |
7450 | if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then |
7451 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7452 | else | |
7453 | ||
7454 | gcc_cv_as_register_pseudo_op=unknown | |
7455 | if test x$gcc_cv_as != x; then | |
7456 | # Check if we have .register | |
7457 | echo ".register %g2, #scratch" > conftest.s | |
7458 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
1cb36a98 | 7459 | gcc_cv_as_register_pseudo_op=yes |
5b68c389 AO |
7460 | else |
7461 | gcc_cv_as_register_pseudo_op=no | |
7462 | fi | |
7463 | rm -f conftest.s conftest.o | |
7464 | fi | |
7465 | ||
7466 | fi | |
7467 | ||
7468 | echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6 | |
7469 | if test "x$gcc_cv_as_register_pseudo_op" = xyes; then | |
7470 | cat >> confdefs.h <<\EOF | |
1cb36a98 RH |
7471 | #define HAVE_AS_REGISTER_PSEUDO_OP 1 |
7472 | EOF | |
7473 | ||
1cb36a98 | 7474 | fi |
1cb36a98 | 7475 | |
e95b1e6a | 7476 | echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6 |
343f59d9 | 7477 | echo "configure:7458: checking assembler supports -relax" >&5 |
e95b1e6a JJ |
7478 | if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then |
7479 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7480 | else | |
7481 | ||
7482 | gcc_cv_as_relax_opt=unknown | |
7483 | if test x$gcc_cv_as != x; then | |
7484 | # Check if gas supports -relax | |
7485 | echo ".text" > conftest.s | |
7486 | if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then | |
7487 | gcc_cv_as_relax_opt=yes | |
7488 | else | |
7489 | gcc_cv_as_relax_opt=no | |
7490 | fi | |
7491 | rm -f conftest.s conftest.o | |
7492 | fi | |
7493 | ||
7494 | fi | |
7495 | ||
7496 | echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6 | |
7497 | if test "x$gcc_cv_as_relax_opt" = xyes; then | |
7498 | cat >> confdefs.h <<\EOF | |
7499 | #define HAVE_AS_RELAX_OPTION 1 | |
7500 | EOF | |
7501 | ||
7502 | fi | |
7503 | ||
17e9e88c | 7504 | echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6 |
343f59d9 | 7505 | echo "configure:7486: checking assembler and linker support unaligned pc related relocs" >&5 |
17e9e88c JJ |
7506 | if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then |
7507 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7508 | else | |
7509 | ||
7510 | gcc_cv_as_sparc_ua_pcrel=unknown | |
7511 | if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then | |
7512 | gcc_cv_as_sparc_ua_pcrel=no | |
7513 | echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s | |
cf7b8b0d JJ |
7514 | if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \ |
7515 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then | |
7516 | gcc_cv_as_sparc_ua_pcrel=yes | |
17e9e88c JJ |
7517 | fi |
7518 | rm -f conftest.s conftest.o conftest | |
7519 | fi | |
7520 | ||
7521 | fi | |
7522 | ||
7523 | echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6 | |
7524 | if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then | |
7525 | cat >> confdefs.h <<\EOF | |
7526 | #define HAVE_AS_SPARC_UA_PCREL 1 | |
7527 | EOF | |
7528 | ||
7529 | fi | |
7530 | ||
fc06c4b2 | 7531 | echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6 |
343f59d9 | 7532 | echo "configure:7513: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5 |
cf7b8b0d JJ |
7533 | if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then |
7534 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7535 | else | |
7536 | ||
7537 | if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then | |
7538 | gcc_cv_as_sparc_ua_pcrel_hidden=unknown | |
7539 | if test x$gcc_cv_objdump != x; then | |
7540 | gcc_cv_as_sparc_ua_pcrel_hidden=no | |
7541 | echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s | |
7542 | echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s | |
7543 | echo "foo: .skip 4" >> conftest.s | |
7544 | if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \ | |
7545 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ | |
7546 | && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ | |
7547 | | grep ' 31000000 07323334' > /dev/null 2>&1; then | |
7548 | if $gcc_cv_objdump -R conftest 2> /dev/null \ | |
7549 | | grep 'DISP32' > /dev/null 2>&1; then | |
7550 | : | |
7551 | else | |
7552 | gcc_cv_as_sparc_ua_pcrel_hidden=yes | |
7553 | fi | |
7554 | fi | |
7555 | fi | |
7556 | rm -f conftest.s conftest.o conftest | |
7557 | else | |
7558 | gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel" | |
7559 | fi | |
7560 | ||
7561 | fi | |
7562 | ||
7563 | echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6 | |
7564 | if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then | |
7565 | cat >> confdefs.h <<\EOF | |
7566 | #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1 | |
7567 | EOF | |
7568 | ||
7569 | fi | |
7570 | ||
5b68c389 AO |
7571 | if test "x$gcc_cv_as_flags64" != xno; then |
7572 | echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6 | |
343f59d9 | 7573 | echo "configure:7554: checking for assembler offsetable %lo() support" >&5 |
5b68c389 AO |
7574 | if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then |
7575 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7576 | else | |
7577 | ||
7578 | gcc_cv_as_offsetable_lo10=unknown | |
7579 | if test "x$gcc_cv_as" != x; then | |
7580 | # Check if assembler has offsetable %lo() | |
7581 | echo "or %g1, %lo(ab) + 12, %g1" > conftest.s | |
7582 | echo "or %g1, %lo(ab + 12), %g1" > conftest1.s | |
7583 | if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \ | |
7584 | > /dev/null 2>&1 && | |
7585 | $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \ | |
7586 | > /dev/null 2>&1; then | |
7587 | if cmp conftest.o conftest1.o > /dev/null 2>&1; then | |
7588 | gcc_cv_as_offsetable_lo10=no | |
7589 | else | |
7590 | gcc_cv_as_offsetable_lo10=yes | |
7591 | fi | |
7592 | else | |
7593 | gcc_cv_as_offsetable_lo10=no | |
7594 | fi | |
7595 | rm -f conftest.s conftest.o conftest1.s conftest1.o | |
7596 | fi | |
7597 | ||
7598 | fi | |
7599 | ||
7600 | echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6 | |
7601 | if test "x$gcc_cv_as_offsetable_lo10" = xyes; then | |
7602 | cat >> confdefs.h <<\EOF | |
1cb36a98 RH |
7603 | #define HAVE_AS_OFFSETABLE_LO10 1 |
7604 | EOF | |
7605 | ||
1cb36a98 | 7606 | fi |
1cb36a98 | 7607 | fi |
43160d01 | 7608 | |
1cb36a98 RH |
7609 | ;; |
7610 | ||
c307e6dd | 7611 | i[34567]86-*-* | x86_64-*-*) |
1cb36a98 | 7612 | echo $ac_n "checking assembler instructions""... $ac_c" 1>&6 |
343f59d9 | 7613 | echo "configure:7594: checking assembler instructions" >&5 |
1cb36a98 | 7614 | gcc_cv_as_instructions= |
981d4858 JM |
7615 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
7616 | if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2; then | |
7617 | gcc_cv_as_instructions="filds fists" | |
7618 | fi | |
7619 | elif test x$gcc_cv_as != x; then | |
53b5ce19 JW |
7620 | set "filds fists" "filds mem; fists mem" |
7621 | while test $# -gt 0 | |
7622 | do | |
7623 | echo "$2" > conftest.s | |
7624 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7625 | gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" " | |
53b5ce19 JW |
7626 | fi |
7627 | shift 2 | |
7628 | done | |
7629 | rm -f conftest.s conftest.o | |
1cb36a98 | 7630 | fi |
981d4858 JM |
7631 | if test x"$gcc_cv_as_instructions" != x; then |
7632 | cat >> confdefs.h <<EOF | |
ee7692d2 | 7633 | #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1 |
981d4858 JM |
7634 | EOF |
7635 | ||
7636 | fi | |
1cb36a98 | 7637 | echo "$ac_t""$gcc_cv_as_instructions" 1>&6 |
f88c65f7 RH |
7638 | |
7639 | echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6 | |
343f59d9 | 7640 | echo "configure:7621: checking assembler GOTOFF in data directives" >&5 |
f88c65f7 RH |
7641 | gcc_cv_as_gotoff_in_data=no |
7642 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x | |
7643 | then | |
7644 | if test "$gcc_cv_gas_major_version" -eq 2 \ | |
7645 | -a "$gcc_cv_gas_minor_version" -ge 11 \ | |
7646 | -o "$gcc_cv_gas_major_version" -gt 2; then | |
7647 | gcc_cv_as_gotoff_in_data=yes | |
7648 | fi | |
7649 | elif test x$gcc_cv_as != x; then | |
7650 | cat > conftest.s <<EOF | |
7651 | .text | |
7652 | .L0: | |
7653 | nop | |
7654 | .data | |
7655 | .long .L0@GOTOFF | |
7656 | EOF | |
7657 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7658 | gcc_cv_as_gotoff_in_data=yes | |
7659 | fi | |
7660 | fi | |
7661 | cat >> confdefs.h <<EOF | |
7662 | #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi` | |
7663 | EOF | |
7664 | ||
7665 | echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6 | |
1cb36a98 RH |
7666 | ;; |
7667 | esac | |
53b5ce19 | 7668 | |
9d147085 | 7669 | echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6 |
343f59d9 | 7670 | echo "configure:7651: checking assembler dwarf2 debug_line support" >&5 |
9d147085 RH |
7671 | gcc_cv_as_dwarf2_debug_line=no |
7672 | # ??? Not all targets support dwarf2 debug_line, even within a version | |
7673 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
7674 | # info to the output file. So, as supported targets are added to gas 2.11, | |
7675 | # add some instruction here to (also) show we expect this might work. | |
7676 | # ??? Once 2.11 is released, probably need to add first known working | |
7677 | # version to the per-target configury. | |
7678 | case "$target" in | |
823fbbce | 7679 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* | x86_64*-*-* | hppa*-*-*) |
9d147085 RH |
7680 | insn="nop" |
7681 | ;; | |
7682 | ia64*-*-*) | |
7683 | insn="nop 0" | |
7684 | ;; | |
7685 | esac | |
7686 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; | |
7687 | then | |
7688 | if test "$gcc_cv_gas_major_version" -eq 2 \ | |
7689 | -a "$gcc_cv_gas_minor_version" -ge 11 \ | |
7690 | -o "$gcc_cv_gas_major_version" -gt 2 \ | |
7691 | && grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
7692 | && test x"$insn" != x ; then | |
7693 | gcc_cv_as_dwarf2_debug_line="yes" | |
7694 | fi | |
7695 | elif test x$gcc_cv_as != x -a x"$insn" != x ; then | |
acc187f5 RH |
7696 | echo ' .file 1 "conftest.s"' > conftest.s |
7697 | echo ' .loc 1 3 0' >> conftest.s | |
9d147085 | 7698 | echo " $insn" >> conftest.s |
981975b6 | 7699 | # ??? This fails with non-gnu grep. |
9d147085 RH |
7700 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ |
7701 | && grep debug_line conftest.o > /dev/null 2>&1 ; then | |
981975b6 | 7702 | # The .debug_line file table must be in the exact order that |
eaec9b3d | 7703 | # we specified the files, since these indices are also used |
981975b6 RH |
7704 | # by DW_AT_decl_file. Approximate this test by testing if |
7705 | # the assembler bitches if the same index is assigned twice. | |
7706 | echo ' .file 1 "foo.s"' > conftest.s | |
7707 | echo ' .file 1 "bar.s"' >> conftest.s | |
7708 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 | |
7709 | then | |
7710 | gcc_cv_as_dwarf2_debug_line="no" | |
7711 | else | |
7712 | gcc_cv_as_dwarf2_debug_line="yes" | |
7713 | fi | |
9d147085 RH |
7714 | fi |
7715 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
7716 | fi | |
7717 | if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then | |
7718 | cat >> confdefs.h <<\EOF | |
7719 | #define HAVE_AS_DWARF2_DEBUG_LINE 1 | |
7720 | EOF | |
7721 | ||
7722 | fi | |
7723 | echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6 | |
7724 | ||
5f0e9ea2 | 7725 | echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6 |
343f59d9 | 7726 | echo "configure:7707: checking assembler --gdwarf2 support" >&5 |
5f0e9ea2 GK |
7727 | gcc_cv_as_gdwarf2_flag=no |
7728 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; | |
7729 | then | |
7730 | if test "$gcc_cv_gas_major_version" -eq 2 \ | |
7731 | -a "$gcc_cv_gas_minor_version" -ge 11 \ | |
7732 | -o "$gcc_cv_gas_major_version" -gt 2 \ | |
7733 | && grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
7734 | && test x"$insn" != x ; then | |
7735 | gcc_cv_as_gdwarf2_debug_flag="yes" | |
7736 | fi | |
7737 | elif test x$gcc_cv_as != x -a x"$insn" != x ; then | |
7738 | echo '' > conftest.s | |
7739 | # ??? This fails with non-gnu grep. | |
7740 | if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1 | |
7741 | then | |
7742 | gcc_cv_as_gdwarf2_flag="yes" | |
7743 | fi | |
7744 | rm -f conftest.s conftest.o | |
7745 | fi | |
7746 | if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then | |
7747 | cat >> confdefs.h <<\EOF | |
7748 | #define HAVE_AS_GDWARF2_DEBUG_FLAG 1 | |
7749 | EOF | |
7750 | ||
7751 | fi | |
7752 | echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6 | |
7753 | ||
7754 | echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6 | |
343f59d9 | 7755 | echo "configure:7736: checking assembler --gstabs support" >&5 |
5f0e9ea2 GK |
7756 | gcc_cv_as_gstabs_flag=no |
7757 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; | |
7758 | then | |
7759 | if test "$gcc_cv_gas_major_version" -eq 2 \ | |
7760 | -a "$gcc_cv_gas_minor_version" -ge 11 \ | |
7761 | -o "$gcc_cv_gas_major_version" -gt 2 \ | |
7762 | && grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
7763 | && test x"$insn" != x ; then | |
7764 | gcc_cv_as_gstabs_debug_flag="yes" | |
7765 | fi | |
7766 | elif test x$gcc_cv_as != x -a x"$insn" != x ; then | |
7767 | echo '' > conftest.s | |
7768 | # ??? This fails with non-gnu grep. | |
7769 | if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then | |
7770 | gcc_cv_as_gstabs_flag="yes" | |
7771 | fi | |
7772 | rm -f conftest.s conftest.o | |
7773 | fi | |
7774 | if test x"$gcc_cv_as_gstabs_flag" = xyes; then | |
7775 | cat >> confdefs.h <<\EOF | |
7776 | #define HAVE_AS_GSTABS_DEBUG_FLAG 1 | |
7777 | EOF | |
7778 | ||
7779 | fi | |
7780 | echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6 | |
7781 | ||
275b60d6 | 7782 | echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6 |
343f59d9 | 7783 | echo "configure:7764: checking linker PT_GNU_EH_FRAME support" >&5 |
275b60d6 JJ |
7784 | gcc_cv_ld_eh_frame_hdr=no |
7785 | if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then | |
7786 | 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 | |
7787 | gcc_cv_ld_eh_frame_hdr=yes | |
7788 | fi | |
7789 | elif test x$gcc_cv_ld != x; then | |
7790 | # Check if linker supports --eh-frame-hdr option | |
7791 | if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then | |
7792 | gcc_cv_ld_eh_frame_hdr=yes | |
7793 | fi | |
7794 | fi | |
7795 | if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then | |
7796 | cat >> confdefs.h <<\EOF | |
7797 | #define HAVE_LD_EH_FRAME_HDR 1 | |
7798 | EOF | |
7799 | ||
7800 | fi | |
7801 | echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6 | |
7802 | ||
793e9558 PB |
7803 | if test "$prefix" != "/usr" && test "$prefix" != "/usr/local" ; then |
7804 | cat >> confdefs.h <<EOF | |
7805 | #define PREFIX_INCLUDE_DIR "$prefix/include" | |
7806 | EOF | |
7807 | ||
7808 | fi | |
7809 | ||
861bb6c1 | 7810 | # Figure out what language subdirectories are present. |
71205e0b MH |
7811 | # Look if the user specified --enable-languages="..."; if not, use |
7812 | # the environment variable $LANGUAGES if defined. $LANGUAGES might | |
7813 | # go away some day. | |
cc9a08e0 | 7814 | # NB: embedded tabs in this IF block -- do not untabify |
71205e0b MH |
7815 | if test x"${enable_languages+set}" != xset; then |
7816 | if test x"${LANGUAGES+set}" = xset; then | |
cc9a08e0 PE |
7817 | enable_languages="${LANGUAGES}" |
7818 | echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2 | |
7819 | ||
71205e0b MH |
7820 | else |
7821 | enable_languages=all | |
7822 | fi | |
d6c6b553 | 7823 | else |
cc9a08e0 PE |
7824 | if test x"${enable_languages}" = x || |
7825 | test x"${enable_languages}" = xyes; | |
7826 | then | |
7827 | { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; } | |
d6c6b553 | 7828 | fi |
71205e0b | 7829 | fi |
cc9a08e0 | 7830 | enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'` |
75382c6d TT |
7831 | |
7832 | # First scan to see if an enabled language requires some other language. | |
7833 | # We assume that a given config-lang.in will list all the language | |
7834 | # front ends it requires, even if some are required indirectly. | |
7835 | for lang in ${srcdir}/*/config-lang.in .. | |
7836 | do | |
7837 | case $lang in | |
7838 | ..) | |
7839 | ;; | |
7840 | # The odd quoting in the next line works around | |
7841 | # an apparent bug in bash 1.12 on linux. | |
7842 | ${srcdir}/[*]/config-lang.in) | |
7843 | ;; | |
7844 | *) | |
7845 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
7846 | this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang` | |
7847 | for other in $this_lang_requires | |
7848 | do | |
7849 | case ,${enable_languages}, in | |
7850 | *,$other,*) | |
7851 | ;; | |
7852 | *,all,*) | |
7853 | ;; | |
1bf17cc4 | 7854 | *,$lang_alias,*) |
75382c6d TT |
7855 | enable_languages="$enable_languages,$other" |
7856 | ;; | |
7857 | esac | |
7858 | done | |
7859 | ;; | |
7860 | esac | |
7861 | done | |
7862 | ||
861bb6c1 JL |
7863 | subdirs= |
7864 | for lang in ${srcdir}/*/config-lang.in .. | |
7865 | do | |
7866 | case $lang in | |
7867 | ..) ;; | |
7868 | # The odd quoting in the next line works around | |
7869 | # an apparent bug in bash 1.12 on linux. | |
7870 | ${srcdir}/[*]/config-lang.in) ;; | |
71205e0b MH |
7871 | *) |
7872 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
2b60b2cb AO |
7873 | this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang` |
7874 | build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang` | |
71205e0b MH |
7875 | if test "x$lang_alias" = x |
7876 | then | |
7877 | echo "$lang doesn't set \$language." 1>&2 | |
7878 | exit 1 | |
7879 | fi | |
2b60b2cb AO |
7880 | case ${build_by_default},${enable_languages}, in |
7881 | *,$lang_alias,*) add_this_lang=yes ;; | |
7882 | no,*) add_this_lang=no ;; | |
7883 | *,all,*) add_this_lang=yes ;; | |
7884 | *) add_this_lang=no ;; | |
7885 | esac | |
71205e0b MH |
7886 | if test x"${add_this_lang}" = xyes; then |
7887 | case $lang in | |
7888 | ${srcdir}/ada/config-lang.in) | |
1ffc5c6e | 7889 | if test x$have_gnat = xyes ; then |
71205e0b MH |
7890 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" |
7891 | fi | |
7892 | ;; | |
7893 | *) | |
7894 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" | |
7895 | ;; | |
7896 | esac | |
7897 | fi | |
7898 | ;; | |
861bb6c1 JL |
7899 | esac |
7900 | done | |
7901 | ||
f24af81b TT |
7902 | # Make gthr-default.h if we have a thread file. |
7903 | gthread_flags= | |
75bffa71 | 7904 | if test $thread_file != single; then |
f24af81b | 7905 | rm -f gthr-default.h |
db0d1ed9 | 7906 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h |
f24af81b TT |
7907 | gthread_flags=-DHAVE_GTHR_DEFAULT |
7908 | fi | |
7909 | ||
7910 | ||
81bf3d9e RH |
7911 | # Find out what GC implementation we want, or may, use. |
7912 | # Check whether --with-gc or --without-gc was given. | |
7913 | if test "${with_gc+set}" = set; then | |
7914 | withval="$with_gc" | |
7915 | case "$withval" in | |
7916 | simple | page) | |
7917 | GGC=ggc-$withval | |
7918 | ;; | |
7919 | *) | |
7920 | { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; } | |
7921 | ;; | |
7922 | esac | |
7923 | else | |
005537df | 7924 | GGC=ggc-page |
81bf3d9e RH |
7925 | fi |
7926 | ||
7927 | ||
7928 | echo "Using $GGC for garbage collection." | |
7929 | ||
3c809ba4 | 7930 | # Use the system's zlib library. |
b8dad04b ZW |
7931 | zlibdir=-L../zlib |
7932 | zlibinc="-I\$(srcdir)/../zlib" | |
3c809ba4 AG |
7933 | # Check whether --with-system-zlib or --without-system-zlib was given. |
7934 | if test "${with_system_zlib+set}" = set; then | |
7935 | withval="$with_system_zlib" | |
7936 | zlibdir= | |
7937 | zlibinc= | |
7938 | ||
7939 | fi | |
7940 | ||
7941 | ||
7942 | ||
7943 | ||
dc6746e7 PT |
7944 | |
7945 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 | |
343f59d9 | 7946 | echo "configure:7927: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
dc6746e7 PT |
7947 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
7948 | if test "${enable_maintainer_mode+set}" = set; then | |
7949 | enableval="$enable_maintainer_mode" | |
7950 | maintainer_mode=$enableval | |
7951 | else | |
7952 | maintainer_mode=no | |
7953 | fi | |
7954 | ||
7955 | ||
7956 | echo "$ac_t""$maintainer_mode" 1>&6 | |
7957 | ||
7958 | if test "$maintainer_mode" = "yes"; then | |
7959 | MAINT='' | |
7960 | else | |
7961 | MAINT='#' | |
7962 | fi | |
7963 | ||
531073e7 RH |
7964 | # With Setjmp/Longjmp based exception handling. |
7965 | # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. | |
7966 | if test "${enable_sjlj_exceptions+set}" = set; then | |
7967 | enableval="$enable_sjlj_exceptions" | |
7968 | sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` | |
7969 | cat >> confdefs.h <<EOF | |
7970 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj | |
7971 | EOF | |
7972 | ||
7973 | fi | |
7974 | ||
7975 | ||
861bb6c1 JL |
7976 | # Make empty files to contain the specs and options for each language. |
7977 | # Then add #include lines to for a compiler that has specs and/or options. | |
7978 | ||
7979 | lang_specs_files= | |
7980 | lang_options_files= | |
3103b7db | 7981 | lang_tree_files= |
861bb6c1 JL |
7982 | for subdir in . $subdirs |
7983 | do | |
75bffa71 | 7984 | if test -f $srcdir/$subdir/lang-specs.h; then |
0d24f4d1 | 7985 | lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" |
861bb6c1 | 7986 | fi |
75bffa71 | 7987 | if test -f $srcdir/$subdir/lang-options.h; then |
0d24f4d1 | 7988 | lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h" |
861bb6c1 | 7989 | fi |
3103b7db | 7990 | if test -f $srcdir/$subdir/$subdir-tree.def; then |
0d24f4d1 | 7991 | lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" |
3103b7db | 7992 | fi |
861bb6c1 JL |
7993 | done |
7994 | ||
7995 | # These (without "all_") are set in each config-lang.in. | |
7996 | # `language' must be a single word so is spelled singularly. | |
7997 | all_languages= | |
7998 | all_boot_languages= | |
7999 | all_compilers= | |
8000 | all_stagestuff= | |
5b7874aa | 8001 | all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc' |
861bb6c1 JL |
8002 | # List of language makefile fragments. |
8003 | all_lang_makefiles= | |
861bb6c1 JL |
8004 | |
8005 | # Add the language fragments. | |
8006 | # Languages are added via two mechanisms. Some information must be | |
8007 | # recorded in makefile variables, these are defined in config-lang.in. | |
8008 | # We accumulate them and plug them into the main Makefile. | |
8009 | # The other mechanism is a set of hooks for each of the main targets | |
8010 | # like `clean', `install', etc. | |
8011 | ||
8012 | language_fragments="Make-lang" | |
8013 | language_hooks="Make-hooks" | |
861bb6c1 JL |
8014 | |
8015 | for s in .. $subdirs | |
8016 | do | |
75bffa71 | 8017 | if test $s != ".." |
861bb6c1 JL |
8018 | then |
8019 | language= | |
8020 | boot_language= | |
8021 | compilers= | |
8022 | stagestuff= | |
861bb6c1 | 8023 | outputs= |
861bb6c1 | 8024 | . ${srcdir}/$s/config-lang.in |
75bffa71 | 8025 | if test "x$language" = x |
861bb6c1 JL |
8026 | then |
8027 | echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2 | |
8028 | exit 1 | |
8029 | fi | |
72aaffbd ZW |
8030 | all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in" |
8031 | if test -f ${srcdir}/$s/Makefile.in | |
8032 | then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in" | |
8033 | fi | |
861bb6c1 | 8034 | all_languages="$all_languages $language" |
75bffa71 | 8035 | if test "x$boot_language" = xyes |
861bb6c1 JL |
8036 | then |
8037 | all_boot_languages="$all_boot_languages $language" | |
8038 | fi | |
8039 | all_compilers="$all_compilers $compilers" | |
8040 | all_stagestuff="$all_stagestuff $stagestuff" | |
861bb6c1 | 8041 | all_outputs="$all_outputs $outputs" |
861bb6c1 JL |
8042 | fi |
8043 | done | |
8044 | ||
cbc59f01 DD |
8045 | check_languages= |
8046 | for language in .. $all_languages | |
8047 | do | |
8048 | if test $language != ".." | |
8049 | then | |
8050 | check_languages="$check_languages check-$language" | |
8051 | fi | |
8052 | done | |
8053 | ||
861bb6c1 JL |
8054 | # Since we can't use `::' targets, we link each language in |
8055 | # with a set of hooks, reached indirectly via lang.${target}. | |
8056 | ||
8057 | rm -f Make-hooks | |
8058 | touch Make-hooks | |
8059 | target_list="all.build all.cross start.encap rest.encap \ | |
d3945f0a | 8060 | info dvi generated-manpages \ |
861bb6c1 | 8061 | install-normal install-common install-info install-man \ |
436a88a6 | 8062 | uninstall \ |
861bb6c1 JL |
8063 | mostlyclean clean distclean extraclean maintainer-clean \ |
8064 | stage1 stage2 stage3 stage4" | |
8065 | for t in $target_list | |
8066 | do | |
8067 | x= | |
ab87f8c8 | 8068 | for lang in .. $all_languages |
861bb6c1 | 8069 | do |
ab87f8c8 JL |
8070 | if test $lang != ".."; then |
8071 | x="$x $lang.$t" | |
861bb6c1 JL |
8072 | fi |
8073 | done | |
8074 | echo "lang.$t: $x" >> Make-hooks | |
8075 | done | |
8076 | ||
cc06d68c | 8077 | # Create .gdbinit. |
861bb6c1 | 8078 | |
cc06d68c GP |
8079 | echo "dir ." > .gdbinit |
8080 | echo "dir ${srcdir}" >> .gdbinit | |
8081 | if test x$gdb_needs_out_file_path = xyes | |
8082 | then | |
8083 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
8084 | fi | |
8085 | if test "x$subdirs" != x; then | |
8086 | for s in $subdirs | |
8087 | do | |
8088 | echo "dir ${srcdir}/$s" >> .gdbinit | |
8089 | done | |
861bb6c1 | 8090 | fi |
cc06d68c | 8091 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 8092 | |
88111b26 JL |
8093 | # Define variables host_canonical and build_canonical |
8094 | # because some Cygnus local changes in the Makefile depend on them. | |
8095 | build_canonical=${build} | |
8096 | host_canonical=${host} | |
8097 | target_subdir= | |
75bffa71 | 8098 | if test "${host}" != "${target}" ; then |
924c96eb | 8099 | target_subdir=${target_alias}/ |
88111b26 JL |
8100 | fi |
8101 | ||
8102 | ||
8103 | ||
8104 | ||
8f8d3278 NC |
8105 | # If $(exec_prefix) exists and is not the same as $(prefix), then compute an |
8106 | # absolute path for gcc_tooldir based on inserting the number of up-directory | |
8107 | # movements required to get from $(exec_prefix) to $(prefix) into the basic | |
8108 | # $(libsubdir)/@(unlibsubdir) based path. | |
82cbf8f7 JL |
8109 | # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel |
8110 | # make and thus we'd get different behavior depending on where we built the | |
8111 | # sources. | |
5949a9fc | 8112 | if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then |
d062c304 JL |
8113 | gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)' |
8114 | else | |
8f8d3278 NC |
8115 | # An explanation of the sed strings: |
8116 | # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix' | |
8117 | # -e 's|/$||' match a trailing forward slash and eliminates it | |
8118 | # -e 's|^[^/]|/|' forces the string to start with a forward slash (*) | |
ff7cc307 | 8119 | # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../ |
8f8d3278 NC |
8120 | # |
8121 | # (*) Note this pattern overwrites the first character of the string | |
8122 | # with a forward slash if one is not already present. This is not a | |
8123 | # problem because the exact names of the sub-directories concerned is | |
8124 | # unimportant, just the number of them matters. | |
8125 | # | |
8126 | # The practical upshot of these patterns is like this: | |
8127 | # | |
8128 | # prefix exec_prefix result | |
8129 | # ------ ----------- ------ | |
8130 | # /foo /foo/bar ../ | |
8131 | # /foo/ /foo/bar ../ | |
8132 | # /foo /foo/bar/ ../ | |
8133 | # /foo/ /foo/bar/ ../ | |
8134 | # /foo /foo/bar/ugg ../../ | |
8135 | # | |
4c112cda NC |
8136 | dollar='$$' |
8137 | gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)" | |
d062c304 JL |
8138 | fi |
8139 | ||
8140 | ||
2ce3c6c6 | 8141 | |
2bbea3a6 RH |
8142 | # Find a directory in which to install a shared libgcc. |
8143 | ||
8144 | # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. | |
8145 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
8146 | enableval="$enable_version_specific_runtime_libs" | |
8147 | : | |
8148 | fi | |
8149 | ||
8150 | ||
5b15f277 RH |
8151 | # Check whether --with-slibdir or --without-slibdir was given. |
8152 | if test "${with_slibdir+set}" = set; then | |
8153 | withval="$with_slibdir" | |
8154 | slibdir="$with_slibdir" | |
8155 | else | |
8156 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 8157 | slibdir='$(libsubdir)' |
5b15f277 | 8158 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
8159 | slibdir='$(build_tooldir)/lib' |
8160 | else | |
5b15f277 | 8161 | slibdir='$(libdir)' |
2bbea3a6 | 8162 | fi |
5b15f277 RH |
8163 | fi |
8164 | ||
2bbea3a6 RH |
8165 | |
8166 | ||
7e717196 | 8167 | # Nothing to do for FLOAT_H, float_format already handled. |
1e6347d8 | 8168 | objdir=`${PWDCMD-pwd}` |
7e717196 JL |
8169 | |
8170 | ||
861bb6c1 JL |
8171 | # Process the language and host/target makefile fragments. |
8172 | ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file" | |
8173 | ||
8174 | # Substitute configuration variables | |
8175 | ||
8176 | ||
8177 | ||
8178 | ||
8179 | ||
8180 | ||
8181 | ||
8182 | ||
8183 | ||
8184 | ||
8185 | ||
8186 | ||
8187 | ||
8188 | ||
8189 | ||
8190 | ||
8191 | ||
8192 | ||
8193 | ||
8194 | ||
8195 | ||
8196 | ||
8197 | ||
8198 | ||
8199 | ||
8200 | ||
8201 | ||
8202 | ||
8203 | ||
8204 | ||
8205 | ||
8206 | ||
8207 | ||
8208 | ||
8209 | ||
8210 | ||
8211 | ||
8212 | ||
8213 | ||
8214 | ||
8215 | ||
8216 | ||
8217 | ||
8218 | ||
8219 | ||
8220 | ||
9b16d2c4 | 8221 | |
e9a25f70 | 8222 | |
6e26218f | 8223 | |
c8724862 | 8224 | |
e061d1ce | 8225 | |
d8bb17c8 | 8226 | |
11642c3a ZW |
8227 | |
8228 | ||
8229 | ||
8230 | ||
8231 | ||
8232 | ||
8233 | ||
3d9d2476 | 8234 | |
596151e1 | 8235 | |
861bb6c1 JL |
8236 | |
8237 | ||
8238 | # Echo that links are built | |
75bffa71 | 8239 | if test x$host = x$target |
861bb6c1 JL |
8240 | then |
8241 | str1="native " | |
8242 | else | |
8243 | str1="cross-" | |
8244 | str2=" from $host" | |
8245 | fi | |
8246 | ||
75bffa71 | 8247 | if test x$host != x$build |
861bb6c1 JL |
8248 | then |
8249 | str3=" on a $build system" | |
8250 | fi | |
8251 | ||
75bffa71 | 8252 | if test "x$str2" != x || test "x$str3" != x |
861bb6c1 JL |
8253 | then |
8254 | str4= | |
8255 | fi | |
8256 | ||
8257 | echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2 | |
8258 | ||
75bffa71 | 8259 | if test "x$str2" != x || test "x$str3" != x |
861bb6c1 JL |
8260 | then |
8261 | echo " ${str2}${str3}." 1>&2 | |
8262 | fi | |
8263 | ||
f6cb0e63 | 8264 | # Truncate the target if necessary |
75bffa71 | 8265 | if test x$host_truncate_target != x; then |
f6cb0e63 JL |
8266 | target=`echo $target | sed -e 's/\(..............\).*/\1/'` |
8267 | fi | |
8268 | ||
861bb6c1 JL |
8269 | # Configure the subdirectories |
8270 | # AC_CONFIG_SUBDIRS($subdirs) | |
8271 | ||
8272 | # Create the Makefile | |
8273 | # and configure language subdirectories | |
8274 | trap '' 1 2 15 | |
8275 | cat > confcache <<\EOF | |
8276 | # This file is a shell script that caches the results of configure | |
8277 | # tests run on this system so they can be shared between configure | |
8278 | # scripts and configure runs. It is not useful on other systems. | |
8279 | # If it contains results you don't want to keep, you may remove or edit it. | |
8280 | # | |
8281 | # By default, configure uses ./config.cache as the cache file, | |
8282 | # creating it if it does not exist already. You can give configure | |
8283 | # the --cache-file=FILE option to use a different cache file; that is | |
8284 | # what configure does when it calls configure scripts in | |
8285 | # subdirectories, so they share the cache. | |
8286 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
8287 | # config.status only pays attention to the cache file if you give it the | |
8288 | # --recheck option to rerun configure. | |
8289 | # | |
8290 | EOF | |
8291 | # The following way of writing the cache mishandles newlines in values, | |
8292 | # but we know of no workaround that is simple, portable, and efficient. | |
8293 | # So, don't put newlines in cache variables' values. | |
8294 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
8295 | # and sets the high bit in the cache file unless we assign to the vars. | |
8296 | (set) 2>&1 | | |
b27d2bd5 | 8297 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
861bb6c1 JL |
8298 | *ac_space=\ *) |
8299 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
8300 | # turns \\\\ into \\, and sed turns \\ into \). | |
8301 | sed -n \ | |
8302 | -e "s/'/'\\\\''/g" \ | |
8303 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
8304 | ;; | |
8305 | *) | |
8306 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
8307 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
8308 | ;; | |
8309 | esac >> confcache | |
8310 | if cmp -s $cache_file confcache; then | |
8311 | : | |
8312 | else | |
8313 | if test -w $cache_file; then | |
8314 | echo "updating cache $cache_file" | |
8315 | cat confcache > $cache_file | |
8316 | else | |
8317 | echo "not updating unwritable cache $cache_file" | |
8318 | fi | |
8319 | fi | |
8320 | rm -f confcache | |
8321 | ||
8322 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
8323 | ||
8324 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
8325 | # Let make expand exec_prefix. | |
8326 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
8327 | ||
8328 | # Any assignment to VPATH causes Sun make to only execute | |
8329 | # the first set of double-colon rules, so remove it if not needed. | |
8330 | # If there is a colon in the path, we need to keep it. | |
8331 | if test "x$srcdir" = x.; then | |
8332 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
8333 | fi | |
8334 | ||
8335 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
8336 | ||
8337 | DEFS=-DHAVE_CONFIG_H | |
8338 | ||
8339 | # Without the "./", some shells look in PATH for config.status. | |
8340 | : ${CONFIG_STATUS=./config.status} | |
8341 | ||
8342 | echo creating $CONFIG_STATUS | |
8343 | rm -f $CONFIG_STATUS | |
8344 | cat > $CONFIG_STATUS <<EOF | |
8345 | #! /bin/sh | |
8346 | # Generated automatically by configure. | |
8347 | # Run this file to recreate the current configuration. | |
8348 | # This directory was configured as follows, | |
8349 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
8350 | # | |
8351 | # $0 $ac_configure_args | |
8352 | # | |
8353 | # Compiler output produced by configure, useful for debugging | |
8354 | # configure, is in ./config.log if it exists. | |
8355 | ||
8356 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
8357 | for ac_option | |
8358 | do | |
8359 | case "\$ac_option" in | |
8360 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
8361 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
8362 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
8363 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
b27d2bd5 | 8364 | echo "$CONFIG_STATUS generated by autoconf version 2.13" |
861bb6c1 JL |
8365 | exit 0 ;; |
8366 | -help | --help | --hel | --he | --h) | |
8367 | echo "\$ac_cs_usage"; exit 0 ;; | |
8368 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
8369 | esac | |
8370 | done | |
8371 | ||
8372 | ac_given_srcdir=$srcdir | |
861bb6c1 | 8373 | |
b7cb92ad | 8374 | trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
861bb6c1 JL |
8375 | EOF |
8376 | cat >> $CONFIG_STATUS <<EOF | |
8377 | ||
8378 | # Protect against being on the right side of a sed subst in config.status. | |
8379 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
8380 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
8381 | $ac_vpsub | |
8382 | $extrasub | |
6f144c9c | 8383 | s%@SHELL@%$SHELL%g |
861bb6c1 JL |
8384 | s%@CFLAGS@%$CFLAGS%g |
8385 | s%@CPPFLAGS@%$CPPFLAGS%g | |
8386 | s%@CXXFLAGS@%$CXXFLAGS%g | |
b27d2bd5 | 8387 | s%@FFLAGS@%$FFLAGS%g |
861bb6c1 JL |
8388 | s%@DEFS@%$DEFS%g |
8389 | s%@LDFLAGS@%$LDFLAGS%g | |
8390 | s%@LIBS@%$LIBS%g | |
8391 | s%@exec_prefix@%$exec_prefix%g | |
8392 | s%@prefix@%$prefix%g | |
8393 | s%@program_transform_name@%$program_transform_name%g | |
8394 | s%@bindir@%$bindir%g | |
8395 | s%@sbindir@%$sbindir%g | |
8396 | s%@libexecdir@%$libexecdir%g | |
8397 | s%@datadir@%$datadir%g | |
8398 | s%@sysconfdir@%$sysconfdir%g | |
8399 | s%@sharedstatedir@%$sharedstatedir%g | |
8400 | s%@localstatedir@%$localstatedir%g | |
8401 | s%@libdir@%$libdir%g | |
8402 | s%@includedir@%$includedir%g | |
8403 | s%@oldincludedir@%$oldincludedir%g | |
8404 | s%@infodir@%$infodir%g | |
8405 | s%@mandir@%$mandir%g | |
39d6f2e8 | 8406 | s%@enable_multilib@%$enable_multilib%g |
50503ac8 | 8407 | s%@enable_shared@%$enable_shared%g |
861bb6c1 JL |
8408 | s%@host@%$host%g |
8409 | s%@host_alias@%$host_alias%g | |
8410 | s%@host_cpu@%$host_cpu%g | |
8411 | s%@host_vendor@%$host_vendor%g | |
8412 | s%@host_os@%$host_os%g | |
8413 | s%@target@%$target%g | |
8414 | s%@target_alias@%$target_alias%g | |
8415 | s%@target_cpu@%$target_cpu%g | |
8416 | s%@target_vendor@%$target_vendor%g | |
8417 | s%@target_os@%$target_os%g | |
8418 | s%@build@%$build%g | |
8419 | s%@build_alias@%$build_alias%g | |
8420 | s%@build_cpu@%$build_cpu%g | |
8421 | s%@build_vendor@%$build_vendor%g | |
8422 | s%@build_os@%$build_os%g | |
e9a25f70 | 8423 | s%@CC@%$CC%g |
3ec83fc2 | 8424 | s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g |
b8dad04b | 8425 | s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g |
200ef634 GK |
8426 | s%@GNATBIND@%$GNATBIND%g |
8427 | s%@ADAC@%$ADAC%g | |
b8dad04b | 8428 | s%@strict1_warn@%$strict1_warn%g |
84c041a1 | 8429 | s%@CPP@%$CPP%g |
b8dad04b ZW |
8430 | s%@warn_cflags@%$warn_cflags%g |
8431 | s%@stage1_cflags@%$stage1_cflags%g | |
e9a25f70 | 8432 | s%@SET_MAKE@%$SET_MAKE%g |
861bb6c1 | 8433 | s%@AWK@%$AWK%g |
0a4b6309 RL |
8434 | s%@LN@%$LN%g |
8435 | s%@LN_S@%$LN_S%g | |
861bb6c1 | 8436 | s%@RANLIB@%$RANLIB%g |
0a4b6309 RL |
8437 | s%@INSTALL@%$INSTALL%g |
8438 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g | |
8439 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
955be633 | 8440 | s%@have_mktemp_command@%$have_mktemp_command%g |
09fa0705 ZW |
8441 | s%@MAKEINFO@%$MAKEINFO%g |
8442 | s%@BUILD_INFO@%$BUILD_INFO%g | |
fd939e46 | 8443 | s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g |
1e608388 ZW |
8444 | s%@FLEX@%$FLEX%g |
8445 | s%@BISON@%$BISON%g | |
4e70264f | 8446 | s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g |
7f2749d4 | 8447 | s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g |
e256b8b6 | 8448 | s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g |
f91abfce | 8449 | s%@LIBICONV@%$LIBICONV%g |
861bb6c1 | 8450 | s%@manext@%$manext%g |
992d1248 | 8451 | s%@objext@%$objext%g |
06f0b04c | 8452 | s%@FORBUILD@%$FORBUILD%g |
ab87f8c8 JL |
8453 | s%@PACKAGE@%$PACKAGE%g |
8454 | s%@VERSION@%$VERSION%g | |
71a94577 ZW |
8455 | s%@ALLOCA@%$ALLOCA%g |
8456 | s%@GLIBC21@%$GLIBC21%g | |
ab87f8c8 JL |
8457 | s%@USE_NLS@%$USE_NLS%g |
8458 | s%@MSGFMT@%$MSGFMT%g | |
8459 | s%@GMSGFMT@%$GMSGFMT%g | |
8460 | s%@XGETTEXT@%$XGETTEXT%g | |
71a94577 ZW |
8461 | s%@INTLBISON@%$INTLBISON%g |
8462 | s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g | |
ab87f8c8 JL |
8463 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g |
8464 | s%@CATALOGS@%$CATALOGS%g | |
8465 | s%@CATOBJEXT@%$CATOBJEXT%g | |
ab87f8c8 | 8466 | s%@INTLLIBS@%$INTLLIBS%g |
77c06844 | 8467 | s%@INTLDEPS@%$INTLDEPS%g |
ab87f8c8 | 8468 | s%@INTLOBJS@%$INTLOBJS%g |
ab87f8c8 | 8469 | s%@POSUB@%$POSUB%g |
71a94577 ZW |
8470 | s%@DATADIRNAME@%$DATADIRNAME%g |
8471 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
8472 | s%@GENCAT@%$GENCAT%g | |
ab87f8c8 | 8473 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g |
71a94577 | 8474 | s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g |
a078a589 ZW |
8475 | s%@CROSS@%$CROSS%g |
8476 | s%@ALL@%$ALL%g | |
8477 | s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g | |
b39d221a | 8478 | s%@inhibit_libc@%$inhibit_libc%g |
a078a589 ZW |
8479 | s%@HOST_PREFIX@%$HOST_PREFIX%g |
8480 | s%@HOST_PREFIX_1@%$HOST_PREFIX_1%g | |
8481 | s%@HOST_CC@%$HOST_CC%g | |
8482 | s%@HOST_CFLAGS@%$HOST_CFLAGS%g | |
8483 | s%@STMP_FIXINC@%$STMP_FIXINC%g | |
8484 | s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g | |
9e944a16 | 8485 | s%@libgcc_visibility@%$libgcc_visibility%g |
f24af81b | 8486 | s%@gthread_flags@%$gthread_flags%g |
81bf3d9e | 8487 | s%@GGC@%$GGC%g |
3c809ba4 AG |
8488 | s%@zlibdir@%$zlibdir%g |
8489 | s%@zlibinc@%$zlibinc%g | |
dc6746e7 | 8490 | s%@MAINT@%$MAINT%g |
88111b26 JL |
8491 | s%@build_canonical@%$build_canonical%g |
8492 | s%@host_canonical@%$host_canonical%g | |
8493 | s%@target_subdir@%$target_subdir%g | |
d062c304 | 8494 | s%@gcc_tooldir@%$gcc_tooldir%g |
4c112cda | 8495 | s%@dollar@%$dollar%g |
2bbea3a6 | 8496 | s%@slibdir@%$slibdir%g |
7e717196 | 8497 | s%@objdir@%$objdir%g |
861bb6c1 | 8498 | s%@subdirs@%$subdirs%g |
861bb6c1 JL |
8499 | s%@all_boot_languages@%$all_boot_languages%g |
8500 | s%@all_compilers@%$all_compilers%g | |
4f3ae93c BK |
8501 | s%@all_lang_makefiles@%$all_lang_makefiles%g |
8502 | s%@all_languages@%$all_languages%g | |
4f3ae93c BK |
8503 | s%@all_stagestuff@%$all_stagestuff%g |
8504 | s%@build_exeext@%$build_exeext%g | |
8505 | s%@build_install_headers_dir@%$build_install_headers_dir%g | |
8506 | s%@build_xm_file_list@%$build_xm_file_list%g | |
11642c3a ZW |
8507 | s%@build_xm_file@%$build_xm_file%g |
8508 | s%@build_xm_defines@%$build_xm_defines%g | |
cbc59f01 | 8509 | s%@check_languages@%$check_languages%g |
4f3ae93c | 8510 | s%@cc_set_by_configure@%$cc_set_by_configure%g |
5aa82ace | 8511 | s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g |
4f3ae93c | 8512 | s%@cpp_install_dir@%$cpp_install_dir%g |
4f3ae93c BK |
8513 | s%@dep_host_xmake_file@%$dep_host_xmake_file%g |
8514 | s%@dep_tmake_file@%$dep_tmake_file%g | |
4f3ae93c | 8515 | s%@extra_headers_list@%$extra_headers_list%g |
861bb6c1 | 8516 | s%@extra_objs@%$extra_objs%g |
4f3ae93c BK |
8517 | s%@extra_parts@%$extra_parts%g |
8518 | s%@extra_passes@%$extra_passes%g | |
8519 | s%@extra_programs@%$extra_programs%g | |
4f3ae93c | 8520 | s%@float_h_file@%$float_h_file%g |
cc1e60ea | 8521 | s%@gcc_config_arguments@%$gcc_config_arguments%g |
4f3ae93c | 8522 | s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g |
e2187d3b | 8523 | s%@libstdcxx_incdir@%$libstdcxx_incdir%g |
4f3ae93c | 8524 | s%@gcc_version@%$gcc_version%g |
8763704d | 8525 | s%@gcc_version_full@%$gcc_version_full%g |
4f3ae93c BK |
8526 | s%@gcc_version_trigger@%$gcc_version_trigger%g |
8527 | s%@host_exeext@%$host_exeext%g | |
861bb6c1 | 8528 | s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g |
861bb6c1 | 8529 | s%@host_xm_file_list@%$host_xm_file_list%g |
11642c3a ZW |
8530 | s%@host_xm_file@%$host_xm_file%g |
8531 | s%@host_xm_defines@%$host_xm_defines%g | |
4f3ae93c | 8532 | s%@install@%$install%g |
861bb6c1 | 8533 | s%@lang_options_files@%$lang_options_files%g |
4f3ae93c | 8534 | s%@lang_specs_files@%$lang_specs_files%g |
3103b7db | 8535 | s%@lang_tree_files@%$lang_tree_files%g |
861bb6c1 | 8536 | s%@local_prefix@%$local_prefix%g |
4f3ae93c BK |
8537 | s%@md_file@%$md_file%g |
8538 | s%@objc_boehm_gc@%$objc_boehm_gc%g | |
8539 | s%@out_file@%$out_file%g | |
8540 | s%@out_object_file@%$out_object_file%g | |
861bb6c1 | 8541 | s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g |
596151e1 | 8542 | s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g |
e9a25f70 | 8543 | s%@symbolic_link@%$symbolic_link%g |
4f3ae93c BK |
8544 | s%@thread_file@%$thread_file%g |
8545 | s%@tm_file_list@%$tm_file_list%g | |
11642c3a ZW |
8546 | s%@tm_file@%$tm_file%g |
8547 | s%@tm_p_file_list@%$tm_p_file_list%g | |
8548 | s%@tm_p_file@%$tm_p_file%g | |
8549 | s%@xm_file@%$xm_file%g | |
3d9d2476 | 8550 | s%@xm_defines@%$xm_defines%g |
aac69a49 NC |
8551 | s%@c_target_objs@%$c_target_objs%g |
8552 | s%@cxx_target_objs@%$cxx_target_objs%g | |
11642c3a | 8553 | s%@target_cpu_default@%$target_cpu_default%g |
861bb6c1 JL |
8554 | /@target_overrides@/r $target_overrides |
8555 | s%@target_overrides@%%g | |
8556 | /@host_overrides@/r $host_overrides | |
8557 | s%@host_overrides@%%g | |
861bb6c1 JL |
8558 | /@language_fragments@/r $language_fragments |
8559 | s%@language_fragments@%%g | |
8560 | /@language_hooks@/r $language_hooks | |
8561 | s%@language_hooks@%%g | |
8562 | ||
8563 | CEOF | |
8564 | EOF | |
8565 | ||
8566 | cat >> $CONFIG_STATUS <<\EOF | |
8567 | ||
8568 | # Split the substitutions into bite-sized pieces for seds with | |
8569 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
8570 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
8571 | ac_file=1 # Number of current file. | |
8572 | ac_beg=1 # First line for current file. | |
8573 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
8574 | ac_more_lines=: | |
8575 | ac_sed_cmds="" | |
8576 | while $ac_more_lines; do | |
8577 | if test $ac_beg -gt 1; then | |
8578 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
8579 | else | |
8580 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
8581 | fi | |
8582 | if test ! -s conftest.s$ac_file; then | |
8583 | ac_more_lines=false | |
8584 | rm -f conftest.s$ac_file | |
8585 | else | |
8586 | if test -z "$ac_sed_cmds"; then | |
8587 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
8588 | else | |
8589 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
8590 | fi | |
8591 | ac_file=`expr $ac_file + 1` | |
8592 | ac_beg=$ac_end | |
8593 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
8594 | fi | |
8595 | done | |
8596 | if test -z "$ac_sed_cmds"; then | |
8597 | ac_sed_cmds=cat | |
8598 | fi | |
8599 | EOF | |
8600 | ||
8601 | cat >> $CONFIG_STATUS <<EOF | |
8602 | ||
8603 | CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"} | |
8604 | EOF | |
8605 | cat >> $CONFIG_STATUS <<\EOF | |
8606 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
8607 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
8608 | case "$ac_file" in | |
8609 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
8610 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
8611 | *) ac_file_in="${ac_file}.in" ;; | |
8612 | esac | |
8613 | ||
8614 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
8615 | ||
8616 | # Remove last slash and all that follows it. Not all systems have dirname. | |
8617 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
8618 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
8619 | # The file is in a subdirectory. | |
8620 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
8621 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
8622 | # A "../" for each directory in $ac_dir_suffix. | |
8623 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
8624 | else | |
8625 | ac_dir_suffix= ac_dots= | |
8626 | fi | |
8627 | ||
8628 | case "$ac_given_srcdir" in | |
8629 | .) srcdir=. | |
8630 | if test -z "$ac_dots"; then top_srcdir=. | |
8631 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
8632 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
8633 | *) # Relative path. | |
8634 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
8635 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
8636 | esac | |
8637 | ||
861bb6c1 JL |
8638 | |
8639 | echo creating "$ac_file" | |
8640 | rm -f "$ac_file" | |
8641 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
8642 | case "$ac_file" in | |
8643 | *Makefile*) ac_comsub="1i\\ | |
8644 | # $configure_input" ;; | |
8645 | *) ac_comsub= ;; | |
8646 | esac | |
8647 | ||
8648 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
8649 | sed -e "$ac_comsub | |
8650 | s%@configure_input@%$configure_input%g | |
8651 | s%@srcdir@%$srcdir%g | |
8652 | s%@top_srcdir@%$top_srcdir%g | |
861bb6c1 JL |
8653 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
8654 | fi; done | |
8655 | rm -f conftest.s* | |
8656 | ||
8657 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
8658 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
8659 | # | |
8660 | # ac_d sets the value in "#define NAME VALUE" lines. | |
8661 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
8662 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
8663 | ac_dC='\3' | |
8664 | ac_dD='%g' | |
8665 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
8666 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
8667 | ac_uB='\([ ]\)%\1#\2define\3' | |
8668 | ac_uC=' ' | |
8669 | ac_uD='\4%g' | |
8670 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
8671 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
8672 | ac_eB='$%\1#\2define\3' | |
8673 | ac_eC=' ' | |
8674 | ac_eD='%g' | |
8675 | ||
8676 | if test "${CONFIG_HEADERS+set}" != set; then | |
8677 | EOF | |
8678 | cat >> $CONFIG_STATUS <<EOF | |
b7cb92ad | 8679 | CONFIG_HEADERS="auto-host.h:config.in" |
861bb6c1 JL |
8680 | EOF |
8681 | cat >> $CONFIG_STATUS <<\EOF | |
8682 | fi | |
8683 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
8684 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
8685 | case "$ac_file" in | |
8686 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
8687 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
8688 | *) ac_file_in="${ac_file}.in" ;; | |
8689 | esac | |
8690 | ||
8691 | echo creating $ac_file | |
8692 | ||
8693 | rm -f conftest.frag conftest.in conftest.out | |
8694 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
8695 | cat $ac_file_inputs > conftest.in | |
8696 | ||
8697 | EOF | |
8698 | ||
8699 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
8700 | # the proper values into config.h.in to produce config.h. And first: | |
8701 | # Protect against being on the right side of a sed subst in config.status. | |
8702 | # Protect against being in an unquoted here document in config.status. | |
8703 | rm -f conftest.vals | |
8704 | cat > conftest.hdr <<\EOF | |
8705 | s/[\\&%]/\\&/g | |
8706 | s%[\\$`]%\\&%g | |
8707 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
8708 | s%ac_d%ac_u%gp | |
8709 | s%ac_u%ac_e%gp | |
8710 | EOF | |
8711 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
8712 | rm -f conftest.hdr | |
8713 | ||
8714 | # This sed command replaces #undef with comments. This is necessary, for | |
8715 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
8716 | # on some systems where configure will not decide to define it. | |
8717 | cat >> conftest.vals <<\EOF | |
8718 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
8719 | EOF | |
8720 | ||
8721 | # Break up conftest.vals because some shells have a limit on | |
8722 | # the size of here documents, and old seds have small limits too. | |
8723 | ||
8724 | rm -f conftest.tail | |
8725 | while : | |
8726 | do | |
8727 | ac_lines=`grep -c . conftest.vals` | |
8728 | # grep -c gives empty output for an empty file on some AIX systems. | |
8729 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
8730 | # Write a limited-size here document to conftest.frag. | |
8731 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
8732 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
8733 | echo 'CEOF | |
8734 | sed -f conftest.frag conftest.in > conftest.out | |
8735 | rm -f conftest.in | |
8736 | mv conftest.out conftest.in | |
8737 | ' >> $CONFIG_STATUS | |
8738 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
8739 | rm -f conftest.vals | |
8740 | mv conftest.tail conftest.vals | |
8741 | done | |
8742 | rm -f conftest.vals | |
8743 | ||
8744 | cat >> $CONFIG_STATUS <<\EOF | |
8745 | rm -f conftest.frag conftest.h | |
8746 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
8747 | cat conftest.in >> conftest.h | |
8748 | rm -f conftest.in | |
8749 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
8750 | echo "$ac_file is unchanged" | |
8751 | rm -f conftest.h | |
8752 | else | |
8753 | # Remove last slash and all that follows it. Not all systems have dirname. | |
8754 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
8755 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
8756 | # The file is in a subdirectory. | |
8757 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
8758 | fi | |
8759 | rm -f $ac_file | |
8760 | mv conftest.h $ac_file | |
8761 | fi | |
8762 | fi; done | |
8763 | ||
8764 | EOF | |
8765 | cat >> $CONFIG_STATUS <<EOF | |
8766 | ||
0d24f4d1 ZW |
8767 | subdirs='$subdirs' |
8768 | symbolic_link='$symbolic_link' | |
861bb6c1 JL |
8769 | |
8770 | EOF | |
8771 | cat >> $CONFIG_STATUS <<\EOF | |
71a94577 ZW |
8772 | for ac_file in $CONFIG_FILES; do |
8773 | # Support "outfile[:infile[:infile...]]" | |
8774 | case "$ac_file" in | |
8775 | *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
8776 | esac | |
8777 | # PO directories have a Makefile.in generated from Makefile.in.in. | |
8778 | case "$ac_file" in */Makefile.in) | |
8779 | # Adjust a relative srcdir. | |
8780 | ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` | |
8781 | ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" | |
8782 | ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` | |
8783 | # In autoconf-2.13 it is called $ac_given_srcdir. | |
8784 | # In autoconf-2.50 it is called $srcdir. | |
8785 | test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" | |
8786 | case "$ac_given_srcdir" in | |
8787 | .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; | |
8788 | /*) top_srcdir="$ac_given_srcdir" ;; | |
8789 | *) top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
8790 | esac | |
8791 | if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then | |
8792 | rm -f "$ac_dir/POTFILES" | |
8793 | test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" | |
8794 | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES" | |
8795 | test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" | |
8796 | sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" | |
8797 | fi | |
8798 | ;; | |
8799 | esac | |
8800 | done | |
861bb6c1 | 8801 | |
861bb6c1 | 8802 | case x$CONFIG_HEADERS in |
b7cb92ad | 8803 | xauto-host.h:config.in) |
861bb6c1 JL |
8804 | echo > cstamp-h ;; |
8805 | esac | |
93cf819d BK |
8806 | # If the host supports symlinks, point stage[1234] at ../stage[1234] so |
8807 | # bootstrapping and the installation procedure can still use | |
8808 | # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks, | |
8809 | # FLAGS_TO_PASS has been modified to solve the problem there. | |
8810 | # This is virtually a duplicate of what happens in configure.lang; we do | |
8811 | # an extra check to make sure this only happens if ln -s can be used. | |
75bffa71 | 8812 | if test "$symbolic_link" = "ln -s"; then |
d8140df6 | 8813 | for d in .. ${subdirs} fixinc ; do |
75bffa71 | 8814 | if test $d != ..; then |
1e6347d8 | 8815 | STARTDIR=`${PWDCMD-pwd}` |
4e8a434e BK |
8816 | cd $d |
8817 | for t in stage1 stage2 stage3 stage4 include | |
8818 | do | |
8819 | rm -f $t | |
8820 | $symbolic_link ../$t $t 2>/dev/null | |
8821 | done | |
8822 | cd $STARTDIR | |
93cf819d BK |
8823 | fi |
8824 | done | |
8825 | else true ; fi | |
ab87f8c8 JL |
8826 | # Avoid having to add intl to our include paths. |
8827 | if test -f intl/libintl.h; then | |
8828 | echo creating libintl.h | |
8829 | echo '#include "intl/libintl.h"' >libintl.h | |
8830 | fi | |
861bb6c1 JL |
8831 | |
8832 | exit 0 | |
8833 | EOF | |
8834 | chmod +x $CONFIG_STATUS | |
8835 | rm -fr confdefs* $ac_clean_files | |
8836 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
8837 |