]>
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. | |
37 | Categories are: misc,tree,rtl,gc,gcac; default | |
59f406b7 | 38 | is misc,tree,gc" |
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= | |
801 | ac_gc_checking= | |
802 | ac_gc_always_collect= | |
803 | case "${enableval}" in | |
51d0e20c | 804 | yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;; |
4e88d51b | 805 | no) ;; |
59f406b7 | 806 | *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," |
f4524c9e ZW |
807 | set fnord $enableval; shift |
808 | IFS="$ac_save_IFS" | |
c62e45ad KG |
809 | for check |
810 | do | |
f4524c9e | 811 | case $check in |
119d24d1 KG |
812 | misc) ac_checking=1 ;; |
813 | tree) ac_tree_checking=1 ;; | |
814 | rtl) ac_rtl_checking=1 ;; | |
815 | gc) ac_gc_checking=1 ;; | |
816 | gcac) ac_gc_always_collect=1 ;; | |
817 | *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;; | |
818 | esac | |
819 | done | |
820 | ;; | |
821 | esac | |
51d0e20c AJ |
822 | |
823 | else | |
824 | # Enable some checks by default for development versions of GCC | |
825 | ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; | |
826 | fi | |
827 | ||
119d24d1 KG |
828 | if test x$ac_checking != x ; then |
829 | cat >> confdefs.h <<\EOF | |
f4524c9e ZW |
830 | #define ENABLE_CHECKING 1 |
831 | EOF | |
119d24d1 KG |
832 | |
833 | fi | |
834 | if test x$ac_tree_checking != x ; then | |
835 | cat >> confdefs.h <<\EOF | |
f4524c9e ZW |
836 | #define ENABLE_TREE_CHECKING 1 |
837 | EOF | |
119d24d1 KG |
838 | |
839 | fi | |
840 | if test x$ac_rtl_checking != x ; then | |
841 | cat >> confdefs.h <<\EOF | |
f4524c9e ZW |
842 | #define ENABLE_RTL_CHECKING 1 |
843 | EOF | |
119d24d1 KG |
844 | |
845 | fi | |
846 | if test x$ac_gc_checking != x ; then | |
847 | cat >> confdefs.h <<\EOF | |
f4524c9e ZW |
848 | #define ENABLE_GC_CHECKING 1 |
849 | EOF | |
119d24d1 KG |
850 | |
851 | fi | |
852 | if test x$ac_gc_always_collect != x ; then | |
853 | cat >> confdefs.h <<\EOF | |
f4524c9e ZW |
854 | #define ENABLE_GC_ALWAYS_COLLECT 1 |
855 | EOF | |
119d24d1 KG |
856 | |
857 | fi | |
858 | ||
a494747c | 859 | |
3ecc3258 ZW |
860 | # Check whether --enable-cpp or --disable-cpp was given. |
861 | if test "${enable_cpp+set}" = set; then | |
862 | enableval="$enable_cpp" | |
863 | : | |
864 | else | |
865 | enable_cpp=yes | |
866 | fi | |
867 | ||
868 | ||
869 | # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. | |
870 | if test "${with_cpp_install_dir+set}" = set; then | |
871 | withval="$with_cpp_install_dir" | |
872 | if test x$withval = xyes; then | |
873 | { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; } | |
874 | elif test x$withval != xno; then | |
875 | cpp_install_dir=$withval | |
876 | fi | |
877 | fi | |
878 | ||
879 | ||
c5c76735 JL |
880 | # Enable Multibyte Characters for C/C++ |
881 | # Check whether --enable-c-mbchar or --disable-c-mbchar was given. | |
882 | if test "${enable_c_mbchar+set}" = set; then | |
883 | enableval="$enable_c_mbchar" | |
2618c083 | 884 | if test x$enable_c_mbchar != xno; then |
9ec7291f ZW |
885 | cat >> confdefs.h <<\EOF |
886 | #define MULTIBYTE_CHARS 1 | |
887 | EOF | |
888 | ||
c5c76735 JL |
889 | fi |
890 | fi | |
891 | ||
892 | ||
861bb6c1 JL |
893 | # Enable threads |
894 | # Pass with no value to take the default | |
895 | # Pass with a value to specify a thread package | |
896 | # Check whether --enable-threads or --disable-threads was given. | |
897 | if test "${enable_threads+set}" = set; then | |
898 | enableval="$enable_threads" | |
981d4858 | 899 | : |
861bb6c1 JL |
900 | else |
901 | enable_threads='' | |
902 | fi | |
903 | ||
904 | ||
e445171e | 905 | enable_threads_flag=$enable_threads |
861bb6c1 | 906 | # Check if a valid thread package |
e445171e | 907 | case x${enable_threads_flag} in |
861bb6c1 JL |
908 | x | xno) |
909 | # No threads | |
a851212a | 910 | target_thread_file='single' |
861bb6c1 JL |
911 | ;; |
912 | xyes) | |
913 | # default | |
a851212a | 914 | target_thread_file='' |
861bb6c1 JL |
915 | ;; |
916 | xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \ | |
e08f13ee | 917 | xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix) |
e445171e | 918 | target_thread_file=$enable_threads_flag |
861bb6c1 JL |
919 | ;; |
920 | *) | |
921 | echo "$enable_threads is an unknown thread package" 1>&2 | |
922 | exit 1 | |
923 | ;; | |
924 | esac | |
925 | ||
d8bb17c8 OP |
926 | # Check whether --enable-objc-gc or --disable-objc-gc was given. |
927 | if test "${enable_objc_gc+set}" = set; then | |
928 | enableval="$enable_objc_gc" | |
2618c083 | 929 | if test x$enable_objc_gc = xno; then |
d8bb17c8 OP |
930 | objc_boehm_gc='' |
931 | else | |
932 | objc_boehm_gc=1 | |
933 | fi | |
934 | else | |
935 | objc_boehm_gc='' | |
936 | fi | |
937 | ||
938 | ||
90e6a802 RL |
939 | # Check whether --with-dwarf2 or --without-dwarf2 was given. |
940 | if test "${with_dwarf2+set}" = set; then | |
941 | withval="$with_dwarf2" | |
942 | dwarf2="$with_dwarf2" | |
943 | else | |
944 | dwarf2=no | |
945 | fi | |
946 | ||
947 | ||
50503ac8 RH |
948 | # Check whether --enable-shared or --disable-shared was given. |
949 | if test "${enable_shared+set}" = set; then | |
950 | enableval="$enable_shared" | |
c785e0fa AO |
951 | |
952 | case $enable_shared in | |
953 | yes | no) ;; | |
954 | *) | |
955 | enable_shared=no | |
956 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
957 | for pkg in $enableval; do | |
958 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
959 | enable_shared=yes | |
960 | fi | |
961 | done | |
962 | IFS="$ac_save_ifs" | |
963 | ;; | |
964 | esac | |
965 | ||
50503ac8 RH |
966 | else |
967 | enable_shared=yes | |
968 | fi | |
969 | ||
970 | ||
971 | ||
861bb6c1 JL |
972 | # Determine the host, build, and target systems |
973 | ac_aux_dir= | |
974 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do | |
975 | if test -f $ac_dir/install-sh; then | |
976 | ac_aux_dir=$ac_dir | |
977 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
978 | break | |
979 | elif test -f $ac_dir/install.sh; then | |
980 | ac_aux_dir=$ac_dir | |
981 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
982 | break | |
983 | fi | |
984 | done | |
985 | if test -z "$ac_aux_dir"; then | |
986 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } | |
987 | fi | |
988 | ac_config_guess=$ac_aux_dir/config.guess | |
989 | ac_config_sub=$ac_aux_dir/config.sub | |
990 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
991 | ||
992 | ||
993 | # Do some error checking and defaulting for the host and target type. | |
994 | # The inputs are: | |
995 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
996 | # | |
997 | # The rules are: | |
998 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
999 | # same time. | |
1000 | # 2. Host defaults to nonopt. | |
1001 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1002 | # as determined by config.guess. | |
1003 | # 4. Target and build default to nonopt. | |
1004 | # 5. If nonopt is not specified, then target and build default to host. | |
1005 | ||
1006 | # The aliases save the names the user supplied, while $host etc. | |
1007 | # will get canonicalized. | |
1008 | case $host---$target---$nonopt in | |
1009 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1010 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1011 | esac | |
1012 | ||
1013 | ||
1014 | # Make sure we can run config.sub. | |
6f144c9c | 1015 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : |
861bb6c1 JL |
1016 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } |
1017 | fi | |
1018 | ||
1019 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
e08f13ee | 1020 | echo "configure:1021: checking host system type" >&5 |
861bb6c1 JL |
1021 | |
1022 | host_alias=$host | |
1023 | case "$host_alias" in | |
1024 | NONE) | |
1025 | case $nonopt in | |
1026 | NONE) | |
6f144c9c | 1027 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : |
861bb6c1 JL |
1028 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } |
1029 | fi ;; | |
1030 | *) host_alias=$nonopt ;; | |
1031 | esac ;; | |
1032 | esac | |
1033 | ||
6f144c9c | 1034 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` |
861bb6c1 JL |
1035 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
1036 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1037 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1038 | echo "$ac_t""$host" 1>&6 | |
1039 | ||
1040 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
e08f13ee | 1041 | echo "configure:1042: checking target system type" >&5 |
861bb6c1 JL |
1042 | |
1043 | target_alias=$target | |
1044 | case "$target_alias" in | |
1045 | NONE) | |
1046 | case $nonopt in | |
1047 | NONE) target_alias=$host_alias ;; | |
1048 | *) target_alias=$nonopt ;; | |
1049 | esac ;; | |
1050 | esac | |
1051 | ||
6f144c9c | 1052 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` |
861bb6c1 JL |
1053 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
1054 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1055 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1056 | echo "$ac_t""$target" 1>&6 | |
1057 | ||
1058 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
e08f13ee | 1059 | echo "configure:1060: checking build system type" >&5 |
861bb6c1 JL |
1060 | |
1061 | build_alias=$build | |
1062 | case "$build_alias" in | |
1063 | NONE) | |
1064 | case $nonopt in | |
1065 | NONE) build_alias=$host_alias ;; | |
1066 | *) build_alias=$nonopt ;; | |
1067 | esac ;; | |
1068 | esac | |
1069 | ||
6f144c9c | 1070 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` |
861bb6c1 JL |
1071 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
1072 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1073 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1074 | echo "$ac_t""$build" 1>&6 | |
1075 | ||
1076 | test "$host_alias" != "$target_alias" && | |
1077 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1078 | NONENONEs,x,x, && | |
1079 | program_prefix=${target_alias}- | |
1080 | ||
1081 | ||
b21d216c AF |
1082 | # Set program_transform_name |
1083 | if test "$program_transform_name" = s,x,x,; then | |
1084 | program_transform_name= | |
1085 | else | |
1086 | # Double any \ or $. echo might interpret backslashes. | |
1087 | cat <<\EOF_SED > conftestsed | |
1088 | s,\\,\\\\,g; s,\$,$$,g | |
1089 | EOF_SED | |
1090 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
1091 | rm -f conftestsed | |
1092 | fi | |
1093 | test "$program_prefix" != NONE && | |
1094 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
1095 | # Use a double $ so make ignores it. | |
1096 | test "$program_suffix" != NONE && | |
1097 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
1098 | ||
1099 | # sed with no file args requires a program. | |
1100 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
1101 | ||
1102 | ||
e9a25f70 JL |
1103 | # Find the native compiler |
1104 | # Extract the first word of "gcc", so it can be a program name with args. | |
1105 | set dummy gcc; ac_word=$2 | |
1106 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b21d216c | 1107 | echo "configure:1108: checking for $ac_word" >&5 |
e9a25f70 JL |
1108 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1109 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1110 | else | |
1111 | if test -n "$CC"; then | |
1112 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1113 | else | |
cd9e5e7c | 1114 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
1115 | ac_dummy="$PATH" |
1116 | for ac_dir in $ac_dummy; do | |
e9a25f70 JL |
1117 | test -z "$ac_dir" && ac_dir=. |
1118 | if test -f $ac_dir/$ac_word; then | |
1119 | ac_cv_prog_CC="gcc" | |
1120 | break | |
1121 | fi | |
1122 | done | |
1123 | IFS="$ac_save_ifs" | |
1124 | fi | |
1125 | fi | |
1126 | CC="$ac_cv_prog_CC" | |
1127 | if test -n "$CC"; then | |
1128 | echo "$ac_t""$CC" 1>&6 | |
1129 | else | |
1130 | echo "$ac_t""no" 1>&6 | |
1131 | fi | |
1132 | ||
1133 | if test -z "$CC"; then | |
1134 | # Extract the first word of "cc", so it can be a program name with args. | |
1135 | set dummy cc; ac_word=$2 | |
1136 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b21d216c | 1137 | echo "configure:1138: checking for $ac_word" >&5 |
e9a25f70 JL |
1138 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1139 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1140 | else | |
1141 | if test -n "$CC"; then | |
1142 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1143 | else | |
cd9e5e7c | 1144 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
e9a25f70 | 1145 | ac_prog_rejected=no |
b27d2bd5 MK |
1146 | ac_dummy="$PATH" |
1147 | for ac_dir in $ac_dummy; do | |
e9a25f70 JL |
1148 | test -z "$ac_dir" && ac_dir=. |
1149 | if test -f $ac_dir/$ac_word; then | |
1150 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
1151 | ac_prog_rejected=yes | |
1152 | continue | |
1153 | fi | |
1154 | ac_cv_prog_CC="cc" | |
1155 | break | |
1156 | fi | |
1157 | done | |
1158 | IFS="$ac_save_ifs" | |
1159 | if test $ac_prog_rejected = yes; then | |
1160 | # We found a bogon in the path, so make sure we never use it. | |
1161 | set dummy $ac_cv_prog_CC | |
1162 | shift | |
1163 | if test $# -gt 0; then | |
1164 | # We chose a different compiler from the bogus one. | |
1165 | # However, it has the same basename, so the bogon will be chosen | |
1166 | # first if we set CC to just the basename; use the full file name. | |
1167 | shift | |
1168 | set dummy "$ac_dir/$ac_word" "$@" | |
1169 | shift | |
1170 | ac_cv_prog_CC="$@" | |
1171 | fi | |
1172 | fi | |
1173 | fi | |
1174 | fi | |
1175 | CC="$ac_cv_prog_CC" | |
1176 | if test -n "$CC"; then | |
1177 | echo "$ac_t""$CC" 1>&6 | |
1178 | else | |
1179 | echo "$ac_t""no" 1>&6 | |
1180 | fi | |
1181 | ||
cd9e5e7c MK |
1182 | if test -z "$CC"; then |
1183 | case "`uname -s`" in | |
1184 | *win32* | *WIN32*) | |
1185 | # Extract the first word of "cl", so it can be a program name with args. | |
1186 | set dummy cl; ac_word=$2 | |
1187 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b21d216c | 1188 | echo "configure:1189: checking for $ac_word" >&5 |
cd9e5e7c MK |
1189 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1190 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1191 | else | |
1192 | if test -n "$CC"; then | |
1193 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1194 | else | |
1195 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
b27d2bd5 MK |
1196 | ac_dummy="$PATH" |
1197 | for ac_dir in $ac_dummy; do | |
cd9e5e7c MK |
1198 | test -z "$ac_dir" && ac_dir=. |
1199 | if test -f $ac_dir/$ac_word; then | |
1200 | ac_cv_prog_CC="cl" | |
1201 | break | |
1202 | fi | |
1203 | done | |
1204 | IFS="$ac_save_ifs" | |
1205 | fi | |
1206 | fi | |
1207 | CC="$ac_cv_prog_CC" | |
1208 | if test -n "$CC"; then | |
1209 | echo "$ac_t""$CC" 1>&6 | |
1210 | else | |
1211 | echo "$ac_t""no" 1>&6 | |
1212 | fi | |
1213 | ;; | |
1214 | esac | |
1215 | fi | |
e9a25f70 JL |
1216 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
1217 | fi | |
1218 | ||
1219 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
b21d216c | 1220 | echo "configure:1221: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
e9a25f70 JL |
1221 | |
1222 | ac_ext=c | |
1223 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1224 | ac_cpp='$CPP $CPPFLAGS' | |
1225 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
cd9e5e7c | 1226 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
e9a25f70 JL |
1227 | cross_compiling=$ac_cv_prog_cc_cross |
1228 | ||
b27d2bd5 MK |
1229 | cat > conftest.$ac_ext << EOF |
1230 | ||
b21d216c | 1231 | #line 1232 "configure" |
e9a25f70 | 1232 | #include "confdefs.h" |
b27d2bd5 | 1233 | |
e9a25f70 JL |
1234 | main(){return(0);} |
1235 | EOF | |
b21d216c | 1236 | if { (eval echo configure:1237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
e9a25f70 JL |
1237 | ac_cv_prog_cc_works=yes |
1238 | # If we can't run a trivial program, we are probably using a cross compiler. | |
1239 | if (./conftest; exit) 2>/dev/null; then | |
1240 | ac_cv_prog_cc_cross=no | |
1241 | else | |
1242 | ac_cv_prog_cc_cross=yes | |
1243 | fi | |
1244 | else | |
1245 | echo "configure: failed program was:" >&5 | |
1246 | cat conftest.$ac_ext >&5 | |
1247 | ac_cv_prog_cc_works=no | |
1248 | fi | |
1249 | rm -fr conftest* | |
b27d2bd5 MK |
1250 | ac_ext=c |
1251 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1252 | ac_cpp='$CPP $CPPFLAGS' | |
1253 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1254 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1255 | cross_compiling=$ac_cv_prog_cc_cross | |
e9a25f70 JL |
1256 | |
1257 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
1258 | if test $ac_cv_prog_cc_works = no; then | |
1259 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
1260 | fi | |
1261 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
b21d216c | 1262 | echo "configure:1263: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
e9a25f70 JL |
1263 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
1264 | cross_compiling=$ac_cv_prog_cc_cross | |
1265 | ||
1266 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
b21d216c | 1267 | echo "configure:1268: checking whether we are using GNU C" >&5 |
e9a25f70 JL |
1268 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
1269 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1270 | else | |
1271 | cat > conftest.c <<EOF | |
1272 | #ifdef __GNUC__ | |
1273 | yes; | |
1274 | #endif | |
1275 | EOF | |
b21d216c | 1276 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
e9a25f70 JL |
1277 | ac_cv_prog_gcc=yes |
1278 | else | |
1279 | ac_cv_prog_gcc=no | |
1280 | fi | |
1281 | fi | |
1282 | ||
1283 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
1284 | ||
1285 | if test $ac_cv_prog_gcc = yes; then | |
1286 | GCC=yes | |
cd9e5e7c MK |
1287 | else |
1288 | GCC= | |
1289 | fi | |
1290 | ||
1291 | ac_test_CFLAGS="${CFLAGS+set}" | |
1292 | ac_save_CFLAGS="$CFLAGS" | |
1293 | CFLAGS= | |
1294 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
b21d216c | 1295 | echo "configure:1296: checking whether ${CC-cc} accepts -g" >&5 |
e9a25f70 JL |
1296 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
1297 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1298 | else | |
1299 | echo 'void f(){}' > conftest.c | |
1300 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
1301 | ac_cv_prog_cc_g=yes | |
1302 | else | |
1303 | ac_cv_prog_cc_g=no | |
1304 | fi | |
1305 | rm -f conftest* | |
1306 | ||
1307 | fi | |
1308 | ||
1309 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
cd9e5e7c MK |
1310 | if test "$ac_test_CFLAGS" = set; then |
1311 | CFLAGS="$ac_save_CFLAGS" | |
1312 | elif test $ac_cv_prog_cc_g = yes; then | |
1313 | if test "$GCC" = yes; then | |
e9a25f70 JL |
1314 | CFLAGS="-g -O2" |
1315 | else | |
cd9e5e7c | 1316 | CFLAGS="-g" |
81814e35 | 1317 | fi |
3723cad9 | 1318 | else |
cd9e5e7c MK |
1319 | if test "$GCC" = yes; then |
1320 | CFLAGS="-O2" | |
1321 | else | |
1322 | CFLAGS= | |
1323 | fi | |
e9a25f70 JL |
1324 | fi |
1325 | ||
3ec83fc2 RH |
1326 | if test "x$CC" != xcc; then |
1327 | echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 | |
b21d216c | 1328 | echo "configure:1329: checking whether $CC and cc understand -c and -o together" >&5 |
3ec83fc2 RH |
1329 | else |
1330 | echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 | |
b21d216c | 1331 | echo "configure:1332: checking whether cc understands -c and -o together" >&5 |
3ec83fc2 RH |
1332 | fi |
1333 | set dummy $CC; ac_cc="`echo $2 | | |
1334 | sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" | |
1335 | if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then | |
1336 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1337 | else | |
1338 | echo 'foo(){}' > conftest.c | |
1339 | # Make sure it works both with $CC and with simple cc. | |
1340 | # We do the test twice because some compilers refuse to overwrite an | |
1341 | # existing .o file with -o, though they will create one. | |
1342 | ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' | |
b21d216c AF |
1343 | if { (eval echo configure:1344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && |
1344 | test -f conftest.o && { (eval echo configure:1345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; | |
3ec83fc2 RH |
1345 | then |
1346 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
1347 | if test "x$CC" != xcc; then | |
1348 | # Test first that cc exists at all. | |
b21d216c | 1349 | if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then |
3ec83fc2 | 1350 | ac_try='cc -c conftest.c -o conftest.o 1>&5' |
b21d216c AF |
1351 | if { (eval echo configure:1352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && |
1352 | test -f conftest.o && { (eval echo configure:1353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; | |
3ec83fc2 RH |
1353 | then |
1354 | # cc works too. | |
1355 | : | |
1356 | else | |
1357 | # cc exists but doesn't like -o. | |
1358 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
1359 | fi | |
1360 | fi | |
1361 | fi | |
1362 | else | |
1363 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
1364 | fi | |
1365 | rm -f conftest* | |
1366 | ||
1367 | fi | |
1368 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then | |
1369 | echo "$ac_t""yes" 1>&6 | |
1370 | else | |
1371 | echo "$ac_t""no" 1>&6 | |
1372 | cat >> confdefs.h <<\EOF | |
1373 | #define NO_MINUS_C_MINUS_O 1 | |
1374 | EOF | |
1375 | ||
1376 | fi | |
1377 | ||
b8dad04b | 1378 | # autoconf is lame and doesn't give us any substitution variable for this. |
e38df833 | 1379 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then |
b4c7e567 | 1380 | NO_MINUS_C_MINUS_O=yes |
b8dad04b ZW |
1381 | else |
1382 | OUTPUT_OPTION='-o $@' | |
b4c7e567 | 1383 | fi |
3ec83fc2 RH |
1384 | |
1385 | ||
b8dad04b | 1386 | |
75e93faa | 1387 | echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6 |
b21d216c | 1388 | echo "configure:1389: checking whether ${CC-cc} accepts -Wno-long-long" >&5 |
75e93faa ZW |
1389 | if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then |
1390 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1391 | else | |
1392 | save_CFLAGS="$CFLAGS" | |
1393 | CFLAGS="-Wno-long-long" | |
1394 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 1395 | #line 1396 "configure" |
75e93faa ZW |
1396 | #include "confdefs.h" |
1397 | ||
1398 | int main() { | |
1399 | ||
1400 | ; return 0; } | |
1401 | EOF | |
b21d216c | 1402 | if { (eval echo configure:1403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1403 | rm -rf conftest* |
1404 | ac_cv_prog_cc_no_long_long=yes | |
1405 | else | |
1406 | echo "configure: failed program was:" >&5 | |
1407 | cat conftest.$ac_ext >&5 | |
1408 | rm -rf conftest* | |
1409 | ac_cv_prog_cc_no_long_long=no | |
1410 | fi | |
1411 | rm -f conftest* | |
1412 | CFLAGS="$save_CFLAGS" | |
1413 | fi | |
1414 | ||
1415 | echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6 | |
1416 | strict1_warn= | |
1417 | if test $ac_cv_prog_cc_no_long_long = yes; then | |
1418 | strict1_warn="-pedantic -Wno-long-long" | |
1419 | fi | |
1420 | ||
1421 | ||
84c041a1 | 1422 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
b21d216c | 1423 | echo "configure:1424: checking how to run the C preprocessor" >&5 |
84c041a1 ZW |
1424 | # On Suns, sometimes $CPP names a directory. |
1425 | if test -n "$CPP" && test -d "$CPP"; then | |
1426 | CPP= | |
1427 | fi | |
1428 | if test -z "$CPP"; then | |
1429 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
1430 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1431 | else | |
1432 | # This must be in double quotes, not single quotes, because CPP may get | |
1433 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
1434 | CPP="${CC-cc} -E" | |
1435 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
1436 | # not just through cpp. | |
1437 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 1438 | #line 1439 "configure" |
84c041a1 ZW |
1439 | #include "confdefs.h" |
1440 | #include <assert.h> | |
1441 | Syntax Error | |
1442 | EOF | |
1443 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b21d216c | 1444 | { (eval echo configure:1445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
84c041a1 ZW |
1445 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1446 | if test -z "$ac_err"; then | |
1447 | : | |
1448 | else | |
1449 | echo "$ac_err" >&5 | |
1450 | echo "configure: failed program was:" >&5 | |
1451 | cat conftest.$ac_ext >&5 | |
1452 | rm -rf conftest* | |
1453 | CPP="${CC-cc} -E -traditional-cpp" | |
1454 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 1455 | #line 1456 "configure" |
84c041a1 ZW |
1456 | #include "confdefs.h" |
1457 | #include <assert.h> | |
1458 | Syntax Error | |
1459 | EOF | |
1460 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b21d216c | 1461 | { (eval echo configure:1462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
84c041a1 ZW |
1462 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1463 | if test -z "$ac_err"; then | |
1464 | : | |
1465 | else | |
1466 | echo "$ac_err" >&5 | |
1467 | echo "configure: failed program was:" >&5 | |
1468 | cat conftest.$ac_ext >&5 | |
1469 | rm -rf conftest* | |
1470 | CPP="${CC-cc} -nologo -E" | |
1471 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 1472 | #line 1473 "configure" |
84c041a1 ZW |
1473 | #include "confdefs.h" |
1474 | #include <assert.h> | |
1475 | Syntax Error | |
1476 | EOF | |
1477 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b21d216c | 1478 | { (eval echo configure:1479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
84c041a1 ZW |
1479 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1480 | if test -z "$ac_err"; then | |
1481 | : | |
1482 | else | |
1483 | echo "$ac_err" >&5 | |
1484 | echo "configure: failed program was:" >&5 | |
1485 | cat conftest.$ac_ext >&5 | |
1486 | rm -rf conftest* | |
1487 | CPP=/lib/cpp | |
1488 | fi | |
1489 | rm -f conftest* | |
1490 | fi | |
1491 | rm -f conftest* | |
1492 | fi | |
1493 | rm -f conftest* | |
1494 | ac_cv_prog_CPP="$CPP" | |
1495 | fi | |
1496 | CPP="$ac_cv_prog_CPP" | |
1497 | else | |
1498 | ac_cv_prog_CPP="$CPP" | |
1499 | fi | |
1500 | echo "$ac_t""$CPP" 1>&6 | |
1501 | ||
75e93faa | 1502 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
b21d216c | 1503 | echo "configure:1504: checking for inline" >&5 |
75e93faa ZW |
1504 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1505 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1506 | else | |
1507 | ac_cv_c_inline=no | |
1508 | for ac_kw in inline __inline__ __inline; do | |
1509 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 1510 | #line 1511 "configure" |
75e93faa ZW |
1511 | #include "confdefs.h" |
1512 | ||
1513 | int main() { | |
1514 | } $ac_kw foo() { | |
1515 | ; return 0; } | |
1516 | EOF | |
b21d216c | 1517 | if { (eval echo configure:1518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1518 | rm -rf conftest* |
1519 | ac_cv_c_inline=$ac_kw; break | |
1520 | else | |
1521 | echo "configure: failed program was:" >&5 | |
1522 | cat conftest.$ac_ext >&5 | |
1523 | fi | |
1524 | rm -f conftest* | |
1525 | done | |
1526 | ||
1527 | fi | |
1528 | ||
1529 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1530 | case "$ac_cv_c_inline" in | |
1531 | inline | yes) ;; | |
1532 | no) cat >> confdefs.h <<\EOF | |
1533 | #define inline | |
1534 | EOF | |
1535 | ;; | |
1536 | *) cat >> confdefs.h <<EOF | |
1537 | #define inline $ac_cv_c_inline | |
1538 | EOF | |
1539 | ;; | |
1540 | esac | |
1541 | ||
1542 | echo $ac_n "checking for volatile""... $ac_c" 1>&6 | |
b21d216c | 1543 | echo "configure:1544: checking for volatile" >&5 |
75e93faa ZW |
1544 | if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then |
1545 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1546 | else | |
1547 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 1548 | #line 1549 "configure" |
75e93faa ZW |
1549 | #include "confdefs.h" |
1550 | ||
1551 | int main() { | |
1552 | volatile int foo; | |
1553 | ; return 0; } | |
1554 | EOF | |
b21d216c | 1555 | if { (eval echo configure:1556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1556 | rm -rf conftest* |
1557 | gcc_cv_c_volatile=yes | |
1558 | else | |
1559 | echo "configure: failed program was:" >&5 | |
1560 | cat conftest.$ac_ext >&5 | |
1561 | rm -rf conftest* | |
1562 | gcc_cv_c_volatile=no | |
1563 | fi | |
1564 | rm -f conftest* | |
1565 | fi | |
1566 | ||
1567 | echo "$ac_t""$gcc_cv_c_volatile" 1>&6 | |
1568 | if test $gcc_cv_c_volatile = yes ; then | |
1569 | cat >> confdefs.h <<\EOF | |
1570 | #define HAVE_VOLATILE 1 | |
1571 | EOF | |
1572 | ||
1573 | fi | |
1574 | ||
1575 | ||
04cabffc | 1576 | echo $ac_n "checking for long double""... $ac_c" 1>&6 |
b21d216c | 1577 | echo "configure:1578: checking for long double" >&5 |
04cabffc KG |
1578 | if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then |
1579 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1580 | else | |
1581 | if test "$GCC" = yes; then | |
1582 | gcc_cv_c_long_double=yes | |
1583 | else | |
1584 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 1585 | #line 1586 "configure" |
04cabffc KG |
1586 | #include "confdefs.h" |
1587 | ||
1588 | int main() { | |
1589 | /* The Stardent Vistra knows sizeof(long double), but does not support it. */ | |
1590 | long double foo = 0.0; | |
1591 | /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ | |
1592 | switch (0) case 0: case (sizeof(long double) >= sizeof(double)):; | |
1593 | ; return 0; } | |
1594 | EOF | |
b21d216c | 1595 | if { (eval echo configure:1596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
04cabffc KG |
1596 | rm -rf conftest* |
1597 | gcc_cv_c_long_double=yes | |
1598 | else | |
1599 | echo "configure: failed program was:" >&5 | |
1600 | cat conftest.$ac_ext >&5 | |
1601 | rm -rf conftest* | |
1602 | gcc_cv_c_long_double=no | |
1603 | fi | |
1604 | rm -f conftest* | |
1605 | fi | |
1606 | fi | |
1607 | ||
1608 | echo "$ac_t""$gcc_cv_c_long_double" 1>&6 | |
1609 | if test $gcc_cv_c_long_double = yes; then | |
1610 | cat >> confdefs.h <<\EOF | |
1611 | #define HAVE_LONG_DOUBLE 1 | |
1612 | EOF | |
1613 | ||
1614 | fi | |
1615 | ||
75e93faa | 1616 | echo $ac_n "checking for long long int""... $ac_c" 1>&6 |
b21d216c | 1617 | echo "configure:1618: checking for long long int" >&5 |
75e93faa ZW |
1618 | if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then |
1619 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1620 | else | |
1621 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 1622 | #line 1623 "configure" |
75e93faa | 1623 | #include "confdefs.h" |
61842080 | 1624 | |
75e93faa ZW |
1625 | int main() { |
1626 | long long int i; | |
1627 | ; return 0; } | |
1628 | EOF | |
b21d216c | 1629 | if { (eval echo configure:1630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1630 | rm -rf conftest* |
1631 | ac_cv_c_long_long=yes | |
1632 | else | |
1633 | echo "configure: failed program was:" >&5 | |
1634 | cat conftest.$ac_ext >&5 | |
1635 | rm -rf conftest* | |
1636 | ac_cv_c_long_long=no | |
1637 | fi | |
1638 | rm -f conftest* | |
1639 | fi | |
1640 | ||
1641 | echo "$ac_t""$ac_cv_c_long_long" 1>&6 | |
1642 | if test $ac_cv_c_long_long = yes; then | |
1643 | cat >> confdefs.h <<\EOF | |
1644 | #define HAVE_LONG_LONG 1 | |
1645 | EOF | |
1646 | ||
1647 | fi | |
1648 | echo $ac_n "checking for __int64""... $ac_c" 1>&6 | |
b21d216c | 1649 | echo "configure:1650: checking for __int64" >&5 |
75e93faa | 1650 | if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then |
5c3bc9fb GK |
1651 | echo $ac_n "(cached) $ac_c" 1>&6 |
1652 | else | |
75e93faa | 1653 | cat > conftest.$ac_ext <<EOF |
b21d216c | 1654 | #line 1655 "configure" |
5c3bc9fb GK |
1655 | #include "confdefs.h" |
1656 | ||
1657 | int main() { | |
75e93faa ZW |
1658 | __int64 i; |
1659 | ; return 0; } | |
1660 | EOF | |
b21d216c | 1661 | if { (eval echo configure:1662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1662 | rm -rf conftest* |
1663 | ac_cv_c___int64=yes | |
1664 | else | |
1665 | echo "configure: failed program was:" >&5 | |
1666 | cat conftest.$ac_ext >&5 | |
1667 | rm -rf conftest* | |
1668 | ac_cv_c___int64=no | |
1669 | fi | |
1670 | rm -f conftest* | |
1671 | fi | |
5c3bc9fb | 1672 | |
75e93faa ZW |
1673 | echo "$ac_t""$ac_cv_c___int64" 1>&6 |
1674 | if test $ac_cv_c___int64 = yes; then | |
1675 | cat >> confdefs.h <<\EOF | |
1676 | #define HAVE___INT64 1 | |
1677 | EOF | |
1678 | ||
1679 | fi | |
1680 | ||
827ae6cf | 1681 | echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6 |
b21d216c | 1682 | echo "configure:1683: checking for built-in _Bool" >&5 |
827ae6cf RO |
1683 | if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then |
1684 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1685 | else | |
1686 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 1687 | #line 1688 "configure" |
827ae6cf RO |
1688 | #include "confdefs.h" |
1689 | ||
1690 | int main() { | |
1691 | _Bool foo; | |
1692 | ; return 0; } | |
1693 | EOF | |
b21d216c | 1694 | if { (eval echo configure:1695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
827ae6cf RO |
1695 | rm -rf conftest* |
1696 | gcc_cv_c__bool=yes | |
1697 | else | |
1698 | echo "configure: failed program was:" >&5 | |
1699 | cat conftest.$ac_ext >&5 | |
1700 | rm -rf conftest* | |
1701 | gcc_cv_c__bool=no | |
1702 | fi | |
1703 | rm -f conftest* | |
1704 | ||
1705 | fi | |
1706 | ||
1707 | echo "$ac_t""$gcc_cv_c__bool" 1>&6 | |
1708 | if test $gcc_cv_c__bool = yes; then | |
1709 | cat >> confdefs.h <<\EOF | |
1710 | #define HAVE__BOOL 1 | |
1711 | EOF | |
1712 | ||
1713 | fi | |
1714 | ||
75e93faa ZW |
1715 | |
1716 | # sizeof(char) is 1 by definition. | |
1717 | echo $ac_n "checking size of short""... $ac_c" 1>&6 | |
b21d216c | 1718 | echo "configure:1719: checking size of short" >&5 |
75e93faa ZW |
1719 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
1720 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1721 | else | |
1722 | for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. | |
1723 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 1724 | #line 1725 "configure" |
75e93faa ZW |
1725 | #include "confdefs.h" |
1726 | #include "confdefs.h" | |
1727 | #include <sys/types.h> | |
1728 | ||
1729 | ||
1730 | int main() { | |
1731 | switch (0) case 0: case (sizeof (short) == $ac_size):; | |
5c3bc9fb GK |
1732 | ; return 0; } |
1733 | EOF | |
b21d216c | 1734 | if { (eval echo configure:1735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5c3bc9fb | 1735 | rm -rf conftest* |
75e93faa | 1736 | ac_cv_sizeof_short=$ac_size |
ff5def20 | 1737 | else |
5c3bc9fb GK |
1738 | echo "configure: failed program was:" >&5 |
1739 | cat conftest.$ac_ext >&5 | |
75e93faa ZW |
1740 | fi |
1741 | rm -f conftest* | |
1742 | if test x$ac_cv_sizeof_short != x ; then break; fi | |
1743 | done | |
1744 | ||
1745 | fi | |
1746 | ||
1747 | if test x$ac_cv_sizeof_short = x ; then | |
1748 | { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } | |
1749 | fi | |
1750 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 | |
1751 | cat >> confdefs.h <<EOF | |
1752 | #define SIZEOF_SHORT $ac_cv_sizeof_short | |
1753 | EOF | |
1754 | ||
1755 | ||
1756 | echo $ac_n "checking size of int""... $ac_c" 1>&6 | |
b21d216c | 1757 | echo "configure:1758: checking size of int" >&5 |
75e93faa ZW |
1758 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
1759 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1760 | else | |
1761 | for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. | |
1762 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 1763 | #line 1764 "configure" |
75e93faa ZW |
1764 | #include "confdefs.h" |
1765 | #include "confdefs.h" | |
1766 | #include <sys/types.h> | |
1767 | ||
1768 | ||
1769 | int main() { | |
1770 | switch (0) case 0: case (sizeof (int) == $ac_size):; | |
1771 | ; return 0; } | |
1772 | EOF | |
b21d216c | 1773 | if { (eval echo configure:1774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5c3bc9fb | 1774 | rm -rf conftest* |
75e93faa ZW |
1775 | ac_cv_sizeof_int=$ac_size |
1776 | else | |
1777 | echo "configure: failed program was:" >&5 | |
1778 | cat conftest.$ac_ext >&5 | |
ff5def20 DA |
1779 | fi |
1780 | rm -f conftest* | |
75e93faa ZW |
1781 | if test x$ac_cv_sizeof_int != x ; then break; fi |
1782 | done | |
1783 | ||
5c3bc9fb GK |
1784 | fi |
1785 | ||
75e93faa ZW |
1786 | if test x$ac_cv_sizeof_int = x ; then |
1787 | { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } | |
1788 | fi | |
1789 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 | |
1790 | cat >> confdefs.h <<EOF | |
1791 | #define SIZEOF_INT $ac_cv_sizeof_int | |
1792 | EOF | |
1793 | ||
1794 | ||
1795 | echo $ac_n "checking size of long""... $ac_c" 1>&6 | |
b21d216c | 1796 | echo "configure:1797: checking size of long" >&5 |
75e93faa ZW |
1797 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
1798 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1799 | else | |
1800 | for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. | |
1801 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 1802 | #line 1803 "configure" |
75e93faa ZW |
1803 | #include "confdefs.h" |
1804 | #include "confdefs.h" | |
1805 | #include <sys/types.h> | |
1806 | ||
1807 | ||
1808 | int main() { | |
1809 | switch (0) case 0: case (sizeof (long) == $ac_size):; | |
1810 | ; return 0; } | |
1811 | EOF | |
b21d216c | 1812 | if { (eval echo configure:1813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1813 | rm -rf conftest* |
1814 | ac_cv_sizeof_long=$ac_size | |
1815 | else | |
1816 | echo "configure: failed program was:" >&5 | |
1817 | cat conftest.$ac_ext >&5 | |
1818 | fi | |
1819 | rm -f conftest* | |
1820 | if test x$ac_cv_sizeof_long != x ; then break; fi | |
1821 | done | |
1822 | ||
1823 | fi | |
1824 | ||
1825 | if test x$ac_cv_sizeof_long = x ; then | |
1826 | { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } | |
1827 | fi | |
1828 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 | |
1829 | cat >> confdefs.h <<EOF | |
1830 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
1831 | EOF | |
1832 | ||
1833 | ||
1834 | if test $ac_cv_c_long_long = yes; then | |
1835 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 | |
b21d216c | 1836 | echo "configure:1837: checking size of long long" >&5 |
75e93faa ZW |
1837 | if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then |
1838 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1839 | else | |
1840 | for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. | |
1841 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 1842 | #line 1843 "configure" |
75e93faa ZW |
1843 | #include "confdefs.h" |
1844 | #include "confdefs.h" | |
1845 | #include <sys/types.h> | |
1846 | ||
1847 | ||
1848 | int main() { | |
1849 | switch (0) case 0: case (sizeof (long long) == $ac_size):; | |
1850 | ; return 0; } | |
1851 | EOF | |
b21d216c | 1852 | if { (eval echo configure:1853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1853 | rm -rf conftest* |
1854 | ac_cv_sizeof_long_long=$ac_size | |
1855 | else | |
1856 | echo "configure: failed program was:" >&5 | |
1857 | cat conftest.$ac_ext >&5 | |
1858 | fi | |
1859 | rm -f conftest* | |
1860 | if test x$ac_cv_sizeof_long_long != x ; then break; fi | |
1861 | done | |
1862 | ||
1863 | fi | |
1864 | ||
1865 | if test x$ac_cv_sizeof_long_long = x ; then | |
1866 | { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; } | |
1867 | fi | |
1868 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 | |
1869 | cat >> confdefs.h <<EOF | |
1870 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
1871 | EOF | |
1872 | ||
1873 | ||
b8dad04b | 1874 | fi |
75e93faa ZW |
1875 | if test $ac_cv_c___int64 = yes; then |
1876 | echo $ac_n "checking size of __int64""... $ac_c" 1>&6 | |
b21d216c | 1877 | echo "configure:1878: checking size of __int64" >&5 |
75e93faa ZW |
1878 | if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then |
1879 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1880 | else | |
1881 | for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. | |
1882 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 1883 | #line 1884 "configure" |
75e93faa ZW |
1884 | #include "confdefs.h" |
1885 | #include "confdefs.h" | |
1886 | #include <sys/types.h> | |
b8dad04b | 1887 | |
ff5def20 | 1888 | |
75e93faa ZW |
1889 | int main() { |
1890 | switch (0) case 0: case (sizeof (__int64) == $ac_size):; | |
1891 | ; return 0; } | |
1892 | EOF | |
b21d216c | 1893 | if { (eval echo configure:1894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1894 | rm -rf conftest* |
1895 | ac_cv_sizeof___int64=$ac_size | |
1896 | else | |
1897 | echo "configure: failed program was:" >&5 | |
1898 | cat conftest.$ac_ext >&5 | |
1899 | fi | |
1900 | rm -f conftest* | |
1901 | if test x$ac_cv_sizeof___int64 != x ; then break; fi | |
1902 | done | |
1903 | ||
1904 | fi | |
1905 | ||
1906 | if test x$ac_cv_sizeof___int64 = x ; then | |
1907 | { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; } | |
1908 | fi | |
1909 | echo "$ac_t""$ac_cv_sizeof___int64" 1>&6 | |
1910 | cat >> confdefs.h <<EOF | |
1911 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 | |
1912 | EOF | |
1913 | ||
1914 | ||
1915 | fi | |
1916 | ||
84c041a1 | 1917 | echo $ac_n "checking execution character set""... $ac_c" 1>&6 |
b21d216c | 1918 | echo "configure:1919: checking execution character set" >&5 |
84c041a1 ZW |
1919 | if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then |
1920 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1921 | else | |
1922 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 1923 | #line 1924 "configure" |
84c041a1 ZW |
1924 | #include "confdefs.h" |
1925 | #if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \ | |
1926 | && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21 | |
1927 | ASCII | |
1928 | #endif | |
1929 | EOF | |
1930 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1931 | egrep "ASCII" >/dev/null 2>&1; then | |
1932 | rm -rf conftest* | |
1933 | ac_cv_c_charset=ASCII | |
1934 | fi | |
1935 | rm -f conftest* | |
1936 | ||
1937 | if test x${ac_cv_c_charset+set} != xset; then | |
1938 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 1939 | #line 1940 "configure" |
84c041a1 ZW |
1940 | #include "confdefs.h" |
1941 | #if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \ | |
1942 | && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A | |
1943 | EBCDIC | |
1944 | #endif | |
1945 | EOF | |
1946 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1947 | egrep "EBCDIC" >/dev/null 2>&1; then | |
1948 | rm -rf conftest* | |
1949 | ac_cv_c_charset=EBCDIC | |
1950 | fi | |
1951 | rm -f conftest* | |
1952 | ||
1953 | fi | |
1954 | if test x${ac_cv_c_charset+set} != xset; then | |
1955 | ac_cv_c_charset=unknown | |
1956 | fi | |
1957 | fi | |
1958 | ||
1959 | echo "$ac_t""$ac_cv_c_charset" 1>&6 | |
1960 | if test $ac_cv_c_charset = unknown; then | |
1961 | { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; } | |
1962 | elif test $ac_cv_c_charset = EBCDIC; then | |
1963 | cat >> confdefs.h <<\EOF | |
1964 | #define HOST_EBCDIC 1 | |
1965 | EOF | |
1966 | ||
1967 | fi | |
84c041a1 | 1968 | |
61842080 MM |
1969 | # If the native compiler is GCC, we can enable warnings even in stage1. |
1970 | # That's useful for people building cross-compilers, or just running a | |
1971 | # quick `make'. | |
b8dad04b ZW |
1972 | warn_cflags= |
1973 | if test "x$GCC" = "xyes"; then | |
1974 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
61842080 MM |
1975 | fi |
1976 | ||
b8dad04b | 1977 | |
5b67ad6f | 1978 | # Stage specific cflags for build. |
b8dad04b | 1979 | stage1_cflags= |
5b67ad6f DA |
1980 | case $build in |
1981 | vax-*-*) | |
1982 | if test x$GCC = xyes | |
1983 | then | |
b8dad04b | 1984 | stage1_cflags="-Wa,-J" |
5b67ad6f | 1985 | else |
b8dad04b | 1986 | stage1_cflags="-J" |
5b67ad6f DA |
1987 | fi |
1988 | ;; | |
1989 | esac | |
1990 | ||
1991 | ||
e9a25f70 | 1992 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 |
b21d216c | 1993 | echo "configure:1994: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
e9a25f70 JL |
1994 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1995 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1996 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1997 | else | |
1998 | cat > conftestmake <<\EOF | |
1999 | all: | |
2000 | @echo 'ac_maketemp="${MAKE}"' | |
2001 | EOF | |
2002 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
2003 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
2004 | if test -n "$ac_maketemp"; then | |
2005 | eval ac_cv_prog_make_${ac_make}_set=yes | |
2006 | else | |
2007 | eval ac_cv_prog_make_${ac_make}_set=no | |
2008 | fi | |
2009 | rm -f conftestmake | |
2010 | fi | |
2011 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
2012 | echo "$ac_t""yes" 1>&6 | |
2013 | SET_MAKE= | |
2014 | else | |
2015 | echo "$ac_t""no" 1>&6 | |
2016 | SET_MAKE="MAKE=${MAKE-make}" | |
2017 | fi | |
2018 | ||
2019 | ||
ab339d62 | 2020 | echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6 |
b21d216c | 2021 | echo "configure:2022: checking whether a default assembler was specified" >&5 |
3ccc3a56 | 2022 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
e154a394 | 2023 | if test x"$gas_flag" = x"no"; then |
3ccc3a56 | 2024 | echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6 |
ab339d62 | 2025 | else |
3ccc3a56 | 2026 | echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6 |
ab339d62 AO |
2027 | fi |
2028 | else | |
2029 | echo "$ac_t""no" 1>&6 | |
2030 | fi | |
2031 | ||
2032 | echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6 | |
b21d216c | 2033 | echo "configure:2034: checking whether a default linker was specified" >&5 |
3ccc3a56 | 2034 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
e154a394 | 2035 | if test x"$gnu_ld_flag" = x"no"; then |
3ccc3a56 | 2036 | echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6 |
ab339d62 | 2037 | else |
3ccc3a56 | 2038 | echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6 |
ab339d62 AO |
2039 | fi |
2040 | else | |
2041 | echo "$ac_t""no" 1>&6 | |
2042 | fi | |
2043 | ||
4070d885 | 2044 | echo $ac_n "checking for GNU C library""... $ac_c" 1>&6 |
b21d216c | 2045 | echo "configure:2046: checking for GNU C library" >&5 |
4070d885 AJ |
2046 | if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then |
2047 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2048 | else | |
2049 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 2050 | #line 2051 "configure" |
4070d885 AJ |
2051 | #include "confdefs.h" |
2052 | #include <features.h> | |
2053 | int main() { | |
2054 | ||
2055 | #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
2056 | #error Not a GNU C library system | |
2057 | #endif | |
2058 | ; return 0; } | |
2059 | EOF | |
b21d216c | 2060 | if { (eval echo configure:2061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
4070d885 AJ |
2061 | rm -rf conftest* |
2062 | gcc_cv_glibc=yes | |
2063 | else | |
2064 | echo "configure: failed program was:" >&5 | |
2065 | cat conftest.$ac_ext >&5 | |
2066 | rm -rf conftest* | |
2067 | gcc_cv_glibc=no | |
2068 | fi | |
2069 | rm -f conftest* | |
2070 | fi | |
2071 | ||
2072 | echo "$ac_t""$gcc_cv_glibc" 1>&6 | |
c2f7d403 | 2073 | if test $gcc_cv_glibc = yes; then |
4070d885 AJ |
2074 | cat >> confdefs.h <<\EOF |
2075 | #define _GNU_SOURCE 1 | |
2076 | EOF | |
2077 | ||
2078 | fi | |
2079 | ||
861bb6c1 | 2080 | # Find some useful tools |
475c267f | 2081 | for ac_prog in mawk gawk nawk awk |
861bb6c1 JL |
2082 | do |
2083 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2084 | set dummy $ac_prog; ac_word=$2 | |
2085 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b21d216c | 2086 | echo "configure:2087: checking for $ac_word" >&5 |
861bb6c1 JL |
2087 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
2088 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2089 | else | |
2090 | if test -n "$AWK"; then | |
2091 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
2092 | else | |
cd9e5e7c | 2093 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
2094 | ac_dummy="$PATH" |
2095 | for ac_dir in $ac_dummy; do | |
861bb6c1 JL |
2096 | test -z "$ac_dir" && ac_dir=. |
2097 | if test -f $ac_dir/$ac_word; then | |
2098 | ac_cv_prog_AWK="$ac_prog" | |
2099 | break | |
2100 | fi | |
2101 | done | |
2102 | IFS="$ac_save_ifs" | |
2103 | fi | |
2104 | fi | |
2105 | AWK="$ac_cv_prog_AWK" | |
2106 | if test -n "$AWK"; then | |
2107 | echo "$ac_t""$AWK" 1>&6 | |
2108 | else | |
2109 | echo "$ac_t""no" 1>&6 | |
2110 | fi | |
2111 | ||
2112 | test -n "$AWK" && break | |
2113 | done | |
2114 | ||
0a4b6309 | 2115 | echo $ac_n "checking whether ln works""... $ac_c" 1>&6 |
b21d216c | 2116 | echo "configure:2117: checking whether ln works" >&5 |
0a4b6309 RL |
2117 | if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then |
2118 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2119 | else | |
2120 | rm -f conftestdata_t | |
2121 | echo >conftestdata_f | |
2122 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
2123 | then | |
2124 | gcc_cv_prog_LN="ln" | |
2125 | else | |
2126 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
2127 | then | |
2128 | gcc_cv_prog_LN="ln -s" | |
2129 | else | |
2130 | gcc_cv_prog_LN=cp | |
2131 | fi | |
2132 | fi | |
2133 | rm -f conftestdata_f conftestdata_t | |
2134 | ||
2135 | fi | |
2136 | LN="$gcc_cv_prog_LN" | |
2137 | if test "$gcc_cv_prog_LN" = "ln"; then | |
2138 | echo "$ac_t""yes" 1>&6 | |
2139 | else | |
2140 | if test "$gcc_cv_prog_LN" = "ln -s"; then | |
2141 | echo "$ac_t""no, using ln -s" 1>&6 | |
2142 | else | |
2143 | echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6 | |
2144 | fi | |
2145 | fi | |
2146 | ||
2147 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 | |
b21d216c | 2148 | echo "configure:2149: checking whether ln -s works" >&5 |
0a4b6309 RL |
2149 | if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then |
2150 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2151 | else | |
2152 | rm -f conftestdata_t | |
2153 | echo >conftestdata_f | |
2154 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
2155 | then | |
2156 | gcc_cv_prog_LN_S="ln -s" | |
2157 | else | |
2158 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
2159 | then | |
2160 | gcc_cv_prog_LN_S=ln | |
2161 | else | |
2162 | gcc_cv_prog_LN_S=cp | |
2163 | fi | |
2164 | fi | |
2165 | rm -f conftestdata_f conftestdata_t | |
2166 | ||
2167 | fi | |
2168 | LN_S="$gcc_cv_prog_LN_S" | |
2169 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
2170 | echo "$ac_t""yes" 1>&6 | |
2171 | else | |
2172 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
2173 | echo "$ac_t""no, using ln" 1>&6 | |
2174 | else | |
2175 | echo "$ac_t""no, and neither does ln, so using cp" 1>&6 | |
2176 | fi | |
2177 | fi | |
2178 | ||
861bb6c1 JL |
2179 | # Extract the first word of "ranlib", so it can be a program name with args. |
2180 | set dummy ranlib; ac_word=$2 | |
2181 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b21d216c | 2182 | echo "configure:2183: checking for $ac_word" >&5 |
861bb6c1 JL |
2183 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
2184 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2185 | else | |
2186 | if test -n "$RANLIB"; then | |
2187 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2188 | else | |
cd9e5e7c | 2189 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
2190 | ac_dummy="$PATH" |
2191 | for ac_dir in $ac_dummy; do | |
861bb6c1 JL |
2192 | test -z "$ac_dir" && ac_dir=. |
2193 | if test -f $ac_dir/$ac_word; then | |
2194 | ac_cv_prog_RANLIB="ranlib" | |
2195 | break | |
2196 | fi | |
2197 | done | |
2198 | IFS="$ac_save_ifs" | |
2199 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
2200 | fi | |
2201 | fi | |
2202 | RANLIB="$ac_cv_prog_RANLIB" | |
2203 | if test -n "$RANLIB"; then | |
2204 | echo "$ac_t""$RANLIB" 1>&6 | |
2205 | else | |
2206 | echo "$ac_t""no" 1>&6 | |
2207 | fi | |
2208 | ||
0a4b6309 RL |
2209 | # Find a good install program. We prefer a C program (faster), |
2210 | # so one script is as good as another. But avoid the broken or | |
2211 | # incompatible versions: | |
2212 | # SysV /etc/install, /usr/sbin/install | |
2213 | # SunOS /usr/etc/install | |
2214 | # IRIX /sbin/install | |
2215 | # AIX /bin/install | |
2216 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2217 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2218 | # ./install, which can be erroneously created by make from ./install.sh. | |
2219 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
b21d216c | 2220 | echo "configure:2221: checking for a BSD compatible install" >&5 |
0a4b6309 RL |
2221 | if test -z "$INSTALL"; then |
2222 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
2223 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2224 | else | |
2225 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
2226 | for ac_dir in $PATH; do | |
2227 | # Account for people who put trailing slashes in PATH elements. | |
2228 | case "$ac_dir/" in | |
2229 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
2230 | *) | |
2231 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2232 | for ac_prog in ginstall scoinst install; do | |
2233 | if test -f $ac_dir/$ac_prog; then | |
2234 | if test $ac_prog = install && | |
2235 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
2236 | # AIX install. It has an incompatible calling convention. | |
2237 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
2238 | : | |
2239 | else | |
2240 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
2241 | break 2 | |
2242 | fi | |
2243 | fi | |
2244 | done | |
2245 | ;; | |
2246 | esac | |
2247 | done | |
2248 | IFS="$ac_save_IFS" | |
2249 | ||
2250 | fi | |
2251 | if test "${ac_cv_path_install+set}" = set; then | |
2252 | INSTALL="$ac_cv_path_install" | |
2253 | else | |
2254 | # As a last resort, use the slow shell script. We don't cache a | |
2255 | # path for INSTALL within a source directory, because that will | |
2256 | # break other packages using the cache if that directory is | |
2257 | # removed, or if the path is relative. | |
2258 | INSTALL="$ac_install_sh" | |
2259 | fi | |
2260 | fi | |
2261 | echo "$ac_t""$INSTALL" 1>&6 | |
2262 | ||
2263 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
2264 | # It thinks the first close brace ends the variable substitution. | |
2265 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
2266 | ||
2267 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
2268 | ||
861bb6c1 | 2269 | |
956d6950 | 2270 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
b21d216c | 2271 | echo "configure:2272: checking for ANSI C header files" >&5 |
956d6950 JL |
2272 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
2273 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2274 | else | |
2275 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 2276 | #line 2277 "configure" |
956d6950 JL |
2277 | #include "confdefs.h" |
2278 | #include <stdlib.h> | |
2279 | #include <stdarg.h> | |
2280 | #include <string.h> | |
2281 | #include <float.h> | |
2282 | EOF | |
2283 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b21d216c | 2284 | { (eval echo configure:2285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 2285 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
956d6950 JL |
2286 | if test -z "$ac_err"; then |
2287 | rm -rf conftest* | |
2288 | ac_cv_header_stdc=yes | |
2289 | else | |
2290 | echo "$ac_err" >&5 | |
2291 | echo "configure: failed program was:" >&5 | |
2292 | cat conftest.$ac_ext >&5 | |
2293 | rm -rf conftest* | |
2294 | ac_cv_header_stdc=no | |
2295 | fi | |
2296 | rm -f conftest* | |
2297 | ||
2298 | if test $ac_cv_header_stdc = yes; then | |
2299 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
2300 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 2301 | #line 2302 "configure" |
956d6950 JL |
2302 | #include "confdefs.h" |
2303 | #include <string.h> | |
2304 | EOF | |
2305 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2306 | egrep "memchr" >/dev/null 2>&1; then | |
2307 | : | |
2308 | else | |
2309 | rm -rf conftest* | |
2310 | ac_cv_header_stdc=no | |
2311 | fi | |
2312 | rm -f conftest* | |
2313 | ||
2314 | fi | |
2315 | ||
2316 | if test $ac_cv_header_stdc = yes; then | |
2317 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
2318 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 2319 | #line 2320 "configure" |
956d6950 JL |
2320 | #include "confdefs.h" |
2321 | #include <stdlib.h> | |
2322 | EOF | |
2323 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2324 | egrep "free" >/dev/null 2>&1; then | |
2325 | : | |
2326 | else | |
2327 | rm -rf conftest* | |
2328 | ac_cv_header_stdc=no | |
2329 | fi | |
2330 | rm -f conftest* | |
2331 | ||
2332 | fi | |
2333 | ||
2334 | if test $ac_cv_header_stdc = yes; then | |
2335 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
2336 | if test "$cross_compiling" = yes; then | |
2337 | : | |
2338 | else | |
2339 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 2340 | #line 2341 "configure" |
956d6950 JL |
2341 | #include "confdefs.h" |
2342 | #include <ctype.h> | |
2343 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
2344 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
2345 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
2346 | int main () { int i; for (i = 0; i < 256; i++) | |
2347 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
2348 | exit (0); } | |
2349 | ||
2350 | EOF | |
b21d216c | 2351 | if { (eval echo configure:2352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
956d6950 JL |
2352 | then |
2353 | : | |
2354 | else | |
2355 | echo "configure: failed program was:" >&5 | |
2356 | cat conftest.$ac_ext >&5 | |
2357 | rm -fr conftest* | |
2358 | ac_cv_header_stdc=no | |
2359 | fi | |
2360 | rm -fr conftest* | |
2361 | fi | |
2362 | ||
2363 | fi | |
2364 | fi | |
2365 | ||
2366 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
2367 | if test $ac_cv_header_stdc = yes; then | |
2368 | cat >> confdefs.h <<\EOF | |
2369 | #define STDC_HEADERS 1 | |
2370 | EOF | |
2371 | ||
2372 | fi | |
2373 | ||
2374 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 | |
b21d216c | 2375 | echo "configure:2376: checking whether time.h and sys/time.h may both be included" >&5 |
956d6950 JL |
2376 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
2377 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2378 | else | |
2379 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 2380 | #line 2381 "configure" |
956d6950 JL |
2381 | #include "confdefs.h" |
2382 | #include <sys/types.h> | |
2383 | #include <sys/time.h> | |
2384 | #include <time.h> | |
2385 | int main() { | |
2386 | struct tm *tp; | |
2387 | ; return 0; } | |
2388 | EOF | |
b21d216c | 2389 | if { (eval echo configure:2390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
956d6950 JL |
2390 | rm -rf conftest* |
2391 | ac_cv_header_time=yes | |
2392 | else | |
2393 | echo "configure: failed program was:" >&5 | |
2394 | cat conftest.$ac_ext >&5 | |
2395 | rm -rf conftest* | |
2396 | ac_cv_header_time=no | |
2397 | fi | |
2398 | rm -f conftest* | |
2399 | fi | |
2400 | ||
2401 | echo "$ac_t""$ac_cv_header_time" 1>&6 | |
2402 | if test $ac_cv_header_time = yes; then | |
2403 | cat >> confdefs.h <<\EOF | |
2404 | #define TIME_WITH_SYS_TIME 1 | |
2405 | EOF | |
2406 | ||
2407 | fi | |
2408 | ||
827ae6cf | 2409 | echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6 |
b21d216c | 2410 | echo "configure:2411: checking for working stdbool.h" >&5 |
827ae6cf RO |
2411 | if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then |
2412 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2413 | else | |
2414 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 2415 | #line 2416 "configure" |
827ae6cf RO |
2416 | #include "confdefs.h" |
2417 | #include <stdbool.h> | |
2418 | int main() { | |
2419 | bool foo = false; | |
2420 | ; return 0; } | |
2421 | EOF | |
b21d216c | 2422 | if { (eval echo configure:2423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
827ae6cf RO |
2423 | rm -rf conftest* |
2424 | ac_cv_header_stdbool_h=yes | |
2425 | else | |
2426 | echo "configure: failed program was:" >&5 | |
2427 | cat conftest.$ac_ext >&5 | |
2428 | rm -rf conftest* | |
2429 | ac_cv_header_stdbool_h=no | |
2430 | fi | |
2431 | rm -f conftest* | |
2432 | fi | |
2433 | ||
2434 | echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6 | |
2435 | if test $ac_cv_header_stdbool_h = yes; then | |
2436 | cat >> confdefs.h <<\EOF | |
2437 | #define HAVE_STDBOOL_H 1 | |
2438 | EOF | |
2439 | ||
2440 | fi | |
2441 | ||
0a4b6309 | 2442 | echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6 |
b21d216c | 2443 | echo "configure:2444: checking whether string.h and strings.h may both be included" >&5 |
0a4b6309 RL |
2444 | if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then |
2445 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2446 | else | |
2447 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 2448 | #line 2449 "configure" |
0a4b6309 RL |
2449 | #include "confdefs.h" |
2450 | #include <string.h> | |
2451 | #include <strings.h> | |
2452 | int main() { | |
2453 | ||
2454 | ; return 0; } | |
2455 | EOF | |
b21d216c | 2456 | if { (eval echo configure:2457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0a4b6309 RL |
2457 | rm -rf conftest* |
2458 | gcc_cv_header_string=yes | |
2459 | else | |
2460 | echo "configure: failed program was:" >&5 | |
2461 | cat conftest.$ac_ext >&5 | |
2462 | rm -rf conftest* | |
2463 | gcc_cv_header_string=no | |
2464 | fi | |
2465 | rm -f conftest* | |
2466 | fi | |
2467 | ||
2468 | echo "$ac_t""$gcc_cv_header_string" 1>&6 | |
2469 | if test $gcc_cv_header_string = yes; then | |
2470 | cat >> confdefs.h <<\EOF | |
2471 | #define STRING_WITH_STRINGS 1 | |
2472 | EOF | |
2473 | ||
2474 | fi | |
2475 | ||
e9831ca0 | 2476 | echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 |
b21d216c | 2477 | echo "configure:2478: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
e9831ca0 KG |
2478 | if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then |
2479 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2480 | else | |
2481 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 2482 | #line 2483 "configure" |
e9831ca0 KG |
2483 | #include "confdefs.h" |
2484 | #include <sys/types.h> | |
2485 | #include <sys/wait.h> | |
2486 | #ifndef WEXITSTATUS | |
2487 | #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) | |
2488 | #endif | |
2489 | #ifndef WIFEXITED | |
2490 | #define WIFEXITED(stat_val) (((stat_val) & 255) == 0) | |
2491 | #endif | |
2492 | int main() { | |
2493 | int s; | |
2494 | wait (&s); | |
2495 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
2496 | ; return 0; } | |
2497 | EOF | |
b21d216c | 2498 | if { (eval echo configure:2499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
e9831ca0 KG |
2499 | rm -rf conftest* |
2500 | ac_cv_header_sys_wait_h=yes | |
2501 | else | |
2502 | echo "configure: failed program was:" >&5 | |
2503 | cat conftest.$ac_ext >&5 | |
2504 | rm -rf conftest* | |
2505 | ac_cv_header_sys_wait_h=no | |
2506 | fi | |
2507 | rm -f conftest* | |
2508 | fi | |
2509 | ||
2510 | echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 | |
2511 | if test $ac_cv_header_sys_wait_h = yes; then | |
2512 | cat >> confdefs.h <<\EOF | |
2513 | #define HAVE_SYS_WAIT_H 1 | |
2514 | EOF | |
2515 | ||
2516 | fi | |
2517 | ||
03c41c05 | 2518 | for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \ |
7719ffbf | 2519 | fcntl.h unistd.h sys/file.h sys/time.h \ |
03c41c05 | 2520 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
f91abfce | 2521 | direct.h malloc.h langinfo.h |
861bb6c1 JL |
2522 | do |
2523 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2524 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
b21d216c | 2525 | echo "configure:2526: checking for $ac_hdr" >&5 |
861bb6c1 JL |
2526 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2527 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2528 | else | |
2529 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 2530 | #line 2531 "configure" |
861bb6c1 JL |
2531 | #include "confdefs.h" |
2532 | #include <$ac_hdr> | |
2533 | EOF | |
956d6950 | 2534 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
b21d216c | 2535 | { (eval echo configure:2536: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 2536 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
956d6950 JL |
2537 | if test -z "$ac_err"; then |
2538 | rm -rf conftest* | |
2539 | eval "ac_cv_header_$ac_safe=yes" | |
2540 | else | |
2541 | echo "$ac_err" >&5 | |
2542 | echo "configure: failed program was:" >&5 | |
2543 | cat conftest.$ac_ext >&5 | |
2544 | rm -rf conftest* | |
2545 | eval "ac_cv_header_$ac_safe=no" | |
2546 | fi | |
2547 | rm -f conftest* | |
2548 | fi | |
2549 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2550 | echo "$ac_t""yes" 1>&6 | |
2551 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2552 | cat >> confdefs.h <<EOF | |
2553 | #define $ac_tr_hdr 1 | |
2554 | EOF | |
2555 | ||
2556 | else | |
2557 | echo "$ac_t""no" 1>&6 | |
2558 | fi | |
2559 | done | |
2560 | ||
2561 | ||
f24af81b TT |
2562 | # Check for thread headers. |
2563 | ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'` | |
2564 | echo $ac_n "checking for thread.h""... $ac_c" 1>&6 | |
b21d216c | 2565 | echo "configure:2566: checking for thread.h" >&5 |
f24af81b TT |
2566 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2567 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2568 | else | |
2569 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 2570 | #line 2571 "configure" |
f24af81b TT |
2571 | #include "confdefs.h" |
2572 | #include <thread.h> | |
2573 | EOF | |
2574 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b21d216c | 2575 | { (eval echo configure:2576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 2576 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
f24af81b TT |
2577 | if test -z "$ac_err"; then |
2578 | rm -rf conftest* | |
2579 | eval "ac_cv_header_$ac_safe=yes" | |
2580 | else | |
2581 | echo "$ac_err" >&5 | |
2582 | echo "configure: failed program was:" >&5 | |
2583 | cat conftest.$ac_ext >&5 | |
2584 | rm -rf conftest* | |
2585 | eval "ac_cv_header_$ac_safe=no" | |
2586 | fi | |
2587 | rm -f conftest* | |
2588 | fi | |
2589 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2590 | echo "$ac_t""yes" 1>&6 | |
2591 | have_thread_h=yes | |
2592 | else | |
2593 | echo "$ac_t""no" 1>&6 | |
2594 | have_thread_h= | |
2595 | fi | |
2596 | ||
2597 | ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'` | |
2598 | echo $ac_n "checking for pthread.h""... $ac_c" 1>&6 | |
b21d216c | 2599 | echo "configure:2600: checking for pthread.h" >&5 |
f24af81b TT |
2600 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2601 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2602 | else | |
2603 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 2604 | #line 2605 "configure" |
f24af81b TT |
2605 | #include "confdefs.h" |
2606 | #include <pthread.h> | |
2607 | EOF | |
2608 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b21d216c | 2609 | { (eval echo configure:2610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 2610 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
f24af81b TT |
2611 | if test -z "$ac_err"; then |
2612 | rm -rf conftest* | |
2613 | eval "ac_cv_header_$ac_safe=yes" | |
2614 | else | |
2615 | echo "$ac_err" >&5 | |
2616 | echo "configure: failed program was:" >&5 | |
2617 | cat conftest.$ac_ext >&5 | |
2618 | rm -rf conftest* | |
2619 | eval "ac_cv_header_$ac_safe=no" | |
2620 | fi | |
2621 | rm -f conftest* | |
2622 | fi | |
2623 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2624 | echo "$ac_t""yes" 1>&6 | |
2625 | have_pthread_h=yes | |
2626 | else | |
2627 | echo "$ac_t""no" 1>&6 | |
2628 | have_pthread_h= | |
2629 | fi | |
2630 | ||
2631 | ||
84c041a1 | 2632 | # These tests can't be done till we know if we have limits.h. |
75e93faa | 2633 | echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6 |
b21d216c | 2634 | echo "configure:2635: checking for CHAR_BIT" >&5 |
75e93faa ZW |
2635 | if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then |
2636 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2637 | else | |
2638 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 2639 | #line 2640 "configure" |
75e93faa ZW |
2640 | #include "confdefs.h" |
2641 | #ifdef HAVE_LIMITS_H | |
2642 | #include <limits.h> | |
2643 | #endif | |
2644 | #ifdef CHAR_BIT | |
2645 | found | |
2646 | #endif | |
2647 | EOF | |
2648 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2649 | egrep "found" >/dev/null 2>&1; then | |
2650 | rm -rf conftest* | |
2651 | gcc_cv_decl_char_bit=yes | |
2652 | else | |
2653 | rm -rf conftest* | |
2654 | gcc_cv_decl_char_bit=no | |
2655 | fi | |
2656 | rm -f conftest* | |
2657 | ||
2658 | ||
2659 | fi | |
2660 | ||
2661 | echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6 | |
2662 | if test $gcc_cv_decl_char_bit = no; then | |
2663 | echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6 | |
b21d216c | 2664 | echo "configure:2665: checking number of bits in a byte" >&5 |
75e93faa ZW |
2665 | if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then |
2666 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2667 | else | |
2668 | i=8 | |
2669 | gcc_cv_c_nbby= | |
2670 | while test $i -lt 65; do | |
2671 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 2672 | #line 2673 "configure" |
75e93faa ZW |
2673 | #include "confdefs.h" |
2674 | ||
2675 | int main() { | |
4e70264f ZW |
2676 | switch(0) { |
2677 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
2678 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
2679 | ; } | |
75e93faa ZW |
2680 | ; return 0; } |
2681 | EOF | |
b21d216c | 2682 | if { (eval echo configure:2683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa | 2683 | rm -rf conftest* |
4e70264f | 2684 | gcc_cv_c_nbby=$i; break |
75e93faa ZW |
2685 | else |
2686 | echo "configure: failed program was:" >&5 | |
2687 | cat conftest.$ac_ext >&5 | |
2688 | fi | |
2689 | rm -f conftest* | |
2690 | i=`expr $i + 1` | |
2691 | done | |
2692 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
2693 | ||
2694 | fi | |
2695 | ||
2696 | echo "$ac_t""$gcc_cv_c_nbby" 1>&6 | |
2697 | if test $gcc_cv_c_nbby = failed; then | |
2698 | { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; } | |
2699 | else | |
2700 | cat >> confdefs.h <<EOF | |
2701 | #define CHAR_BIT $gcc_cv_c_nbby | |
2702 | EOF | |
2703 | ||
2704 | fi | |
2705 | fi | |
2d6eb5bf | 2706 | echo $ac_n "checking byte ordering""... $ac_c" 1>&6 |
b21d216c | 2707 | echo "configure:2708: checking byte ordering" >&5 |
2d6eb5bf | 2708 | if eval "test \"`echo '$''{'ac_cv_c_compile_endian'+set}'`\" = set"; then |
84c041a1 ZW |
2709 | echo $ac_n "(cached) $ac_c" 1>&6 |
2710 | else | |
2d6eb5bf ZW |
2711 | ac_cv_c_compile_endian=unknown |
2712 | ||
2713 | ac_ext=c | |
2714 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2715 | ac_cpp='$CPP $CPPFLAGS' | |
2716 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2717 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2718 | cross_compiling=$ac_cv_prog_cc_cross | |
2719 | ||
2720 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 2721 | #line 2722 "configure" |
84c041a1 | 2722 | #include "confdefs.h" |
2d6eb5bf | 2723 | |
84c041a1 | 2724 | #ifdef HAVE_LIMITS_H |
2d6eb5bf | 2725 | # include <limits.h> |
84c041a1 ZW |
2726 | #endif |
2727 | /* This structure must have no internal padding. */ | |
2728 | struct { | |
2d6eb5bf | 2729 | char prefix[sizeof "\nendian:" - 1]; |
84c041a1 | 2730 | short word; |
2d6eb5bf | 2731 | char postfix[2]; |
84c041a1 | 2732 | } tester = { |
2d6eb5bf | 2733 | "\nendian:", |
84c041a1 ZW |
2734 | #if SIZEOF_SHORT == 4 |
2735 | ('A' << (CHAR_BIT * 3)) | ('B' << (CHAR_BIT * 2)) | | |
2736 | #endif | |
2d6eb5bf ZW |
2737 | ('A' << CHAR_BIT) | 'B', |
2738 | 'X', '\n' | |
84c041a1 ZW |
2739 | }; |
2740 | EOF | |
b21d216c | 2741 | if { (eval echo configure:2742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
2d6eb5bf | 2742 | od -c conftest.o | |
e48cd290 | 2743 | sed 's/^[0-7]*[ ]*/ / |
2d6eb5bf ZW |
2744 | s/\*/./g |
2745 | s/ \\n/*/g | |
2746 | s/ [0-9][0-9][0-9]/./g | |
2747 | s/ \\[^ ]/./g' | | |
2748 | tr -d ' | |
2749 | ' | tr -s '*' ' | |
2750 | ' | fold | sed '$a\ | |
2751 | ' > conftest.dmp | |
2752 | if grep 'endian:AB' conftest.dmp >/dev/null 2>&1; then | |
2753 | ac_cv_c_compile_endian=big-endian | |
2754 | elif grep 'endian:BA' conftest.dmp >/dev/null 2>&1; then | |
2755 | ac_cv_c_compile_endian=little-endian | |
84c041a1 ZW |
2756 | fi |
2757 | fi | |
84c041a1 | 2758 | rm -rf conftest* |
2d6eb5bf ZW |
2759 | ac_ext=c |
2760 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2761 | ac_cpp='$CPP $CPPFLAGS' | |
2762 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2763 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2764 | cross_compiling=$ac_cv_prog_cc_cross | |
2765 | ||
2766 | ||
84c041a1 ZW |
2767 | fi |
2768 | ||
2d6eb5bf ZW |
2769 | echo "$ac_t""$ac_cv_c_compile_endian" 1>&6 |
2770 | if test $ac_cv_c_compile_endian = unknown; then | |
2771 | { echo "configure: error: *** unable to determine endianness" 1>&2; exit 1; } | |
2772 | elif test $ac_cv_c_compile_endian = big-endian; then | |
84c041a1 ZW |
2773 | cat >> confdefs.h <<\EOF |
2774 | #define HOST_WORDS_BIG_ENDIAN 1 | |
2775 | EOF | |
2776 | ||
2777 | fi | |
2778 | ||
2d6eb5bf | 2779 | echo $ac_n "checking floating point format""... $ac_c" 1>&6 |
b21d216c | 2780 | echo "configure:2781: checking floating point format" >&5 |
2d6eb5bf ZW |
2781 | if eval "test \"`echo '$''{'ac_cv_c_float_format'+set}'`\" = set"; then |
2782 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2783 | else | |
2784 | ||
2785 | ac_ext=c | |
2786 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2787 | ac_cpp='$CPP $CPPFLAGS' | |
2788 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2789 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2790 | cross_compiling=$ac_cv_prog_cc_cross | |
2791 | ||
2792 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 2793 | #line 2794 "configure" |
2d6eb5bf ZW |
2794 | #include "confdefs.h" |
2795 | /* This will not work unless sizeof(double) == 8. */ | |
2796 | extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1]; | |
2797 | ||
2798 | /* This structure must have no internal padding. */ | |
2799 | struct possibility { | |
2800 | char prefix[8]; | |
2801 | double candidate; | |
2802 | char postfix[8]; | |
2803 | }; | |
2804 | ||
2805 | #define C(cand) { "\nformat:", cand, ":tamrof\n" } | |
2806 | struct possibility table [] = | |
2807 | { | |
2808 | C( 3.25724264705901305206e+01), /* @@IEEEFP - IEEE 754 */ | |
2809 | C( 3.53802595280598432000e+18), /* D__float - VAX */ | |
2810 | C( 5.32201830133125317057e-19), /* D.PDP-10 - PDP-10 - the dot is 0x13a */ | |
2811 | C( 1.77977764695171661377e+10), /* IBMHEXFP - s/390 format, ascii */ | |
2812 | C(-5.22995989424860458374e+10) /* IBMHEXFP - s/390 format, EBCDIC */ | |
2813 | }; | |
2814 | EOF | |
b21d216c | 2815 | if { (eval echo configure:2816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
2d6eb5bf | 2816 | od -c conftest.o | |
e48cd290 | 2817 | sed 's/^[0-7]*[ ]*/ / |
2d6eb5bf ZW |
2818 | s/\*/./g |
2819 | s/ \\n/*/g | |
2820 | s/ [0-9][0-9][0-9]/./g | |
2821 | s/ \\[^ ]/./g' | | |
2822 | tr -d ' | |
2823 | ' | tr -s '*' ' | |
2824 | ' | fold | sed '$a\ | |
2825 | ' > conftest.dmp | |
2826 | if grep 'format:.@IEEEF.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2827 | ac_cv_c_float_format='IEEE (big-endian)' | |
2828 | elif grep 'format:.I@@PFE.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2829 | ac_cv_c_float_format='IEEE (big-endian)' | |
2830 | elif grep 'format:.FEEEI@.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2831 | ac_cv_c_float_format='IEEE (little-endian)' | |
2832 | elif grep 'format:.EFP@@I.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2833 | ac_cv_c_float_format='IEEE (little-endian)' | |
2834 | elif grep 'format:.__floa.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2835 | ac_cv_c_float_format='VAX D-float' | |
2836 | elif grep 'format:..PDP-1.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2837 | ac_cv_c_float_format='PDP-10' | |
2838 | elif grep 'format:.BMHEXF.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2839 | ac_cv_c_float_format='IBM 370 hex' | |
2840 | else | |
2841 | { echo "configure: error: Unknown floating point format" 1>&2; exit 1; } | |
2842 | fi | |
2843 | else | |
2844 | { echo "configure: error: compile failed" 1>&2; exit 1; } | |
2845 | fi | |
2846 | rm -rf conftest* | |
2847 | ac_ext=c | |
2848 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2849 | ac_cpp='$CPP $CPPFLAGS' | |
2850 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2851 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2852 | cross_compiling=$ac_cv_prog_cc_cross | |
2853 | ||
2854 | ||
2855 | fi | |
2856 | ||
2857 | echo "$ac_t""$ac_cv_c_float_format" 1>&6 | |
2858 | # IEEE is the default format. If the float endianness isn't the same | |
2859 | # as the integer endianness, we have to set FLOAT_WORDS_BIG_ENDIAN | |
2860 | # (which is a tristate: yes, no, default). This is only an issue with | |
2861 | # IEEE; the other formats are only supported by a few machines each, | |
2862 | # all with the same endianness. | |
2863 | format= | |
2864 | fbigend= | |
2865 | case $ac_cv_c_float_format in | |
2866 | 'IEEE (big-endian)' ) | |
2867 | if test $ac_cv_c_compile_endian = little-endian; then | |
2868 | fbigend=1 | |
2869 | fi | |
2870 | ;; | |
2871 | 'IEEE (little-endian)' ) | |
2872 | if test $ac_cv_c_compile_endian = big-endian; then | |
2873 | fbigend=0 | |
2874 | fi | |
2875 | ;; | |
2876 | 'VAX D-float' ) | |
2877 | format=VAX_FLOAT_FORMAT | |
2878 | ;; | |
2879 | 'PDP-10' ) | |
2880 | format=PDP10_FLOAT_FORMAT | |
2881 | ;; | |
2882 | 'IBM 370 hex' ) | |
2883 | format=IBM_FLOAT_FORMAT | |
2884 | ;; | |
2885 | esac | |
2886 | if test -n "$format"; then | |
2887 | cat >> confdefs.h <<EOF | |
2888 | #define HOST_FLOAT_FORMAT $format | |
2889 | EOF | |
2890 | ||
2891 | fi | |
2892 | if test -n "$fbigend"; then | |
2893 | cat >> confdefs.h <<EOF | |
2894 | #define HOST_FLOAT_WORDS_BIG_ENDIAN $fbigend | |
2895 | EOF | |
2896 | ||
2897 | fi | |
2898 | ||
75e93faa | 2899 | |
bcf12124 | 2900 | # See if GNAT has been installed |
67f28219 ZW |
2901 | if test $host != $build; then |
2902 | ac_tool_prefix=${host_alias}- | |
2903 | else | |
2904 | ac_tool_prefix= | |
2905 | fi | |
2906 | ||
2907 | ||
2908 | # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args. | |
2909 | set dummy ${ac_tool_prefix}gnatbind; ac_word=$2 | |
2910 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b21d216c | 2911 | echo "configure:2912: checking for $ac_word" >&5 |
67f28219 ZW |
2912 | if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then |
2913 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2914 | else | |
2915 | if test -n "$GNATBIND"; then | |
2916 | ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test. | |
2917 | else | |
2918 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2919 | ac_dummy="$PATH" | |
2920 | for ac_dir in $ac_dummy; do | |
2921 | test -z "$ac_dir" && ac_dir=. | |
2922 | if test -f $ac_dir/$ac_word; then | |
2923 | ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind" | |
2924 | break | |
2925 | fi | |
2926 | done | |
2927 | IFS="$ac_save_ifs" | |
2928 | fi | |
2929 | fi | |
2930 | GNATBIND="$ac_cv_prog_GNATBIND" | |
2931 | if test -n "$GNATBIND"; then | |
2932 | echo "$ac_t""$GNATBIND" 1>&6 | |
2933 | else | |
2934 | echo "$ac_t""no" 1>&6 | |
2935 | fi | |
2936 | ||
2937 | ||
2938 | if test -z "$ac_cv_prog_GNATBIND"; then | |
2939 | if test -n "$ac_tool_prefix"; then | |
2940 | # Extract the first word of "gnatbind", so it can be a program name with args. | |
bcf12124 JL |
2941 | set dummy gnatbind; ac_word=$2 |
2942 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b21d216c | 2943 | echo "configure:2944: checking for $ac_word" >&5 |
67f28219 | 2944 | if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then |
bcf12124 JL |
2945 | echo $ac_n "(cached) $ac_c" 1>&6 |
2946 | else | |
67f28219 ZW |
2947 | if test -n "$GNATBIND"; then |
2948 | ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test. | |
bcf12124 | 2949 | else |
cd9e5e7c | 2950 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
2951 | ac_dummy="$PATH" |
2952 | for ac_dir in $ac_dummy; do | |
bcf12124 JL |
2953 | test -z "$ac_dir" && ac_dir=. |
2954 | if test -f $ac_dir/$ac_word; then | |
67f28219 | 2955 | ac_cv_prog_GNATBIND="gnatbind" |
bcf12124 JL |
2956 | break |
2957 | fi | |
2958 | done | |
2959 | IFS="$ac_save_ifs" | |
67f28219 | 2960 | test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no" |
bcf12124 JL |
2961 | fi |
2962 | fi | |
67f28219 ZW |
2963 | GNATBIND="$ac_cv_prog_GNATBIND" |
2964 | if test -n "$GNATBIND"; then | |
2965 | echo "$ac_t""$GNATBIND" 1>&6 | |
bcf12124 JL |
2966 | else |
2967 | echo "$ac_t""no" 1>&6 | |
2968 | fi | |
2969 | ||
67f28219 ZW |
2970 | else |
2971 | GNATBIND="no" | |
2972 | fi | |
2973 | fi | |
2974 | ||
2975 | echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6 | |
b21d216c | 2976 | echo "configure:2977: checking for compiler driver that understands Ada" >&5 |
67f28219 ZW |
2977 | if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then |
2978 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2979 | else | |
2980 | cat >conftest.adb <<EOF | |
2981 | procedure conftest is begin null; end conftest; | |
2982 | EOF | |
2983 | gcc_cv_prog_adac=no | |
2984 | # Have to do ac_tool_prefix and user overrides by hand. | |
2985 | user_adac=$ADAC | |
2986 | user_cc=$CC | |
2987 | for cand in ${ac_tool_prefix}$user_adac $user_adac \ | |
2988 | ${ac_tool_prefix}$user_cc $user_cc \ | |
2989 | ${ac_tool_prefix}gcc gcc \ | |
2990 | ${ac_tool_prefix}cc cc \ | |
2991 | ${ac_tool_prefix}gnatgcc gnatgcc \ | |
2992 | ${ac_tool_prefix}gnatcc gnatcc \ | |
2993 | ${ac_tool_prefix}adagcc adagcc \ | |
2994 | ${ac_tool_prefix}adacc adacc ; do | |
2995 | # There is a bug in all released versions of GCC which causes the | |
2996 | # driver to exit successfully when the appropriate language module | |
2997 | # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1. | |
2998 | # Therefore we must check for the error message as well as an | |
2999 | # unsuccessful exit. | |
3000 | errors=`$cand -c conftest.adb 2>&1 || echo failure` | |
3001 | if test x"$errors" = x; then | |
3002 | gcc_cv_prog_adac=$cand | |
3003 | break | |
3004 | fi | |
3005 | done | |
3006 | rm -f conftest.* | |
3007 | fi | |
3008 | ||
3009 | echo "$ac_t""$gcc_cv_prog_adac" 1>&6 | |
3010 | ADAC=$gcc_cv_prog_adac | |
3011 | ||
3012 | ||
3013 | if test x$GNATBIND != xno && test x$ADAC != xno; then | |
3014 | have_gnat=yes | |
3015 | else | |
3016 | have_gnat=no | |
3017 | fi | |
3018 | ||
bcf12124 | 3019 | |
955be633 JM |
3020 | # See if we have the mktemp command. |
3021 | # Extract the first word of "mktemp", so it can be a program name with args. | |
3022 | set dummy mktemp; ac_word=$2 | |
3023 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b21d216c | 3024 | echo "configure:3025: checking for $ac_word" >&5 |
955be633 JM |
3025 | if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then |
3026 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3027 | else | |
3028 | if test -n "$have_mktemp_command"; then | |
3029 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
3030 | else | |
3031 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3032 | ac_dummy="$PATH" | |
3033 | for ac_dir in $ac_dummy; do | |
3034 | test -z "$ac_dir" && ac_dir=. | |
3035 | if test -f $ac_dir/$ac_word; then | |
3036 | ac_cv_prog_have_mktemp_command="yes" | |
3037 | break | |
3038 | fi | |
3039 | done | |
3040 | IFS="$ac_save_ifs" | |
3041 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" | |
3042 | fi | |
3043 | fi | |
3044 | have_mktemp_command="$ac_cv_prog_have_mktemp_command" | |
3045 | if test -n "$have_mktemp_command"; then | |
3046 | echo "$ac_t""$have_mktemp_command" 1>&6 | |
3047 | else | |
3048 | echo "$ac_t""no" 1>&6 | |
3049 | fi | |
3050 | ||
3051 | ||
09fa0705 ZW |
3052 | # Do we have a single-tree copy of texinfo? |
3053 | if test -f $srcdir/../texinfo/Makefile.in; then | |
3054 | MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo' | |
3055 | gcc_cv_prog_makeinfo_modern=yes | |
3056 | echo "$ac_t""Using makeinfo from the unified source tree." 1>&6 | |
3057 | else | |
3058 | # See if makeinfo has been installed and is modern enough | |
3059 | # that we can use it. | |
3060 | # Extract the first word of "makeinfo", so it can be a program name with args. | |
3061 | set dummy makeinfo; ac_word=$2 | |
3062 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b21d216c | 3063 | echo "configure:3064: checking for $ac_word" >&5 |
09fa0705 ZW |
3064 | if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then |
3065 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3066 | else | |
3067 | if test -n "$MAKEINFO"; then | |
3068 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
3069 | else | |
3070 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3071 | ac_dummy="$PATH" | |
3072 | for ac_dir in $ac_dummy; do | |
3073 | test -z "$ac_dir" && ac_dir=. | |
3074 | if test -f $ac_dir/$ac_word; then | |
3075 | ac_cv_prog_MAKEINFO="makeinfo" | |
3076 | break | |
3077 | fi | |
3078 | done | |
3079 | IFS="$ac_save_ifs" | |
3080 | fi | |
3081 | fi | |
3082 | MAKEINFO="$ac_cv_prog_MAKEINFO" | |
3083 | if test -n "$MAKEINFO"; then | |
3084 | echo "$ac_t""$MAKEINFO" 1>&6 | |
3085 | else | |
3086 | echo "$ac_t""no" 1>&6 | |
3087 | fi | |
3088 | ||
3089 | if test -n "$MAKEINFO"; then | |
3090 | # Found it, now check the version. | |
3091 | echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6 | |
b21d216c | 3092 | echo "configure:3093: checking for modern makeinfo" >&5 |
09fa0705 ZW |
3093 | if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then |
3094 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3095 | else | |
3096 | ac_prog_version=`$MAKEINFO --version 2>&1 | | |
3097 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
b21d216c | 3098 | echo "configure:3099: version of makeinfo is $ac_prog_version" >&5 |
09fa0705 ZW |
3099 | case $ac_prog_version in |
3100 | '') gcc_cv_prog_makeinfo_modern=no;; | |
fd939e46 | 3101 | 4.*) |
09fa0705 ZW |
3102 | gcc_cv_prog_makeinfo_modern=yes;; |
3103 | *) gcc_cv_prog_makeinfo_modern=no;; | |
3104 | esac | |
3105 | ||
3106 | fi | |
3107 | ||
3108 | echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6 | |
3109 | else | |
3110 | gcc_cv_prog_makeinfo_modern=no | |
3111 | fi | |
3112 | ||
3113 | fi | |
3114 | ||
3115 | if test $gcc_cv_prog_makeinfo_modern = no; then | |
3116 | echo "configure: warning: | |
3117 | *** Makeinfo is missing or too old. | |
17db6582 | 3118 | *** Info documentation will not be built." 1>&2 |
d21445e7 | 3119 | BUILD_INFO= |
09fa0705 ZW |
3120 | else |
3121 | BUILD_INFO=info | |
09fa0705 ZW |
3122 | fi |
3123 | ||
3f896fc2 JM |
3124 | # Is pod2man recent enough to regenerate manpages? |
3125 | echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6 | |
b21d216c | 3126 | echo "configure:3127: checking for recent Pod::Man" >&5 |
3f896fc2 | 3127 | if perl -e 'use 1.10 Pod::Man' >/dev/null 2>&1; then |
fd939e46 JM |
3128 | echo "$ac_t""yes" 1>&6 |
3129 | GENERATED_MANPAGES=generated-manpages | |
3130 | else | |
3131 | echo "$ac_t""no" 1>&6 | |
3132 | GENERATED_MANPAGES= | |
3133 | fi | |
3134 | ||
1e608388 ZW |
3135 | # How about lex? |
3136 | if test -f $srcdir/../flex/skel.c; then | |
3137 | FLEX='$(objdir)/../flex/flex' | |
3138 | else | |
3139 | # Extract the first word of "flex", so it can be a program name with args. | |
3140 | set dummy flex; ac_word=$2 | |
3141 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b21d216c | 3142 | echo "configure:3143: checking for $ac_word" >&5 |
1e608388 ZW |
3143 | if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then |
3144 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3145 | else | |
3146 | if test -n "$FLEX"; then | |
3147 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
3148 | else | |
3149 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3150 | ac_dummy="$PATH" | |
3151 | for ac_dir in $ac_dummy; do | |
3152 | test -z "$ac_dir" && ac_dir=. | |
3153 | if test -f $ac_dir/$ac_word; then | |
3154 | ac_cv_prog_FLEX="flex" | |
3155 | break | |
3156 | fi | |
3157 | done | |
3158 | IFS="$ac_save_ifs" | |
3159 | test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="false" | |
3160 | fi | |
3161 | fi | |
3162 | FLEX="$ac_cv_prog_FLEX" | |
3163 | if test -n "$FLEX"; then | |
3164 | echo "$ac_t""$FLEX" 1>&6 | |
3165 | else | |
3166 | echo "$ac_t""no" 1>&6 | |
3167 | fi | |
3168 | ||
3169 | fi | |
3170 | ||
3171 | # Bison? | |
3172 | # The -L switch is so bison can find its skeleton file. | |
3173 | if test -f $srcdir/../bison/bison.simple; then | |
3174 | BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/' | |
3175 | else | |
3176 | # Extract the first word of "bison", so it can be a program name with args. | |
3177 | set dummy bison; ac_word=$2 | |
3178 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b21d216c | 3179 | echo "configure:3180: checking for $ac_word" >&5 |
1e608388 ZW |
3180 | if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then |
3181 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3182 | else | |
3183 | if test -n "$BISON"; then | |
3184 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
3185 | else | |
3186 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3187 | ac_dummy="$PATH" | |
3188 | for ac_dir in $ac_dummy; do | |
3189 | test -z "$ac_dir" && ac_dir=. | |
3190 | if test -f $ac_dir/$ac_word; then | |
3191 | ac_cv_prog_BISON="bison" | |
3192 | break | |
3193 | fi | |
3194 | done | |
3195 | IFS="$ac_save_ifs" | |
3196 | test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="false" | |
3197 | fi | |
3198 | fi | |
3199 | BISON="$ac_cv_prog_BISON" | |
3200 | if test -n "$BISON"; then | |
3201 | echo "$ac_t""$BISON" 1>&6 | |
3202 | else | |
3203 | echo "$ac_t""no" 1>&6 | |
3204 | fi | |
3205 | ||
3206 | fi | |
3207 | ||
4e70264f ZW |
3208 | # These libraries may be used by collect2. |
3209 | # We may need a special search path to get them linked. | |
3210 | echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6 | |
b21d216c | 3211 | echo "configure:3212: checking for collect2 libraries" >&5 |
4e70264f ZW |
3212 | if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then |
3213 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3214 | else | |
3215 | save_LIBS="$LIBS" | |
7f2749d4 | 3216 | for libs in '' -lld -lmld \ |
4e70264f ZW |
3217 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
3218 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
3219 | do | |
3220 | LIBS="$libs" | |
3221 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 3222 | #line 3223 "configure" |
4e70264f ZW |
3223 | #include "confdefs.h" |
3224 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3225 | /* We use char because int might match the return type of a gcc2 | |
3226 | builtin and then its argument prototype would still apply. */ | |
3227 | char ldopen(); | |
3228 | ||
3229 | int main() { | |
3230 | ldopen() | |
3231 | ; return 0; } | |
3232 | EOF | |
b21d216c | 3233 | if { (eval echo configure:3234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4e70264f ZW |
3234 | rm -rf conftest* |
3235 | gcc_cv_collect2_libs="$libs"; break | |
3236 | else | |
3237 | echo "configure: failed program was:" >&5 | |
3238 | cat conftest.$ac_ext >&5 | |
3239 | fi | |
3240 | rm -f conftest* | |
3241 | done | |
3242 | LIBS="$save_LIBS" | |
3243 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
3244 | fi | |
3245 | ||
3246 | echo "$ac_t""$gcc_cv_collect2_libs" 1>&6 | |
3247 | case $gcc_cv_collect2_libs in | |
3248 | "none required") ;; | |
3249 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
3250 | esac | |
3251 | ||
3252 | ||
7f2749d4 RK |
3253 | # When building Ada code on Alpha, we need exc_resume which is usually in |
3254 | # -lexc. So test for it. | |
3255 | save_LIBS="$LIBS" | |
3256 | LIBS= | |
3257 | ||
3258 | echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6 | |
b21d216c | 3259 | echo "configure:3260: checking for library containing exc_resume" >&5 |
7f2749d4 RK |
3260 | if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then |
3261 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3262 | else | |
3263 | ac_func_search_save_LIBS="$LIBS" | |
3264 | ac_cv_search_exc_resume="no" | |
3265 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 3266 | #line 3267 "configure" |
7f2749d4 RK |
3267 | #include "confdefs.h" |
3268 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3269 | /* We use char because int might match the return type of a gcc2 | |
3270 | builtin and then its argument prototype would still apply. */ | |
3271 | char exc_resume(); | |
3272 | ||
3273 | int main() { | |
3274 | exc_resume() | |
3275 | ; return 0; } | |
3276 | EOF | |
b21d216c | 3277 | if { (eval echo configure:3278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7f2749d4 RK |
3278 | rm -rf conftest* |
3279 | ac_cv_search_exc_resume="none required" | |
3280 | else | |
3281 | echo "configure: failed program was:" >&5 | |
3282 | cat conftest.$ac_ext >&5 | |
3283 | fi | |
3284 | rm -f conftest* | |
3285 | test "$ac_cv_search_exc_resume" = "no" && for i in exc; do | |
3286 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3287 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 3288 | #line 3289 "configure" |
7f2749d4 RK |
3289 | #include "confdefs.h" |
3290 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3291 | /* We use char because int might match the return type of a gcc2 | |
3292 | builtin and then its argument prototype would still apply. */ | |
3293 | char exc_resume(); | |
3294 | ||
3295 | int main() { | |
3296 | exc_resume() | |
3297 | ; return 0; } | |
3298 | EOF | |
b21d216c | 3299 | if { (eval echo configure:3300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7f2749d4 RK |
3300 | rm -rf conftest* |
3301 | ac_cv_search_exc_resume="-l$i" | |
3302 | break | |
3303 | else | |
3304 | echo "configure: failed program was:" >&5 | |
3305 | cat conftest.$ac_ext >&5 | |
3306 | fi | |
3307 | rm -f conftest* | |
3308 | done | |
3309 | LIBS="$ac_func_search_save_LIBS" | |
3310 | fi | |
3311 | ||
3312 | echo "$ac_t""$ac_cv_search_exc_resume" 1>&6 | |
3313 | if test "$ac_cv_search_exc_resume" != "no"; then | |
3314 | test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS" | |
3315 | ||
3316 | else : | |
3317 | ||
3318 | fi | |
3319 | GNAT_LIBEXC="$LIBS" | |
3320 | LIBS="$save_LIBS" | |
3321 | ||
3322 | ||
890ad3ea | 3323 | # See if the stage1 system preprocessor understands the ANSI C |
4bc5fbd4 | 3324 | # preprocessor stringification operator. (Used by symcat.h.) |
890ad3ea KG |
3325 | |
3326 | ||
3327 | echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6 | |
b21d216c | 3328 | echo "configure:3329: checking for preprocessor stringizing operator" >&5 |
890ad3ea | 3329 | if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then |
76844337 RH |
3330 | echo $ac_n "(cached) $ac_c" 1>&6 |
3331 | else | |
3332 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 3333 | #line 3334 "configure" |
76844337 RH |
3334 | #include "confdefs.h" |
3335 | ||
890ad3ea KG |
3336 | #define x(y) #y |
3337 | ||
3338 | char *s = x(teststring); | |
3339 | ||
76844337 | 3340 | EOF |
890ad3ea KG |
3341 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
3342 | egrep "#teststring" >/dev/null 2>&1; then | |
76844337 | 3343 | rm -rf conftest* |
890ad3ea | 3344 | ac_cv_c_stringize=no |
76844337 | 3345 | else |
76844337 | 3346 | rm -rf conftest* |
890ad3ea | 3347 | ac_cv_c_stringize=yes |
76844337 RH |
3348 | fi |
3349 | rm -f conftest* | |
890ad3ea | 3350 | |
76844337 RH |
3351 | fi |
3352 | ||
890ad3ea KG |
3353 | if test "${ac_cv_c_stringize}" = yes |
3354 | then | |
3355 | cat >> confdefs.h <<\EOF | |
3356 | #define HAVE_STRINGIZE 1 | |
76844337 RH |
3357 | EOF |
3358 | ||
3359 | fi | |
890ad3ea KG |
3360 | echo "$ac_t""${ac_cv_c_stringize}" 1>&6 |
3361 | ||
76844337 | 3362 | |
956d6950 JL |
3363 | # Use <inttypes.h> only if it exists, |
3364 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
3365 | echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6 | |
b21d216c | 3366 | echo "configure:3367: checking for inttypes.h" >&5 |
956d6950 JL |
3367 | if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then |
3368 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3369 | else | |
3370 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 3371 | #line 3372 "configure" |
956d6950 JL |
3372 | #include "confdefs.h" |
3373 | #include <sys/types.h> | |
3374 | #include <inttypes.h> | |
3375 | int main() { | |
3376 | intmax_t i = -1; | |
3377 | ; return 0; } | |
3378 | EOF | |
b21d216c | 3379 | if { (eval echo configure:3380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
956d6950 | 3380 | rm -rf conftest* |
0056a9b5 | 3381 | gcc_cv_header_inttypes_h=yes |
956d6950 JL |
3382 | else |
3383 | echo "configure: failed program was:" >&5 | |
3384 | cat conftest.$ac_ext >&5 | |
3385 | rm -rf conftest* | |
3386 | gcc_cv_header_inttypes_h=no | |
3387 | fi | |
3388 | rm -f conftest* | |
3389 | fi | |
3390 | ||
3391 | echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6 | |
0056a9b5 KG |
3392 | if test $gcc_cv_header_inttypes_h = yes; then |
3393 | cat >> confdefs.h <<\EOF | |
3394 | #define HAVE_INTTYPES_H 1 | |
3395 | EOF | |
3396 | ||
3397 | fi | |
956d6950 | 3398 | |
c149cc37 | 3399 | |
475c267f | 3400 | for ac_func in strtoul bsearch popen times clock dup2 \ |
2e09e75a | 3401 | strchr strrchr kill getrlimit setrlimit atoll atoq \ |
54953b66 | 3402 | sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \ |
3b681e9d ZW |
3403 | fputs_unlocked fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \ |
3404 | lstat | |
956d6950 JL |
3405 | do |
3406 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b21d216c | 3407 | echo "configure:3408: checking for $ac_func" >&5 |
956d6950 JL |
3408 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3409 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3410 | else | |
3411 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 3412 | #line 3413 "configure" |
956d6950 JL |
3413 | #include "confdefs.h" |
3414 | /* System header to define __stub macros and hopefully few prototypes, | |
3415 | which can conflict with char $ac_func(); below. */ | |
3416 | #include <assert.h> | |
3417 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3418 | /* We use char because int might match the return type of a gcc2 | |
3419 | builtin and then its argument prototype would still apply. */ | |
3420 | char $ac_func(); | |
3421 | ||
3422 | int main() { | |
3423 | ||
3424 | /* The GNU C library defines this for functions which it implements | |
3425 | to always fail with ENOSYS. Some functions are actually named | |
3426 | something starting with __ and the normal name is an alias. */ | |
3427 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3428 | choke me | |
3429 | #else | |
99b09ff3 | 3430 | $ac_func(); |
956d6950 JL |
3431 | #endif |
3432 | ||
3433 | ; return 0; } | |
3434 | EOF | |
b21d216c | 3435 | if { (eval echo configure:3436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
956d6950 JL |
3436 | rm -rf conftest* |
3437 | eval "ac_cv_func_$ac_func=yes" | |
3438 | else | |
3439 | echo "configure: failed program was:" >&5 | |
3440 | cat conftest.$ac_ext >&5 | |
3441 | rm -rf conftest* | |
3442 | eval "ac_cv_func_$ac_func=no" | |
3443 | fi | |
3444 | rm -f conftest* | |
3445 | fi | |
3446 | ||
3447 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3448 | echo "$ac_t""yes" 1>&6 | |
3449 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3450 | cat >> confdefs.h <<EOF | |
3451 | #define $ac_tr_func 1 | |
3452 | EOF | |
3453 | ||
3454 | else | |
3455 | echo "$ac_t""no" 1>&6 | |
3456 | fi | |
3457 | done | |
3458 | ||
6885fc87 | 3459 | |
f12bc141 | 3460 | echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 |
b21d216c | 3461 | echo "configure:3462: checking for ssize_t" >&5 |
f12bc141 ZW |
3462 | if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then |
3463 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3464 | else | |
3465 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 3466 | #line 3467 "configure" |
f12bc141 ZW |
3467 | #include "confdefs.h" |
3468 | #include <sys/types.h> | |
3469 | #if STDC_HEADERS | |
3470 | #include <stdlib.h> | |
3471 | #include <stddef.h> | |
3472 | #endif | |
3473 | EOF | |
3474 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3475 | egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
3476 | rm -rf conftest* | |
cb65112a | 3477 | ac_cv_type_ssize_t=yes |
f12bc141 ZW |
3478 | else |
3479 | rm -rf conftest* | |
cb65112a | 3480 | ac_cv_type_ssize_t=no |
f12bc141 ZW |
3481 | fi |
3482 | rm -f conftest* | |
3483 | ||
3484 | fi | |
cb65112a AO |
3485 | echo "$ac_t""$ac_cv_type_ssize_t" 1>&6 |
3486 | if test $ac_cv_type_ssize_t = no; then | |
3487 | cat >> confdefs.h <<\EOF | |
f12bc141 ZW |
3488 | #define ssize_t int |
3489 | EOF | |
3490 | ||
3491 | fi | |
3492 | ||
0b9d02c6 | 3493 | |
e256b8b6 DA |
3494 | # Try to determine the array type of the second argument of getgroups |
3495 | # for the target system (int or gid_t). | |
3496 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 | |
b21d216c | 3497 | echo "configure:3498: checking for uid_t in sys/types.h" >&5 |
e256b8b6 DA |
3498 | if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then |
3499 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3500 | else | |
3501 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 3502 | #line 3503 "configure" |
e256b8b6 DA |
3503 | #include "confdefs.h" |
3504 | #include <sys/types.h> | |
3505 | EOF | |
3506 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3507 | egrep "uid_t" >/dev/null 2>&1; then | |
3508 | rm -rf conftest* | |
3509 | ac_cv_type_uid_t=yes | |
3510 | else | |
3511 | rm -rf conftest* | |
3512 | ac_cv_type_uid_t=no | |
3513 | fi | |
3514 | rm -f conftest* | |
3515 | ||
3516 | fi | |
3517 | ||
3518 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 | |
3519 | if test $ac_cv_type_uid_t = no; then | |
3520 | cat >> confdefs.h <<\EOF | |
3521 | #define uid_t int | |
3522 | EOF | |
3523 | ||
3524 | cat >> confdefs.h <<\EOF | |
3525 | #define gid_t int | |
3526 | EOF | |
3527 | ||
3528 | fi | |
3529 | ||
3530 | echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 | |
b21d216c | 3531 | echo "configure:3532: checking type of array argument to getgroups" >&5 |
e256b8b6 DA |
3532 | if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then |
3533 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3534 | else | |
3535 | if test "$cross_compiling" = yes; then | |
3536 | ac_cv_type_getgroups=cross | |
3537 | else | |
3538 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 3539 | #line 3540 "configure" |
e256b8b6 DA |
3540 | #include "confdefs.h" |
3541 | ||
3542 | /* Thanks to Mike Rendell for this test. */ | |
3543 | #include <sys/types.h> | |
3544 | #define NGID 256 | |
3545 | #undef MAX | |
3546 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
3547 | main() | |
3548 | { | |
3549 | gid_t gidset[NGID]; | |
3550 | int i, n; | |
3551 | union { gid_t gval; long lval; } val; | |
3552 | ||
3553 | val.lval = -1; | |
3554 | for (i = 0; i < NGID; i++) | |
3555 | gidset[i] = val.gval; | |
3556 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
3557 | gidset); | |
3558 | /* Exit non-zero if getgroups seems to require an array of ints. This | |
3559 | happens when gid_t is short but getgroups modifies an array of ints. */ | |
3560 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
3561 | } | |
3562 | ||
3563 | EOF | |
b21d216c | 3564 | if { (eval echo configure:3565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
e256b8b6 DA |
3565 | then |
3566 | ac_cv_type_getgroups=gid_t | |
3567 | else | |
3568 | echo "configure: failed program was:" >&5 | |
3569 | cat conftest.$ac_ext >&5 | |
3570 | rm -fr conftest* | |
3571 | ac_cv_type_getgroups=int | |
3572 | fi | |
3573 | rm -fr conftest* | |
3574 | fi | |
3575 | ||
3576 | if test $ac_cv_type_getgroups = cross; then | |
3577 | cat > conftest.$ac_ext <<EOF | |
b21d216c | 3578 | #line 3579 "configure" |
e256b8b6 DA |
3579 | #include "confdefs.h" |
3580 | #include <unistd.h> | |
3581 | EOF | |
3582 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3583 | egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then | |
3584 | rm -rf conftest* | |
3585 | ac_cv_type_getgroups=gid_t | |
3586 | else | |
3587 | rm -rf conftest* | |
3588 | ac_cv_type_getgroups=int | |
3589 | fi | |
3590 | rm -f conftest* | |
3591 | ||
3592 | fi | |
3593 | fi | |
3594 | ||
3595 | echo "$ac_t""$ac_cv_type_getgroups" 1>&6 | |
3596 | cat >> confdefs.h <<EOF | |
3597 | #define GETGROUPS_T $ac_cv_type_getgroups | |
3598 | EOF | |
3599 | ||
3600 | ||
3601 | if test "${target}" = "${build}"; then | |
3602 | TARGET_GETGROUPS_T=$ac_cv_type_getgroups | |
3603 | else | |
3604 | case "${target}" in | |
3605 | # This condition may need some tweaking. It should include all | |
3606 | # targets where the array type of the second argument of getgroups | |
3607 | # is int and the type of gid_t is not equivalent to int. | |
3608 | *-*-sunos* | *-*-ultrix*) | |
3609 | TARGET_GETGROUPS_T=int | |
3610 | ;; | |
3611 | *) | |
3612 | TARGET_GETGROUPS_T=gid_t | |
3613 | ;; | |
3614 | esac | |
3615 | fi | |
3616 | ||
3617 | ||
0a4b6309 | 3618 | echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6 |
06f0b04c | 3619 | echo "configure:3620: checking whether the printf functions support %p" >&5 |
0a4b6309 RL |
3620 | if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then |
3621 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3622 | else | |
3623 | if test "$cross_compiling" = yes; then | |
3624 | gcc_cv_func_printf_ptr=no | |
3625 | else | |
3626 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 3627 | #line 3628 "configure" |
0a4b6309 RL |
3628 | #include "confdefs.h" |
3629 | #include <stdio.h> | |
3630 | ||
86cf1cbd | 3631 | int main() |
0a4b6309 RL |
3632 | { |
3633 | char buf[64]; | |
3634 | char *p = buf, *q = NULL; | |
3635 | sprintf(buf, "%p", p); | |
3636 | sscanf(buf, "%p", &q); | |
86cf1cbd | 3637 | return (p != q); |
0a4b6309 RL |
3638 | } |
3639 | EOF | |
06f0b04c | 3640 | if { (eval echo configure:3641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
0a4b6309 RL |
3641 | then |
3642 | gcc_cv_func_printf_ptr=yes | |
3643 | else | |
3644 | echo "configure: failed program was:" >&5 | |
3645 | cat conftest.$ac_ext >&5 | |
3646 | rm -fr conftest* | |
3647 | gcc_cv_func_printf_ptr=no | |
3648 | fi | |
3649 | rm -fr conftest* | |
3650 | fi | |
3651 | ||
3652 | rm -f core core.* *.core | |
3653 | fi | |
3654 | ||
3655 | echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6 | |
3656 | if test $gcc_cv_func_printf_ptr = yes ; then | |
3657 | cat >> confdefs.h <<\EOF | |
3658 | #define HAVE_PRINTF_PTR 1 | |
3659 | EOF | |
3660 | ||
3661 | fi | |
3662 | ||
b27d2bd5 MK |
3663 | |
3664 | case "${host}" in | |
3665 | *-*-uwin*) | |
34fa3e7d MM |
3666 | { echo "configure: error: |
3667 | *** UWIN may not be used as a host platform because | |
3668 | *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; } | |
b27d2bd5 MK |
3669 | ;; |
3670 | esac | |
c375c43b | 3671 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
06f0b04c | 3672 | echo "configure:3673: checking for pid_t" >&5 |
c375c43b KG |
3673 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
3674 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3675 | else | |
3676 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 3677 | #line 3678 "configure" |
c375c43b KG |
3678 | #include "confdefs.h" |
3679 | #include <sys/types.h> | |
3680 | #if STDC_HEADERS | |
3681 | #include <stdlib.h> | |
3682 | #include <stddef.h> | |
3683 | #endif | |
3684 | EOF | |
3685 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
b27d2bd5 | 3686 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
c375c43b | 3687 | rm -rf conftest* |
cb65112a | 3688 | ac_cv_type_pid_t=yes |
c375c43b KG |
3689 | else |
3690 | rm -rf conftest* | |
cb65112a | 3691 | ac_cv_type_pid_t=no |
c375c43b KG |
3692 | fi |
3693 | rm -f conftest* | |
3694 | ||
3695 | fi | |
cb65112a AO |
3696 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
3697 | if test $ac_cv_type_pid_t = no; then | |
3698 | cat >> confdefs.h <<\EOF | |
c375c43b KG |
3699 | #define pid_t int |
3700 | EOF | |
3701 | ||
3702 | fi | |
3703 | ||
3704 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` | |
3705 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
06f0b04c | 3706 | echo "configure:3707: checking for vfork.h" >&5 |
c375c43b KG |
3707 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3708 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3709 | else | |
3710 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 3711 | #line 3712 "configure" |
c375c43b KG |
3712 | #include "confdefs.h" |
3713 | #include <vfork.h> | |
3714 | EOF | |
3715 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
06f0b04c | 3716 | { (eval echo configure:3717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 3717 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
c375c43b KG |
3718 | if test -z "$ac_err"; then |
3719 | rm -rf conftest* | |
3720 | eval "ac_cv_header_$ac_safe=yes" | |
3721 | else | |
3722 | echo "$ac_err" >&5 | |
3723 | echo "configure: failed program was:" >&5 | |
3724 | cat conftest.$ac_ext >&5 | |
3725 | rm -rf conftest* | |
3726 | eval "ac_cv_header_$ac_safe=no" | |
3727 | fi | |
3728 | rm -f conftest* | |
3729 | fi | |
3730 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3731 | echo "$ac_t""yes" 1>&6 | |
3732 | cat >> confdefs.h <<\EOF | |
3733 | #define HAVE_VFORK_H 1 | |
3734 | EOF | |
3735 | ||
3736 | else | |
3737 | echo "$ac_t""no" 1>&6 | |
3738 | fi | |
3739 | ||
3740 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 | |
06f0b04c | 3741 | echo "configure:3742: checking for working vfork" >&5 |
c375c43b KG |
3742 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
3743 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3744 | else | |
3745 | if test "$cross_compiling" = yes; then | |
3746 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
06f0b04c | 3747 | echo "configure:3748: checking for vfork" >&5 |
c375c43b KG |
3748 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
3749 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3750 | else | |
3751 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 3752 | #line 3753 "configure" |
c375c43b KG |
3753 | #include "confdefs.h" |
3754 | /* System header to define __stub macros and hopefully few prototypes, | |
3755 | which can conflict with char vfork(); below. */ | |
3756 | #include <assert.h> | |
3757 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3758 | /* We use char because int might match the return type of a gcc2 | |
3759 | builtin and then its argument prototype would still apply. */ | |
3760 | char vfork(); | |
3761 | ||
3762 | int main() { | |
3763 | ||
3764 | /* The GNU C library defines this for functions which it implements | |
3765 | to always fail with ENOSYS. Some functions are actually named | |
3766 | something starting with __ and the normal name is an alias. */ | |
3767 | #if defined (__stub_vfork) || defined (__stub___vfork) | |
3768 | choke me | |
3769 | #else | |
99b09ff3 | 3770 | vfork(); |
c375c43b KG |
3771 | #endif |
3772 | ||
3773 | ; return 0; } | |
3774 | EOF | |
06f0b04c | 3775 | if { (eval echo configure:3776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c375c43b KG |
3776 | rm -rf conftest* |
3777 | eval "ac_cv_func_vfork=yes" | |
3778 | else | |
3779 | echo "configure: failed program was:" >&5 | |
3780 | cat conftest.$ac_ext >&5 | |
3781 | rm -rf conftest* | |
3782 | eval "ac_cv_func_vfork=no" | |
3783 | fi | |
3784 | rm -f conftest* | |
3785 | fi | |
3786 | ||
3787 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then | |
3788 | echo "$ac_t""yes" 1>&6 | |
3789 | : | |
3790 | else | |
3791 | echo "$ac_t""no" 1>&6 | |
3792 | fi | |
3793 | ||
3794 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
3795 | else | |
3796 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 3797 | #line 3798 "configure" |
c375c43b KG |
3798 | #include "confdefs.h" |
3799 | /* Thanks to Paul Eggert for this test. */ | |
3800 | #include <stdio.h> | |
3801 | #include <sys/types.h> | |
3802 | #include <sys/stat.h> | |
3803 | #ifdef HAVE_UNISTD_H | |
3804 | #include <unistd.h> | |
3805 | #endif | |
3806 | #ifdef HAVE_VFORK_H | |
3807 | #include <vfork.h> | |
3808 | #endif | |
3809 | /* On some sparc systems, changes by the child to local and incoming | |
3810 | argument registers are propagated back to the parent. | |
3811 | The compiler is told about this with #include <vfork.h>, | |
3812 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
3813 | Test for this by using a static variable whose address | |
3814 | is put into a register that is clobbered by the vfork. */ | |
3815 | static | |
3816 | #ifdef __cplusplus | |
3817 | sparc_address_test (int arg) | |
3818 | #else | |
3819 | sparc_address_test (arg) int arg; | |
3820 | #endif | |
3821 | { | |
3822 | static pid_t child; | |
3823 | if (!child) { | |
3824 | child = vfork (); | |
3825 | if (child < 0) { | |
3826 | perror ("vfork"); | |
3827 | _exit(2); | |
3828 | } | |
3829 | if (!child) { | |
3830 | arg = getpid(); | |
3831 | write(-1, "", 0); | |
3832 | _exit (arg); | |
3833 | } | |
3834 | } | |
3835 | } | |
3836 | main() { | |
3837 | pid_t parent = getpid (); | |
3838 | pid_t child; | |
3839 | ||
3840 | sparc_address_test (); | |
3841 | ||
3842 | child = vfork (); | |
3843 | ||
3844 | if (child == 0) { | |
3845 | /* Here is another test for sparc vfork register problems. | |
3846 | This test uses lots of local variables, at least | |
3847 | as many local variables as main has allocated so far | |
3848 | including compiler temporaries. 4 locals are enough for | |
3849 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
3850 | A buggy compiler should reuse the register of parent | |
3851 | for one of the local variables, since it will think that | |
3852 | parent can't possibly be used any more in this routine. | |
3853 | Assigning to the local variable will thus munge parent | |
3854 | in the parent process. */ | |
3855 | pid_t | |
3856 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
3857 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
3858 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
3859 | use the same hardware register for all 8 local variables. */ | |
3860 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
3861 | || p != p5 || p != p6 || p != p7) | |
3862 | _exit(1); | |
3863 | ||
3864 | /* On some systems (e.g. IRIX 3.3), | |
3865 | vfork doesn't separate parent from child file descriptors. | |
3866 | If the child closes a descriptor before it execs or exits, | |
3867 | this munges the parent's descriptor as well. | |
3868 | Test for this by closing stdout in the child. */ | |
3869 | _exit(close(fileno(stdout)) != 0); | |
3870 | } else { | |
3871 | int status; | |
3872 | struct stat st; | |
3873 | ||
3874 | while (wait(&status) != child) | |
3875 | ; | |
3876 | exit( | |
3877 | /* Was there some problem with vforking? */ | |
3878 | child < 0 | |
3879 | ||
3880 | /* Did the child fail? (This shouldn't happen.) */ | |
3881 | || status | |
3882 | ||
3883 | /* Did the vfork/compiler bug occur? */ | |
3884 | || parent != getpid() | |
3885 | ||
3886 | /* Did the file descriptor bug occur? */ | |
3887 | || fstat(fileno(stdout), &st) != 0 | |
3888 | ); | |
3889 | } | |
3890 | } | |
3891 | EOF | |
06f0b04c | 3892 | if { (eval echo configure:3893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c375c43b KG |
3893 | then |
3894 | ac_cv_func_vfork_works=yes | |
3895 | else | |
3896 | echo "configure: failed program was:" >&5 | |
3897 | cat conftest.$ac_ext >&5 | |
3898 | rm -fr conftest* | |
3899 | ac_cv_func_vfork_works=no | |
3900 | fi | |
3901 | rm -fr conftest* | |
3902 | fi | |
3903 | ||
3904 | fi | |
3905 | ||
3906 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 | |
3907 | if test $ac_cv_func_vfork_works = no; then | |
3908 | cat >> confdefs.h <<\EOF | |
3909 | #define vfork fork | |
3910 | EOF | |
3911 | ||
3912 | fi | |
3913 | ||
81bf3d9e | 3914 | for ac_func in getpagesize |
0a4b6309 | 3915 | do |
81bf3d9e | 3916 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
06f0b04c | 3917 | echo "configure:3918: checking for $ac_func" >&5 |
81bf3d9e | 3918 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
0a4b6309 RL |
3919 | echo $ac_n "(cached) $ac_c" 1>&6 |
3920 | else | |
3921 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 3922 | #line 3923 "configure" |
0a4b6309 | 3923 | #include "confdefs.h" |
81bf3d9e RH |
3924 | /* System header to define __stub macros and hopefully few prototypes, |
3925 | which can conflict with char $ac_func(); below. */ | |
3926 | #include <assert.h> | |
3927 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3928 | /* We use char because int might match the return type of a gcc2 | |
3929 | builtin and then its argument prototype would still apply. */ | |
3930 | char $ac_func(); | |
8fa1f09f | 3931 | |
81bf3d9e RH |
3932 | int main() { |
3933 | ||
3934 | /* The GNU C library defines this for functions which it implements | |
3935 | to always fail with ENOSYS. Some functions are actually named | |
3936 | something starting with __ and the normal name is an alias. */ | |
3937 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3938 | choke me | |
c5c76735 | 3939 | #else |
99b09ff3 | 3940 | $ac_func(); |
c5c76735 JL |
3941 | #endif |
3942 | ||
c5c76735 JL |
3943 | ; return 0; } |
3944 | EOF | |
06f0b04c | 3945 | if { (eval echo configure:3946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c5c76735 | 3946 | rm -rf conftest* |
81bf3d9e | 3947 | eval "ac_cv_func_$ac_func=yes" |
c5c76735 JL |
3948 | else |
3949 | echo "configure: failed program was:" >&5 | |
3950 | cat conftest.$ac_ext >&5 | |
3951 | rm -rf conftest* | |
81bf3d9e | 3952 | eval "ac_cv_func_$ac_func=no" |
c5c76735 JL |
3953 | fi |
3954 | rm -f conftest* | |
3955 | fi | |
3956 | ||
81bf3d9e | 3957 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
c5c76735 | 3958 | echo "$ac_t""yes" 1>&6 |
81bf3d9e | 3959 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
c5c76735 | 3960 | cat >> confdefs.h <<EOF |
81bf3d9e | 3961 | #define $ac_tr_func 1 |
c5c76735 | 3962 | EOF |
81bf3d9e | 3963 | |
c5c76735 JL |
3964 | else |
3965 | echo "$ac_t""no" 1>&6 | |
3966 | fi | |
c5c76735 JL |
3967 | done |
3968 | ||
825b6926 ZW |
3969 | # The test program for the next two tests is the same except for one |
3970 | # set of ifdefs. | |
3971 | cat >ct-mmap.inc <<'EOF' | |
d2cabf16 | 3972 | #include <sys/types.h> |
81bf3d9e | 3973 | #include <sys/mman.h> |
825b6926 ZW |
3974 | #include <fcntl.h> |
3975 | #include <signal.h> | |
3976 | #include <setjmp.h> | |
3977 | #include <stdio.h> | |
0a4b6309 | 3978 | |
4c1331d6 DA |
3979 | #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON) |
3980 | # define MAP_ANONYMOUS MAP_ANON | |
3981 | #endif | |
3982 | ||
81bf3d9e RH |
3983 | /* This mess was copied from the GNU getpagesize.h. */ |
3984 | #ifndef HAVE_GETPAGESIZE | |
3985 | # ifdef HAVE_UNISTD_H | |
3986 | # include <unistd.h> | |
3987 | # endif | |
0a4b6309 | 3988 | |
81bf3d9e RH |
3989 | /* Assume that all systems that can run configure have sys/param.h. */ |
3990 | # ifndef HAVE_SYS_PARAM_H | |
3991 | # define HAVE_SYS_PARAM_H 1 | |
3992 | # endif | |
0a4b6309 | 3993 | |
81bf3d9e RH |
3994 | # ifdef _SC_PAGESIZE |
3995 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
3996 | # else /* no _SC_PAGESIZE */ | |
3997 | # ifdef HAVE_SYS_PARAM_H | |
3998 | # include <sys/param.h> | |
3999 | # ifdef EXEC_PAGESIZE | |
4000 | # define getpagesize() EXEC_PAGESIZE | |
4001 | # else /* no EXEC_PAGESIZE */ | |
4002 | # ifdef NBPG | |
4003 | # define getpagesize() NBPG * CLSIZE | |
4004 | # ifndef CLSIZE | |
4005 | # define CLSIZE 1 | |
4006 | # endif /* no CLSIZE */ | |
4007 | # else /* no NBPG */ | |
4008 | # ifdef NBPC | |
4009 | # define getpagesize() NBPC | |
4010 | # else /* no NBPC */ | |
4011 | # ifdef PAGESIZE | |
4012 | # define getpagesize() PAGESIZE | |
4013 | # endif /* PAGESIZE */ | |
4014 | # endif /* no NBPC */ | |
4015 | # endif /* no NBPG */ | |
4016 | # endif /* no EXEC_PAGESIZE */ | |
4017 | # else /* no HAVE_SYS_PARAM_H */ | |
4018 | # define getpagesize() 8192 /* punt totally */ | |
4019 | # endif /* no HAVE_SYS_PARAM_H */ | |
4020 | # endif /* no _SC_PAGESIZE */ | |
0a4b6309 | 4021 | |
81bf3d9e | 4022 | #endif /* no HAVE_GETPAGESIZE */ |
0a4b6309 | 4023 | |
825b6926 ZW |
4024 | #ifndef MAP_FAILED |
4025 | # define MAP_FAILED -1 | |
4c1331d6 | 4026 | #endif |
81bf3d9e | 4027 | |
825b6926 ZW |
4028 | #undef perror_exit |
4029 | #define perror_exit(str, val) \ | |
4030 | do { perror(str); exit(val); } while (0) | |
4031 | ||
4032 | /* Some versions of cygwin mmap require that munmap is called with the | |
4033 | same parameters as mmap. GCC expects that this is not the case. | |
4034 | Test for various forms of this problem. Warning - icky signal games. */ | |
4035 | ||
4036 | static sigset_t unblock_sigsegv; | |
4037 | static jmp_buf r; | |
4038 | static size_t pg; | |
4039 | static int devzero; | |
4040 | ||
4041 | static char * | |
4042 | anonmap (size) | |
4043 | size_t size; | |
4044 | { | |
4045 | #ifdef USE_MAP_ANON | |
4046 | return (char *) mmap (0, size, PROT_READ|PROT_WRITE, | |
4047 | MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); | |
4c1331d6 | 4048 | #else |
825b6926 ZW |
4049 | return (char *) mmap (0, size, PROT_READ|PROT_WRITE, |
4050 | MAP_PRIVATE, devzero, 0); | |
4c1331d6 | 4051 | #endif |
825b6926 ZW |
4052 | } |
4053 | ||
4054 | static void | |
4055 | sigsegv (unused) | |
4056 | int unused; | |
4057 | { | |
4058 | sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0); | |
4059 | longjmp (r, 1); | |
4060 | } | |
4061 | ||
4062 | /* Basic functionality test. */ | |
4063 | void | |
4064 | test_0 () | |
4065 | { | |
4066 | char *x = anonmap (pg); | |
4067 | if (x == (char *) MAP_FAILED) | |
4068 | perror_exit("test 0 mmap", 2); | |
81bf3d9e | 4069 | |
4acab94b | 4070 | *(int *)x += 1; |
81bf3d9e | 4071 | |
4acab94b | 4072 | if (munmap(x, pg) < 0) |
825b6926 ZW |
4073 | perror_exit("test 0 munmap", 3); |
4074 | } | |
4075 | ||
4076 | /* 1. If we map a 2-page region and unmap its second page, the first page | |
4077 | must remain. */ | |
4078 | static void | |
4079 | test_1 () | |
4080 | { | |
4081 | char *x = anonmap (pg * 2); | |
4082 | if (x == (char *)MAP_FAILED) | |
4083 | perror_exit ("test 1 mmap", 4); | |
4084 | ||
4085 | signal (SIGSEGV, sigsegv); | |
4086 | if (setjmp (r)) | |
4087 | perror_exit ("test 1 fault", 5); | |
4088 | ||
4089 | x[0] = 1; | |
4090 | x[pg] = 1; | |
4091 | ||
4092 | if (munmap (x + pg, pg) < 0) | |
4093 | perror_exit ("test 1 munmap 1", 6); | |
4094 | x[0] = 2; | |
4095 | ||
4096 | if (setjmp (r) == 0) | |
4097 | { | |
4098 | x[pg] = 1; | |
4099 | perror_exit ("test 1 no fault", 7); | |
4100 | } | |
4101 | if (munmap (x, pg) < 0) | |
4102 | perror_exit ("test 1 munmap 2", 8); | |
4103 | } | |
4104 | ||
4105 | /* 2. If we map a 2-page region and unmap its first page, the second | |
4106 | page must remain. */ | |
4107 | static void | |
4108 | test_2 () | |
4109 | { | |
4110 | char *x = anonmap (pg * 2); | |
4111 | if (x == (char *)MAP_FAILED) | |
4112 | perror_exit ("test 2 mmap", 9); | |
4113 | ||
4114 | signal (SIGSEGV, sigsegv); | |
4115 | if (setjmp (r)) | |
4116 | perror_exit ("test 2 fault", 10); | |
4117 | ||
4118 | x[0] = 1; | |
4119 | x[pg] = 1; | |
4120 | ||
4121 | if (munmap (x, pg) < 0) | |
4122 | perror_exit ("test 2 munmap 1", 11); | |
4123 | ||
4124 | x[pg] = 2; | |
4125 | ||
4126 | if (setjmp (r) == 0) | |
4127 | { | |
4128 | x[0] = 1; | |
4129 | perror_exit ("test 2 no fault", 12); | |
4130 | } | |
4131 | ||
4132 | if (munmap (x+pg, pg) < 0) | |
4133 | perror_exit ("test 2 munmap 2", 13); | |
4134 | } | |
4135 | ||
4136 | /* 3. If we map two adjacent 1-page regions and unmap them both with | |
4137 | one munmap, both must go away. | |
4138 | ||
4139 | Getting two adjacent 1-page regions with two mmap calls is slightly | |
4140 | tricky. All OS's tested skip over already-allocated blocks; therefore | |
4141 | we have been careful to unmap all allocated regions in previous tests. | |
4142 | HP/UX allocates pages backward in memory. No OS has yet been observed | |
4143 | to be so perverse as to leave unmapped space between consecutive calls | |
4144 | to mmap. */ | |
4145 | ||
4146 | static void | |
4147 | test_3 () | |
4148 | { | |
4149 | char *x, *y, *z; | |
4150 | ||
4151 | x = anonmap (pg); | |
4152 | if (x == (char *)MAP_FAILED) | |
4153 | perror_exit ("test 3 mmap 1", 14); | |
4154 | y = anonmap (pg); | |
4155 | if (y == (char *)MAP_FAILED) | |
4156 | perror_exit ("test 3 mmap 2", 15); | |
4157 | ||
4158 | if (y != x + pg) | |
4159 | { | |
4160 | if (y == x - pg) | |
4161 | z = y, y = x, x = z; | |
4162 | else | |
4163 | { | |
4164 | fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n", | |
4165 | (unsigned long)x, (unsigned long)y); | |
4166 | exit (16); | |
4167 | } | |
4168 | } | |
4169 | ||
4170 | signal (SIGSEGV, sigsegv); | |
4171 | if (setjmp (r)) | |
4172 | perror_exit ("test 3 fault", 17); | |
4173 | ||
4174 | x[0] = 1; | |
4175 | y[0] = 1; | |
4176 | ||
4177 | if (munmap (x, pg*2) < 0) | |
4178 | perror_exit ("test 3 munmap", 18); | |
4179 | ||
4180 | if (setjmp (r) == 0) | |
4181 | { | |
4182 | x[0] = 1; | |
4183 | perror_exit ("test 3 no fault 1", 19); | |
4184 | } | |
4185 | ||
4186 | signal (SIGSEGV, sigsegv); | |
4187 | if (setjmp (r) == 0) | |
4188 | { | |
4189 | y[0] = 1; | |
4190 | perror_exit ("test 3 no fault 2", 20); | |
4191 | } | |
4192 | } | |
4193 | ||
4194 | int | |
4195 | main () | |
4196 | { | |
4197 | sigemptyset (&unblock_sigsegv); | |
4198 | sigaddset (&unblock_sigsegv, SIGSEGV); | |
4199 | pg = getpagesize (); | |
4200 | #ifndef USE_MAP_ANON | |
4201 | devzero = open ("/dev/zero", O_RDWR); | |
4202 | if (devzero < 0) | |
4203 | perror_exit ("open /dev/zero", 1); | |
4204 | #endif | |
4205 | ||
4206 | test_0(); | |
4207 | test_1(); | |
4208 | test_2(); | |
4209 | test_3(); | |
81bf3d9e | 4210 | |
4acab94b AO |
4211 | exit(0); |
4212 | } | |
81bf3d9e | 4213 | EOF |
825b6926 ZW |
4214 | |
4215 | echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6 | |
06f0b04c | 4216 | echo "configure:4217: checking for working mmap from /dev/zero" >&5 |
825b6926 ZW |
4217 | if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then |
4218 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4219 | else | |
4220 | if test "$cross_compiling" = yes; then | |
4221 | # If this is not cygwin, and /dev/zero is a character device, it's probably | |
4222 | # safe to assume it works. | |
4223 | case "$host_os" in | |
4224 | cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;; | |
4225 | * ) if test -c /dev/zero | |
4226 | then ac_cv_func_mmap_dev_zero=yes | |
4227 | else ac_cv_func_mmap_dev_zero=no | |
4228 | fi ;; | |
4229 | esac | |
4230 | else | |
4231 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 4232 | #line 4233 "configure" |
825b6926 ZW |
4233 | #include "confdefs.h" |
4234 | #include "ct-mmap.inc" | |
4235 | EOF | |
06f0b04c | 4236 | if { (eval echo configure:4237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
825b6926 ZW |
4237 | then |
4238 | ac_cv_func_mmap_dev_zero=yes | |
4239 | else | |
4240 | echo "configure: failed program was:" >&5 | |
4241 | cat conftest.$ac_ext >&5 | |
4242 | rm -fr conftest* | |
4243 | if test $? -lt 4 | |
4244 | then ac_cv_func_mmap_dev_zero=no | |
4245 | else ac_cv_func_mmap_dev_zero=buggy | |
4246 | fi | |
4247 | fi | |
4248 | rm -fr conftest* | |
4249 | fi | |
4250 | ||
4251 | ||
4252 | fi | |
4253 | ||
4254 | echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6 | |
4255 | if test $ac_cv_func_mmap_dev_zero = yes; then | |
4256 | cat >> confdefs.h <<\EOF | |
4257 | #define HAVE_MMAP_DEV_ZERO 1 | |
4258 | EOF | |
4259 | ||
4260 | fi | |
4261 | ||
4262 | echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6 | |
06f0b04c | 4263 | echo "configure:4264: checking for working mmap with MAP_ANON(YMOUS)" >&5 |
825b6926 ZW |
4264 | if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then |
4265 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4266 | else | |
4267 | if test "$cross_compiling" = yes; then | |
4268 | # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works | |
4269 | # just because it's there. Some SCO Un*xen define it but don't implement it. | |
4270 | ac_cv_func_mmap_anon=no | |
4271 | else | |
4272 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 4273 | #line 4274 "configure" |
825b6926 ZW |
4274 | #include "confdefs.h" |
4275 | #define USE_MAP_ANON | |
4276 | #include "ct-mmap.inc" | |
4277 | EOF | |
06f0b04c | 4278 | if { (eval echo configure:4279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
81bf3d9e | 4279 | then |
825b6926 | 4280 | ac_cv_func_mmap_anon=yes |
81bf3d9e RH |
4281 | else |
4282 | echo "configure: failed program was:" >&5 | |
4283 | cat conftest.$ac_ext >&5 | |
4284 | rm -fr conftest* | |
825b6926 ZW |
4285 | if test $? -lt 4 |
4286 | then ac_cv_func_mmap_anon=no | |
4287 | else ac_cv_func_mmap_anon=buggy | |
4288 | fi | |
81bf3d9e RH |
4289 | fi |
4290 | rm -fr conftest* | |
4291 | fi | |
4292 | ||
825b6926 | 4293 | |
81bf3d9e RH |
4294 | fi |
4295 | ||
825b6926 ZW |
4296 | echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6 |
4297 | if test $ac_cv_func_mmap_anon = yes; then | |
81bf3d9e | 4298 | cat >> confdefs.h <<\EOF |
825b6926 | 4299 | #define HAVE_MMAP_ANON 1 |
81bf3d9e RH |
4300 | EOF |
4301 | ||
4302 | fi | |
825b6926 | 4303 | rm -f ct-mmap.inc |
81bf3d9e | 4304 | |
56f02b88 | 4305 | echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6 |
06f0b04c | 4306 | echo "configure:4307: checking for working mmap of a file" >&5 |
56f02b88 ZW |
4307 | if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then |
4308 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4309 | else | |
4310 | # Create a file one thousand bytes long. | |
4311 | for i in 1 2 3 4 5 6 7 8 9 0 | |
4312 | do for j in 1 2 3 4 5 6 7 8 9 0 | |
4313 | do echo $i $j xxxxx | |
4314 | done | |
4315 | done > conftestdata$$ | |
4316 | ||
4317 | if test "$cross_compiling" = yes; then | |
4318 | ac_cv_func_mmap_file=no | |
4319 | else | |
4320 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 4321 | #line 4322 "configure" |
56f02b88 ZW |
4322 | #include "confdefs.h" |
4323 | ||
4324 | /* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by | |
4325 | Richard Henderson and Alexandre Oliva. | |
4326 | Check whether read-only mmap of a plain file works. */ | |
4327 | #include <sys/types.h> | |
4328 | #include <sys/stat.h> | |
4329 | #include <fcntl.h> | |
4330 | #include <sys/mman.h> | |
4331 | ||
4332 | int main() | |
4333 | { | |
4334 | char *x; | |
4335 | int fd; | |
4336 | struct stat st; | |
4337 | ||
4338 | fd = open("conftestdata$$", O_RDONLY); | |
4339 | if (fd < 0) | |
4340 | exit(1); | |
4341 | ||
4342 | if (fstat (fd, &st)) | |
4343 | exit(2); | |
4344 | ||
4345 | x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); | |
4346 | if (x == (char *) -1) | |
4347 | exit(3); | |
4348 | ||
4349 | if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ') | |
4350 | exit(4); | |
4351 | ||
4352 | if (munmap(x, st.st_size) < 0) | |
4353 | exit(5); | |
4354 | ||
4355 | exit(0); | |
4356 | } | |
4357 | EOF | |
06f0b04c | 4358 | if { (eval echo configure:4359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
56f02b88 ZW |
4359 | then |
4360 | ac_cv_func_mmap_file=yes | |
4361 | else | |
4362 | echo "configure: failed program was:" >&5 | |
4363 | cat conftest.$ac_ext >&5 | |
4364 | rm -fr conftest* | |
4365 | ac_cv_func_mmap_file=no | |
4366 | fi | |
4367 | rm -fr conftest* | |
4368 | fi | |
4369 | ||
4370 | fi | |
4371 | ||
4372 | echo "$ac_t""$ac_cv_func_mmap_file" 1>&6 | |
4373 | if test $ac_cv_func_mmap_file = yes; then | |
4374 | cat >> confdefs.h <<\EOF | |
4375 | #define HAVE_MMAP_FILE 1 | |
4376 | EOF | |
4377 | ||
4378 | fi | |
4379 | ||
81bf3d9e | 4380 | |
f91abfce TT |
4381 | |
4382 | ||
4383 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
4384 | if test "${with_libiconv_prefix+set}" = set; then | |
4385 | withval="$with_libiconv_prefix" | |
4386 | ||
4387 | for dir in `echo "$withval" | tr : ' '`; do | |
4388 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
4389 | if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi | |
4390 | done | |
4391 | ||
4392 | fi | |
4393 | ||
4394 | ||
4395 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 | |
06f0b04c | 4396 | echo "configure:4397: checking for iconv" >&5 |
f91abfce TT |
4397 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
4398 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4399 | else | |
4400 | ||
4401 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
4402 | am_cv_lib_iconv=no | |
4403 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 4404 | #line 4405 "configure" |
f91abfce TT |
4405 | #include "confdefs.h" |
4406 | #include <stdlib.h> | |
4407 | #include <iconv.h> | |
4408 | int main() { | |
4409 | iconv_t cd = iconv_open("",""); | |
4410 | iconv(cd,NULL,NULL,NULL,NULL); | |
4411 | iconv_close(cd); | |
4412 | ; return 0; } | |
4413 | EOF | |
06f0b04c | 4414 | if { (eval echo configure:4415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
f91abfce TT |
4415 | rm -rf conftest* |
4416 | am_cv_func_iconv=yes | |
4417 | else | |
4418 | echo "configure: failed program was:" >&5 | |
4419 | cat conftest.$ac_ext >&5 | |
4420 | fi | |
4421 | rm -f conftest* | |
4422 | if test "$am_cv_func_iconv" != yes; then | |
4423 | am_save_LIBS="$LIBS" | |
4424 | LIBS="$LIBS -liconv" | |
4425 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 4426 | #line 4427 "configure" |
f91abfce TT |
4427 | #include "confdefs.h" |
4428 | #include <stdlib.h> | |
4429 | #include <iconv.h> | |
4430 | int main() { | |
4431 | iconv_t cd = iconv_open("",""); | |
4432 | iconv(cd,NULL,NULL,NULL,NULL); | |
4433 | iconv_close(cd); | |
4434 | ; return 0; } | |
4435 | EOF | |
06f0b04c | 4436 | if { (eval echo configure:4437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
f91abfce TT |
4437 | rm -rf conftest* |
4438 | am_cv_lib_iconv=yes | |
4439 | am_cv_func_iconv=yes | |
4440 | else | |
4441 | echo "configure: failed program was:" >&5 | |
4442 | cat conftest.$ac_ext >&5 | |
4443 | fi | |
4444 | rm -f conftest* | |
4445 | LIBS="$am_save_LIBS" | |
4446 | fi | |
4447 | ||
4448 | fi | |
4449 | ||
4450 | echo "$ac_t""$am_cv_func_iconv" 1>&6 | |
4451 | if test "$am_cv_func_iconv" = yes; then | |
4452 | cat >> confdefs.h <<\EOF | |
4453 | #define HAVE_ICONV 1 | |
4454 | EOF | |
4455 | ||
4456 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 | |
06f0b04c | 4457 | echo "configure:4458: checking for iconv declaration" >&5 |
f91abfce TT |
4458 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
4459 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4460 | else | |
4461 | ||
4462 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 4463 | #line 4464 "configure" |
f91abfce TT |
4464 | #include "confdefs.h" |
4465 | ||
4466 | #include <stdlib.h> | |
4467 | #include <iconv.h> | |
4468 | extern | |
4469 | #ifdef __cplusplus | |
4470 | "C" | |
4471 | #endif | |
4472 | #if defined(__STDC__) || defined(__cplusplus) | |
4473 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
4474 | #else | |
4475 | size_t iconv(); | |
4476 | #endif | |
4477 | ||
4478 | int main() { | |
4479 | ||
4480 | ; return 0; } | |
4481 | EOF | |
06f0b04c | 4482 | if { (eval echo configure:4483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
f91abfce TT |
4483 | rm -rf conftest* |
4484 | am_cv_proto_iconv_arg1="" | |
4485 | else | |
4486 | echo "configure: failed program was:" >&5 | |
4487 | cat conftest.$ac_ext >&5 | |
4488 | rm -rf conftest* | |
4489 | am_cv_proto_iconv_arg1="const" | |
4490 | fi | |
4491 | rm -f conftest* | |
4492 | 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);" | |
4493 | fi | |
4494 | ||
4495 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
4496 | echo "$ac_t""${ac_t:- | |
4497 | }$am_cv_proto_iconv" 1>&6 | |
4498 | cat >> confdefs.h <<EOF | |
4499 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
4500 | EOF | |
4501 | ||
4502 | fi | |
4503 | LIBICONV= | |
4504 | if test "$am_cv_lib_iconv" = yes; then | |
4505 | LIBICONV="-liconv" | |
4506 | fi | |
4507 | ||
4508 | ||
4509 | ||
86cf1cbd KG |
4510 | # We will need to find libiberty.h and ansidecl.h |
4511 | saved_CFLAGS="$CFLAGS" | |
4512 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
8e944909 | 4513 | for ac_func in getenv atol sbrk abort atof getcwd getwd \ |
3b681e9d ZW |
4514 | strsignal putc_unlocked fputs_unlocked fwrite_unlocked \ |
4515 | fprintf_unlocked strstr environ errno \ | |
c1800ec8 | 4516 | malloc realloc calloc free basename getopt clock |
81bf3d9e | 4517 | do |
f31e826b KG |
4518 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
4519 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 | |
06f0b04c | 4520 | echo "configure:4521: checking whether $ac_func is declared" >&5 |
f31e826b | 4521 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
81bf3d9e RH |
4522 | echo $ac_n "(cached) $ac_c" 1>&6 |
4523 | else | |
4524 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 4525 | #line 4526 "configure" |
81bf3d9e | 4526 | #include "confdefs.h" |
7afe8c41 KG |
4527 | #undef $ac_tr_decl |
4528 | #define $ac_tr_decl 1 | |
4529 | ||
d02af173 | 4530 | #include "ansidecl.h" |
86cf1cbd | 4531 | #include "system.h" |
f31e826b | 4532 | |
81bf3d9e | 4533 | int main() { |
86cf1cbd KG |
4534 | #ifndef $ac_func |
4535 | char *(*pfn) = (char *(*)) $ac_func ; | |
4536 | #endif | |
81bf3d9e RH |
4537 | ; return 0; } |
4538 | EOF | |
06f0b04c | 4539 | if { (eval echo configure:4540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
81bf3d9e | 4540 | rm -rf conftest* |
f31e826b | 4541 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e RH |
4542 | else |
4543 | echo "configure: failed program was:" >&5 | |
4544 | cat conftest.$ac_ext >&5 | |
4545 | rm -rf conftest* | |
f31e826b | 4546 | eval "gcc_cv_have_decl_$ac_func=no" |
81bf3d9e RH |
4547 | fi |
4548 | rm -f conftest* | |
4549 | fi | |
4550 | ||
f31e826b KG |
4551 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
4552 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF | |
86cf1cbd | 4553 | #define $ac_tr_decl 1 |
81bf3d9e | 4554 | EOF |
86cf1cbd | 4555 | |
81bf3d9e | 4556 | else |
f31e826b KG |
4557 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
4558 | #define $ac_tr_decl 0 | |
4559 | EOF | |
4560 | ||
81bf3d9e RH |
4561 | fi |
4562 | ||
4563 | done | |
86cf1cbd | 4564 | if test x = y ; then |
05e12634 | 4565 | cat >> confdefs.h <<\EOF |
f31e826b | 4566 | #define HAVE_DECL_GETENV 1 |
86cf1cbd | 4567 | EOF |
05e12634 | 4568 | cat >> confdefs.h <<\EOF |
f31e826b | 4569 | #define HAVE_DECL_ATOL 1 |
86cf1cbd | 4570 | EOF |
05e12634 | 4571 | cat >> confdefs.h <<\EOF |
f31e826b | 4572 | #define HAVE_DECL_SBRK 1 |
86cf1cbd | 4573 | EOF |
05e12634 | 4574 | cat >> confdefs.h <<\EOF |
f31e826b | 4575 | #define HAVE_DECL_ABORT 1 |
86cf1cbd | 4576 | EOF |
05e12634 | 4577 | cat >> confdefs.h <<\EOF |
f31e826b | 4578 | #define HAVE_DECL_ATOF 1 |
86cf1cbd | 4579 | EOF |
05e12634 | 4580 | cat >> confdefs.h <<\EOF |
f31e826b | 4581 | #define HAVE_DECL_GETCWD 1 |
86cf1cbd | 4582 | EOF |
05e12634 | 4583 | cat >> confdefs.h <<\EOF |
f31e826b | 4584 | #define HAVE_DECL_GETWD 1 |
86cf1cbd KG |
4585 | EOF |
4586 | \ | |
05e12634 | 4587 | cat >> confdefs.h <<\EOF |
f31e826b | 4588 | #define HAVE_DECL_STRSIGNAL 1 |
86cf1cbd | 4589 | EOF |
05e12634 | 4590 | cat >> confdefs.h <<\EOF |
f31e826b | 4591 | #define HAVE_DECL_PUTC_UNLOCKED 1 |
86cf1cbd | 4592 | EOF |
05e12634 | 4593 | cat >> confdefs.h <<\EOF |
f31e826b | 4594 | #define HAVE_DECL_FPUTS_UNLOCKED 1 |
3b681e9d ZW |
4595 | EOF |
4596 | cat >> confdefs.h <<\EOF | |
4597 | #define HAVE_DECL_FWRITE_UNLOCKED 1 | |
4598 | EOF | |
4599 | \ | |
4600 | cat >> confdefs.h <<\EOF | |
4601 | #define HAVE_DECL_FPRINTF_UNLOCKED 1 | |
86cf1cbd | 4602 | EOF |
05e12634 | 4603 | cat >> confdefs.h <<\EOF |
f31e826b | 4604 | #define HAVE_DECL_STRSTR 1 |
86cf1cbd | 4605 | EOF |
05e12634 | 4606 | cat >> confdefs.h <<\EOF |
f31e826b | 4607 | #define HAVE_DECL_ENVIRON 1 |
6c889b67 | 4608 | EOF |
05e12634 | 4609 | cat >> confdefs.h <<\EOF |
6c889b67 | 4610 | #define HAVE_DECL_ERRNO 1 |
86cf1cbd KG |
4611 | EOF |
4612 | \ | |
05e12634 | 4613 | cat >> confdefs.h <<\EOF |
f31e826b KG |
4614 | #define HAVE_DECL_MALLOC 1 |
4615 | EOF | |
05e12634 | 4616 | cat >> confdefs.h <<\EOF |
f31e826b | 4617 | #define HAVE_DECL_REALLOC 1 |
86cf1cbd | 4618 | EOF |
05e12634 | 4619 | cat >> confdefs.h <<\EOF |
f31e826b | 4620 | #define HAVE_DECL_CALLOC 1 |
86cf1cbd | 4621 | EOF |
05e12634 | 4622 | cat >> confdefs.h <<\EOF |
f31e826b | 4623 | #define HAVE_DECL_FREE 1 |
86cf1cbd | 4624 | EOF |
05e12634 | 4625 | cat >> confdefs.h <<\EOF |
f31e826b KG |
4626 | #define HAVE_DECL_BASENAME 1 |
4627 | EOF | |
05e12634 | 4628 | cat >> confdefs.h <<\EOF |
f31e826b | 4629 | #define HAVE_DECL_GETOPT 1 |
c1800ec8 | 4630 | EOF |
05e12634 | 4631 | cat >> confdefs.h <<\EOF |
c1800ec8 | 4632 | #define HAVE_DECL_CLOCK 1 |
81bf3d9e | 4633 | EOF |
81bf3d9e RH |
4634 | fi |
4635 | ||
81bf3d9e RH |
4636 | |
4637 | for ac_func in getrlimit setrlimit getrusage | |
4638 | do | |
f31e826b KG |
4639 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
4640 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 | |
06f0b04c | 4641 | echo "configure:4642: checking whether $ac_func is declared" >&5 |
f31e826b | 4642 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
81bf3d9e RH |
4643 | echo $ac_n "(cached) $ac_c" 1>&6 |
4644 | else | |
4645 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 4646 | #line 4647 "configure" |
81bf3d9e | 4647 | #include "confdefs.h" |
7afe8c41 KG |
4648 | #undef $ac_tr_decl |
4649 | #define $ac_tr_decl 1 | |
4650 | ||
d02af173 | 4651 | #include "ansidecl.h" |
86cf1cbd | 4652 | #include "system.h" |
81bf3d9e RH |
4653 | #ifdef HAVE_SYS_RESOURCE_H |
4654 | #include <sys/resource.h> | |
4655 | #endif | |
4656 | ||
f31e826b | 4657 | |
81bf3d9e | 4658 | int main() { |
86cf1cbd KG |
4659 | #ifndef $ac_func |
4660 | char *(*pfn) = (char *(*)) $ac_func ; | |
4661 | #endif | |
81bf3d9e RH |
4662 | ; return 0; } |
4663 | EOF | |
06f0b04c | 4664 | if { (eval echo configure:4665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
81bf3d9e | 4665 | rm -rf conftest* |
f31e826b | 4666 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e RH |
4667 | else |
4668 | echo "configure: failed program was:" >&5 | |
4669 | cat conftest.$ac_ext >&5 | |
4670 | rm -rf conftest* | |
f31e826b | 4671 | eval "gcc_cv_have_decl_$ac_func=no" |
81bf3d9e RH |
4672 | fi |
4673 | rm -f conftest* | |
4674 | fi | |
4675 | ||
f31e826b KG |
4676 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
4677 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF | |
86cf1cbd | 4678 | #define $ac_tr_decl 1 |
81bf3d9e | 4679 | EOF |
86cf1cbd | 4680 | |
81bf3d9e | 4681 | else |
f31e826b KG |
4682 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
4683 | #define $ac_tr_decl 0 | |
4684 | EOF | |
4685 | ||
81bf3d9e RH |
4686 | fi |
4687 | ||
4688 | done | |
86cf1cbd | 4689 | if test x = y ; then |
05e12634 | 4690 | cat >> confdefs.h <<\EOF |
f31e826b | 4691 | #define HAVE_DECL_GETRLIMIT 1 |
86cf1cbd | 4692 | EOF |
05e12634 | 4693 | cat >> confdefs.h <<\EOF |
f31e826b | 4694 | #define HAVE_DECL_SETRLIMIT 1 |
86cf1cbd | 4695 | EOF |
05e12634 | 4696 | cat >> confdefs.h <<\EOF |
f31e826b | 4697 | #define HAVE_DECL_GETRUSAGE 1 |
86cf1cbd KG |
4698 | EOF |
4699 | fi | |
4700 | ||
81bf3d9e | 4701 | |
c1800ec8 ZW |
4702 | for ac_func in times |
4703 | do | |
4704 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4705 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 | |
06f0b04c | 4706 | echo "configure:4707: checking whether $ac_func is declared" >&5 |
c1800ec8 ZW |
4707 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4708 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4709 | else | |
4710 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 4711 | #line 4712 "configure" |
c1800ec8 ZW |
4712 | #include "confdefs.h" |
4713 | #undef $ac_tr_decl | |
4714 | #define $ac_tr_decl 1 | |
4715 | ||
4716 | #include "ansidecl.h" | |
4717 | #include "system.h" | |
4718 | #ifdef HAVE_SYS_TIMES_H | |
4719 | #include <sys/times.h> | |
4720 | #endif | |
4721 | ||
4722 | ||
4723 | int main() { | |
4724 | #ifndef $ac_func | |
4725 | char *(*pfn) = (char *(*)) $ac_func ; | |
4726 | #endif | |
4727 | ; return 0; } | |
4728 | EOF | |
06f0b04c | 4729 | if { (eval echo configure:4730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c1800ec8 ZW |
4730 | rm -rf conftest* |
4731 | eval "gcc_cv_have_decl_$ac_func=yes" | |
4732 | else | |
4733 | echo "configure: failed program was:" >&5 | |
4734 | cat conftest.$ac_ext >&5 | |
4735 | rm -rf conftest* | |
4736 | eval "gcc_cv_have_decl_$ac_func=no" | |
4737 | fi | |
4738 | rm -f conftest* | |
4739 | fi | |
4740 | ||
4741 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
4742 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF | |
4743 | #define $ac_tr_decl 1 | |
4744 | EOF | |
4745 | ||
4746 | else | |
4747 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF | |
4748 | #define $ac_tr_decl 0 | |
4749 | EOF | |
4750 | ||
4751 | fi | |
4752 | ||
4753 | done | |
4754 | if test x = y ; then | |
05e12634 | 4755 | cat >> confdefs.h <<\EOF |
c1800ec8 ZW |
4756 | #define HAVE_DECL_TIMES 1 |
4757 | EOF | |
4758 | fi | |
4759 | ||
4760 | ||
4761 | # More time-related stuff. | |
4762 | echo $ac_n "checking for struct tms""... $ac_c" 1>&6 | |
06f0b04c | 4763 | echo "configure:4764: checking for struct tms" >&5 |
c1800ec8 ZW |
4764 | if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then |
4765 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4766 | else | |
4767 | ||
4768 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 4769 | #line 4770 "configure" |
c1800ec8 ZW |
4770 | #include "confdefs.h" |
4771 | ||
4772 | #include "ansidecl.h" | |
4773 | #include "system.h" | |
4774 | #ifdef HAVE_SYS_TIMES_H | |
4775 | #include <sys/times.h> | |
4776 | #endif | |
4777 | ||
4778 | int main() { | |
4779 | struct tms tms; | |
4780 | ; return 0; } | |
4781 | EOF | |
06f0b04c | 4782 | if { (eval echo configure:4783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c1800ec8 ZW |
4783 | rm -rf conftest* |
4784 | ac_cv_struct_tms=yes | |
4785 | else | |
4786 | echo "configure: failed program was:" >&5 | |
4787 | cat conftest.$ac_ext >&5 | |
4788 | rm -rf conftest* | |
4789 | ac_cv_struct_tms=no | |
4790 | fi | |
4791 | rm -f conftest* | |
4792 | fi | |
4793 | ||
4794 | echo "$ac_t""$ac_cv_struct_tms" 1>&6 | |
4795 | if test $ac_cv_struct_tms = yes; then | |
4796 | cat >> confdefs.h <<\EOF | |
4797 | #define HAVE_STRUCT_TMS 1 | |
4798 | EOF | |
4799 | ||
4800 | fi | |
4801 | ||
4802 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
4803 | # revisit after autoconf 2.50. | |
4804 | echo $ac_n "checking for clock_t""... $ac_c" 1>&6 | |
06f0b04c | 4805 | echo "configure:4806: checking for clock_t" >&5 |
c1800ec8 ZW |
4806 | if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then |
4807 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4808 | else | |
4809 | ||
4810 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 4811 | #line 4812 "configure" |
c1800ec8 ZW |
4812 | #include "confdefs.h" |
4813 | ||
4814 | #include "ansidecl.h" | |
4815 | #include "system.h" | |
4816 | ||
4817 | int main() { | |
4818 | clock_t x; | |
4819 | ; return 0; } | |
4820 | EOF | |
06f0b04c | 4821 | if { (eval echo configure:4822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c1800ec8 ZW |
4822 | rm -rf conftest* |
4823 | gcc_cv_type_clock_t=yes | |
4824 | else | |
4825 | echo "configure: failed program was:" >&5 | |
4826 | cat conftest.$ac_ext >&5 | |
4827 | rm -rf conftest* | |
4828 | gcc_cv_type_clock_t=no | |
4829 | fi | |
4830 | rm -f conftest* | |
4831 | fi | |
4832 | ||
4833 | echo "$ac_t""$gcc_cv_type_clock_t" 1>&6 | |
4834 | if test $gcc_cv_type_clock_t = yes; then | |
4835 | cat >> confdefs.h <<\EOF | |
4836 | #define HAVE_CLOCK_T 1 | |
4837 | EOF | |
4838 | ||
4839 | fi | |
4840 | ||
86cf1cbd KG |
4841 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
4842 | CFLAGS="$saved_CFLAGS" | |
81bf3d9e | 4843 | |
75923b2f MK |
4844 | # mkdir takes a single argument on some systems. |
4845 | echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6 | |
06f0b04c | 4846 | echo "configure:4847: checking if mkdir takes one argument" >&5 |
75923b2f MK |
4847 | if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then |
4848 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4849 | else | |
4850 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 4851 | #line 4852 "configure" |
75923b2f MK |
4852 | #include "confdefs.h" |
4853 | ||
4854 | #include <sys/types.h> | |
4855 | #ifdef HAVE_SYS_STAT_H | |
4856 | # include <sys/stat.h> | |
4857 | #endif | |
4858 | #ifdef HAVE_UNISTD_H | |
4859 | # include <unistd.h> | |
4860 | #endif | |
4861 | #ifdef HAVE_DIRECT_H | |
4862 | # include <direct.h> | |
4863 | #endif | |
4864 | int main() { | |
4865 | mkdir ("foo", 0); | |
4866 | ; return 0; } | |
4867 | EOF | |
06f0b04c | 4868 | if { (eval echo configure:4869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75923b2f MK |
4869 | rm -rf conftest* |
4870 | gcc_cv_mkdir_takes_one_arg=no | |
4871 | else | |
4872 | echo "configure: failed program was:" >&5 | |
4873 | cat conftest.$ac_ext >&5 | |
4874 | rm -rf conftest* | |
4875 | gcc_cv_mkdir_takes_one_arg=yes | |
4876 | fi | |
4877 | rm -f conftest* | |
4878 | fi | |
4879 | ||
4880 | echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6 | |
4881 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then | |
4882 | cat >> confdefs.h <<\EOF | |
4883 | #define MKDIR_TAKES_ONE_ARG 1 | |
4884 | EOF | |
4885 | ||
4886 | fi | |
4887 | ||
4888 | ||
861bb6c1 JL |
4889 | # File extensions |
4890 | manext='.1' | |
4891 | objext='.o' | |
4892 | ||
4893 | ||
4894 | ||
4895 | build_xm_file= | |
f6cb0e63 | 4896 | build_xm_defines= |
861bb6c1 JL |
4897 | build_install_headers_dir=install-headers-tar |
4898 | build_exeext= | |
4899 | host_xm_file= | |
f6cb0e63 | 4900 | host_xm_defines= |
861bb6c1 JL |
4901 | host_xmake_file= |
4902 | host_truncate_target= | |
6e26218f | 4903 | host_exeext= |
861bb6c1 JL |
4904 | |
4905 | # Decode the host machine, then the target machine. | |
4906 | # For the host machine, we save the xm_file variable as host_xm_file; | |
4907 | # then we decode the target machine and forget everything else | |
4908 | # that came from the host machine. | |
4909 | for machine in $build $host $target; do | |
61ed06c3 | 4910 | . ${srcdir}/config.gcc |
861bb6c1 JL |
4911 | done |
4912 | ||
4913 | extra_objs="${host_extra_objs} ${extra_objs}" | |
4914 | ||
4915 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 4916 | if test x"$tm_file" = x |
861bb6c1 JL |
4917 | then tm_file=$cpu_type/$cpu_type.h; fi |
4918 | ||
6b2adea9 | 4919 | if test x"$extra_headers" = x |
861bb6c1 JL |
4920 | then extra_headers=; fi |
4921 | ||
75bffa71 | 4922 | if test x$md_file = x |
e98e406f | 4923 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 4924 | |
75bffa71 | 4925 | if test x$out_file = x |
861bb6c1 JL |
4926 | then out_file=$cpu_type/$cpu_type.c; fi |
4927 | ||
75bffa71 | 4928 | if test x"$tmake_file" = x |
861bb6c1 JL |
4929 | then tmake_file=$cpu_type/t-$cpu_type |
4930 | fi | |
4931 | ||
90e6a802 | 4932 | if test x"$dwarf2" = xyes |
756ee602 | 4933 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
4934 | fi |
4935 | ||
75bffa71 | 4936 | if test x$float_format = x |
861bb6c1 JL |
4937 | then float_format=i64 |
4938 | fi | |
4939 | ||
027ea2a7 JW |
4940 | if test $float_format = none |
4941 | then float_h_file=Makefile.in | |
4942 | else float_h_file=float-$float_format.h | |
4943 | fi | |
4944 | ||
9fc9b82a | 4945 | # Handle cpp installation. |
3ecc3258 | 4946 | if test x$enable_cpp != xno |
9fc9b82a L |
4947 | then |
4948 | tmake_file="$tmake_file t-install-cpp" | |
4949 | fi | |
4950 | ||
861bb6c1 | 4951 | # Say what files are being used for the output code and MD file. |
11642c3a | 4952 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
4953 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
4954 | ||
11642c3a | 4955 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
4956 | # about them and drop them. |
4957 | ||
11642c3a ZW |
4958 | bx= |
4959 | for x in $build_xm_file; do | |
4960 | if test -f $srcdir/config/$x | |
4961 | then bx="$bx $x" | |
11642c3a ZW |
4962 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
4963 | fi | |
4964 | done | |
4965 | build_xm_file="$bx" | |
4966 | ||
4967 | hx= | |
4968 | for x in $host_xm_file; do | |
4969 | if test -f $srcdir/config/$x | |
4970 | then hx="$hx $x" | |
11642c3a ZW |
4971 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
4972 | fi | |
4973 | done | |
4974 | host_xm_file="$hx" | |
4975 | ||
4976 | tx= | |
4977 | for x in $xm_file; do | |
4978 | if test -f $srcdir/config/$x | |
4979 | then tx="$tx $x" | |
11642c3a ZW |
4980 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
4981 | fi | |
4982 | done | |
4983 | xm_file="$tx" | |
4984 | ||
861bb6c1 JL |
4985 | count=a |
4986 | for f in $tm_file; do | |
4987 | count=${count}x | |
4988 | done | |
75bffa71 | 4989 | if test $count = ax; then |
861bb6c1 JL |
4990 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
4991 | else | |
4992 | echo "Using the following target machine macro files:" | |
4993 | for f in $tm_file; do | |
4994 | echo " $srcdir/config/$f" | |
4995 | done | |
4996 | fi | |
4997 | ||
4998 | count=a | |
4999 | for f in $host_xm_file; do | |
5000 | count=${count}x | |
5001 | done | |
11642c3a ZW |
5002 | if test $count = a; then |
5003 | : | |
5004 | elif test $count = ax; then | |
861bb6c1 JL |
5005 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
5006 | else | |
5007 | echo "Using the following host machine macro files:" | |
5008 | for f in $host_xm_file; do | |
5009 | echo " $srcdir/config/$f" | |
5010 | done | |
5011 | fi | |
5012 | ||
75bffa71 | 5013 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
5014 | count=a |
5015 | for f in $build_xm_file; do | |
5016 | count=${count}x | |
5017 | done | |
11642c3a ZW |
5018 | if test $count = a; then |
5019 | : | |
5020 | elif test $count = ax; then | |
861bb6c1 JL |
5021 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
5022 | else | |
5023 | echo "Using the following build machine macro files:" | |
5024 | for f in $build_xm_file; do | |
5025 | echo " $srcdir/config/$f" | |
5026 | done | |
5027 | fi | |
5028 | fi | |
5029 | ||
75bffa71 ILT |
5030 | if test x$thread_file = x; then |
5031 | if test x$target_thread_file != x; then | |
a851212a JW |
5032 | thread_file=$target_thread_file |
5033 | else | |
5034 | thread_file='single' | |
5035 | fi | |
861bb6c1 JL |
5036 | fi |
5037 | ||
b7cb92ad | 5038 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 5039 | # the first file included by config.h. |
b7cb92ad | 5040 | # If host=build, it is correct to have hconfig include auto-host.h |
db81d74a RH |
5041 | # as well. If host!=build, we are in error and need to do more |
5042 | # work to find out the build config parameters. | |
75bffa71 | 5043 | if test x$host = x$build |
db81d74a | 5044 | then |
eaf4e618 | 5045 | build_auto=auto-host.h |
06f0b04c | 5046 | FORBUILD=.. |
b7cb92ad JL |
5047 | else |
5048 | # We create a subdir, then run autoconf in the subdir. | |
5049 | # To prevent recursion we set host and build for the new | |
5050 | # invocation of configure to the build for this invocation | |
5051 | # of configure. | |
5052 | tempdir=build.$$ | |
5053 | rm -rf $tempdir | |
5054 | mkdir $tempdir | |
5055 | cd $tempdir | |
5056 | case ${srcdir} in | |
255b8a49 | 5057 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
5058 | *) realsrcdir=../${srcdir};; |
5059 | esac | |
d920e825 L |
5060 | saved_CFLAGS="${CFLAGS}" |
5061 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
5062 | ${realsrcdir}/configure \ | |
b7cb92ad | 5063 | --target=$target --host=$build --build=$build |
d920e825 | 5064 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
5065 | |
5066 | # We just finished tests for the build machine, so rename | |
5067 | # the file auto-build.h in the gcc directory. | |
5068 | mv auto-host.h ../auto-build.h | |
5069 | cd .. | |
5070 | rm -rf $tempdir | |
eaf4e618 | 5071 | build_auto=auto-build.h |
06f0b04c | 5072 | FORBUILD=../$build |
db81d74a RH |
5073 | fi |
5074 | ||
06f0b04c | 5075 | |
eaf4e618 | 5076 | tm_file="${tm_file} defaults.h" |
d02af173 ZW |
5077 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file} ${tm_file}" |
5078 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file} ${tm_file}" | |
5079 | xm_file="ansidecl.h ${xm_file} ${tm_file}" | |
0056a9b5 | 5080 | |
861bb6c1 | 5081 | # Truncate the target if necessary |
75bffa71 | 5082 | if test x$host_truncate_target != x; then |
861bb6c1 JL |
5083 | target=`echo $target | sed -e 's/\(..............\).*/\1/'` |
5084 | fi | |
5085 | ||
f1943b77 | 5086 | # Get the version trigger filename from the toplevel |
75bffa71 | 5087 | if test "${with_gcc_version_trigger+set}" = set; then |
f1943b77 MH |
5088 | gcc_version_trigger=$with_gcc_version_trigger |
5089 | else | |
5090 | gcc_version_trigger=${srcdir}/version.c | |
5091 | fi | |
022dae81 | 5092 | gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'` |
8763704d | 5093 | gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` |
861bb6c1 | 5094 | |
cc1e60ea | 5095 | # Compile in configure arguments. |
8105825d | 5096 | if test -f configargs.h ; then |
cc1e60ea | 5097 | # Being re-configured. |
022dae81 | 5098 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
5099 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
5100 | else | |
5101 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
5102 | fi | |
5103 | cat > configargs.h <<EOF | |
5104 | /* Generated automatically. */ | |
5105 | static const char configuration_arguments[] = "$gcc_config_arguments"; | |
a6687d2b | 5106 | static const char thread_model[] = "$thread_file"; |
cc1e60ea JM |
5107 | EOF |
5108 | ||
ab87f8c8 JL |
5109 | # Internationalization |
5110 | PACKAGE=gcc | |
5111 | VERSION="$gcc_version" | |
5112 | cat >> confdefs.h <<EOF | |
5113 | #define PACKAGE "$PACKAGE" | |
5114 | EOF | |
861bb6c1 | 5115 | |
ab87f8c8 JL |
5116 | cat >> confdefs.h <<EOF |
5117 | #define VERSION "$VERSION" | |
5118 | EOF | |
861bb6c1 | 5119 | |
861bb6c1 | 5120 | |
ab87f8c8 JL |
5121 | |
5122 | ||
dc6746e7 | 5123 | # Enable NLS support by default |
ab87f8c8 JL |
5124 | # Check whether --enable-nls or --disable-nls was given. |
5125 | if test "${enable_nls+set}" = set; then | |
5126 | enableval="$enable_nls" | |
5127 | : | |
861bb6c1 | 5128 | else |
dc6746e7 | 5129 | enable_nls=yes |
861bb6c1 | 5130 | fi |
861bb6c1 | 5131 | |
861bb6c1 | 5132 | |
dc6746e7 PT |
5133 | # if cross compiling, disable NLS support. |
5134 | # It's not worth the trouble, at least for now. | |
5135 | ||
063a4b85 | 5136 | if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then |
dc6746e7 PT |
5137 | echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2 |
5138 | enable_nls=no | |
5139 | fi | |
5140 | ||
861bb6c1 | 5141 | |
71a94577 ZW |
5142 | |
5143 | echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6 | |
06f0b04c | 5144 | echo "configure:5145: checking for library containing strerror" >&5 |
71a94577 | 5145 | if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then |
ab87f8c8 JL |
5146 | echo $ac_n "(cached) $ac_c" 1>&6 |
5147 | else | |
71a94577 ZW |
5148 | ac_func_search_save_LIBS="$LIBS" |
5149 | ac_cv_search_strerror="no" | |
ab87f8c8 | 5150 | cat > conftest.$ac_ext <<EOF |
06f0b04c | 5151 | #line 5152 "configure" |
ab87f8c8 JL |
5152 | #include "confdefs.h" |
5153 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5154 | /* We use char because int might match the return type of a gcc2 | |
5155 | builtin and then its argument prototype would still apply. */ | |
5156 | char strerror(); | |
861bb6c1 | 5157 | |
ab87f8c8 JL |
5158 | int main() { |
5159 | strerror() | |
5160 | ; return 0; } | |
5161 | EOF | |
06f0b04c | 5162 | if { (eval echo configure:5163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 5163 | rm -rf conftest* |
71a94577 | 5164 | ac_cv_search_strerror="none required" |
ab87f8c8 JL |
5165 | else |
5166 | echo "configure: failed program was:" >&5 | |
5167 | cat conftest.$ac_ext >&5 | |
861bb6c1 | 5168 | fi |
ab87f8c8 | 5169 | rm -f conftest* |
71a94577 ZW |
5170 | test "$ac_cv_search_strerror" = "no" && for i in cposix; do |
5171 | LIBS="-l$i $ac_func_search_save_LIBS" | |
5172 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 5173 | #line 5174 "configure" |
71a94577 ZW |
5174 | #include "confdefs.h" |
5175 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5176 | /* We use char because int might match the return type of a gcc2 | |
5177 | builtin and then its argument prototype would still apply. */ | |
5178 | char strerror(); | |
861bb6c1 | 5179 | |
71a94577 ZW |
5180 | int main() { |
5181 | strerror() | |
5182 | ; return 0; } | |
5183 | EOF | |
06f0b04c | 5184 | if { (eval echo configure:5185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
71a94577 ZW |
5185 | rm -rf conftest* |
5186 | ac_cv_search_strerror="-l$i" | |
5187 | break | |
861bb6c1 | 5188 | else |
71a94577 ZW |
5189 | echo "configure: failed program was:" >&5 |
5190 | cat conftest.$ac_ext >&5 | |
5191 | fi | |
5192 | rm -f conftest* | |
5193 | done | |
5194 | LIBS="$ac_func_search_save_LIBS" | |
861bb6c1 JL |
5195 | fi |
5196 | ||
71a94577 ZW |
5197 | echo "$ac_t""$ac_cv_search_strerror" 1>&6 |
5198 | if test "$ac_cv_search_strerror" != "no"; then | |
5199 | test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" | |
5200 | ||
5201 | else : | |
5202 | ||
5203 | fi | |
ab87f8c8 | 5204 | |
2ce3c6c6 | 5205 | |
ab87f8c8 | 5206 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
06f0b04c | 5207 | echo "configure:5208: checking for working const" >&5 |
ab87f8c8 JL |
5208 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
5209 | echo $ac_n "(cached) $ac_c" 1>&6 | |
861bb6c1 | 5210 | else |
ab87f8c8 | 5211 | cat > conftest.$ac_ext <<EOF |
06f0b04c | 5212 | #line 5213 "configure" |
ab87f8c8 | 5213 | #include "confdefs.h" |
861bb6c1 | 5214 | |
ab87f8c8 JL |
5215 | int main() { |
5216 | ||
5217 | /* Ultrix mips cc rejects this. */ | |
130fadbb | 5218 | typedef int charset[2]; const charset x; |
ab87f8c8 JL |
5219 | /* SunOS 4.1.1 cc rejects this. */ |
5220 | char const *const *ccp; | |
5221 | char **p; | |
5222 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
5223 | struct point {int x, y;}; | |
5224 | static struct point const zero = {0,0}; | |
5225 | /* AIX XL C 1.02.0.0 rejects this. | |
5226 | It does not let you subtract one const X* pointer from another in an arm | |
5227 | of an if-expression whose if-part is not a constant expression */ | |
5228 | const char *g = "string"; | |
5229 | ccp = &g + (g ? g-g : 0); | |
5230 | /* HPUX 7.0 cc rejects these. */ | |
5231 | ++ccp; | |
5232 | p = (char**) ccp; | |
5233 | ccp = (char const *const *) p; | |
5234 | { /* SCO 3.2v4 cc rejects this. */ | |
5235 | char *t; | |
5236 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5237 | ||
5238 | *t++ = 0; | |
5239 | } | |
5240 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
5241 | int x[] = {25, 17}; | |
5242 | const int *foo = &x[0]; | |
5243 | ++foo; | |
5244 | } | |
5245 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
5246 | typedef const int *iptr; | |
5247 | iptr p = 0; | |
5248 | ++p; | |
5249 | } | |
5250 | { /* AIX XL C 1.02.0.0 rejects this saying | |
5251 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
5252 | struct s { int j; const int *ap[3]; }; | |
5253 | struct s *b; b->j = 5; | |
5254 | } | |
5255 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
5256 | const int foo = 10; | |
5257 | } | |
5258 | ||
5259 | ; return 0; } | |
5260 | EOF | |
06f0b04c | 5261 | if { (eval echo configure:5262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
ab87f8c8 JL |
5262 | rm -rf conftest* |
5263 | ac_cv_c_const=yes | |
861bb6c1 | 5264 | else |
ab87f8c8 JL |
5265 | echo "configure: failed program was:" >&5 |
5266 | cat conftest.$ac_ext >&5 | |
5267 | rm -rf conftest* | |
5268 | ac_cv_c_const=no | |
5269 | fi | |
5270 | rm -f conftest* | |
861bb6c1 JL |
5271 | fi |
5272 | ||
ab87f8c8 JL |
5273 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
5274 | if test $ac_cv_c_const = no; then | |
5275 | cat >> confdefs.h <<\EOF | |
5276 | #define const | |
5277 | EOF | |
5278 | ||
861bb6c1 JL |
5279 | fi |
5280 | ||
ab87f8c8 | 5281 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
06f0b04c | 5282 | echo "configure:5283: checking for off_t" >&5 |
ab87f8c8 JL |
5283 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
5284 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5285 | else | |
5286 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 5287 | #line 5288 "configure" |
ab87f8c8 JL |
5288 | #include "confdefs.h" |
5289 | #include <sys/types.h> | |
5290 | #if STDC_HEADERS | |
5291 | #include <stdlib.h> | |
5292 | #include <stddef.h> | |
5293 | #endif | |
5294 | EOF | |
5295 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
b27d2bd5 | 5296 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
ab87f8c8 | 5297 | rm -rf conftest* |
cb65112a | 5298 | ac_cv_type_off_t=yes |
ab87f8c8 JL |
5299 | else |
5300 | rm -rf conftest* | |
cb65112a | 5301 | ac_cv_type_off_t=no |
ab87f8c8 JL |
5302 | fi |
5303 | rm -f conftest* | |
5304 | ||
5305 | fi | |
cb65112a AO |
5306 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 |
5307 | if test $ac_cv_type_off_t = no; then | |
5308 | cat >> confdefs.h <<\EOF | |
ab87f8c8 JL |
5309 | #define off_t long |
5310 | EOF | |
5311 | ||
5312 | fi | |
5313 | ||
5314 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
06f0b04c | 5315 | echo "configure:5316: checking for size_t" >&5 |
ab87f8c8 JL |
5316 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
5317 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5318 | else | |
5319 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 5320 | #line 5321 "configure" |
ab87f8c8 JL |
5321 | #include "confdefs.h" |
5322 | #include <sys/types.h> | |
5323 | #if STDC_HEADERS | |
5324 | #include <stdlib.h> | |
5325 | #include <stddef.h> | |
5326 | #endif | |
5327 | EOF | |
5328 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
b27d2bd5 | 5329 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
ab87f8c8 | 5330 | rm -rf conftest* |
cb65112a | 5331 | ac_cv_type_size_t=yes |
ab87f8c8 JL |
5332 | else |
5333 | rm -rf conftest* | |
cb65112a | 5334 | ac_cv_type_size_t=no |
ab87f8c8 JL |
5335 | fi |
5336 | rm -f conftest* | |
5337 | ||
5338 | fi | |
cb65112a AO |
5339 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 |
5340 | if test $ac_cv_type_size_t = no; then | |
5341 | cat >> confdefs.h <<\EOF | |
ab87f8c8 JL |
5342 | #define size_t unsigned |
5343 | EOF | |
5344 | ||
5345 | fi | |
5346 | ||
71a94577 ZW |
5347 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
5348 | # for constant arguments. Useless! | |
5349 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
06f0b04c | 5350 | echo "configure:5351: checking for working alloca.h" >&5 |
71a94577 | 5351 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
ab87f8c8 JL |
5352 | echo $ac_n "(cached) $ac_c" 1>&6 |
5353 | else | |
5354 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 5355 | #line 5356 "configure" |
ab87f8c8 | 5356 | #include "confdefs.h" |
71a94577 ZW |
5357 | #include <alloca.h> |
5358 | int main() { | |
5359 | char *p = alloca(2 * sizeof(int)); | |
5360 | ; return 0; } | |
ab87f8c8 | 5361 | EOF |
06f0b04c | 5362 | if { (eval echo configure:5363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 5363 | rm -rf conftest* |
71a94577 | 5364 | ac_cv_header_alloca_h=yes |
ab87f8c8 | 5365 | else |
ab87f8c8 JL |
5366 | echo "configure: failed program was:" >&5 |
5367 | cat conftest.$ac_ext >&5 | |
5368 | rm -rf conftest* | |
71a94577 | 5369 | ac_cv_header_alloca_h=no |
ab87f8c8 JL |
5370 | fi |
5371 | rm -f conftest* | |
5372 | fi | |
71a94577 ZW |
5373 | |
5374 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
5375 | if test $ac_cv_header_alloca_h = yes; then | |
5376 | cat >> confdefs.h <<\EOF | |
5377 | #define HAVE_ALLOCA_H 1 | |
ab87f8c8 | 5378 | EOF |
71a94577 | 5379 | |
ab87f8c8 | 5380 | fi |
ab87f8c8 | 5381 | |
71a94577 | 5382 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 |
06f0b04c | 5383 | echo "configure:5384: checking for alloca" >&5 |
71a94577 | 5384 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
ab87f8c8 JL |
5385 | echo $ac_n "(cached) $ac_c" 1>&6 |
5386 | else | |
5387 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 5388 | #line 5389 "configure" |
ab87f8c8 | 5389 | #include "confdefs.h" |
ab87f8c8 | 5390 | |
71a94577 ZW |
5391 | #ifdef __GNUC__ |
5392 | # define alloca __builtin_alloca | |
ab87f8c8 | 5393 | #else |
71a94577 ZW |
5394 | # ifdef _MSC_VER |
5395 | # include <malloc.h> | |
5396 | # define alloca _alloca | |
5397 | # else | |
5398 | # if HAVE_ALLOCA_H | |
5399 | # include <alloca.h> | |
5400 | # else | |
5401 | # ifdef _AIX | |
5402 | #pragma alloca | |
5403 | # else | |
5404 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
5405 | char *alloca (); | |
5406 | # endif | |
5407 | # endif | |
5408 | # endif | |
5409 | # endif | |
ab87f8c8 JL |
5410 | #endif |
5411 | ||
71a94577 ZW |
5412 | int main() { |
5413 | char *p = (char *) alloca(1); | |
ab87f8c8 JL |
5414 | ; return 0; } |
5415 | EOF | |
06f0b04c | 5416 | if { (eval echo configure:5417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 5417 | rm -rf conftest* |
71a94577 | 5418 | ac_cv_func_alloca_works=yes |
ab87f8c8 JL |
5419 | else |
5420 | echo "configure: failed program was:" >&5 | |
5421 | cat conftest.$ac_ext >&5 | |
5422 | rm -rf conftest* | |
71a94577 | 5423 | ac_cv_func_alloca_works=no |
ab87f8c8 JL |
5424 | fi |
5425 | rm -f conftest* | |
5426 | fi | |
5427 | ||
71a94577 ZW |
5428 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 |
5429 | if test $ac_cv_func_alloca_works = yes; then | |
5430 | cat >> confdefs.h <<\EOF | |
5431 | #define HAVE_ALLOCA 1 | |
ab87f8c8 | 5432 | EOF |
71a94577 ZW |
5433 | |
5434 | fi | |
5435 | ||
5436 | if test $ac_cv_func_alloca_works = no; then | |
5437 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
5438 | # that cause trouble. Some versions do not even contain alloca or | |
5439 | # contain a buggy version. If you still want to use their alloca, | |
5440 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
5441 | ALLOCA=alloca.${ac_objext} | |
5442 | cat >> confdefs.h <<\EOF | |
5443 | #define C_ALLOCA 1 | |
5444 | EOF | |
5445 | ||
5446 | ||
5447 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
06f0b04c | 5448 | echo "configure:5449: checking whether alloca needs Cray hooks" >&5 |
71a94577 ZW |
5449 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
5450 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 5451 | else |
71a94577 | 5452 | cat > conftest.$ac_ext <<EOF |
06f0b04c | 5453 | #line 5454 "configure" |
71a94577 ZW |
5454 | #include "confdefs.h" |
5455 | #if defined(CRAY) && ! defined(CRAY2) | |
5456 | webecray | |
5457 | #else | |
5458 | wenotbecray | |
5459 | #endif | |
5460 | ||
5461 | EOF | |
5462 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5463 | egrep "webecray" >/dev/null 2>&1; then | |
5464 | rm -rf conftest* | |
5465 | ac_cv_os_cray=yes | |
5466 | else | |
5467 | rm -rf conftest* | |
5468 | ac_cv_os_cray=no | |
ab87f8c8 | 5469 | fi |
71a94577 | 5470 | rm -f conftest* |
ab87f8c8 | 5471 | |
71a94577 | 5472 | fi |
ab87f8c8 | 5473 | |
71a94577 ZW |
5474 | echo "$ac_t""$ac_cv_os_cray" 1>&6 |
5475 | if test $ac_cv_os_cray = yes; then | |
5476 | for ac_func in _getb67 GETB67 getb67; do | |
5477 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
06f0b04c | 5478 | echo "configure:5479: checking for $ac_func" >&5 |
ab87f8c8 JL |
5479 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5480 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5481 | else | |
5482 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 5483 | #line 5484 "configure" |
ab87f8c8 JL |
5484 | #include "confdefs.h" |
5485 | /* System header to define __stub macros and hopefully few prototypes, | |
5486 | which can conflict with char $ac_func(); below. */ | |
5487 | #include <assert.h> | |
5488 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5489 | /* We use char because int might match the return type of a gcc2 | |
5490 | builtin and then its argument prototype would still apply. */ | |
5491 | char $ac_func(); | |
5492 | ||
5493 | int main() { | |
5494 | ||
5495 | /* The GNU C library defines this for functions which it implements | |
5496 | to always fail with ENOSYS. Some functions are actually named | |
5497 | something starting with __ and the normal name is an alias. */ | |
5498 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5499 | choke me | |
5500 | #else | |
99b09ff3 | 5501 | $ac_func(); |
ab87f8c8 JL |
5502 | #endif |
5503 | ||
5504 | ; return 0; } | |
5505 | EOF | |
06f0b04c | 5506 | if { (eval echo configure:5507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 JL |
5507 | rm -rf conftest* |
5508 | eval "ac_cv_func_$ac_func=yes" | |
5509 | else | |
5510 | echo "configure: failed program was:" >&5 | |
5511 | cat conftest.$ac_ext >&5 | |
5512 | rm -rf conftest* | |
5513 | eval "ac_cv_func_$ac_func=no" | |
5514 | fi | |
5515 | rm -f conftest* | |
5516 | fi | |
5517 | ||
5518 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5519 | echo "$ac_t""yes" 1>&6 | |
ab87f8c8 | 5520 | cat >> confdefs.h <<EOF |
71a94577 | 5521 | #define CRAY_STACKSEG_END $ac_func |
ab87f8c8 | 5522 | EOF |
71a94577 ZW |
5523 | |
5524 | break | |
ab87f8c8 JL |
5525 | else |
5526 | echo "$ac_t""no" 1>&6 | |
5527 | fi | |
ab87f8c8 | 5528 | |
71a94577 ZW |
5529 | done |
5530 | fi | |
ab87f8c8 | 5531 | |
71a94577 | 5532 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 |
06f0b04c | 5533 | echo "configure:5534: checking stack direction for C alloca" >&5 |
71a94577 | 5534 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
ab87f8c8 | 5535 | echo $ac_n "(cached) $ac_c" 1>&6 |
71a94577 ZW |
5536 | else |
5537 | if test "$cross_compiling" = yes; then | |
5538 | ac_cv_c_stack_direction=0 | |
ab87f8c8 JL |
5539 | else |
5540 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 5541 | #line 5542 "configure" |
ab87f8c8 | 5542 | #include "confdefs.h" |
71a94577 ZW |
5543 | find_stack_direction () |
5544 | { | |
5545 | static char *addr = 0; | |
5546 | auto char dummy; | |
5547 | if (addr == 0) | |
5548 | { | |
5549 | addr = &dummy; | |
5550 | return find_stack_direction (); | |
5551 | } | |
5552 | else | |
5553 | return (&dummy > addr) ? 1 : -1; | |
5554 | } | |
5555 | main () | |
5556 | { | |
5557 | exit (find_stack_direction() < 0); | |
5558 | } | |
ab87f8c8 | 5559 | EOF |
06f0b04c | 5560 | if { (eval echo configure:5561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
71a94577 ZW |
5561 | then |
5562 | ac_cv_c_stack_direction=1 | |
ab87f8c8 JL |
5563 | else |
5564 | echo "configure: failed program was:" >&5 | |
5565 | cat conftest.$ac_ext >&5 | |
71a94577 ZW |
5566 | rm -fr conftest* |
5567 | ac_cv_c_stack_direction=-1 | |
ab87f8c8 | 5568 | fi |
71a94577 | 5569 | rm -fr conftest* |
ab87f8c8 JL |
5570 | fi |
5571 | ||
71a94577 ZW |
5572 | fi |
5573 | ||
5574 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
5575 | cat >> confdefs.h <<EOF | |
5576 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
ab87f8c8 JL |
5577 | EOF |
5578 | ||
ab87f8c8 JL |
5579 | fi |
5580 | ||
ab87f8c8 | 5581 | |
71a94577 | 5582 | echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6 |
06f0b04c | 5583 | echo "configure:5584: checking whether we are using the GNU C Library 2.1 or newer" >&5 |
71a94577 ZW |
5584 | if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then |
5585 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5586 | else | |
5587 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 5588 | #line 5589 "configure" |
71a94577 | 5589 | #include "confdefs.h" |
ab87f8c8 | 5590 | |
71a94577 ZW |
5591 | #include <features.h> |
5592 | #ifdef __GNU_LIBRARY__ | |
5593 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) | |
5594 | Lucky GNU user | |
5595 | #endif | |
5596 | #endif | |
5597 | ||
ab87f8c8 | 5598 | EOF |
71a94577 ZW |
5599 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
5600 | egrep "Lucky GNU user" >/dev/null 2>&1; then | |
5601 | rm -rf conftest* | |
5602 | ac_cv_gnu_library_2_1=yes | |
ab87f8c8 | 5603 | else |
71a94577 ZW |
5604 | rm -rf conftest* |
5605 | ac_cv_gnu_library_2_1=no | |
ab87f8c8 | 5606 | fi |
71a94577 | 5607 | rm -f conftest* |
ab87f8c8 | 5608 | |
71a94577 ZW |
5609 | |
5610 | ||
5611 | fi | |
ab87f8c8 | 5612 | |
71a94577 ZW |
5613 | echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6 |
5614 | ||
5615 | GLIBC21="$ac_cv_gnu_library_2_1" | |
5616 | ||
ab87f8c8 | 5617 | |
71a94577 ZW |
5618 | |
5619 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ | |
5620 | stdlib.h string.h unistd.h sys/param.h | |
5621 | do | |
5622 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5623 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
06f0b04c | 5624 | echo "configure:5625: checking for $ac_hdr" >&5 |
ab87f8c8 JL |
5625 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5626 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5627 | else | |
5628 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 5629 | #line 5630 "configure" |
ab87f8c8 | 5630 | #include "confdefs.h" |
71a94577 | 5631 | #include <$ac_hdr> |
ab87f8c8 JL |
5632 | EOF |
5633 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
06f0b04c | 5634 | { (eval echo configure:5635: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 5635 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
ab87f8c8 JL |
5636 | if test -z "$ac_err"; then |
5637 | rm -rf conftest* | |
5638 | eval "ac_cv_header_$ac_safe=yes" | |
5639 | else | |
5640 | echo "$ac_err" >&5 | |
5641 | echo "configure: failed program was:" >&5 | |
5642 | cat conftest.$ac_ext >&5 | |
5643 | rm -rf conftest* | |
5644 | eval "ac_cv_header_$ac_safe=no" | |
5645 | fi | |
5646 | rm -f conftest* | |
5647 | fi | |
5648 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5649 | echo "$ac_t""yes" 1>&6 | |
71a94577 ZW |
5650 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5651 | cat >> confdefs.h <<EOF | |
5652 | #define $ac_tr_hdr 1 | |
ab87f8c8 | 5653 | EOF |
71a94577 | 5654 | |
ab87f8c8 | 5655 | else |
71a94577 | 5656 | echo "$ac_t""no" 1>&6 |
ab87f8c8 | 5657 | fi |
71a94577 | 5658 | done |
ab87f8c8 | 5659 | |
71a94577 ZW |
5660 | for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \ |
5661 | getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \ | |
5662 | strdup strtoul tsearch __argz_count __argz_stringify __argz_next | |
5663 | do | |
5664 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
06f0b04c | 5665 | echo "configure:5666: checking for $ac_func" >&5 |
71a94577 | 5666 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
ab87f8c8 JL |
5667 | echo $ac_n "(cached) $ac_c" 1>&6 |
5668 | else | |
71a94577 | 5669 | cat > conftest.$ac_ext <<EOF |
06f0b04c | 5670 | #line 5671 "configure" |
ab87f8c8 | 5671 | #include "confdefs.h" |
71a94577 ZW |
5672 | /* System header to define __stub macros and hopefully few prototypes, |
5673 | which can conflict with char $ac_func(); below. */ | |
5674 | #include <assert.h> | |
ab87f8c8 JL |
5675 | /* Override any gcc2 internal prototype to avoid an error. */ |
5676 | /* We use char because int might match the return type of a gcc2 | |
5677 | builtin and then its argument prototype would still apply. */ | |
71a94577 | 5678 | char $ac_func(); |
ab87f8c8 JL |
5679 | |
5680 | int main() { | |
71a94577 ZW |
5681 | |
5682 | /* The GNU C library defines this for functions which it implements | |
5683 | to always fail with ENOSYS. Some functions are actually named | |
5684 | something starting with __ and the normal name is an alias. */ | |
5685 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5686 | choke me | |
5687 | #else | |
5688 | $ac_func(); | |
5689 | #endif | |
5690 | ||
ab87f8c8 JL |
5691 | ; return 0; } |
5692 | EOF | |
06f0b04c | 5693 | if { (eval echo configure:5694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 5694 | rm -rf conftest* |
71a94577 | 5695 | eval "ac_cv_func_$ac_func=yes" |
ab87f8c8 JL |
5696 | else |
5697 | echo "configure: failed program was:" >&5 | |
5698 | cat conftest.$ac_ext >&5 | |
5699 | rm -rf conftest* | |
71a94577 | 5700 | eval "ac_cv_func_$ac_func=no" |
ab87f8c8 JL |
5701 | fi |
5702 | rm -f conftest* | |
ab87f8c8 | 5703 | fi |
71a94577 ZW |
5704 | |
5705 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
ab87f8c8 | 5706 | echo "$ac_t""yes" 1>&6 |
71a94577 ZW |
5707 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
5708 | cat >> confdefs.h <<EOF | |
5709 | #define $ac_tr_func 1 | |
5710 | EOF | |
5711 | ||
ab87f8c8 | 5712 | else |
71a94577 ZW |
5713 | echo "$ac_t""no" 1>&6 |
5714 | fi | |
5715 | done | |
5716 | ||
5717 | ||
5718 | ||
5719 | ||
5720 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
5721 | if test "${with_libiconv_prefix+set}" = set; then | |
5722 | withval="$with_libiconv_prefix" | |
5723 | ||
5724 | for dir in `echo "$withval" | tr : ' '`; do | |
5725 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
5726 | if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi | |
5727 | done | |
5728 | ||
5729 | fi | |
ab87f8c8 | 5730 | |
71a94577 ZW |
5731 | |
5732 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 | |
06f0b04c | 5733 | echo "configure:5734: checking for iconv" >&5 |
71a94577 ZW |
5734 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
5735 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5736 | else | |
5737 | ||
5738 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
5739 | am_cv_lib_iconv=no | |
5740 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 5741 | #line 5742 "configure" |
71a94577 ZW |
5742 | #include "confdefs.h" |
5743 | #include <stdlib.h> | |
5744 | #include <iconv.h> | |
ab87f8c8 | 5745 | int main() { |
71a94577 ZW |
5746 | iconv_t cd = iconv_open("",""); |
5747 | iconv(cd,NULL,NULL,NULL,NULL); | |
5748 | iconv_close(cd); | |
ab87f8c8 JL |
5749 | ; return 0; } |
5750 | EOF | |
06f0b04c | 5751 | if { (eval echo configure:5752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 5752 | rm -rf conftest* |
71a94577 | 5753 | am_cv_func_iconv=yes |
ab87f8c8 JL |
5754 | else |
5755 | echo "configure: failed program was:" >&5 | |
5756 | cat conftest.$ac_ext >&5 | |
ab87f8c8 JL |
5757 | fi |
5758 | rm -f conftest* | |
71a94577 ZW |
5759 | if test "$am_cv_func_iconv" != yes; then |
5760 | am_save_LIBS="$LIBS" | |
5761 | LIBS="$LIBS -liconv" | |
5762 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 5763 | #line 5764 "configure" |
71a94577 ZW |
5764 | #include "confdefs.h" |
5765 | #include <stdlib.h> | |
5766 | #include <iconv.h> | |
5767 | int main() { | |
5768 | iconv_t cd = iconv_open("",""); | |
5769 | iconv(cd,NULL,NULL,NULL,NULL); | |
5770 | iconv_close(cd); | |
5771 | ; return 0; } | |
5772 | EOF | |
06f0b04c | 5773 | if { (eval echo configure:5774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
71a94577 ZW |
5774 | rm -rf conftest* |
5775 | am_cv_lib_iconv=yes | |
5776 | am_cv_func_iconv=yes | |
ab87f8c8 | 5777 | else |
71a94577 ZW |
5778 | echo "configure: failed program was:" >&5 |
5779 | cat conftest.$ac_ext >&5 | |
ab87f8c8 | 5780 | fi |
71a94577 ZW |
5781 | rm -f conftest* |
5782 | LIBS="$am_save_LIBS" | |
5783 | fi | |
5784 | ||
ab87f8c8 JL |
5785 | fi |
5786 | ||
71a94577 ZW |
5787 | echo "$ac_t""$am_cv_func_iconv" 1>&6 |
5788 | if test "$am_cv_func_iconv" = yes; then | |
5789 | cat >> confdefs.h <<\EOF | |
5790 | #define HAVE_ICONV 1 | |
5791 | EOF | |
5792 | ||
5793 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 | |
06f0b04c | 5794 | echo "configure:5795: checking for iconv declaration" >&5 |
71a94577 ZW |
5795 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
5796 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 5797 | else |
71a94577 ZW |
5798 | |
5799 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 5800 | #line 5801 "configure" |
71a94577 | 5801 | #include "confdefs.h" |
ab87f8c8 | 5802 | |
71a94577 ZW |
5803 | #include <stdlib.h> |
5804 | #include <iconv.h> | |
5805 | extern | |
5806 | #ifdef __cplusplus | |
5807 | "C" | |
5808 | #endif | |
5809 | #if defined(__STDC__) || defined(__cplusplus) | |
5810 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
5811 | #else | |
5812 | size_t iconv(); | |
5813 | #endif | |
ab87f8c8 | 5814 | |
71a94577 | 5815 | int main() { |
380a627a | 5816 | |
71a94577 | 5817 | ; return 0; } |
ab87f8c8 | 5818 | EOF |
06f0b04c | 5819 | if { (eval echo configure:5820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
71a94577 ZW |
5820 | rm -rf conftest* |
5821 | am_cv_proto_iconv_arg1="" | |
ab87f8c8 | 5822 | else |
71a94577 ZW |
5823 | echo "configure: failed program was:" >&5 |
5824 | cat conftest.$ac_ext >&5 | |
5825 | rm -rf conftest* | |
5826 | am_cv_proto_iconv_arg1="const" | |
ab87f8c8 | 5827 | fi |
71a94577 ZW |
5828 | rm -f conftest* |
5829 | 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 | 5830 | fi |
71a94577 ZW |
5831 | |
5832 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
5833 | echo "$ac_t""${ac_t:- | |
5834 | }$am_cv_proto_iconv" 1>&6 | |
5835 | cat >> confdefs.h <<EOF | |
5836 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
5837 | EOF | |
5838 | ||
5839 | fi | |
5840 | LIBICONV= | |
5841 | if test "$am_cv_lib_iconv" = yes; then | |
5842 | LIBICONV="-liconv" | |
5843 | fi | |
5844 | ||
5845 | ||
5846 | ||
5847 | echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6 | |
06f0b04c | 5848 | echo "configure:5849: checking for nl_langinfo and CODESET" >&5 |
71a94577 | 5849 | if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then |
ab87f8c8 JL |
5850 | echo $ac_n "(cached) $ac_c" 1>&6 |
5851 | else | |
5852 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 5853 | #line 5854 "configure" |
ab87f8c8 | 5854 | #include "confdefs.h" |
71a94577 | 5855 | #include <langinfo.h> |
ab87f8c8 | 5856 | int main() { |
71a94577 | 5857 | char* cs = nl_langinfo(CODESET); |
ab87f8c8 JL |
5858 | ; return 0; } |
5859 | EOF | |
06f0b04c | 5860 | if { (eval echo configure:5861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 5861 | rm -rf conftest* |
71a94577 | 5862 | am_cv_langinfo_codeset=yes |
ab87f8c8 JL |
5863 | else |
5864 | echo "configure: failed program was:" >&5 | |
5865 | cat conftest.$ac_ext >&5 | |
5866 | rm -rf conftest* | |
71a94577 | 5867 | am_cv_langinfo_codeset=no |
ab87f8c8 JL |
5868 | fi |
5869 | rm -f conftest* | |
71a94577 | 5870 | |
ab87f8c8 JL |
5871 | fi |
5872 | ||
71a94577 ZW |
5873 | echo "$ac_t""$am_cv_langinfo_codeset" 1>&6 |
5874 | if test $am_cv_langinfo_codeset = yes; then | |
5875 | cat >> confdefs.h <<\EOF | |
5876 | #define HAVE_LANGINFO_CODESET 1 | |
ab87f8c8 | 5877 | EOF |
ab87f8c8 | 5878 | |
71a94577 ZW |
5879 | fi |
5880 | ||
5881 | if test $ac_cv_header_locale_h = yes; then | |
5882 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
06f0b04c | 5883 | echo "configure:5884: checking for LC_MESSAGES" >&5 |
71a94577 | 5884 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
ab87f8c8 JL |
5885 | echo $ac_n "(cached) $ac_c" 1>&6 |
5886 | else | |
71a94577 | 5887 | cat > conftest.$ac_ext <<EOF |
06f0b04c | 5888 | #line 5889 "configure" |
71a94577 ZW |
5889 | #include "confdefs.h" |
5890 | #include <locale.h> | |
5891 | int main() { | |
5892 | return LC_MESSAGES | |
5893 | ; return 0; } | |
5894 | EOF | |
06f0b04c | 5895 | if { (eval echo configure:5896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
71a94577 ZW |
5896 | rm -rf conftest* |
5897 | am_cv_val_LC_MESSAGES=yes | |
5898 | else | |
5899 | echo "configure: failed program was:" >&5 | |
5900 | cat conftest.$ac_ext >&5 | |
5901 | rm -rf conftest* | |
5902 | am_cv_val_LC_MESSAGES=no | |
5903 | fi | |
5904 | rm -f conftest* | |
5905 | fi | |
5906 | ||
5907 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
5908 | if test $am_cv_val_LC_MESSAGES = yes; then | |
5909 | cat >> confdefs.h <<\EOF | |
5910 | #define HAVE_LC_MESSAGES 1 | |
5911 | EOF | |
5912 | ||
ab87f8c8 | 5913 | fi |
71a94577 ZW |
5914 | fi |
5915 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
06f0b04c | 5916 | echo "configure:5917: checking whether NLS is requested" >&5 |
71a94577 ZW |
5917 | # Check whether --enable-nls or --disable-nls was given. |
5918 | if test "${enable_nls+set}" = set; then | |
5919 | enableval="$enable_nls" | |
5920 | USE_NLS=$enableval | |
5921 | else | |
5922 | USE_NLS=yes | |
ab87f8c8 | 5923 | fi |
71a94577 ZW |
5924 | |
5925 | echo "$ac_t""$USE_NLS" 1>&6 | |
5926 | ||
5927 | ||
5928 | BUILD_INCLUDED_LIBINTL=no | |
5929 | USE_INCLUDED_LIBINTL=no | |
5930 | INTLLIBS= | |
77c06844 | 5931 | INTLDEPS= |
71a94577 ZW |
5932 | |
5933 | if test "$USE_NLS" = "yes"; then | |
5934 | cat >> confdefs.h <<\EOF | |
5935 | #define ENABLE_NLS 1 | |
5936 | EOF | |
5937 | ||
5938 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
06f0b04c | 5939 | echo "configure:5940: checking whether included gettext is requested" >&5 |
71a94577 ZW |
5940 | # Check whether --with-included-gettext or --without-included-gettext was given. |
5941 | if test "${with_included_gettext+set}" = set; then | |
5942 | withval="$with_included_gettext" | |
5943 | nls_cv_force_use_gnu_gettext=$withval | |
ab87f8c8 | 5944 | else |
71a94577 | 5945 | nls_cv_force_use_gnu_gettext=no |
ab87f8c8 JL |
5946 | fi |
5947 | ||
71a94577 ZW |
5948 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 |
5949 | ||
5950 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
5951 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
5952 | CATOBJEXT=NONE | |
5953 | ||
5954 | ||
5955 | ||
5956 | ||
5957 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
5958 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
06f0b04c | 5959 | echo "configure:5960: checking for libintl.h" >&5 |
71a94577 | 5960 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
ab87f8c8 JL |
5961 | echo $ac_n "(cached) $ac_c" 1>&6 |
5962 | else | |
71a94577 | 5963 | cat > conftest.$ac_ext <<EOF |
06f0b04c | 5964 | #line 5965 "configure" |
71a94577 ZW |
5965 | #include "confdefs.h" |
5966 | #include <libintl.h> | |
5967 | EOF | |
5968 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
06f0b04c | 5969 | { (eval echo configure:5970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
71a94577 ZW |
5970 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5971 | if test -z "$ac_err"; then | |
5972 | rm -rf conftest* | |
5973 | eval "ac_cv_header_$ac_safe=yes" | |
ab87f8c8 | 5974 | else |
71a94577 ZW |
5975 | echo "$ac_err" >&5 |
5976 | echo "configure: failed program was:" >&5 | |
5977 | cat conftest.$ac_ext >&5 | |
5978 | rm -rf conftest* | |
5979 | eval "ac_cv_header_$ac_safe=no" | |
ab87f8c8 | 5980 | fi |
71a94577 ZW |
5981 | rm -f conftest* |
5982 | fi | |
5983 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5984 | echo "$ac_t""yes" 1>&6 | |
191bf464 ZW |
5985 | cat >> confdefs.h <<\EOF |
5986 | #define HAVE_LIBINTL_H 1 | |
5987 | EOF | |
5988 | ||
5989 | echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6 | |
06f0b04c | 5990 | echo "configure:5991: checking for GNU gettext in libc" >&5 |
71a94577 ZW |
5991 | if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then |
5992 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5993 | else | |
5994 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 5995 | #line 5996 "configure" |
ab87f8c8 | 5996 | #include "confdefs.h" |
71a94577 | 5997 | #include <libintl.h> |
ab87f8c8 | 5998 | extern int _nl_msg_cat_cntr; |
71a94577 ZW |
5999 | int main() { |
6000 | bindtextdomain ("", ""); | |
6001 | return (int) gettext ("") + _nl_msg_cat_cntr | |
ab87f8c8 JL |
6002 | ; return 0; } |
6003 | EOF | |
06f0b04c | 6004 | if { (eval echo configure:6005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 6005 | rm -rf conftest* |
71a94577 | 6006 | gt_cv_func_gnugettext1_libc=yes |
ab87f8c8 JL |
6007 | else |
6008 | echo "configure: failed program was:" >&5 | |
6009 | cat conftest.$ac_ext >&5 | |
6010 | rm -rf conftest* | |
71a94577 | 6011 | gt_cv_func_gnugettext1_libc=no |
ab87f8c8 JL |
6012 | fi |
6013 | rm -f conftest* | |
ab87f8c8 JL |
6014 | fi |
6015 | ||
71a94577 | 6016 | echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6 |
ab87f8c8 | 6017 | |
71a94577 ZW |
6018 | if test "$gt_cv_func_gnugettext1_libc" != "yes"; then |
6019 | echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6 | |
06f0b04c | 6020 | echo "configure:6021: checking for GNU gettext in libintl" >&5 |
71a94577 | 6021 | if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then |
ab87f8c8 JL |
6022 | echo $ac_n "(cached) $ac_c" 1>&6 |
6023 | else | |
71a94577 ZW |
6024 | gt_save_LIBS="$LIBS" |
6025 | LIBS="$LIBS -lintl $LIBICONV" | |
6026 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 6027 | #line 6028 "configure" |
ab87f8c8 | 6028 | #include "confdefs.h" |
71a94577 ZW |
6029 | #include <libintl.h> |
6030 | extern int _nl_msg_cat_cntr; | |
ab87f8c8 | 6031 | int main() { |
71a94577 ZW |
6032 | bindtextdomain ("", ""); |
6033 | return (int) gettext ("") + _nl_msg_cat_cntr | |
ab87f8c8 JL |
6034 | ; return 0; } |
6035 | EOF | |
06f0b04c | 6036 | if { (eval echo configure:6037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 6037 | rm -rf conftest* |
71a94577 | 6038 | gt_cv_func_gnugettext1_libintl=yes |
ab87f8c8 JL |
6039 | else |
6040 | echo "configure: failed program was:" >&5 | |
6041 | cat conftest.$ac_ext >&5 | |
6042 | rm -rf conftest* | |
71a94577 | 6043 | gt_cv_func_gnugettext1_libintl=no |
ab87f8c8 JL |
6044 | fi |
6045 | rm -f conftest* | |
71a94577 | 6046 | LIBS="$gt_save_LIBS" |
ab87f8c8 | 6047 | fi |
71a94577 ZW |
6048 | |
6049 | echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6 | |
6050 | fi | |
6051 | ||
6052 | if test "$gt_cv_func_gnugettext1_libc" = "yes" \ | |
6053 | || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \ | |
6054 | && test "$PACKAGE" != gettext; }; then | |
6055 | cat >> confdefs.h <<\EOF | |
6056 | #define HAVE_GETTEXT 1 | |
ab87f8c8 JL |
6057 | EOF |
6058 | ||
ab87f8c8 | 6059 | |
71a94577 ZW |
6060 | if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then |
6061 | INTLLIBS="-lintl $LIBICONV" | |
6062 | fi | |
ab87f8c8 | 6063 | |
71a94577 ZW |
6064 | gt_save_LIBS="$LIBS" |
6065 | LIBS="$LIBS $INTLLIBS" | |
6066 | for ac_func in dcgettext | |
6067 | do | |
6068 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
06f0b04c | 6069 | echo "configure:6070: checking for $ac_func" >&5 |
71a94577 | 6070 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
ab87f8c8 JL |
6071 | echo $ac_n "(cached) $ac_c" 1>&6 |
6072 | else | |
6073 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 6074 | #line 6075 "configure" |
ab87f8c8 JL |
6075 | #include "confdefs.h" |
6076 | /* System header to define __stub macros and hopefully few prototypes, | |
71a94577 | 6077 | which can conflict with char $ac_func(); below. */ |
ab87f8c8 JL |
6078 | #include <assert.h> |
6079 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6080 | /* We use char because int might match the return type of a gcc2 | |
6081 | builtin and then its argument prototype would still apply. */ | |
71a94577 | 6082 | char $ac_func(); |
ab87f8c8 JL |
6083 | |
6084 | int main() { | |
6085 | ||
6086 | /* The GNU C library defines this for functions which it implements | |
6087 | to always fail with ENOSYS. Some functions are actually named | |
6088 | something starting with __ and the normal name is an alias. */ | |
71a94577 | 6089 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
ab87f8c8 JL |
6090 | choke me |
6091 | #else | |
71a94577 | 6092 | $ac_func(); |
ab87f8c8 JL |
6093 | #endif |
6094 | ||
6095 | ; return 0; } | |
6096 | EOF | |
06f0b04c | 6097 | if { (eval echo configure:6098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 6098 | rm -rf conftest* |
71a94577 | 6099 | eval "ac_cv_func_$ac_func=yes" |
ab87f8c8 JL |
6100 | else |
6101 | echo "configure: failed program was:" >&5 | |
6102 | cat conftest.$ac_ext >&5 | |
6103 | rm -rf conftest* | |
71a94577 | 6104 | eval "ac_cv_func_$ac_func=no" |
ab87f8c8 JL |
6105 | fi |
6106 | rm -f conftest* | |
6107 | fi | |
6108 | ||
71a94577 | 6109 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
ab87f8c8 | 6110 | echo "$ac_t""yes" 1>&6 |
71a94577 ZW |
6111 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
6112 | cat >> confdefs.h <<EOF | |
6113 | #define $ac_tr_func 1 | |
ab87f8c8 | 6114 | EOF |
71a94577 ZW |
6115 | |
6116 | else | |
6117 | echo "$ac_t""no" 1>&6 | |
6118 | fi | |
6119 | done | |
ab87f8c8 | 6120 | |
71a94577 ZW |
6121 | LIBS="$gt_save_LIBS" |
6122 | ||
6123 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
6124 | set dummy msgfmt; ac_word=$2 | |
ab87f8c8 | 6125 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
06f0b04c | 6126 | echo "configure:6127: checking for $ac_word" >&5 |
71a94577 | 6127 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
ab87f8c8 JL |
6128 | echo $ac_n "(cached) $ac_c" 1>&6 |
6129 | else | |
71a94577 | 6130 | case "$MSGFMT" in |
ab87f8c8 | 6131 | /*) |
71a94577 | 6132 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6133 | ;; |
6134 | *) | |
71a94577 ZW |
6135 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
6136 | for ac_dir in $PATH; do | |
ab87f8c8 JL |
6137 | test -z "$ac_dir" && ac_dir=. |
6138 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6139 | if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then |
6140 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
6141 | break | |
6142 | fi | |
ab87f8c8 JL |
6143 | fi |
6144 | done | |
6145 | IFS="$ac_save_ifs" | |
71a94577 | 6146 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" |
ab87f8c8 JL |
6147 | ;; |
6148 | esac | |
6149 | fi | |
71a94577 ZW |
6150 | MSGFMT="$ac_cv_path_MSGFMT" |
6151 | if test "$MSGFMT" != ":"; then | |
6152 | echo "$ac_t""$MSGFMT" 1>&6 | |
ab87f8c8 JL |
6153 | else |
6154 | echo "$ac_t""no" 1>&6 | |
6155 | fi | |
71a94577 ZW |
6156 | |
6157 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
ab87f8c8 JL |
6158 | set dummy gmsgfmt; ac_word=$2 |
6159 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
06f0b04c | 6160 | echo "configure:6161: checking for $ac_word" >&5 |
71a94577 | 6161 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
ab87f8c8 JL |
6162 | echo $ac_n "(cached) $ac_c" 1>&6 |
6163 | else | |
6164 | case "$GMSGFMT" in | |
6165 | /*) | |
71a94577 | 6166 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6167 | ;; |
6168 | ?:/*) | |
71a94577 | 6169 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. |
ab87f8c8 JL |
6170 | ;; |
6171 | *) | |
cd9e5e7c | 6172 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
6173 | ac_dummy="$PATH" |
6174 | for ac_dir in $ac_dummy; do | |
ab87f8c8 JL |
6175 | test -z "$ac_dir" && ac_dir=. |
6176 | if test -f $ac_dir/$ac_word; then | |
71a94577 | 6177 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" |
ab87f8c8 JL |
6178 | break |
6179 | fi | |
6180 | done | |
6181 | IFS="$ac_save_ifs" | |
71a94577 | 6182 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" |
ab87f8c8 JL |
6183 | ;; |
6184 | esac | |
6185 | fi | |
71a94577 | 6186 | GMSGFMT="$ac_cv_path_GMSGFMT" |
ab87f8c8 JL |
6187 | if test -n "$GMSGFMT"; then |
6188 | echo "$ac_t""$GMSGFMT" 1>&6 | |
6189 | else | |
6190 | echo "$ac_t""no" 1>&6 | |
6191 | fi | |
6192 | ||
ab87f8c8 | 6193 | |
71a94577 | 6194 | # Extract the first word of "xgettext", so it can be a program name with args. |
ab87f8c8 JL |
6195 | set dummy xgettext; ac_word=$2 |
6196 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
06f0b04c | 6197 | echo "configure:6198: checking for $ac_word" >&5 |
71a94577 | 6198 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
ab87f8c8 JL |
6199 | echo $ac_n "(cached) $ac_c" 1>&6 |
6200 | else | |
6201 | case "$XGETTEXT" in | |
6202 | /*) | |
71a94577 | 6203 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. |
ab87f8c8 JL |
6204 | ;; |
6205 | *) | |
6206 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6207 | for ac_dir in $PATH; do | |
6208 | test -z "$ac_dir" && ac_dir=. | |
6209 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6210 | if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then |
6211 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
ab87f8c8 JL |
6212 | break |
6213 | fi | |
6214 | fi | |
6215 | done | |
6216 | IFS="$ac_save_ifs" | |
71a94577 | 6217 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" |
ab87f8c8 JL |
6218 | ;; |
6219 | esac | |
6220 | fi | |
71a94577 ZW |
6221 | XGETTEXT="$ac_cv_path_XGETTEXT" |
6222 | if test "$XGETTEXT" != ":"; then | |
ab87f8c8 JL |
6223 | echo "$ac_t""$XGETTEXT" 1>&6 |
6224 | else | |
6225 | echo "$ac_t""no" 1>&6 | |
6226 | fi | |
6227 | ||
71a94577 ZW |
6228 | |
6229 | CATOBJEXT=.gmo | |
6230 | fi | |
6231 | ||
ab87f8c8 JL |
6232 | else |
6233 | echo "$ac_t""no" 1>&6 | |
6234 | fi | |
6235 | ||
ab87f8c8 JL |
6236 | |
6237 | if test "$CATOBJEXT" = "NONE"; then | |
6238 | nls_cv_use_gnu_gettext=yes | |
6239 | fi | |
6240 | fi | |
6241 | ||
6242 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
6243 | INTLOBJS="\$(GETTOBJS)" | |
6244 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
6245 | set dummy msgfmt; ac_word=$2 | |
6246 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
06f0b04c | 6247 | echo "configure:6248: checking for $ac_word" >&5 |
71a94577 | 6248 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
ab87f8c8 JL |
6249 | echo $ac_n "(cached) $ac_c" 1>&6 |
6250 | else | |
6251 | case "$MSGFMT" in | |
6252 | /*) | |
71a94577 | 6253 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6254 | ;; |
6255 | *) | |
6256 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6257 | for ac_dir in $PATH; do | |
6258 | test -z "$ac_dir" && ac_dir=. | |
6259 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6260 | if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then |
6261 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
ab87f8c8 JL |
6262 | break |
6263 | fi | |
6264 | fi | |
6265 | done | |
6266 | IFS="$ac_save_ifs" | |
71a94577 | 6267 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" |
ab87f8c8 JL |
6268 | ;; |
6269 | esac | |
6270 | fi | |
71a94577 ZW |
6271 | MSGFMT="$ac_cv_path_MSGFMT" |
6272 | if test "$MSGFMT" != ":"; then | |
ab87f8c8 JL |
6273 | echo "$ac_t""$MSGFMT" 1>&6 |
6274 | else | |
6275 | echo "$ac_t""no" 1>&6 | |
6276 | fi | |
6277 | ||
6278 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
6279 | set dummy gmsgfmt; ac_word=$2 | |
6280 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
06f0b04c | 6281 | echo "configure:6282: checking for $ac_word" >&5 |
71a94577 | 6282 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
ab87f8c8 JL |
6283 | echo $ac_n "(cached) $ac_c" 1>&6 |
6284 | else | |
6285 | case "$GMSGFMT" in | |
6286 | /*) | |
71a94577 | 6287 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6288 | ;; |
6289 | ?:/*) | |
71a94577 | 6290 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. |
ab87f8c8 JL |
6291 | ;; |
6292 | *) | |
cd9e5e7c | 6293 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
6294 | ac_dummy="$PATH" |
6295 | for ac_dir in $ac_dummy; do | |
ab87f8c8 JL |
6296 | test -z "$ac_dir" && ac_dir=. |
6297 | if test -f $ac_dir/$ac_word; then | |
71a94577 | 6298 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" |
ab87f8c8 JL |
6299 | break |
6300 | fi | |
6301 | done | |
6302 | IFS="$ac_save_ifs" | |
71a94577 | 6303 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" |
ab87f8c8 JL |
6304 | ;; |
6305 | esac | |
6306 | fi | |
71a94577 | 6307 | GMSGFMT="$ac_cv_path_GMSGFMT" |
ab87f8c8 JL |
6308 | if test -n "$GMSGFMT"; then |
6309 | echo "$ac_t""$GMSGFMT" 1>&6 | |
6310 | else | |
6311 | echo "$ac_t""no" 1>&6 | |
6312 | fi | |
6313 | ||
6314 | # Extract the first word of "xgettext", so it can be a program name with args. | |
6315 | set dummy xgettext; ac_word=$2 | |
6316 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
06f0b04c | 6317 | echo "configure:6318: checking for $ac_word" >&5 |
71a94577 | 6318 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
ab87f8c8 JL |
6319 | echo $ac_n "(cached) $ac_c" 1>&6 |
6320 | else | |
6321 | case "$XGETTEXT" in | |
6322 | /*) | |
71a94577 | 6323 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. |
ab87f8c8 JL |
6324 | ;; |
6325 | *) | |
6326 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6327 | for ac_dir in $PATH; do | |
6328 | test -z "$ac_dir" && ac_dir=. | |
6329 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6330 | if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then |
6331 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
ab87f8c8 JL |
6332 | break |
6333 | fi | |
6334 | fi | |
6335 | done | |
6336 | IFS="$ac_save_ifs" | |
71a94577 | 6337 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" |
ab87f8c8 JL |
6338 | ;; |
6339 | esac | |
6340 | fi | |
71a94577 ZW |
6341 | XGETTEXT="$ac_cv_path_XGETTEXT" |
6342 | if test "$XGETTEXT" != ":"; then | |
ab87f8c8 JL |
6343 | echo "$ac_t""$XGETTEXT" 1>&6 |
6344 | else | |
6345 | echo "$ac_t""no" 1>&6 | |
6346 | fi | |
6347 | ||
6348 | ||
71a94577 | 6349 | BUILD_INCLUDED_LIBINTL=yes |
ab87f8c8 JL |
6350 | USE_INCLUDED_LIBINTL=yes |
6351 | CATOBJEXT=.gmo | |
71a94577 | 6352 | INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV" |
77c06844 | 6353 | INTLDEPS="\$(top_builddir)/intl/libintl.a" |
71a94577 ZW |
6354 | LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` |
6355 | fi | |
6356 | ||
6357 | if test "$GMSGFMT" != ":"; then | |
6358 | if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then | |
6359 | : ; | |
6360 | else | |
6361 | echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6 | |
6362 | GMSGFMT=":" | |
6363 | fi | |
ab87f8c8 JL |
6364 | fi |
6365 | ||
71a94577 ZW |
6366 | if test "$XGETTEXT" != ":"; then |
6367 | if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then | |
ab87f8c8 JL |
6368 | : ; |
6369 | else | |
6370 | echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6 | |
6371 | XGETTEXT=":" | |
6372 | fi | |
6373 | fi | |
6374 | ||
71a94577 ZW |
6375 | POSUB=po |
6376 | fi | |
6377 | ||
17297c41 PT |
6378 | |
6379 | ||
71a94577 ZW |
6380 | if test "$PACKAGE" = gettext; then |
6381 | BUILD_INCLUDED_LIBINTL=yes | |
ab87f8c8 | 6382 | fi |
ab87f8c8 | 6383 | |
71a94577 ZW |
6384 | for ac_prog in bison |
6385 | do | |
6386 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
6387 | set dummy $ac_prog; ac_word=$2 | |
6388 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
06f0b04c | 6389 | echo "configure:6390: checking for $ac_word" >&5 |
71a94577 ZW |
6390 | if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then |
6391 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6392 | else | |
6393 | if test -n "$INTLBISON"; then | |
6394 | ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test. | |
6395 | else | |
6396 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
6397 | ac_dummy="$PATH" | |
6398 | for ac_dir in $ac_dummy; do | |
6399 | test -z "$ac_dir" && ac_dir=. | |
6400 | if test -f $ac_dir/$ac_word; then | |
6401 | ac_cv_prog_INTLBISON="$ac_prog" | |
6402 | break | |
6403 | fi | |
6404 | done | |
6405 | IFS="$ac_save_ifs" | |
6406 | fi | |
6407 | fi | |
6408 | INTLBISON="$ac_cv_prog_INTLBISON" | |
6409 | if test -n "$INTLBISON"; then | |
6410 | echo "$ac_t""$INTLBISON" 1>&6 | |
6411 | else | |
6412 | echo "$ac_t""no" 1>&6 | |
6413 | fi | |
6414 | ||
6415 | test -n "$INTLBISON" && break | |
6416 | done | |
ab87f8c8 | 6417 | |
71a94577 ZW |
6418 | if test -z "$INTLBISON"; then |
6419 | ac_verc_fail=yes | |
6420 | else | |
6421 | echo $ac_n "checking version of bison""... $ac_c" 1>&6 | |
06f0b04c | 6422 | echo "configure:6423: checking version of bison" >&5 |
71a94577 ZW |
6423 | ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` |
6424 | case $ac_prog_version in | |
6425 | '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; | |
6426 | 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) | |
6427 | ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; | |
6428 | *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; | |
6429 | esac | |
6430 | echo "$ac_t""$ac_prog_version" 1>&6 | |
6431 | fi | |
6432 | if test $ac_verc_fail = yes; then | |
6433 | INTLBISON=: | |
ab87f8c8 JL |
6434 | fi |
6435 | ||
ab87f8c8 | 6436 | |
9f6682b7 | 6437 | |
ab87f8c8 JL |
6438 | |
6439 | ||
6440 | ||
6441 | ||
6442 | ||
6443 | ||
77c06844 | 6444 | |
191bf464 ZW |
6445 | if test $USE_INCLUDED_LIBINTL = yes; then |
6446 | cat >> confdefs.h <<\EOF | |
6447 | #define USE_INCLUDED_LIBINTL 1 | |
6448 | EOF | |
6449 | ||
6450 | fi | |
71a94577 ZW |
6451 | |
6452 | nls_cv_header_intl= | |
6453 | nls_cv_header_libgt= | |
6454 | ||
6455 | DATADIRNAME=share | |
ab87f8c8 | 6456 | |
71a94577 ZW |
6457 | |
6458 | INSTOBJEXT=.mo | |
ab87f8c8 | 6459 | |
ab87f8c8 | 6460 | |
71a94577 ZW |
6461 | GENCAT=gencat |
6462 | ||
6463 | ||
9fdf713f | 6464 | |
9f6682b7 ZW |
6465 | if test "x$CATOBJEXT" != x; then |
6466 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
06f0b04c | 6467 | echo "configure:6468: checking for catalogs to be installed" >&5 |
9f6682b7 ZW |
6468 | # Look for .po and .gmo files in the source directory. |
6469 | CATALOGS= | |
6470 | XLINGUAS= | |
6471 | for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do | |
6472 | # If there aren't any .gmo files the shell will give us the | |
6473 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
6474 | # weeded out. | |
6475 | case "$cat" in *\**) | |
6476 | continue;; | |
6477 | esac | |
6478 | # The quadruple backslash is collapsed to a double backslash | |
6479 | # by the backticks, then collapsed again by the double quotes, | |
6480 | # leaving us with one backslash in the sed expression (right | |
6481 | # before the dot that mustn't act as a wildcard). The dot to | |
6482 | # be escaped in the second expression is hiding inside CATOBJEXT. | |
6483 | cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"` | |
6484 | lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"` | |
6485 | # The user is allowed to set LINGUAS to a list of languages to | |
6486 | # install catalogs for. If it's empty that means "all of them." | |
6487 | if test "x$LINGUAS" = x; then | |
6488 | CATALOGS="$CATALOGS $cat" | |
6489 | XLINGUAS="$XLINGUAS $lang" | |
6490 | else | |
6491 | case "$LINGUAS" in *$lang*) | |
6492 | CATALOGS="$CATALOGS $cat" | |
6493 | XLINGUAS="$XLINGUAS $lang" | |
6494 | ;; | |
6495 | esac | |
6496 | fi | |
6497 | done | |
6498 | LINGUAS="$XLINGUAS" | |
6499 | echo "$ac_t""$LINGUAS" 1>&6 | |
ab87f8c8 JL |
6500 | fi |
6501 | ||
ab87f8c8 JL |
6502 | MKINSTALLDIRS= |
6503 | if test -n "$ac_aux_dir"; then | |
6504 | MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" | |
6505 | fi | |
6506 | if test -z "$MKINSTALLDIRS"; then | |
6507 | MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" | |
6508 | fi | |
6509 | ||
6510 | ||
71a94577 | 6511 | INTL_LIBTOOL_SUFFIX_PREFIX= |
ab87f8c8 | 6512 | |
ab87f8c8 | 6513 | |
ab87f8c8 | 6514 | |
f4ab28e3 MK |
6515 | # Windows32 Registry support for specifying GCC installation paths. |
6516 | # Check whether --enable-win32-registry or --disable-win32-registry was given. | |
6517 | if test "${enable_win32_registry+set}" = set; then | |
6518 | enableval="$enable_win32_registry" | |
6519 | : | |
6520 | fi | |
6521 | ||
4e70264f ZW |
6522 | case $host_os in |
6523 | win32 | pe | cygwin* | mingw32* | uwin*) | |
f4ab28e3 | 6524 | echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6 |
06f0b04c | 6525 | echo "configure:6526: checking whether windows registry support is requested" >&5 |
9dd53f2c | 6526 | if test "x$enable_win32_registry" != xno; then |
f4ab28e3 MK |
6527 | cat >> confdefs.h <<\EOF |
6528 | #define ENABLE_WIN32_REGISTRY 1 | |
6529 | EOF | |
6530 | ||
6531 | echo "$ac_t""yes" 1>&6 | |
4e70264f ZW |
6532 | |
6533 | echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6 | |
06f0b04c | 6534 | echo "configure:6535: checking for library containing RegOpenKeyExA" >&5 |
4e70264f ZW |
6535 | if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then |
6536 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6537 | else | |
6538 | ac_func_search_save_LIBS="$LIBS" | |
6539 | ac_cv_search_RegOpenKeyExA="no" | |
6540 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 6541 | #line 6542 "configure" |
4e70264f ZW |
6542 | #include "confdefs.h" |
6543 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6544 | /* We use char because int might match the return type of a gcc2 | |
6545 | builtin and then its argument prototype would still apply. */ | |
6546 | char RegOpenKeyExA(); | |
6547 | ||
6548 | int main() { | |
6549 | RegOpenKeyExA() | |
6550 | ; return 0; } | |
6551 | EOF | |
06f0b04c | 6552 | if { (eval echo configure:6553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4e70264f ZW |
6553 | rm -rf conftest* |
6554 | ac_cv_search_RegOpenKeyExA="none required" | |
6555 | else | |
6556 | echo "configure: failed program was:" >&5 | |
6557 | cat conftest.$ac_ext >&5 | |
6558 | fi | |
6559 | rm -f conftest* | |
6560 | test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do | |
6561 | LIBS="-l$i $ac_func_search_save_LIBS" | |
6562 | cat > conftest.$ac_ext <<EOF | |
06f0b04c | 6563 | #line 6564 "configure" |
4e70264f ZW |
6564 | #include "confdefs.h" |
6565 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6566 | /* We use char because int might match the return type of a gcc2 | |
6567 | builtin and then its argument prototype would still apply. */ | |
6568 | char RegOpenKeyExA(); | |
6569 | ||
6570 | int main() { | |
6571 | RegOpenKeyExA() | |
6572 | ; return 0; } | |
6573 | EOF | |
06f0b04c | 6574 | if { (eval echo configure:6575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4e70264f ZW |
6575 | rm -rf conftest* |
6576 | ac_cv_search_RegOpenKeyExA="-l$i" | |
6577 | break | |
6578 | else | |
6579 | echo "configure: failed program was:" >&5 | |
6580 | cat conftest.$ac_ext >&5 | |
6581 | fi | |
6582 | rm -f conftest* | |
6583 | done | |
6584 | LIBS="$ac_func_search_save_LIBS" | |
6585 | fi | |
6586 | ||
6587 | echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6 | |
6588 | if test "$ac_cv_search_RegOpenKeyExA" != "no"; then | |
6589 | test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS" | |
6590 | ||
6591 | else : | |
6592 | ||
6593 | fi | |
f4ab28e3 MK |
6594 | else |
6595 | echo "$ac_t""no" 1>&6 | |
6596 | fi | |
6597 | ||
6598 | # Check if user specified a different registry key. | |
9dd53f2c | 6599 | case "x${enable_win32_registry}" in |
f4ab28e3 MK |
6600 | x | xyes) |
6601 | # default. | |
6602 | gcc_cv_win32_registry_key="$VERSION" | |
6603 | ;; | |
6604 | xno) | |
6605 | # no registry lookup. | |
6606 | gcc_cv_win32_registry_key='' | |
6607 | ;; | |
6608 | *) | |
6609 | # user-specified key. | |
6610 | gcc_cv_win32_registry_key="$enable_win32_registry" | |
6611 | ;; | |
6612 | esac | |
6613 | ||
9dd53f2c | 6614 | if test "x$enable_win32_registry" != xno; then |
f4ab28e3 | 6615 | echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6 |
06f0b04c | 6616 | echo "configure:6617: checking registry key on windows hosts" >&5 |
f4ab28e3 MK |
6617 | cat >> confdefs.h <<EOF |
6618 | #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key" | |
6619 | EOF | |
6620 | ||
6621 | echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6 | |
6622 | fi | |
4e70264f ZW |
6623 | ;; |
6624 | esac | |
f4ab28e3 | 6625 | |
ab87f8c8 JL |
6626 | # Get an absolute path to the GCC top-level source directory |
6627 | holddir=`pwd` | |
6628 | cd $srcdir | |
6629 | topdir=`pwd` | |
6630 | cd $holddir | |
6631 | ||
6632 | # Conditionalize the makefile for this host machine. | |
6633 | # Make-host contains the concatenation of all host makefile fragments | |
6634 | # [there can be more than one]. This file is built by configure.frag. | |
6635 | host_overrides=Make-host | |
6636 | dep_host_xmake_file= | |
6637 | for f in .. ${host_xmake_file} | |
6638 | do | |
6639 | if test -f ${srcdir}/config/$f | |
6640 | then | |
6641 | dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f" | |
6642 | fi | |
6643 | done | |
6644 | ||
6645 | # Conditionalize the makefile for this target machine. | |
6646 | # Make-target contains the concatenation of all host makefile fragments | |
6647 | # [there can be more than one]. This file is built by configure.frag. | |
6648 | target_overrides=Make-target | |
6649 | dep_tmake_file= | |
6650 | for f in .. ${tmake_file} | |
6651 | do | |
6652 | if test -f ${srcdir}/config/$f | |
6653 | then | |
6654 | dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f" | |
6655 | fi | |
6656 | done | |
6657 | ||
6658 | # If the host doesn't support symlinks, modify CC in | |
6659 | # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. | |
6660 | # Otherwise, we can use "CC=$(CC)". | |
6661 | rm -f symtest.tem | |
6662 | if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null | |
6663 | then | |
6664 | cc_set_by_configure="\$(CC)" | |
5aa82ace | 6665 | quoted_cc_set_by_configure="\$(CC)" |
ab87f8c8 JL |
6666 | stage_prefix_set_by_configure="\$(STAGE_PREFIX)" |
6667 | else | |
6668 | rm -f symtest.tem | |
6669 | if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null | |
6670 | then | |
6671 | symbolic_link="cp -p" | |
6672 | else | |
6673 | symbolic_link="cp" | |
6674 | fi | |
6675 | cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" | |
5aa82ace | 6676 | quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`" |
ab87f8c8 JL |
6677 | stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" |
6678 | fi | |
6679 | rm -f symtest.tem | |
6680 | ||
6681 | out_object_file=`basename $out_file .c`.o | |
6682 | ||
6683 | tm_file_list= | |
6684 | for f in $tm_file; do | |
64ccbc99 | 6685 | case $f in |
d02af173 ZW |
6686 | ansidecl.h ) |
6687 | tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
6688 | defaults.h ) | |
64ccbc99 KG |
6689 | tm_file_list="${tm_file_list} $f" ;; |
6690 | *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;; | |
6691 | esac | |
ab87f8c8 JL |
6692 | done |
6693 | ||
11642c3a ZW |
6694 | tm_p_file_list= |
6695 | for f in $tm_p_file; do | |
6696 | tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" | |
6697 | done | |
6698 | ||
ab87f8c8 JL |
6699 | host_xm_file_list= |
6700 | for f in $host_xm_file; do | |
64ccbc99 | 6701 | case $f in |
d02af173 ZW |
6702 | ansidecl.h ) |
6703 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
6704 | auto-host.h | defaults.h ) | |
64ccbc99 KG |
6705 | host_xm_file_list="${host_xm_file_list} $f" ;; |
6706 | *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;; | |
6707 | esac | |
ab87f8c8 JL |
6708 | done |
6709 | ||
6710 | build_xm_file_list= | |
6711 | for f in $build_xm_file; do | |
64ccbc99 | 6712 | case $f in |
d02af173 ZW |
6713 | ansidecl.h ) |
6714 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
6715 | auto-build.h | auto-host.h | defaults.h ) | |
64ccbc99 KG |
6716 | build_xm_file_list="${build_xm_file_list} $f" ;; |
6717 | *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;; | |
6718 | esac | |
ab87f8c8 JL |
6719 | done |
6720 | ||
6721 | # Define macro CROSS_COMPILE in compilation | |
6722 | # if this is a cross-compiler. | |
6723 | # Also use all.cross instead of all.internal | |
6724 | # and add cross-make to Makefile. | |
6725 | cross_overrides="/dev/null" | |
6726 | if test x$host != x$target | |
6727 | then | |
6728 | cross_defines="CROSS=-DCROSS_COMPILE" | |
6729 | cross_overrides="${topdir}/cross-make" | |
6730 | fi | |
6731 | ||
b39d221a EC |
6732 | # If this is a cross-compiler that does not |
6733 | # have its own set of headers then define | |
6734 | # inhibit_libc | |
6735 | ||
fecd6201 ZW |
6736 | # If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS. |
6737 | # This prevents libgcc2 from containing any code which requires libc | |
6738 | # support. | |
b39d221a EC |
6739 | inhibit_libc= |
6740 | if test x$host != x$target && test x$with_headers = x; then | |
6741 | inhibit_libc=-Dinhibit_libc | |
6742 | else | |
6743 | if test x$with_newlib = xyes; then | |
6744 | inhibit_libc=-Dinhibit_libc | |
6745 | fi | |
6746 | fi | |
6747 | ||
6748 | ||
ab87f8c8 JL |
6749 | # When building gcc with a cross-compiler, we need to fix a few things. |
6750 | # This must come after cross-make as we want all.build to override | |
6751 | # all.cross. | |
6752 | build_overrides="/dev/null" | |
6753 | if test x$build != x$host | |
6754 | then | |
6755 | build_overrides="${topdir}/build-make" | |
6756 | fi | |
6757 | ||
6758 | # Expand extra_headers to include complete path. | |
6759 | # This substitutes for lots of t-* files. | |
6760 | extra_headers_list= | |
6761 | if test "x$extra_headers" = x | |
6762 | then true | |
6763 | else | |
6764 | # Prepend ${srcdir}/ginclude/ to every entry in extra_headers. | |
6765 | for file in $extra_headers; | |
6766 | do | |
6767 | extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}" | |
6768 | done | |
6769 | fi | |
6770 | ||
6771 | if test x$use_collect2 = xno; then | |
6772 | use_collect2= | |
6773 | fi | |
6774 | ||
6775 | # Add a definition of USE_COLLECT2 if system wants one. | |
2cc07db4 | 6776 | if test x$use_collect2 != x |
ab87f8c8 | 6777 | then |
2cc07db4 RH |
6778 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
6779 | xm_defines="${xm_defines} USE_COLLECT2" | |
ab87f8c8 JL |
6780 | fi |
6781 | ||
ab87f8c8 JL |
6782 | # If we have gas in the build tree, make a link to it. |
6783 | if test -f ../gas/Makefile; then | |
6784 | rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null | |
6785 | fi | |
6786 | ||
3cae5780 | 6787 | # If we have nm and objdump in the build tree, make a link to them. |
ab87f8c8 JL |
6788 | if test -f ../binutils/Makefile; then |
6789 | rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null | |
3cae5780 | 6790 | rm -f objdump; $symbolic_link ../binutils/objdump$host_exeext objdump$host_exeext 2>/dev/null |
ab87f8c8 JL |
6791 | fi |
6792 | ||
6793 | # If we have ld in the build tree, make a link to it. | |
6794 | if test -f ../ld/Makefile; then | |
2cc07db4 | 6795 | rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null |
ab87f8c8 JL |
6796 | fi |
6797 | ||
981d4858 JM |
6798 | # Figure out what assembler we will be using. |
6799 | echo $ac_n "checking what assembler to use""... $ac_c" 1>&6 | |
06f0b04c | 6800 | echo "configure:6801: checking what assembler to use" >&5 |
ab87f8c8 | 6801 | gcc_cv_as= |
981d4858 JM |
6802 | gcc_cv_gas_major_version= |
6803 | gcc_cv_gas_minor_version= | |
ab87f8c8 | 6804 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas |
0936a455 | 6805 | gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd |
ab87f8c8 JL |
6806 | if test -x "$DEFAULT_ASSEMBLER"; then |
6807 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
6808 | elif test -x "$AS"; then | |
6809 | gcc_cv_as="$AS" | |
6810 | elif test -x as$host_exeext; then | |
6811 | # Build using assembler in the current directory. | |
6812 | gcc_cv_as=./as$host_exeext | |
6813 | elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then | |
6814 | # Single tree build which includes gas. | |
0936a455 | 6815 | 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 |
6816 | do |
6817 | gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` | |
6818 | if test x$gcc_cv_gas_version != x; then | |
6819 | break | |
6820 | fi | |
6821 | done | |
6822 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
6823 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
981d4858 | 6824 | fi |
9e423e6d | 6825 | |
981d4858 | 6826 | if test "x$gcc_cv_as" = x -a x$host = x$target; then |
9e423e6d | 6827 | # Native build. |
779243f7 JL |
6828 | # Search the same directories that the installed compiler will |
6829 | # search. Else we may find the wrong assembler and lose. If we | |
6830 | # do not find a suitable assembler binary, then try the user's | |
6831 | # path. | |
6832 | # | |
6833 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
6834 | # user's path. Unfortunately, there is no good way to get at the | |
6835 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
6836 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
6837 | # to be fixed as part of the make/configure rewrite too. | |
6838 | ||
6839 | if test "x$exec_prefix" = xNONE; then | |
6840 | if test "x$prefix" = xNONE; then | |
6841 | test_prefix=/usr/local | |
6842 | else | |
6843 | test_prefix=$prefix | |
6844 | fi | |
6845 | else | |
6846 | test_prefix=$exec_prefix | |
6847 | fi | |
6848 | ||
6849 | # If the loop below does not find an assembler, then use whatever | |
6850 | # one we can find in the users's path. | |
6851 | # user's path. | |
16a0fe50 | 6852 | gcc_cv_as=as$host_exeext |
779243f7 JL |
6853 | |
6854 | test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \ | |
6855 | $test_prefix/lib/gcc-lib/$target \ | |
6856 | /usr/lib/gcc/$target/$gcc_version \ | |
6857 | /usr/lib/gcc/$target \ | |
6858 | $test_prefix/$target/bin/$target/$gcc_version \ | |
6859 | $test_prefix/$target/bin \ | |
6860 | /usr/libexec \ | |
6861 | /usr/ccs/gcc \ | |
6862 | /usr/ccs/bin \ | |
6863 | /udk/usr/ccs/bin \ | |
6864 | /bsd43/usr/lib/cmplrs/cc \ | |
6865 | /usr/cross64/usr/bin \ | |
6866 | /usr/lib/cmplrs/cc \ | |
6867 | /sysv/usr/lib/cmplrs/cc \ | |
6868 | /svr4/usr/lib/cmplrs/cc \ | |
6869 | /usr/bin" | |
6870 | ||
6871 | for dir in $test_dirs; do | |
6872 | if test -f $dir/as$host_exeext; then | |
6873 | gcc_cv_as=$dir/as$host_exeext | |
6874 | break; | |
6875 | fi | |
6876 | done | |
9e423e6d | 6877 | fi |
981d4858 JM |
6878 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
6879 | echo "$ac_t"""newly built gas"" 1>&6 | |
6880 | else | |
6881 | echo "$ac_t""$gcc_cv_as" 1>&6 | |
6882 | fi | |
6883 | ||
6884 | # Figure out what nm we will be using. | |
6885 | echo $ac_n "checking what nm to use""... $ac_c" 1>&6 | |
06f0b04c | 6886 | echo "configure:6887: checking what nm to use" >&5 |
981d4858 JM |
6887 | if test -x nm$host_exeext; then |
6888 | gcc_cv_nm=./nm$host_exeext | |
6889 | elif test x$host = x$target; then | |
6890 | # Native build. | |
6891 | gcc_cv_nm=nm$host_exeext | |
6892 | fi | |
6893 | echo "$ac_t""$gcc_cv_nm" 1>&6 | |
6894 | ||
3cae5780 AS |
6895 | # Figure out what objdump we will be using. |
6896 | echo $ac_n "checking what objdump to use""... $ac_c" 1>&6 | |
06f0b04c | 6897 | echo "configure:6898: checking what objdump to use" >&5 |
3cae5780 AS |
6898 | if test -x objdump$host_exeext; then |
6899 | gcc_cv_objdump=./objdump$host_exeext | |
6900 | elif test x$host = x$target; then | |
6901 | # Native build. | |
6902 | gcc_cv_objdump=objdump$host_exeext | |
6903 | fi | |
6904 | echo "$ac_t""$gcc_cv_objdump" 1>&6 | |
6905 | ||
981d4858 JM |
6906 | # Figure out what assembler alignment features are present. |
6907 | echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6 | |
06f0b04c | 6908 | echo "configure:6909: checking assembler alignment features" >&5 |
9d147085 | 6909 | gcc_cv_as_alignment_features=none |
981d4858 JM |
6910 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
6911 | # Gas version 2.6 and later support for .balign and .p2align. | |
6912 | # bytes to skip when using .p2align. | |
6913 | 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 | |
6914 | gcc_cv_as_alignment_features=".balign and .p2align" | |
6915 | cat >> confdefs.h <<\EOF | |
6916 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 | |
6917 | EOF | |
6918 | ||
6919 | fi | |
6920 | # Gas version 2.8 and later support specifying the maximum | |
6921 | # bytes to skip when using .p2align. | |
6922 | 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 | |
6923 | gcc_cv_as_alignment_features=".p2align including maximum skip" | |
6924 | cat >> confdefs.h <<\EOF | |
6925 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 | |
6926 | EOF | |
6927 | ||
6928 | fi | |
6929 | elif test x$gcc_cv_as != x; then | |
00ccc16d JL |
6930 | # Check if we have .balign and .p2align |
6931 | echo ".balign 4" > conftest.s | |
6932 | echo ".p2align 2" >> conftest.s | |
6933 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
6934 | gcc_cv_as_alignment_features=".balign and .p2align" | |
6935 | cat >> confdefs.h <<\EOF | |
6936 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 | |
6937 | EOF | |
6938 | ||
6939 | fi | |
6940 | rm -f conftest.s conftest.o | |
9e423e6d JW |
6941 | # Check if specifying the maximum bytes to skip when |
6942 | # using .p2align is supported. | |
6943 | echo ".p2align 4,,7" > conftest.s | |
6944 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
6945 | gcc_cv_as_alignment_features=".p2align including maximum skip" | |
6946 | cat >> confdefs.h <<\EOF | |
6947 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 | |
6948 | EOF | |
6949 | ||
6950 | fi | |
6951 | rm -f conftest.s conftest.o | |
6952 | fi | |
6953 | echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6 | |
6954 | ||
d1accaa3 | 6955 | echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6 |
06f0b04c | 6956 | echo "configure:6957: checking assembler subsection support" >&5 |
9d147085 | 6957 | gcc_cv_as_subsections=no |
981d4858 JM |
6958 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
6959 | 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 | |
6960 | gcc_cv_as_subsections="working .subsection -1" | |
6961 | fi | |
6962 | elif test x$gcc_cv_as != x; then | |
d1accaa3 JJ |
6963 | # Check if we have .subsection |
6964 | echo ".subsection 1" > conftest.s | |
6965 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
6966 | gcc_cv_as_subsections=".subsection" | |
d1accaa3 JJ |
6967 | if test x$gcc_cv_nm != x; then |
6968 | cat > conftest.s <<EOF | |
6969 | conftest_label1: .word 0 | |
6970 | .subsection -1 | |
6971 | conftest_label2: .word 0 | |
6972 | .previous | |
6973 | EOF | |
6974 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
6975 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
6976 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
1b015bec AO |
6977 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then |
6978 | : | |
6979 | else | |
d1accaa3 | 6980 | gcc_cv_as_subsections="working .subsection -1" |
d1accaa3 JJ |
6981 | fi |
6982 | fi | |
6983 | fi | |
6984 | fi | |
6985 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
981d4858 JM |
6986 | fi |
6987 | if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then | |
6988 | cat >> confdefs.h <<\EOF | |
6989 | #define HAVE_GAS_SUBSECTION_ORDERING 1 | |
6990 | EOF | |
6991 | ||
d1accaa3 JJ |
6992 | fi |
6993 | echo "$ac_t""$gcc_cv_as_subsections" 1>&6 | |
6994 | ||
12822146 | 6995 | echo $ac_n "checking assembler weak support""... $ac_c" 1>&6 |
06f0b04c | 6996 | echo "configure:6997: checking assembler weak support" >&5 |
9d147085 | 6997 | gcc_cv_as_weak=no |
981d4858 JM |
6998 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
6999 | 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 | |
7000 | gcc_cv_as_weak="yes" | |
7001 | fi | |
7002 | elif test x$gcc_cv_as != x; then | |
12822146 JL |
7003 | # Check if we have .weak |
7004 | echo " .weak foobar" > conftest.s | |
7005 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
12822146 JL |
7006 | gcc_cv_as_weak="yes" |
7007 | fi | |
7008 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
981d4858 JM |
7009 | fi |
7010 | if test x"$gcc_cv_as_weak" = xyes; then | |
7011 | cat >> confdefs.h <<\EOF | |
7012 | #define HAVE_GAS_WEAK 1 | |
7013 | EOF | |
7014 | ||
12822146 JL |
7015 | fi |
7016 | echo "$ac_t""$gcc_cv_as_weak" 1>&6 | |
7017 | ||
6a9c5260 | 7018 | echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6 |
06f0b04c | 7019 | echo "configure:7020: checking assembler hidden support" >&5 |
9d147085 | 7020 | gcc_cv_as_hidden=no |
981d4858 JM |
7021 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
7022 | if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 10 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
7023 | gcc_cv_as_hidden="yes" | |
7024 | fi | |
7025 | elif test x$gcc_cv_as != x; then | |
6a9c5260 UD |
7026 | # Check if we have .hidden |
7027 | echo " .hidden foobar" > conftest.s | |
7028 | echo "foobar:" >> conftest.s | |
7029 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
6a9c5260 UD |
7030 | gcc_cv_as_hidden="yes" |
7031 | fi | |
7032 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
981d4858 JM |
7033 | fi |
7034 | if test x"$gcc_cv_as_hidden" = xyes; then | |
7035 | cat >> confdefs.h <<\EOF | |
7036 | #define HAVE_GAS_HIDDEN 1 | |
7037 | EOF | |
7038 | ||
6a9c5260 UD |
7039 | fi |
7040 | echo "$ac_t""$gcc_cv_as_hidden" 1>&6 | |
7041 | ||
b7460f24 | 7042 | echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6 |
06f0b04c | 7043 | echo "configure:7044: checking assembler leb128 support" >&5 |
fbe42b1b | 7044 | gcc_cv_as_leb128=no |
b7460f24 | 7045 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
fbe42b1b | 7046 | 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 |
7047 | gcc_cv_as_leb128="yes" |
7048 | fi | |
7049 | elif test x$gcc_cv_as != x; then | |
7050 | # Check if we have .[us]leb128, and support symbol arithmetic with it. | |
7051 | cat > conftest.s <<EOF | |
7052 | .data | |
7053 | .uleb128 L2 - L1 | |
7054 | L1: | |
7055 | .uleb128 1280 | |
7056 | .sleb128 -1010 | |
7057 | L2: | |
7058 | EOF | |
7059 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
78e766a0 RH |
7060 | gcc_cv_as_leb128="yes" |
7061 | ||
7062 | # GAS versions before 2.11 do not support uleb128, | |
7063 | # despite appearing to. | |
7064 | # ??? There exists an elf-specific test that will crash | |
7065 | # the assembler. Perhaps it's better to figure out whether | |
7066 | # arbitrary sections are supported and try the test. | |
7067 | as_ver=`$gcc_cv_as --version 2>/dev/null | head -1` | |
7068 | if echo "$as_ver" | grep GNU > /dev/null; then | |
5fed851d | 7069 | as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` |
78e766a0 | 7070 | as_major=`echo $as_ver | sed 's/\..*//'` |
3d399d67 | 7071 | as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` |
78e766a0 RH |
7072 | if test $as_major -eq 2 -a $as_minor -lt 11; then |
7073 | gcc_cv_as_leb128="no" | |
7074 | fi | |
fbe42b1b | 7075 | fi |
b7460f24 RH |
7076 | fi |
7077 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
7078 | fi | |
7079 | if test x"$gcc_cv_as_leb128" = xyes; then | |
7080 | cat >> confdefs.h <<\EOF | |
7081 | #define HAVE_AS_LEB128 1 | |
7082 | EOF | |
7083 | ||
7084 | fi | |
7085 | echo "$ac_t""$gcc_cv_as_leb128" 1>&6 | |
7086 | ||
c64688ae | 7087 | echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6 |
06f0b04c | 7088 | echo "configure:7089: checking assembler eh_frame optimization" >&5 |
c64688ae RH |
7089 | gcc_cv_as_eh_frame=no |
7090 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then | |
7091 | 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 | |
7092 | gcc_cv_as_eh_frame="yes" | |
7093 | fi | |
7094 | elif test x$gcc_cv_as != x; then | |
7095 | # Check if this is GAS. | |
41948db5 SS |
7096 | as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1` |
7097 | rm -f a.out 2> /dev/null | |
c64688ae RH |
7098 | if echo "$as_ver" | grep GNU > /dev/null; then |
7099 | # Versions up to and including 2.11.0 may mis-optimize | |
7100 | # .eh_frame data. Try something. | |
7101 | cat > conftest.s <<EOF | |
7102 | .text | |
7103 | .LFB1: | |
7104 | .4byte 0 | |
7105 | .L1: | |
7106 | .4byte 0 | |
7107 | .LFE1: | |
7108 | .section .eh_frame,"aw",@progbits | |
7109 | __FRAME_BEGIN__: | |
7110 | .4byte .LECIE1-.LSCIE1 | |
7111 | .LSCIE1: | |
7112 | .4byte 0x0 | |
7113 | .byte 0x1 | |
7114 | .ascii "z\0" | |
7115 | .byte 0x1 | |
7116 | .byte 0x78 | |
7117 | .byte 0x1a | |
7118 | .byte 0x0 | |
7119 | .byte 0x4 | |
7120 | .4byte 1 | |
7121 | .p2align 1 | |
7122 | .LECIE1: | |
7123 | .LSFDE1: | |
7124 | .4byte .LEFDE1-.LASFDE1 | |
7125 | .LASFDE1: | |
7126 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
7127 | .4byte .LFB1 | |
7128 | .4byte .LFE1-.LFB1 | |
7129 | .byte 0x4 | |
7130 | .4byte .LFE1-.LFB1 | |
7131 | .byte 0x4 | |
7132 | .4byte .L1-.LFB1 | |
7133 | .LEFDE1: | |
7134 | EOF | |
01efb963 | 7135 | cat > conftest.lit <<EOF |
c64688ae RH |
7136 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
7137 | 0010 01000000 12000000 18000000 00000000 ................ | |
7138 | 0020 08000000 04080000 0044 .........D | |
01efb963 AS |
7139 | EOF |
7140 | cat > conftest.big <<EOF | |
7141 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... | |
7142 | 0010 00000001 00000012 00000018 00000000 ................ | |
7143 | 0020 00000008 04000000 0844 .........D | |
c64688ae RH |
7144 | EOF |
7145 | # If the assembler didn't choke, and we can objdump, | |
7146 | # and we got the correct data, then succeed. | |
7147 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ | |
3cae5780 | 7148 | && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ |
c64688ae | 7149 | | tail -3 > conftest.got \ |
01efb963 AS |
7150 | && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ |
7151 | || cmp conftest.big conftest.got > /dev/null 2>&1; } | |
c64688ae RH |
7152 | then |
7153 | gcc_cv_as_eh_frame="yes" | |
7154 | else | |
7155 | gcc_cv_as_eh_frame="bad" | |
7156 | if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then | |
7157 | cat >> confdefs.h <<\EOF | |
7158 | #define USE_AS_TRADITIONAL_FORMAT 1 | |
7159 | EOF | |
7160 | ||
7161 | fi | |
7162 | fi | |
7163 | fi | |
7164 | rm -f conftest.* | |
7165 | fi | |
7166 | echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6 | |
7167 | ||
201556f0 | 7168 | echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6 |
06f0b04c | 7169 | echo "configure:7170: checking assembler section merging support" >&5 |
201556f0 JJ |
7170 | gcc_cv_as_shf_merge=no |
7171 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then | |
7172 | 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 | 7173 | gcc_cv_as_shf_merge=yes |
201556f0 JJ |
7174 | fi |
7175 | elif test x$gcc_cv_as != x; then | |
7176 | # Check if we support SHF_MERGE sections | |
7177 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s | |
a8b7afb9 | 7178 | if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then |
201556f0 JJ |
7179 | gcc_cv_as_shf_merge=yes |
7180 | fi | |
7181 | rm -f conftest.s conftest.o | |
7182 | fi | |
7183 | if test x"$gcc_cv_as_shf_merge" = xyes; then | |
7184 | cat >> confdefs.h <<\EOF | |
7185 | #define HAVE_GAS_SHF_MERGE 1 | |
7186 | EOF | |
7187 | ||
7188 | fi | |
7189 | echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6 | |
7190 | ||
1cb36a98 RH |
7191 | case "$target" in |
7192 | sparc*-*-*) | |
7193 | echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6 | |
06f0b04c | 7194 | echo "configure:7195: checking assembler .register pseudo-op support" >&5 |
5b68c389 AO |
7195 | if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then |
7196 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7197 | else | |
7198 | ||
7199 | gcc_cv_as_register_pseudo_op=unknown | |
7200 | if test x$gcc_cv_as != x; then | |
7201 | # Check if we have .register | |
7202 | echo ".register %g2, #scratch" > conftest.s | |
7203 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
1cb36a98 | 7204 | gcc_cv_as_register_pseudo_op=yes |
5b68c389 AO |
7205 | else |
7206 | gcc_cv_as_register_pseudo_op=no | |
7207 | fi | |
7208 | rm -f conftest.s conftest.o | |
7209 | fi | |
7210 | ||
7211 | fi | |
7212 | ||
7213 | echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6 | |
7214 | if test "x$gcc_cv_as_register_pseudo_op" = xyes; then | |
7215 | cat >> confdefs.h <<\EOF | |
1cb36a98 RH |
7216 | #define HAVE_AS_REGISTER_PSEUDO_OP 1 |
7217 | EOF | |
7218 | ||
1cb36a98 | 7219 | fi |
1cb36a98 | 7220 | |
e95b1e6a | 7221 | echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6 |
06f0b04c | 7222 | echo "configure:7223: checking assembler supports -relax" >&5 |
e95b1e6a JJ |
7223 | if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then |
7224 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7225 | else | |
7226 | ||
7227 | gcc_cv_as_relax_opt=unknown | |
7228 | if test x$gcc_cv_as != x; then | |
7229 | # Check if gas supports -relax | |
7230 | echo ".text" > conftest.s | |
7231 | if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then | |
7232 | gcc_cv_as_relax_opt=yes | |
7233 | else | |
7234 | gcc_cv_as_relax_opt=no | |
7235 | fi | |
7236 | rm -f conftest.s conftest.o | |
7237 | fi | |
7238 | ||
7239 | fi | |
7240 | ||
7241 | echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6 | |
7242 | if test "x$gcc_cv_as_relax_opt" = xyes; then | |
7243 | cat >> confdefs.h <<\EOF | |
7244 | #define HAVE_AS_RELAX_OPTION 1 | |
7245 | EOF | |
7246 | ||
7247 | fi | |
7248 | ||
5b68c389 AO |
7249 | case "$tm_file" in |
7250 | *64*) | |
7251 | echo $ac_n "checking for 64 bit support in assembler ($gcc_cv_as)""... $ac_c" 1>&6 | |
06f0b04c | 7252 | echo "configure:7253: checking for 64 bit support in assembler ($gcc_cv_as)" >&5 |
5b68c389 AO |
7253 | if eval "test \"`echo '$''{'gcc_cv_as_flags64'+set}'`\" = set"; then |
7254 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7255 | else | |
7256 | ||
7257 | if test -n "$gcc_cv_as"; then | |
7258 | echo ".xword foo" > conftest.s | |
7259 | gcc_cv_as_flags64=no | |
8a90b95d | 7260 | for flag in "-xarch=v9" "-64 -Av9"; do |
5b68c389 AO |
7261 | if $gcc_cv_as $flag -o conftest.o conftest.s \ |
7262 | > /dev/null 2>&1; then | |
7263 | gcc_cv_as_flags64=$flag | |
7264 | break | |
7265 | fi | |
7266 | done | |
7267 | rm -f conftest.s conftest.o | |
7268 | else | |
7269 | if test "$gas" = yes; then | |
7270 | gcc_cv_as_flags64="-64 -Av9" | |
7271 | else | |
7272 | gcc_cv_as_flags64="-xarch=v9" | |
7273 | fi | |
1cb36a98 | 7274 | fi |
5b68c389 AO |
7275 | |
7276 | fi | |
7277 | ||
7278 | echo "$ac_t""$gcc_cv_as_flags64" 1>&6 | |
7279 | if test "x$gcc_cv_as_flags64" = xno; then | |
7280 | ||
7281 | tmake_file=`echo " $tmake_file " | sed -e 's, sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'` | |
7282 | dep_tmake_file=`echo " $dep_tmake_file " | sed -e 's, [^ ]*/config/sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'` | |
7283 | ||
7284 | else | |
7285 | cat >> confdefs.h <<EOF | |
7286 | #define AS_SPARC64_FLAG "$gcc_cv_as_flags64" | |
7287 | EOF | |
7288 | ||
1cb36a98 | 7289 | fi |
5b68c389 AO |
7290 | ;; |
7291 | *) gcc_cv_as_flags64=${gcc_cv_as_flags64-no} | |
7292 | ;; | |
7293 | esac | |
7294 | ||
7295 | if test "x$gcc_cv_as_flags64" != xno; then | |
7296 | echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6 | |
06f0b04c | 7297 | echo "configure:7298: checking for assembler offsetable %lo() support" >&5 |
5b68c389 AO |
7298 | if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then |
7299 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7300 | else | |
7301 | ||
7302 | gcc_cv_as_offsetable_lo10=unknown | |
7303 | if test "x$gcc_cv_as" != x; then | |
7304 | # Check if assembler has offsetable %lo() | |
7305 | echo "or %g1, %lo(ab) + 12, %g1" > conftest.s | |
7306 | echo "or %g1, %lo(ab + 12), %g1" > conftest1.s | |
7307 | if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \ | |
7308 | > /dev/null 2>&1 && | |
7309 | $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \ | |
7310 | > /dev/null 2>&1; then | |
7311 | if cmp conftest.o conftest1.o > /dev/null 2>&1; then | |
7312 | gcc_cv_as_offsetable_lo10=no | |
7313 | else | |
7314 | gcc_cv_as_offsetable_lo10=yes | |
7315 | fi | |
7316 | else | |
7317 | gcc_cv_as_offsetable_lo10=no | |
7318 | fi | |
7319 | rm -f conftest.s conftest.o conftest1.s conftest1.o | |
7320 | fi | |
7321 | ||
7322 | fi | |
7323 | ||
7324 | echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6 | |
7325 | if test "x$gcc_cv_as_offsetable_lo10" = xyes; then | |
7326 | cat >> confdefs.h <<\EOF | |
1cb36a98 RH |
7327 | #define HAVE_AS_OFFSETABLE_LO10 1 |
7328 | EOF | |
7329 | ||
1cb36a98 | 7330 | fi |
1cb36a98 | 7331 | fi |
43160d01 | 7332 | |
1cb36a98 RH |
7333 | ;; |
7334 | ||
c307e6dd | 7335 | i[34567]86-*-* | x86_64-*-*) |
1cb36a98 | 7336 | echo $ac_n "checking assembler instructions""... $ac_c" 1>&6 |
06f0b04c | 7337 | echo "configure:7338: checking assembler instructions" >&5 |
1cb36a98 | 7338 | gcc_cv_as_instructions= |
981d4858 JM |
7339 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
7340 | 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 | |
7341 | gcc_cv_as_instructions="filds fists" | |
7342 | fi | |
7343 | elif test x$gcc_cv_as != x; then | |
53b5ce19 JW |
7344 | set "filds fists" "filds mem; fists mem" |
7345 | while test $# -gt 0 | |
7346 | do | |
7347 | echo "$2" > conftest.s | |
7348 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7349 | gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" " | |
53b5ce19 JW |
7350 | fi |
7351 | shift 2 | |
7352 | done | |
7353 | rm -f conftest.s conftest.o | |
1cb36a98 | 7354 | fi |
981d4858 JM |
7355 | if test x"$gcc_cv_as_instructions" != x; then |
7356 | cat >> confdefs.h <<EOF | |
ee7692d2 | 7357 | #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1 |
981d4858 JM |
7358 | EOF |
7359 | ||
7360 | fi | |
1cb36a98 | 7361 | echo "$ac_t""$gcc_cv_as_instructions" 1>&6 |
f88c65f7 RH |
7362 | |
7363 | echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6 | |
06f0b04c | 7364 | echo "configure:7365: checking assembler GOTOFF in data directives" >&5 |
f88c65f7 RH |
7365 | gcc_cv_as_gotoff_in_data=no |
7366 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x | |
7367 | then | |
7368 | if test "$gcc_cv_gas_major_version" -eq 2 \ | |
7369 | -a "$gcc_cv_gas_minor_version" -ge 11 \ | |
7370 | -o "$gcc_cv_gas_major_version" -gt 2; then | |
7371 | gcc_cv_as_gotoff_in_data=yes | |
7372 | fi | |
7373 | elif test x$gcc_cv_as != x; then | |
7374 | cat > conftest.s <<EOF | |
7375 | .text | |
7376 | .L0: | |
7377 | nop | |
7378 | .data | |
7379 | .long .L0@GOTOFF | |
7380 | EOF | |
7381 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7382 | gcc_cv_as_gotoff_in_data=yes | |
7383 | fi | |
7384 | fi | |
7385 | cat >> confdefs.h <<EOF | |
7386 | #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi` | |
7387 | EOF | |
7388 | ||
7389 | echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6 | |
1cb36a98 RH |
7390 | ;; |
7391 | esac | |
53b5ce19 | 7392 | |
9d147085 | 7393 | echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6 |
06f0b04c | 7394 | echo "configure:7395: checking assembler dwarf2 debug_line support" >&5 |
9d147085 RH |
7395 | gcc_cv_as_dwarf2_debug_line=no |
7396 | # ??? Not all targets support dwarf2 debug_line, even within a version | |
7397 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
7398 | # info to the output file. So, as supported targets are added to gas 2.11, | |
7399 | # add some instruction here to (also) show we expect this might work. | |
7400 | # ??? Once 2.11 is released, probably need to add first known working | |
7401 | # version to the per-target configury. | |
7402 | case "$target" in | |
c307e6dd | 7403 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* | x86_64*-*-*) |
9d147085 RH |
7404 | insn="nop" |
7405 | ;; | |
7406 | ia64*-*-*) | |
7407 | insn="nop 0" | |
7408 | ;; | |
7409 | esac | |
7410 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; | |
7411 | then | |
7412 | if test "$gcc_cv_gas_major_version" -eq 2 \ | |
7413 | -a "$gcc_cv_gas_minor_version" -ge 11 \ | |
7414 | -o "$gcc_cv_gas_major_version" -gt 2 \ | |
7415 | && grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
7416 | && test x"$insn" != x ; then | |
7417 | gcc_cv_as_dwarf2_debug_line="yes" | |
7418 | fi | |
7419 | elif test x$gcc_cv_as != x -a x"$insn" != x ; then | |
acc187f5 RH |
7420 | echo ' .file 1 "conftest.s"' > conftest.s |
7421 | echo ' .loc 1 3 0' >> conftest.s | |
9d147085 | 7422 | echo " $insn" >> conftest.s |
981975b6 | 7423 | # ??? This fails with non-gnu grep. |
9d147085 RH |
7424 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ |
7425 | && grep debug_line conftest.o > /dev/null 2>&1 ; then | |
981975b6 | 7426 | # The .debug_line file table must be in the exact order that |
eaec9b3d | 7427 | # we specified the files, since these indices are also used |
981975b6 RH |
7428 | # by DW_AT_decl_file. Approximate this test by testing if |
7429 | # the assembler bitches if the same index is assigned twice. | |
7430 | echo ' .file 1 "foo.s"' > conftest.s | |
7431 | echo ' .file 1 "bar.s"' >> conftest.s | |
7432 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 | |
7433 | then | |
7434 | gcc_cv_as_dwarf2_debug_line="no" | |
7435 | else | |
7436 | gcc_cv_as_dwarf2_debug_line="yes" | |
7437 | fi | |
9d147085 RH |
7438 | fi |
7439 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
7440 | fi | |
7441 | if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then | |
7442 | cat >> confdefs.h <<\EOF | |
7443 | #define HAVE_AS_DWARF2_DEBUG_LINE 1 | |
7444 | EOF | |
7445 | ||
7446 | fi | |
7447 | echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6 | |
7448 | ||
5f0e9ea2 | 7449 | echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6 |
06f0b04c | 7450 | echo "configure:7451: checking assembler --gdwarf2 support" >&5 |
5f0e9ea2 GK |
7451 | gcc_cv_as_gdwarf2_flag=no |
7452 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; | |
7453 | then | |
7454 | if test "$gcc_cv_gas_major_version" -eq 2 \ | |
7455 | -a "$gcc_cv_gas_minor_version" -ge 11 \ | |
7456 | -o "$gcc_cv_gas_major_version" -gt 2 \ | |
7457 | && grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
7458 | && test x"$insn" != x ; then | |
7459 | gcc_cv_as_gdwarf2_debug_flag="yes" | |
7460 | fi | |
7461 | elif test x$gcc_cv_as != x -a x"$insn" != x ; then | |
7462 | echo '' > conftest.s | |
7463 | # ??? This fails with non-gnu grep. | |
7464 | if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1 | |
7465 | then | |
7466 | gcc_cv_as_gdwarf2_flag="yes" | |
7467 | fi | |
7468 | rm -f conftest.s conftest.o | |
7469 | fi | |
7470 | if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then | |
7471 | cat >> confdefs.h <<\EOF | |
7472 | #define HAVE_AS_GDWARF2_DEBUG_FLAG 1 | |
7473 | EOF | |
7474 | ||
7475 | fi | |
7476 | echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6 | |
7477 | ||
7478 | echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6 | |
06f0b04c | 7479 | echo "configure:7480: checking assembler --gstabs support" >&5 |
5f0e9ea2 GK |
7480 | gcc_cv_as_gstabs_flag=no |
7481 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; | |
7482 | then | |
7483 | if test "$gcc_cv_gas_major_version" -eq 2 \ | |
7484 | -a "$gcc_cv_gas_minor_version" -ge 11 \ | |
7485 | -o "$gcc_cv_gas_major_version" -gt 2 \ | |
7486 | && grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
7487 | && test x"$insn" != x ; then | |
7488 | gcc_cv_as_gstabs_debug_flag="yes" | |
7489 | fi | |
7490 | elif test x$gcc_cv_as != x -a x"$insn" != x ; then | |
7491 | echo '' > conftest.s | |
7492 | # ??? This fails with non-gnu grep. | |
7493 | if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then | |
7494 | gcc_cv_as_gstabs_flag="yes" | |
7495 | fi | |
7496 | rm -f conftest.s conftest.o | |
7497 | fi | |
7498 | if test x"$gcc_cv_as_gstabs_flag" = xyes; then | |
7499 | cat >> confdefs.h <<\EOF | |
7500 | #define HAVE_AS_GSTABS_DEBUG_FLAG 1 | |
7501 | EOF | |
7502 | ||
7503 | fi | |
7504 | echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6 | |
7505 | ||
793e9558 PB |
7506 | if test "$prefix" != "/usr" && test "$prefix" != "/usr/local" ; then |
7507 | cat >> confdefs.h <<EOF | |
7508 | #define PREFIX_INCLUDE_DIR "$prefix/include" | |
7509 | EOF | |
7510 | ||
7511 | fi | |
7512 | ||
861bb6c1 | 7513 | # Figure out what language subdirectories are present. |
71205e0b MH |
7514 | # Look if the user specified --enable-languages="..."; if not, use |
7515 | # the environment variable $LANGUAGES if defined. $LANGUAGES might | |
7516 | # go away some day. | |
cc9a08e0 | 7517 | # NB: embedded tabs in this IF block -- do not untabify |
71205e0b MH |
7518 | if test x"${enable_languages+set}" != xset; then |
7519 | if test x"${LANGUAGES+set}" = xset; then | |
cc9a08e0 PE |
7520 | enable_languages="${LANGUAGES}" |
7521 | echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2 | |
7522 | ||
71205e0b MH |
7523 | else |
7524 | enable_languages=all | |
7525 | fi | |
d6c6b553 | 7526 | else |
cc9a08e0 PE |
7527 | if test x"${enable_languages}" = x || |
7528 | test x"${enable_languages}" = xyes; | |
7529 | then | |
7530 | { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; } | |
d6c6b553 | 7531 | fi |
71205e0b | 7532 | fi |
cc9a08e0 | 7533 | enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'` |
75382c6d TT |
7534 | |
7535 | # First scan to see if an enabled language requires some other language. | |
7536 | # We assume that a given config-lang.in will list all the language | |
7537 | # front ends it requires, even if some are required indirectly. | |
7538 | for lang in ${srcdir}/*/config-lang.in .. | |
7539 | do | |
7540 | case $lang in | |
7541 | ..) | |
7542 | ;; | |
7543 | # The odd quoting in the next line works around | |
7544 | # an apparent bug in bash 1.12 on linux. | |
7545 | ${srcdir}/[*]/config-lang.in) | |
7546 | ;; | |
7547 | *) | |
7548 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
7549 | this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang` | |
7550 | for other in $this_lang_requires | |
7551 | do | |
7552 | case ,${enable_languages}, in | |
7553 | *,$other,*) | |
7554 | ;; | |
7555 | *,all,*) | |
7556 | ;; | |
1bf17cc4 | 7557 | *,$lang_alias,*) |
75382c6d TT |
7558 | enable_languages="$enable_languages,$other" |
7559 | ;; | |
7560 | esac | |
7561 | done | |
7562 | ;; | |
7563 | esac | |
7564 | done | |
7565 | ||
861bb6c1 JL |
7566 | subdirs= |
7567 | for lang in ${srcdir}/*/config-lang.in .. | |
7568 | do | |
7569 | case $lang in | |
7570 | ..) ;; | |
7571 | # The odd quoting in the next line works around | |
7572 | # an apparent bug in bash 1.12 on linux. | |
7573 | ${srcdir}/[*]/config-lang.in) ;; | |
71205e0b MH |
7574 | *) |
7575 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
2b60b2cb AO |
7576 | this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang` |
7577 | build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang` | |
71205e0b MH |
7578 | if test "x$lang_alias" = x |
7579 | then | |
7580 | echo "$lang doesn't set \$language." 1>&2 | |
7581 | exit 1 | |
7582 | fi | |
2b60b2cb AO |
7583 | case ${build_by_default},${enable_languages}, in |
7584 | *,$lang_alias,*) add_this_lang=yes ;; | |
7585 | no,*) add_this_lang=no ;; | |
7586 | *,all,*) add_this_lang=yes ;; | |
7587 | *) add_this_lang=no ;; | |
7588 | esac | |
71205e0b MH |
7589 | if test x"${add_this_lang}" = xyes; then |
7590 | case $lang in | |
7591 | ${srcdir}/ada/config-lang.in) | |
1ffc5c6e | 7592 | if test x$have_gnat = xyes ; then |
71205e0b MH |
7593 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" |
7594 | fi | |
7595 | ;; | |
7596 | *) | |
7597 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" | |
7598 | ;; | |
7599 | esac | |
7600 | fi | |
7601 | ;; | |
861bb6c1 JL |
7602 | esac |
7603 | done | |
7604 | ||
f24af81b TT |
7605 | # Make gthr-default.h if we have a thread file. |
7606 | gthread_flags= | |
75bffa71 | 7607 | if test $thread_file != single; then |
f24af81b | 7608 | rm -f gthr-default.h |
db0d1ed9 | 7609 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h |
f24af81b TT |
7610 | gthread_flags=-DHAVE_GTHR_DEFAULT |
7611 | fi | |
7612 | ||
7613 | ||
81bf3d9e RH |
7614 | # Find out what GC implementation we want, or may, use. |
7615 | # Check whether --with-gc or --without-gc was given. | |
7616 | if test "${with_gc+set}" = set; then | |
7617 | withval="$with_gc" | |
7618 | case "$withval" in | |
7619 | simple | page) | |
7620 | GGC=ggc-$withval | |
7621 | ;; | |
7622 | *) | |
7623 | { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; } | |
7624 | ;; | |
7625 | esac | |
7626 | else | |
005537df | 7627 | GGC=ggc-page |
81bf3d9e RH |
7628 | fi |
7629 | ||
7630 | ||
7631 | echo "Using $GGC for garbage collection." | |
7632 | ||
3c809ba4 | 7633 | # Use the system's zlib library. |
b8dad04b ZW |
7634 | zlibdir=-L../zlib |
7635 | zlibinc="-I\$(srcdir)/../zlib" | |
3c809ba4 AG |
7636 | # Check whether --with-system-zlib or --without-system-zlib was given. |
7637 | if test "${with_system_zlib+set}" = set; then | |
7638 | withval="$with_system_zlib" | |
7639 | zlibdir= | |
7640 | zlibinc= | |
7641 | ||
7642 | fi | |
7643 | ||
7644 | ||
7645 | ||
7646 | ||
dc6746e7 PT |
7647 | |
7648 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 | |
06f0b04c | 7649 | echo "configure:7650: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
dc6746e7 PT |
7650 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
7651 | if test "${enable_maintainer_mode+set}" = set; then | |
7652 | enableval="$enable_maintainer_mode" | |
7653 | maintainer_mode=$enableval | |
7654 | else | |
7655 | maintainer_mode=no | |
7656 | fi | |
7657 | ||
7658 | ||
7659 | echo "$ac_t""$maintainer_mode" 1>&6 | |
7660 | ||
7661 | if test "$maintainer_mode" = "yes"; then | |
7662 | MAINT='' | |
7663 | else | |
7664 | MAINT='#' | |
7665 | fi | |
7666 | ||
531073e7 RH |
7667 | # With Setjmp/Longjmp based exception handling. |
7668 | # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. | |
7669 | if test "${enable_sjlj_exceptions+set}" = set; then | |
7670 | enableval="$enable_sjlj_exceptions" | |
7671 | sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` | |
7672 | cat >> confdefs.h <<EOF | |
7673 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj | |
7674 | EOF | |
7675 | ||
7676 | fi | |
7677 | ||
7678 | ||
861bb6c1 JL |
7679 | # Make empty files to contain the specs and options for each language. |
7680 | # Then add #include lines to for a compiler that has specs and/or options. | |
7681 | ||
7682 | lang_specs_files= | |
7683 | lang_options_files= | |
3103b7db ML |
7684 | lang_tree_files= |
7685 | rm -f specs.h options.h gencheck.h | |
7686 | touch specs.h options.h gencheck.h | |
861bb6c1 JL |
7687 | for subdir in . $subdirs |
7688 | do | |
75bffa71 | 7689 | if test -f $srcdir/$subdir/lang-specs.h; then |
861bb6c1 JL |
7690 | echo "#include \"$subdir/lang-specs.h\"" >>specs.h |
7691 | lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" | |
7692 | fi | |
75bffa71 | 7693 | if test -f $srcdir/$subdir/lang-options.h; then |
861bb6c1 JL |
7694 | echo "#include \"$subdir/lang-options.h\"" >>options.h |
7695 | lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h" | |
7696 | fi | |
3103b7db ML |
7697 | if test -f $srcdir/$subdir/$subdir-tree.def; then |
7698 | echo "#include \"$subdir/$subdir-tree.def\"" >>gencheck.h | |
7699 | lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" | |
7700 | fi | |
861bb6c1 JL |
7701 | done |
7702 | ||
7703 | # These (without "all_") are set in each config-lang.in. | |
7704 | # `language' must be a single word so is spelled singularly. | |
7705 | all_languages= | |
7706 | all_boot_languages= | |
7707 | all_compilers= | |
7708 | all_stagestuff= | |
7709 | all_diff_excludes= | |
5b7874aa | 7710 | all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc' |
861bb6c1 JL |
7711 | # List of language makefile fragments. |
7712 | all_lang_makefiles= | |
7713 | all_headers= | |
7714 | all_lib2funcs= | |
7715 | ||
7716 | # Add the language fragments. | |
7717 | # Languages are added via two mechanisms. Some information must be | |
7718 | # recorded in makefile variables, these are defined in config-lang.in. | |
7719 | # We accumulate them and plug them into the main Makefile. | |
7720 | # The other mechanism is a set of hooks for each of the main targets | |
7721 | # like `clean', `install', etc. | |
7722 | ||
7723 | language_fragments="Make-lang" | |
7724 | language_hooks="Make-hooks" | |
861bb6c1 JL |
7725 | |
7726 | for s in .. $subdirs | |
7727 | do | |
75bffa71 | 7728 | if test $s != ".." |
861bb6c1 JL |
7729 | then |
7730 | language= | |
7731 | boot_language= | |
7732 | compilers= | |
7733 | stagestuff= | |
7734 | diff_excludes= | |
7735 | headers= | |
7736 | outputs= | |
7737 | lib2funcs= | |
7738 | . ${srcdir}/$s/config-lang.in | |
75bffa71 | 7739 | if test "x$language" = x |
861bb6c1 JL |
7740 | then |
7741 | echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2 | |
7742 | exit 1 | |
7743 | fi | |
72aaffbd ZW |
7744 | all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in" |
7745 | if test -f ${srcdir}/$s/Makefile.in | |
7746 | then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in" | |
7747 | fi | |
861bb6c1 | 7748 | all_languages="$all_languages $language" |
75bffa71 | 7749 | if test "x$boot_language" = xyes |
861bb6c1 JL |
7750 | then |
7751 | all_boot_languages="$all_boot_languages $language" | |
7752 | fi | |
7753 | all_compilers="$all_compilers $compilers" | |
7754 | all_stagestuff="$all_stagestuff $stagestuff" | |
7755 | all_diff_excludes="$all_diff_excludes $diff_excludes" | |
7756 | all_headers="$all_headers $headers" | |
7757 | all_outputs="$all_outputs $outputs" | |
861bb6c1 JL |
7758 | all_lib2funcs="$all_lib2funcs $lib2funcs" |
7759 | fi | |
7760 | done | |
7761 | ||
cbc59f01 DD |
7762 | check_languages= |
7763 | for language in .. $all_languages | |
7764 | do | |
7765 | if test $language != ".." | |
7766 | then | |
7767 | check_languages="$check_languages check-$language" | |
7768 | fi | |
7769 | done | |
7770 | ||
861bb6c1 JL |
7771 | # Since we can't use `::' targets, we link each language in |
7772 | # with a set of hooks, reached indirectly via lang.${target}. | |
7773 | ||
7774 | rm -f Make-hooks | |
7775 | touch Make-hooks | |
7776 | target_list="all.build all.cross start.encap rest.encap \ | |
d3945f0a | 7777 | info dvi generated-manpages \ |
861bb6c1 | 7778 | install-normal install-common install-info install-man \ |
436a88a6 | 7779 | uninstall \ |
861bb6c1 JL |
7780 | mostlyclean clean distclean extraclean maintainer-clean \ |
7781 | stage1 stage2 stage3 stage4" | |
7782 | for t in $target_list | |
7783 | do | |
7784 | x= | |
ab87f8c8 | 7785 | for lang in .. $all_languages |
861bb6c1 | 7786 | do |
ab87f8c8 JL |
7787 | if test $lang != ".."; then |
7788 | x="$x $lang.$t" | |
861bb6c1 JL |
7789 | fi |
7790 | done | |
7791 | echo "lang.$t: $x" >> Make-hooks | |
7792 | done | |
7793 | ||
cc06d68c | 7794 | # Create .gdbinit. |
861bb6c1 | 7795 | |
cc06d68c GP |
7796 | echo "dir ." > .gdbinit |
7797 | echo "dir ${srcdir}" >> .gdbinit | |
7798 | if test x$gdb_needs_out_file_path = xyes | |
7799 | then | |
7800 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
7801 | fi | |
7802 | if test "x$subdirs" != x; then | |
7803 | for s in $subdirs | |
7804 | do | |
7805 | echo "dir ${srcdir}/$s" >> .gdbinit | |
7806 | done | |
861bb6c1 | 7807 | fi |
cc06d68c | 7808 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 7809 | |
88111b26 JL |
7810 | # Define variables host_canonical and build_canonical |
7811 | # because some Cygnus local changes in the Makefile depend on them. | |
7812 | build_canonical=${build} | |
7813 | host_canonical=${host} | |
7814 | target_subdir= | |
75bffa71 | 7815 | if test "${host}" != "${target}" ; then |
924c96eb | 7816 | target_subdir=${target_alias}/ |
88111b26 JL |
7817 | fi |
7818 | ||
7819 | ||
7820 | ||
7821 | ||
8f8d3278 NC |
7822 | # If $(exec_prefix) exists and is not the same as $(prefix), then compute an |
7823 | # absolute path for gcc_tooldir based on inserting the number of up-directory | |
7824 | # movements required to get from $(exec_prefix) to $(prefix) into the basic | |
7825 | # $(libsubdir)/@(unlibsubdir) based path. | |
82cbf8f7 JL |
7826 | # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel |
7827 | # make and thus we'd get different behavior depending on where we built the | |
7828 | # sources. | |
5949a9fc | 7829 | if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then |
d062c304 JL |
7830 | gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)' |
7831 | else | |
8f8d3278 NC |
7832 | # An explanation of the sed strings: |
7833 | # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix' | |
7834 | # -e 's|/$||' match a trailing forward slash and eliminates it | |
7835 | # -e 's|^[^/]|/|' forces the string to start with a forward slash (*) | |
ff7cc307 | 7836 | # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../ |
8f8d3278 NC |
7837 | # |
7838 | # (*) Note this pattern overwrites the first character of the string | |
7839 | # with a forward slash if one is not already present. This is not a | |
7840 | # problem because the exact names of the sub-directories concerned is | |
7841 | # unimportant, just the number of them matters. | |
7842 | # | |
7843 | # The practical upshot of these patterns is like this: | |
7844 | # | |
7845 | # prefix exec_prefix result | |
7846 | # ------ ----------- ------ | |
7847 | # /foo /foo/bar ../ | |
7848 | # /foo/ /foo/bar ../ | |
7849 | # /foo /foo/bar/ ../ | |
7850 | # /foo/ /foo/bar/ ../ | |
7851 | # /foo /foo/bar/ugg ../../ | |
7852 | # | |
4c112cda NC |
7853 | dollar='$$' |
7854 | gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)" | |
d062c304 JL |
7855 | fi |
7856 | ||
7857 | ||
2ce3c6c6 | 7858 | |
2bbea3a6 RH |
7859 | # Find a directory in which to install a shared libgcc. |
7860 | ||
7861 | # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. | |
7862 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
7863 | enableval="$enable_version_specific_runtime_libs" | |
7864 | : | |
7865 | fi | |
7866 | ||
7867 | ||
5b15f277 RH |
7868 | # Check whether --with-slibdir or --without-slibdir was given. |
7869 | if test "${with_slibdir+set}" = set; then | |
7870 | withval="$with_slibdir" | |
7871 | slibdir="$with_slibdir" | |
7872 | else | |
7873 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 7874 | slibdir='$(libsubdir)' |
5b15f277 | 7875 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
7876 | slibdir='$(build_tooldir)/lib' |
7877 | else | |
5b15f277 | 7878 | slibdir='$(libdir)' |
2bbea3a6 | 7879 | fi |
5b15f277 RH |
7880 | fi |
7881 | ||
2bbea3a6 RH |
7882 | |
7883 | ||
7e717196 JL |
7884 | # Nothing to do for FLOAT_H, float_format already handled. |
7885 | objdir=`pwd` | |
7886 | ||
7887 | ||
861bb6c1 JL |
7888 | # Process the language and host/target makefile fragments. |
7889 | ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file" | |
7890 | ||
7891 | # Substitute configuration variables | |
7892 | ||
7893 | ||
7894 | ||
7895 | ||
7896 | ||
7897 | ||
7898 | ||
7899 | ||
7900 | ||
7901 | ||
7902 | ||
7903 | ||
7904 | ||
7905 | ||
7906 | ||
7907 | ||
7908 | ||
7909 | ||
7910 | ||
7911 | ||
7912 | ||
7913 | ||
7914 | ||
7915 | ||
7916 | ||
7917 | ||
7918 | ||
7919 | ||
7920 | ||
7921 | ||
7922 | ||
7923 | ||
7924 | ||
7925 | ||
7926 | ||
7927 | ||
7928 | ||
7929 | ||
7930 | ||
7931 | ||
7932 | ||
7933 | ||
7934 | ||
7935 | ||
7936 | ||
7937 | ||
9b16d2c4 | 7938 | |
e9a25f70 | 7939 | |
6e26218f | 7940 | |
c8724862 | 7941 | |
e061d1ce | 7942 | |
d8bb17c8 | 7943 | |
11642c3a ZW |
7944 | |
7945 | ||
7946 | ||
7947 | ||
7948 | ||
7949 | ||
7950 | ||
7951 | ||
9fc9b82a | 7952 | |
8763704d | 7953 | |
aac69a49 NC |
7954 | |
7955 | ||
cc1e60ea | 7956 | |
3d9d2476 | 7957 | |
861bb6c1 JL |
7958 | |
7959 | ||
7960 | # Echo that links are built | |
75bffa71 | 7961 | if test x$host = x$target |
861bb6c1 JL |
7962 | then |
7963 | str1="native " | |
7964 | else | |
7965 | str1="cross-" | |
7966 | str2=" from $host" | |
7967 | fi | |
7968 | ||
75bffa71 | 7969 | if test x$host != x$build |
861bb6c1 JL |
7970 | then |
7971 | str3=" on a $build system" | |
7972 | fi | |
7973 | ||
75bffa71 | 7974 | if test "x$str2" != x || test "x$str3" != x |
861bb6c1 JL |
7975 | then |
7976 | str4= | |
7977 | fi | |
7978 | ||
7979 | echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2 | |
7980 | ||
75bffa71 | 7981 | if test "x$str2" != x || test "x$str3" != x |
861bb6c1 JL |
7982 | then |
7983 | echo " ${str2}${str3}." 1>&2 | |
7984 | fi | |
7985 | ||
f6cb0e63 | 7986 | # Truncate the target if necessary |
75bffa71 | 7987 | if test x$host_truncate_target != x; then |
f6cb0e63 JL |
7988 | target=`echo $target | sed -e 's/\(..............\).*/\1/'` |
7989 | fi | |
7990 | ||
861bb6c1 JL |
7991 | # Configure the subdirectories |
7992 | # AC_CONFIG_SUBDIRS($subdirs) | |
7993 | ||
7994 | # Create the Makefile | |
7995 | # and configure language subdirectories | |
7996 | trap '' 1 2 15 | |
7997 | cat > confcache <<\EOF | |
7998 | # This file is a shell script that caches the results of configure | |
7999 | # tests run on this system so they can be shared between configure | |
8000 | # scripts and configure runs. It is not useful on other systems. | |
8001 | # If it contains results you don't want to keep, you may remove or edit it. | |
8002 | # | |
8003 | # By default, configure uses ./config.cache as the cache file, | |
8004 | # creating it if it does not exist already. You can give configure | |
8005 | # the --cache-file=FILE option to use a different cache file; that is | |
8006 | # what configure does when it calls configure scripts in | |
8007 | # subdirectories, so they share the cache. | |
8008 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
8009 | # config.status only pays attention to the cache file if you give it the | |
8010 | # --recheck option to rerun configure. | |
8011 | # | |
8012 | EOF | |
8013 | # The following way of writing the cache mishandles newlines in values, | |
8014 | # but we know of no workaround that is simple, portable, and efficient. | |
8015 | # So, don't put newlines in cache variables' values. | |
8016 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
8017 | # and sets the high bit in the cache file unless we assign to the vars. | |
8018 | (set) 2>&1 | | |
b27d2bd5 | 8019 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
861bb6c1 JL |
8020 | *ac_space=\ *) |
8021 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
8022 | # turns \\\\ into \\, and sed turns \\ into \). | |
8023 | sed -n \ | |
8024 | -e "s/'/'\\\\''/g" \ | |
8025 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
8026 | ;; | |
8027 | *) | |
8028 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
8029 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
8030 | ;; | |
8031 | esac >> confcache | |
8032 | if cmp -s $cache_file confcache; then | |
8033 | : | |
8034 | else | |
8035 | if test -w $cache_file; then | |
8036 | echo "updating cache $cache_file" | |
8037 | cat confcache > $cache_file | |
8038 | else | |
8039 | echo "not updating unwritable cache $cache_file" | |
8040 | fi | |
8041 | fi | |
8042 | rm -f confcache | |
8043 | ||
8044 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
8045 | ||
8046 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
8047 | # Let make expand exec_prefix. | |
8048 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
8049 | ||
8050 | # Any assignment to VPATH causes Sun make to only execute | |
8051 | # the first set of double-colon rules, so remove it if not needed. | |
8052 | # If there is a colon in the path, we need to keep it. | |
8053 | if test "x$srcdir" = x.; then | |
8054 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
8055 | fi | |
8056 | ||
8057 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
8058 | ||
8059 | DEFS=-DHAVE_CONFIG_H | |
8060 | ||
8061 | # Without the "./", some shells look in PATH for config.status. | |
8062 | : ${CONFIG_STATUS=./config.status} | |
8063 | ||
8064 | echo creating $CONFIG_STATUS | |
8065 | rm -f $CONFIG_STATUS | |
8066 | cat > $CONFIG_STATUS <<EOF | |
8067 | #! /bin/sh | |
8068 | # Generated automatically by configure. | |
8069 | # Run this file to recreate the current configuration. | |
8070 | # This directory was configured as follows, | |
8071 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
8072 | # | |
8073 | # $0 $ac_configure_args | |
8074 | # | |
8075 | # Compiler output produced by configure, useful for debugging | |
8076 | # configure, is in ./config.log if it exists. | |
8077 | ||
8078 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
8079 | for ac_option | |
8080 | do | |
8081 | case "\$ac_option" in | |
8082 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
8083 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
8084 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
8085 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
b27d2bd5 | 8086 | echo "$CONFIG_STATUS generated by autoconf version 2.13" |
861bb6c1 JL |
8087 | exit 0 ;; |
8088 | -help | --help | --hel | --he | --h) | |
8089 | echo "\$ac_cs_usage"; exit 0 ;; | |
8090 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
8091 | esac | |
8092 | done | |
8093 | ||
8094 | ac_given_srcdir=$srcdir | |
861bb6c1 | 8095 | |
b7cb92ad | 8096 | trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
861bb6c1 JL |
8097 | EOF |
8098 | cat >> $CONFIG_STATUS <<EOF | |
8099 | ||
8100 | # Protect against being on the right side of a sed subst in config.status. | |
8101 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
8102 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
8103 | $ac_vpsub | |
8104 | $extrasub | |
6f144c9c | 8105 | s%@SHELL@%$SHELL%g |
861bb6c1 JL |
8106 | s%@CFLAGS@%$CFLAGS%g |
8107 | s%@CPPFLAGS@%$CPPFLAGS%g | |
8108 | s%@CXXFLAGS@%$CXXFLAGS%g | |
b27d2bd5 | 8109 | s%@FFLAGS@%$FFLAGS%g |
861bb6c1 JL |
8110 | s%@DEFS@%$DEFS%g |
8111 | s%@LDFLAGS@%$LDFLAGS%g | |
8112 | s%@LIBS@%$LIBS%g | |
8113 | s%@exec_prefix@%$exec_prefix%g | |
8114 | s%@prefix@%$prefix%g | |
8115 | s%@program_transform_name@%$program_transform_name%g | |
8116 | s%@bindir@%$bindir%g | |
8117 | s%@sbindir@%$sbindir%g | |
8118 | s%@libexecdir@%$libexecdir%g | |
8119 | s%@datadir@%$datadir%g | |
8120 | s%@sysconfdir@%$sysconfdir%g | |
8121 | s%@sharedstatedir@%$sharedstatedir%g | |
8122 | s%@localstatedir@%$localstatedir%g | |
8123 | s%@libdir@%$libdir%g | |
8124 | s%@includedir@%$includedir%g | |
8125 | s%@oldincludedir@%$oldincludedir%g | |
8126 | s%@infodir@%$infodir%g | |
8127 | s%@mandir@%$mandir%g | |
39d6f2e8 | 8128 | s%@enable_multilib@%$enable_multilib%g |
50503ac8 | 8129 | s%@enable_shared@%$enable_shared%g |
861bb6c1 JL |
8130 | s%@host@%$host%g |
8131 | s%@host_alias@%$host_alias%g | |
8132 | s%@host_cpu@%$host_cpu%g | |
8133 | s%@host_vendor@%$host_vendor%g | |
8134 | s%@host_os@%$host_os%g | |
8135 | s%@target@%$target%g | |
8136 | s%@target_alias@%$target_alias%g | |
8137 | s%@target_cpu@%$target_cpu%g | |
8138 | s%@target_vendor@%$target_vendor%g | |
8139 | s%@target_os@%$target_os%g | |
8140 | s%@build@%$build%g | |
8141 | s%@build_alias@%$build_alias%g | |
8142 | s%@build_cpu@%$build_cpu%g | |
8143 | s%@build_vendor@%$build_vendor%g | |
8144 | s%@build_os@%$build_os%g | |
e9a25f70 | 8145 | s%@CC@%$CC%g |
3ec83fc2 | 8146 | s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g |
b8dad04b ZW |
8147 | s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g |
8148 | s%@strict1_warn@%$strict1_warn%g | |
84c041a1 | 8149 | s%@CPP@%$CPP%g |
b8dad04b ZW |
8150 | s%@warn_cflags@%$warn_cflags%g |
8151 | s%@stage1_cflags@%$stage1_cflags%g | |
e9a25f70 | 8152 | s%@SET_MAKE@%$SET_MAKE%g |
861bb6c1 | 8153 | s%@AWK@%$AWK%g |
0a4b6309 RL |
8154 | s%@LN@%$LN%g |
8155 | s%@LN_S@%$LN_S%g | |
861bb6c1 | 8156 | s%@RANLIB@%$RANLIB%g |
0a4b6309 RL |
8157 | s%@INSTALL@%$INSTALL%g |
8158 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g | |
8159 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
67f28219 ZW |
8160 | s%@GNATBIND@%$GNATBIND%g |
8161 | s%@ADAC@%$ADAC%g | |
955be633 | 8162 | s%@have_mktemp_command@%$have_mktemp_command%g |
09fa0705 ZW |
8163 | s%@MAKEINFO@%$MAKEINFO%g |
8164 | s%@BUILD_INFO@%$BUILD_INFO%g | |
fd939e46 | 8165 | s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g |
1e608388 ZW |
8166 | s%@FLEX@%$FLEX%g |
8167 | s%@BISON@%$BISON%g | |
4e70264f | 8168 | s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g |
7f2749d4 | 8169 | s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g |
e256b8b6 | 8170 | s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g |
f91abfce | 8171 | s%@LIBICONV@%$LIBICONV%g |
861bb6c1 | 8172 | s%@manext@%$manext%g |
992d1248 | 8173 | s%@objext@%$objext%g |
06f0b04c | 8174 | s%@FORBUILD@%$FORBUILD%g |
ab87f8c8 JL |
8175 | s%@PACKAGE@%$PACKAGE%g |
8176 | s%@VERSION@%$VERSION%g | |
71a94577 ZW |
8177 | s%@ALLOCA@%$ALLOCA%g |
8178 | s%@GLIBC21@%$GLIBC21%g | |
ab87f8c8 JL |
8179 | s%@USE_NLS@%$USE_NLS%g |
8180 | s%@MSGFMT@%$MSGFMT%g | |
8181 | s%@GMSGFMT@%$GMSGFMT%g | |
8182 | s%@XGETTEXT@%$XGETTEXT%g | |
71a94577 ZW |
8183 | s%@INTLBISON@%$INTLBISON%g |
8184 | s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g | |
ab87f8c8 JL |
8185 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g |
8186 | s%@CATALOGS@%$CATALOGS%g | |
8187 | s%@CATOBJEXT@%$CATOBJEXT%g | |
ab87f8c8 | 8188 | s%@INTLLIBS@%$INTLLIBS%g |
77c06844 | 8189 | s%@INTLDEPS@%$INTLDEPS%g |
ab87f8c8 | 8190 | s%@INTLOBJS@%$INTLOBJS%g |
ab87f8c8 | 8191 | s%@POSUB@%$POSUB%g |
71a94577 ZW |
8192 | s%@DATADIRNAME@%$DATADIRNAME%g |
8193 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
8194 | s%@GENCAT@%$GENCAT%g | |
ab87f8c8 | 8195 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g |
71a94577 | 8196 | s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g |
b39d221a | 8197 | s%@inhibit_libc@%$inhibit_libc%g |
f24af81b | 8198 | s%@gthread_flags@%$gthread_flags%g |
81bf3d9e | 8199 | s%@GGC@%$GGC%g |
3c809ba4 AG |
8200 | s%@zlibdir@%$zlibdir%g |
8201 | s%@zlibinc@%$zlibinc%g | |
dc6746e7 | 8202 | s%@MAINT@%$MAINT%g |
88111b26 JL |
8203 | s%@build_canonical@%$build_canonical%g |
8204 | s%@host_canonical@%$host_canonical%g | |
8205 | s%@target_subdir@%$target_subdir%g | |
d062c304 | 8206 | s%@gcc_tooldir@%$gcc_tooldir%g |
4c112cda | 8207 | s%@dollar@%$dollar%g |
2bbea3a6 | 8208 | s%@slibdir@%$slibdir%g |
7e717196 | 8209 | s%@objdir@%$objdir%g |
861bb6c1 | 8210 | s%@subdirs@%$subdirs%g |
861bb6c1 JL |
8211 | s%@all_boot_languages@%$all_boot_languages%g |
8212 | s%@all_compilers@%$all_compilers%g | |
861bb6c1 | 8213 | s%@all_diff_excludes@%$all_diff_excludes%g |
861bb6c1 | 8214 | s%@all_headers@%$all_headers%g |
4f3ae93c BK |
8215 | s%@all_lang_makefiles@%$all_lang_makefiles%g |
8216 | s%@all_languages@%$all_languages%g | |
8217 | s%@all_lib2funcs@%$all_lib2funcs%g | |
8218 | s%@all_stagestuff@%$all_stagestuff%g | |
8219 | s%@build_exeext@%$build_exeext%g | |
8220 | s%@build_install_headers_dir@%$build_install_headers_dir%g | |
8221 | s%@build_xm_file_list@%$build_xm_file_list%g | |
11642c3a ZW |
8222 | s%@build_xm_file@%$build_xm_file%g |
8223 | s%@build_xm_defines@%$build_xm_defines%g | |
cbc59f01 | 8224 | s%@check_languages@%$check_languages%g |
4f3ae93c | 8225 | s%@cc_set_by_configure@%$cc_set_by_configure%g |
5aa82ace | 8226 | s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g |
4f3ae93c | 8227 | s%@cpp_install_dir@%$cpp_install_dir%g |
4f3ae93c BK |
8228 | s%@dep_host_xmake_file@%$dep_host_xmake_file%g |
8229 | s%@dep_tmake_file@%$dep_tmake_file%g | |
8230 | s%@extra_c_flags@%$extra_c_flags%g | |
4f3ae93c | 8231 | s%@extra_headers_list@%$extra_headers_list%g |
861bb6c1 | 8232 | s%@extra_objs@%$extra_objs%g |
4f3ae93c BK |
8233 | s%@extra_parts@%$extra_parts%g |
8234 | s%@extra_passes@%$extra_passes%g | |
8235 | s%@extra_programs@%$extra_programs%g | |
4f3ae93c | 8236 | s%@float_h_file@%$float_h_file%g |
cc1e60ea | 8237 | s%@gcc_config_arguments@%$gcc_config_arguments%g |
4f3ae93c | 8238 | s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g |
e2187d3b | 8239 | s%@libstdcxx_incdir@%$libstdcxx_incdir%g |
4f3ae93c | 8240 | s%@gcc_version@%$gcc_version%g |
8763704d | 8241 | s%@gcc_version_full@%$gcc_version_full%g |
4f3ae93c BK |
8242 | s%@gcc_version_trigger@%$gcc_version_trigger%g |
8243 | s%@host_exeext@%$host_exeext%g | |
861bb6c1 | 8244 | s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g |
861bb6c1 | 8245 | s%@host_xm_file_list@%$host_xm_file_list%g |
11642c3a ZW |
8246 | s%@host_xm_file@%$host_xm_file%g |
8247 | s%@host_xm_defines@%$host_xm_defines%g | |
4f3ae93c | 8248 | s%@install@%$install%g |
861bb6c1 | 8249 | s%@lang_options_files@%$lang_options_files%g |
4f3ae93c | 8250 | s%@lang_specs_files@%$lang_specs_files%g |
3103b7db | 8251 | s%@lang_tree_files@%$lang_tree_files%g |
861bb6c1 | 8252 | s%@local_prefix@%$local_prefix%g |
4f3ae93c BK |
8253 | s%@md_file@%$md_file%g |
8254 | s%@objc_boehm_gc@%$objc_boehm_gc%g | |
8255 | s%@out_file@%$out_file%g | |
8256 | s%@out_object_file@%$out_object_file%g | |
861bb6c1 | 8257 | s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g |
e9a25f70 | 8258 | s%@symbolic_link@%$symbolic_link%g |
4f3ae93c BK |
8259 | s%@thread_file@%$thread_file%g |
8260 | s%@tm_file_list@%$tm_file_list%g | |
11642c3a ZW |
8261 | s%@tm_file@%$tm_file%g |
8262 | s%@tm_p_file_list@%$tm_p_file_list%g | |
8263 | s%@tm_p_file@%$tm_p_file%g | |
8264 | s%@xm_file@%$xm_file%g | |
3d9d2476 | 8265 | s%@xm_defines@%$xm_defines%g |
aac69a49 NC |
8266 | s%@c_target_objs@%$c_target_objs%g |
8267 | s%@cxx_target_objs@%$cxx_target_objs%g | |
11642c3a | 8268 | s%@target_cpu_default@%$target_cpu_default%g |
861bb6c1 JL |
8269 | /@target_overrides@/r $target_overrides |
8270 | s%@target_overrides@%%g | |
8271 | /@host_overrides@/r $host_overrides | |
8272 | s%@host_overrides@%%g | |
8273 | s%@cross_defines@%$cross_defines%g | |
8274 | /@cross_overrides@/r $cross_overrides | |
8275 | s%@cross_overrides@%%g | |
8276 | /@build_overrides@/r $build_overrides | |
8277 | s%@build_overrides@%%g | |
8278 | /@language_fragments@/r $language_fragments | |
8279 | s%@language_fragments@%%g | |
8280 | /@language_hooks@/r $language_hooks | |
8281 | s%@language_hooks@%%g | |
8282 | ||
8283 | CEOF | |
8284 | EOF | |
8285 | ||
8286 | cat >> $CONFIG_STATUS <<\EOF | |
8287 | ||
8288 | # Split the substitutions into bite-sized pieces for seds with | |
8289 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
8290 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
8291 | ac_file=1 # Number of current file. | |
8292 | ac_beg=1 # First line for current file. | |
8293 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
8294 | ac_more_lines=: | |
8295 | ac_sed_cmds="" | |
8296 | while $ac_more_lines; do | |
8297 | if test $ac_beg -gt 1; then | |
8298 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
8299 | else | |
8300 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
8301 | fi | |
8302 | if test ! -s conftest.s$ac_file; then | |
8303 | ac_more_lines=false | |
8304 | rm -f conftest.s$ac_file | |
8305 | else | |
8306 | if test -z "$ac_sed_cmds"; then | |
8307 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
8308 | else | |
8309 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
8310 | fi | |
8311 | ac_file=`expr $ac_file + 1` | |
8312 | ac_beg=$ac_end | |
8313 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
8314 | fi | |
8315 | done | |
8316 | if test -z "$ac_sed_cmds"; then | |
8317 | ac_sed_cmds=cat | |
8318 | fi | |
8319 | EOF | |
8320 | ||
8321 | cat >> $CONFIG_STATUS <<EOF | |
8322 | ||
8323 | CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"} | |
8324 | EOF | |
8325 | cat >> $CONFIG_STATUS <<\EOF | |
8326 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
8327 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
8328 | case "$ac_file" in | |
8329 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
8330 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
8331 | *) ac_file_in="${ac_file}.in" ;; | |
8332 | esac | |
8333 | ||
8334 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
8335 | ||
8336 | # Remove last slash and all that follows it. Not all systems have dirname. | |
8337 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
8338 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
8339 | # The file is in a subdirectory. | |
8340 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
8341 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
8342 | # A "../" for each directory in $ac_dir_suffix. | |
8343 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
8344 | else | |
8345 | ac_dir_suffix= ac_dots= | |
8346 | fi | |
8347 | ||
8348 | case "$ac_given_srcdir" in | |
8349 | .) srcdir=. | |
8350 | if test -z "$ac_dots"; then top_srcdir=. | |
8351 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
8352 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
8353 | *) # Relative path. | |
8354 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
8355 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
8356 | esac | |
8357 | ||
861bb6c1 JL |
8358 | |
8359 | echo creating "$ac_file" | |
8360 | rm -f "$ac_file" | |
8361 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
8362 | case "$ac_file" in | |
8363 | *Makefile*) ac_comsub="1i\\ | |
8364 | # $configure_input" ;; | |
8365 | *) ac_comsub= ;; | |
8366 | esac | |
8367 | ||
8368 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
8369 | sed -e "$ac_comsub | |
8370 | s%@configure_input@%$configure_input%g | |
8371 | s%@srcdir@%$srcdir%g | |
8372 | s%@top_srcdir@%$top_srcdir%g | |
861bb6c1 JL |
8373 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
8374 | fi; done | |
8375 | rm -f conftest.s* | |
8376 | ||
8377 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
8378 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
8379 | # | |
8380 | # ac_d sets the value in "#define NAME VALUE" lines. | |
8381 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
8382 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
8383 | ac_dC='\3' | |
8384 | ac_dD='%g' | |
8385 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
8386 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
8387 | ac_uB='\([ ]\)%\1#\2define\3' | |
8388 | ac_uC=' ' | |
8389 | ac_uD='\4%g' | |
8390 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
8391 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
8392 | ac_eB='$%\1#\2define\3' | |
8393 | ac_eC=' ' | |
8394 | ac_eD='%g' | |
8395 | ||
8396 | if test "${CONFIG_HEADERS+set}" != set; then | |
8397 | EOF | |
8398 | cat >> $CONFIG_STATUS <<EOF | |
b7cb92ad | 8399 | CONFIG_HEADERS="auto-host.h:config.in" |
861bb6c1 JL |
8400 | EOF |
8401 | cat >> $CONFIG_STATUS <<\EOF | |
8402 | fi | |
8403 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
8404 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
8405 | case "$ac_file" in | |
8406 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
8407 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
8408 | *) ac_file_in="${ac_file}.in" ;; | |
8409 | esac | |
8410 | ||
8411 | echo creating $ac_file | |
8412 | ||
8413 | rm -f conftest.frag conftest.in conftest.out | |
8414 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
8415 | cat $ac_file_inputs > conftest.in | |
8416 | ||
8417 | EOF | |
8418 | ||
8419 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
8420 | # the proper values into config.h.in to produce config.h. And first: | |
8421 | # Protect against being on the right side of a sed subst in config.status. | |
8422 | # Protect against being in an unquoted here document in config.status. | |
8423 | rm -f conftest.vals | |
8424 | cat > conftest.hdr <<\EOF | |
8425 | s/[\\&%]/\\&/g | |
8426 | s%[\\$`]%\\&%g | |
8427 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
8428 | s%ac_d%ac_u%gp | |
8429 | s%ac_u%ac_e%gp | |
8430 | EOF | |
8431 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
8432 | rm -f conftest.hdr | |
8433 | ||
8434 | # This sed command replaces #undef with comments. This is necessary, for | |
8435 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
8436 | # on some systems where configure will not decide to define it. | |
8437 | cat >> conftest.vals <<\EOF | |
8438 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
8439 | EOF | |
8440 | ||
8441 | # Break up conftest.vals because some shells have a limit on | |
8442 | # the size of here documents, and old seds have small limits too. | |
8443 | ||
8444 | rm -f conftest.tail | |
8445 | while : | |
8446 | do | |
8447 | ac_lines=`grep -c . conftest.vals` | |
8448 | # grep -c gives empty output for an empty file on some AIX systems. | |
8449 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
8450 | # Write a limited-size here document to conftest.frag. | |
8451 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
8452 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
8453 | echo 'CEOF | |
8454 | sed -f conftest.frag conftest.in > conftest.out | |
8455 | rm -f conftest.in | |
8456 | mv conftest.out conftest.in | |
8457 | ' >> $CONFIG_STATUS | |
8458 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
8459 | rm -f conftest.vals | |
8460 | mv conftest.tail conftest.vals | |
8461 | done | |
8462 | rm -f conftest.vals | |
8463 | ||
8464 | cat >> $CONFIG_STATUS <<\EOF | |
8465 | rm -f conftest.frag conftest.h | |
8466 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
8467 | cat conftest.in >> conftest.h | |
8468 | rm -f conftest.in | |
8469 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
8470 | echo "$ac_file is unchanged" | |
8471 | rm -f conftest.h | |
8472 | else | |
8473 | # Remove last slash and all that follows it. Not all systems have dirname. | |
8474 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
8475 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
8476 | # The file is in a subdirectory. | |
8477 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
8478 | fi | |
8479 | rm -f $ac_file | |
8480 | mv conftest.h $ac_file | |
8481 | fi | |
8482 | fi; done | |
8483 | ||
8484 | EOF | |
8485 | cat >> $CONFIG_STATUS <<EOF | |
8486 | ||
ab87f8c8 | 8487 | |
861bb6c1 JL |
8488 | host='${host}' |
8489 | build='${build}' | |
8490 | target='${target}' | |
8491 | target_alias='${target_alias}' | |
8492 | srcdir='${srcdir}' | |
8493 | subdirs='${subdirs}' | |
861bb6c1 JL |
8494 | symbolic_link='${symbolic_link}' |
8495 | program_transform_set='${program_transform_set}' | |
8496 | program_transform_name='${program_transform_name}' | |
8497 | dep_host_xmake_file='${dep_host_xmake_file}' | |
8498 | host_xmake_file='${host_xmake_file}' | |
8499 | dep_tmake_file='${dep_tmake_file}' | |
8500 | tmake_file='${tmake_file}' | |
8501 | thread_file='${thread_file}' | |
cc1e60ea | 8502 | gcc_config_arguments='${gcc_config_arguments}' |
f1943b77 | 8503 | gcc_version='${gcc_version}' |
8763704d | 8504 | gcc_version_full='${gcc_version_full}' |
f1943b77 | 8505 | gcc_version_trigger='${gcc_version_trigger}' |
861bb6c1 JL |
8506 | local_prefix='${local_prefix}' |
8507 | build_install_headers_dir='${build_install_headers_dir}' | |
8508 | build_exeext='${build_exeext}' | |
6e26218f | 8509 | host_exeext='${host_exeext}' |
7ed46111 | 8510 | out_file='${out_file}' |
861bb6c1 JL |
8511 | gdb_needs_out_file_path='${gdb_needs_out_file_path}' |
8512 | SET_MAKE='${SET_MAKE}' | |
861bb6c1 JL |
8513 | target_list='${target_list}' |
8514 | target_overrides='${target_overrides}' | |
8515 | host_overrides='${host_overrides}' | |
8516 | cross_defines='${cross_defines}' | |
8517 | cross_overrides='${cross_overrides}' | |
8518 | build_overrides='${build_overrides}' | |
9fc9b82a | 8519 | cpp_install_dir='${cpp_install_dir}' |
861bb6c1 JL |
8520 | |
8521 | EOF | |
8522 | cat >> $CONFIG_STATUS <<\EOF | |
71a94577 ZW |
8523 | for ac_file in $CONFIG_FILES; do |
8524 | # Support "outfile[:infile[:infile...]]" | |
8525 | case "$ac_file" in | |
8526 | *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
8527 | esac | |
8528 | # PO directories have a Makefile.in generated from Makefile.in.in. | |
8529 | case "$ac_file" in */Makefile.in) | |
8530 | # Adjust a relative srcdir. | |
8531 | ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` | |
8532 | ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" | |
8533 | ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` | |
8534 | # In autoconf-2.13 it is called $ac_given_srcdir. | |
8535 | # In autoconf-2.50 it is called $srcdir. | |
8536 | test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" | |
8537 | case "$ac_given_srcdir" in | |
8538 | .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; | |
8539 | /*) top_srcdir="$ac_given_srcdir" ;; | |
8540 | *) top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
8541 | esac | |
8542 | if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then | |
8543 | rm -f "$ac_dir/POTFILES" | |
8544 | test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" | |
8545 | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES" | |
8546 | test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" | |
8547 | sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" | |
8548 | fi | |
8549 | ;; | |
8550 | esac | |
8551 | done | |
861bb6c1 | 8552 | |
861bb6c1 | 8553 | case x$CONFIG_HEADERS in |
b7cb92ad | 8554 | xauto-host.h:config.in) |
861bb6c1 JL |
8555 | echo > cstamp-h ;; |
8556 | esac | |
93cf819d BK |
8557 | # If the host supports symlinks, point stage[1234] at ../stage[1234] so |
8558 | # bootstrapping and the installation procedure can still use | |
8559 | # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks, | |
8560 | # FLAGS_TO_PASS has been modified to solve the problem there. | |
8561 | # This is virtually a duplicate of what happens in configure.lang; we do | |
8562 | # an extra check to make sure this only happens if ln -s can be used. | |
75bffa71 | 8563 | if test "$symbolic_link" = "ln -s"; then |
d8140df6 | 8564 | for d in .. ${subdirs} fixinc ; do |
75bffa71 | 8565 | if test $d != ..; then |
4e8a434e BK |
8566 | STARTDIR=`pwd` |
8567 | cd $d | |
8568 | for t in stage1 stage2 stage3 stage4 include | |
8569 | do | |
8570 | rm -f $t | |
8571 | $symbolic_link ../$t $t 2>/dev/null | |
8572 | done | |
8573 | cd $STARTDIR | |
93cf819d BK |
8574 | fi |
8575 | done | |
8576 | else true ; fi | |
ab87f8c8 JL |
8577 | # Avoid having to add intl to our include paths. |
8578 | if test -f intl/libintl.h; then | |
8579 | echo creating libintl.h | |
8580 | echo '#include "intl/libintl.h"' >libintl.h | |
8581 | fi | |
861bb6c1 JL |
8582 | |
8583 | exit 0 | |
8584 | EOF | |
8585 | chmod +x $CONFIG_STATUS | |
8586 | rm -fr confdefs* $ac_clean_files | |
8587 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
8588 |