]>
Commit | Line | Data |
---|---|---|
005537df | 1 | #! /bin/sh |
861bb6c1 JL |
2 | |
3 | # Guess values for system-dependent variables and create Makefiles. | |
b27d2bd5 | 4 | # Generated automatically using autoconf version 2.13 |
861bb6c1 JL |
5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
6 | # | |
7 | # This configure script is free software; the Free Software Foundation | |
8 | # gives unlimited permission to copy, distribute and modify it. | |
9 | ||
10 | # Defaults: | |
11 | ac_help= | |
12 | ac_default_prefix=/usr/local | |
13 | # Any additions from configure.in: | |
14 | ac_help="$ac_help | |
15 | --with-gnu-ld arrange to work with GNU ld." | |
ab339d62 | 16 | ac_help="$ac_help |
e8bec136 | 17 | --with-ld arrange to use the specified ld (full pathname)" |
861bb6c1 | 18 | ac_help="$ac_help |
e8bec136 | 19 | --with-gnu-as arrange to work with GNU as" |
ab339d62 | 20 | ac_help="$ac_help |
e8bec136 | 21 | --with-as arrange to use the specified as (full pathname)" |
861bb6c1 | 22 | ac_help="$ac_help |
e8bec136 | 23 | --with-stabs arrange to use stabs instead of host debug format" |
861bb6c1 | 24 | ac_help="$ac_help |
e8bec136 | 25 | --with-elf arrange to use ELF instead of host debug format" |
861bb6c1 | 26 | ac_help="$ac_help |
e8bec136 | 27 | --with-local-prefix=DIR specifies directory to put local include" |
861bb6c1 JL |
28 | ac_help="$ac_help |
29 | --with-gxx-include-dir=DIR | |
e8bec136 | 30 | specifies directory to put g++ header files" |
39d6f2e8 | 31 | ac_help="$ac_help |
e8bec136 | 32 | --enable-multilib enable library support for multiple ABIs" |
a494747c | 33 | ac_help="$ac_help |
f4524c9e ZW |
34 | --enable-checking[=LIST] |
35 | enable expensive run-time checks. With LIST, | |
36 | enable only specific categories of checks. | |
4c76f856 JJ |
37 | Categories are: misc,tree,rtl,rtlflag,gc,gcac; |
38 | default is misc,tree,gc,rtlflag" | |
22aa533e NS |
39 | ac_help="$ac_help |
40 | --enable-coverage[=LEVEL] | |
41 | enable compiler\'s code coverage collection. | |
42 | Use to measure compiler performance and locate | |
43 | unused parts of the compiler. With LEVEL, specificy | |
44 | optimization. Values are opt, noopt, | |
45 | default is noopt" | |
3ecc3258 ZW |
46 | ac_help="$ac_help |
47 | --with-cpp-install-dir=DIR | |
48 | install the user visible C preprocessor in DIR | |
e8bec136 | 49 | (relative to PREFIX) as well as PREFIX/bin" |
4bafaa6f L |
50 | ac_help="$ac_help |
51 | --enable-__cxa_atexit enable __cxa_atexit for C++" | |
c5c76735 | 52 | ac_help="$ac_help |
e8bec136 | 53 | --enable-c-mbchar enable multibyte characters for C and C++" |
861bb6c1 | 54 | ac_help="$ac_help |
e8bec136 RO |
55 | --enable-threads enable thread usage for target GCC |
56 | --enable-threads=LIB use LIB thread package for target GCC" | |
d8bb17c8 OP |
57 | ac_help="$ac_help |
58 | --enable-objc-gc enable the use of Boehm's garbage collector with | |
e8bec136 | 59 | the GNU Objective-C runtime" |
90e6a802 | 60 | ac_help="$ac_help |
e8bec136 | 61 | --with-dwarf2 force the default debug format to be DWARF 2" |
50503ac8 | 62 | ac_help="$ac_help |
e8bec136 | 63 | --disable-shared don't provide a shared libgcc" |
f91abfce TT |
64 | ac_help="$ac_help |
65 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" | |
07cf4226 DM |
66 | ac_help="$ac_help |
67 | --enable-initfini-array use .init_array/.fini_array sections" | |
ab87f8c8 | 68 | ac_help="$ac_help |
dc6746e7 | 69 | --enable-nls use Native Language Support (default)" |
71a94577 ZW |
70 | ac_help="$ac_help |
71 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" | |
ab87f8c8 JL |
72 | ac_help="$ac_help |
73 | --disable-nls do not use Native Language Support" | |
74 | ac_help="$ac_help | |
75 | --with-included-gettext use the GNU gettext library included here" | |
f4ab28e3 MK |
76 | ac_help="$ac_help |
77 | --disable-win32-registry | |
e8bec136 RO |
78 | disable lookup of installation paths in the |
79 | Registry on Windows hosts | |
80 | --enable-win32-registry enable registry lookup (default) | |
f4ab28e3 | 81 | --enable-win32-registry=KEY |
e8bec136 RO |
82 | use KEY instead of GCC version as the last portion |
83 | of the registry key" | |
81bf3d9e | 84 | ac_help="$ac_help |
e8bec136 RO |
85 | --with-gc={simple,page} choose the garbage collection mechanism to use |
86 | with the compiler" | |
3c809ba4 AG |
87 | ac_help="$ac_help |
88 | --with-system-zlib use installed libz" | |
dc6746e7 | 89 | ac_help="$ac_help |
e8bec136 RO |
90 | --enable-maintainer-mode |
91 | enable make rules and dependencies not useful | |
dc6746e7 | 92 | (and sometimes confusing) to the casual installer" |
531073e7 | 93 | ac_help="$ac_help |
e8bec136 RO |
94 | --enable-sjlj-exceptions |
95 | arrange to use setjmp/longjmp exception handling" | |
893a047c SE |
96 | ac_help="$ac_help |
97 | --enable-libunwind-exceptions force use libunwind for exceptions" | |
2bbea3a6 | 98 | ac_help="$ac_help |
e8bec136 RO |
99 | --enable-version-specific-runtime-libs |
100 | specify that runtime libraries should be | |
101 | installed in a compiler-specific directory" | |
5b15f277 RH |
102 | ac_help="$ac_help |
103 | --with-slibdir=DIR shared libraries in DIR [LIBDIR]" | |
861bb6c1 JL |
104 | |
105 | # Initialize some variables set by options. | |
106 | # The variables have the same names as the options, with | |
107 | # dashes changed to underlines. | |
108 | build=NONE | |
109 | cache_file=./config.cache | |
110 | exec_prefix=NONE | |
111 | host=NONE | |
112 | no_create= | |
113 | nonopt=NONE | |
114 | no_recursion= | |
115 | prefix=NONE | |
116 | program_prefix=NONE | |
117 | program_suffix=NONE | |
118 | program_transform_name=s,x,x, | |
119 | silent= | |
120 | site= | |
121 | srcdir= | |
122 | target=NONE | |
123 | verbose= | |
124 | x_includes=NONE | |
125 | x_libraries=NONE | |
126 | bindir='${exec_prefix}/bin' | |
127 | sbindir='${exec_prefix}/sbin' | |
128 | libexecdir='${exec_prefix}/libexec' | |
129 | datadir='${prefix}/share' | |
130 | sysconfdir='${prefix}/etc' | |
131 | sharedstatedir='${prefix}/com' | |
132 | localstatedir='${prefix}/var' | |
133 | libdir='${exec_prefix}/lib' | |
134 | includedir='${prefix}/include' | |
135 | oldincludedir='/usr/include' | |
136 | infodir='${prefix}/info' | |
137 | mandir='${prefix}/man' | |
138 | ||
139 | # Initialize some other variables. | |
140 | subdirs= | |
141 | MFLAGS= MAKEFLAGS= | |
6f144c9c | 142 | SHELL=${CONFIG_SHELL-/bin/sh} |
861bb6c1 JL |
143 | # Maximum number of lines to put in a shell here document. |
144 | ac_max_here_lines=12 | |
145 | ||
146 | ac_prev= | |
147 | for ac_option | |
148 | do | |
149 | ||
150 | # If the previous option needs an argument, assign it. | |
151 | if test -n "$ac_prev"; then | |
152 | eval "$ac_prev=\$ac_option" | |
153 | ac_prev= | |
154 | continue | |
155 | fi | |
156 | ||
157 | case "$ac_option" in | |
158 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
159 | *) ac_optarg= ;; | |
160 | esac | |
161 | ||
162 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
163 | ||
164 | case "$ac_option" in | |
165 | ||
166 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
167 | ac_prev=bindir ;; | |
168 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
169 | bindir="$ac_optarg" ;; | |
170 | ||
171 | -build | --build | --buil | --bui | --bu) | |
172 | ac_prev=build ;; | |
173 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
174 | build="$ac_optarg" ;; | |
175 | ||
176 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
177 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
178 | ac_prev=cache_file ;; | |
179 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
180 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
181 | cache_file="$ac_optarg" ;; | |
182 | ||
183 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
184 | ac_prev=datadir ;; | |
185 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
186 | | --da=*) | |
187 | datadir="$ac_optarg" ;; | |
188 | ||
189 | -disable-* | --disable-*) | |
190 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
191 | # Reject names that are not valid shell variable names. | |
192 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
193 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
194 | fi | |
195 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
196 | eval "enable_${ac_feature}=no" ;; | |
197 | ||
198 | -enable-* | --enable-*) | |
199 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
200 | # Reject names that are not valid shell variable names. | |
201 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
202 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
203 | fi | |
204 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
205 | case "$ac_option" in | |
206 | *=*) ;; | |
207 | *) ac_optarg=yes ;; | |
208 | esac | |
209 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
210 | ||
211 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
212 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
213 | | --exec | --exe | --ex) | |
214 | ac_prev=exec_prefix ;; | |
215 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
216 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
217 | | --exec=* | --exe=* | --ex=*) | |
218 | exec_prefix="$ac_optarg" ;; | |
219 | ||
220 | -gas | --gas | --ga | --g) | |
221 | # Obsolete; use --with-gas. | |
222 | with_gas=yes ;; | |
223 | ||
224 | -help | --help | --hel | --he) | |
225 | # Omit some internal or obsolete options to make the list less imposing. | |
226 | # This message is too long to be a string in the A/UX 3.1 sh. | |
227 | cat << EOF | |
228 | Usage: configure [options] [host] | |
229 | Options: [defaults in brackets after descriptions] | |
230 | Configuration: | |
231 | --cache-file=FILE cache test results in FILE | |
232 | --help print this message | |
233 | --no-create do not create output files | |
234 | --quiet, --silent do not print \`checking...' messages | |
235 | --version print the version of autoconf that created configure | |
236 | Directory and file names: | |
237 | --prefix=PREFIX install architecture-independent files in PREFIX | |
238 | [$ac_default_prefix] | |
239 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
240 | [same as prefix] | |
241 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
242 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
243 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
244 | --datadir=DIR read-only architecture-independent data in DIR | |
245 | [PREFIX/share] | |
246 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
247 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
248 | [PREFIX/com] | |
249 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
250 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
251 | --includedir=DIR C header files in DIR [PREFIX/include] | |
252 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
253 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
254 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
255 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
256 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
257 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
258 | --program-transform-name=PROGRAM | |
259 | run sed PROGRAM on installed program names | |
260 | EOF | |
261 | cat << EOF | |
262 | Host type: | |
263 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
264 | --host=HOST configure for HOST [guessed] | |
265 | --target=TARGET configure for TARGET [TARGET=HOST] | |
266 | Features and packages: | |
267 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
268 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
269 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
270 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
271 | --x-includes=DIR X include files are in DIR | |
272 | --x-libraries=DIR X library files are in DIR | |
273 | EOF | |
274 | if test -n "$ac_help"; then | |
275 | echo "--enable and --with options recognized:$ac_help" | |
276 | fi | |
277 | exit 0 ;; | |
278 | ||
279 | -host | --host | --hos | --ho) | |
280 | ac_prev=host ;; | |
281 | -host=* | --host=* | --hos=* | --ho=*) | |
282 | host="$ac_optarg" ;; | |
283 | ||
284 | -includedir | --includedir | --includedi | --included | --include \ | |
285 | | --includ | --inclu | --incl | --inc) | |
286 | ac_prev=includedir ;; | |
287 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
288 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
289 | includedir="$ac_optarg" ;; | |
290 | ||
291 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
292 | ac_prev=infodir ;; | |
293 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
294 | infodir="$ac_optarg" ;; | |
295 | ||
296 | -libdir | --libdir | --libdi | --libd) | |
297 | ac_prev=libdir ;; | |
298 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
299 | libdir="$ac_optarg" ;; | |
300 | ||
301 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
302 | | --libexe | --libex | --libe) | |
303 | ac_prev=libexecdir ;; | |
304 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
305 | | --libexe=* | --libex=* | --libe=*) | |
306 | libexecdir="$ac_optarg" ;; | |
307 | ||
308 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
309 | | --localstate | --localstat | --localsta | --localst \ | |
310 | | --locals | --local | --loca | --loc | --lo) | |
311 | ac_prev=localstatedir ;; | |
312 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
313 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
314 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
315 | localstatedir="$ac_optarg" ;; | |
316 | ||
317 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
318 | ac_prev=mandir ;; | |
319 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
320 | mandir="$ac_optarg" ;; | |
321 | ||
322 | -nfp | --nfp | --nf) | |
323 | # Obsolete; use --without-fp. | |
324 | with_fp=no ;; | |
325 | ||
326 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
327 | | --no-cr | --no-c) | |
328 | no_create=yes ;; | |
329 | ||
330 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
331 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
332 | no_recursion=yes ;; | |
333 | ||
334 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
335 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
336 | | --oldin | --oldi | --old | --ol | --o) | |
337 | ac_prev=oldincludedir ;; | |
338 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
339 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
340 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
341 | oldincludedir="$ac_optarg" ;; | |
342 | ||
343 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
344 | ac_prev=prefix ;; | |
345 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
346 | prefix="$ac_optarg" ;; | |
347 | ||
348 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
349 | | --program-pre | --program-pr | --program-p) | |
350 | ac_prev=program_prefix ;; | |
351 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
352 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
353 | program_prefix="$ac_optarg" ;; | |
354 | ||
355 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
356 | | --program-suf | --program-su | --program-s) | |
357 | ac_prev=program_suffix ;; | |
358 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
359 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
360 | program_suffix="$ac_optarg" ;; | |
361 | ||
362 | -program-transform-name | --program-transform-name \ | |
363 | | --program-transform-nam | --program-transform-na \ | |
364 | | --program-transform-n | --program-transform- \ | |
365 | | --program-transform | --program-transfor \ | |
366 | | --program-transfo | --program-transf \ | |
367 | | --program-trans | --program-tran \ | |
368 | | --progr-tra | --program-tr | --program-t) | |
369 | ac_prev=program_transform_name ;; | |
370 | -program-transform-name=* | --program-transform-name=* \ | |
371 | | --program-transform-nam=* | --program-transform-na=* \ | |
372 | | --program-transform-n=* | --program-transform-=* \ | |
373 | | --program-transform=* | --program-transfor=* \ | |
374 | | --program-transfo=* | --program-transf=* \ | |
375 | | --program-trans=* | --program-tran=* \ | |
376 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
377 | program_transform_name="$ac_optarg" ;; | |
378 | ||
379 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
380 | | -silent | --silent | --silen | --sile | --sil) | |
381 | silent=yes ;; | |
382 | ||
383 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
384 | ac_prev=sbindir ;; | |
385 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
386 | | --sbi=* | --sb=*) | |
387 | sbindir="$ac_optarg" ;; | |
388 | ||
389 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
390 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
391 | | --sharedst | --shareds | --shared | --share | --shar \ | |
392 | | --sha | --sh) | |
393 | ac_prev=sharedstatedir ;; | |
394 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
395 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
396 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
397 | | --sha=* | --sh=*) | |
398 | sharedstatedir="$ac_optarg" ;; | |
399 | ||
400 | -site | --site | --sit) | |
401 | ac_prev=site ;; | |
402 | -site=* | --site=* | --sit=*) | |
403 | site="$ac_optarg" ;; | |
404 | ||
405 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
406 | ac_prev=srcdir ;; | |
407 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
408 | srcdir="$ac_optarg" ;; | |
409 | ||
410 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
411 | | --syscon | --sysco | --sysc | --sys | --sy) | |
412 | ac_prev=sysconfdir ;; | |
413 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
414 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
415 | sysconfdir="$ac_optarg" ;; | |
416 | ||
417 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
418 | ac_prev=target ;; | |
419 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
420 | target="$ac_optarg" ;; | |
421 | ||
422 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
423 | verbose=yes ;; | |
424 | ||
425 | -version | --version | --versio | --versi | --vers) | |
b27d2bd5 | 426 | echo "configure generated by autoconf version 2.13" |
861bb6c1 JL |
427 | exit 0 ;; |
428 | ||
429 | -with-* | --with-*) | |
430 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
431 | # Reject names that are not valid shell variable names. | |
432 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
433 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
434 | fi | |
435 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
436 | case "$ac_option" in | |
437 | *=*) ;; | |
438 | *) ac_optarg=yes ;; | |
439 | esac | |
440 | eval "with_${ac_package}='$ac_optarg'" ;; | |
441 | ||
442 | -without-* | --without-*) | |
443 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
444 | # Reject names that are not valid shell variable names. | |
445 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
446 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
447 | fi | |
448 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
449 | eval "with_${ac_package}=no" ;; | |
450 | ||
451 | --x) | |
452 | # Obsolete; use --with-x. | |
453 | with_x=yes ;; | |
454 | ||
455 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
456 | | --x-incl | --x-inc | --x-in | --x-i) | |
457 | ac_prev=x_includes ;; | |
458 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
459 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
460 | x_includes="$ac_optarg" ;; | |
461 | ||
462 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
463 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
464 | ac_prev=x_libraries ;; | |
465 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
466 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
467 | x_libraries="$ac_optarg" ;; | |
468 | ||
469 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
470 | ;; | |
471 | ||
472 | *) | |
473 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
474 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
475 | fi | |
476 | if test "x$nonopt" != xNONE; then | |
477 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
478 | fi | |
479 | nonopt="$ac_option" | |
480 | ;; | |
481 | ||
482 | esac | |
483 | done | |
484 | ||
485 | if test -n "$ac_prev"; then | |
486 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
487 | fi | |
488 | ||
489 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
490 | ||
491 | # File descriptor usage: | |
492 | # 0 standard input | |
493 | # 1 file creation | |
494 | # 2 errors and warnings | |
495 | # 3 some systems may open it to /dev/tty | |
496 | # 4 used on the Kubota Titan | |
497 | # 6 checking for... messages and results | |
498 | # 5 compiler messages saved in config.log | |
499 | if test "$silent" = yes; then | |
500 | exec 6>/dev/null | |
501 | else | |
502 | exec 6>&1 | |
503 | fi | |
504 | exec 5>./config.log | |
505 | ||
506 | echo "\ | |
507 | This file contains any messages produced by compilers while | |
508 | running configure, to aid debugging if configure makes a mistake. | |
509 | " 1>&5 | |
510 | ||
511 | # Strip out --no-create and --no-recursion so they do not pile up. | |
512 | # Also quote any args containing shell metacharacters. | |
513 | ac_configure_args= | |
514 | for ac_arg | |
515 | do | |
516 | case "$ac_arg" in | |
517 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
518 | | --no-cr | --no-c) ;; | |
519 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
520 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
521 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
522 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
523 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
524 | esac | |
525 | done | |
526 | ||
527 | # NLS nuisances. | |
528 | # Only set these to C if already set. These must not be set unconditionally | |
529 | # because not all systems understand e.g. LANG=C (notably SCO). | |
530 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
531 | # Non-C LC_CTYPE values break the ctype check. | |
532 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
533 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
534 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
535 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
536 | ||
537 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
538 | rm -rf conftest* confdefs.h | |
539 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
540 | echo > confdefs.h | |
541 | ||
542 | # A filename unique to this package, relative to the directory that | |
543 | # configure is in, which we can look for to find out if srcdir is correct. | |
544 | ac_unique_file=tree.c | |
545 | ||
546 | # Find the source files, if location was not specified. | |
547 | if test -z "$srcdir"; then | |
548 | ac_srcdir_defaulted=yes | |
549 | # Try the directory containing this script, then its parent. | |
550 | ac_prog=$0 | |
551 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
552 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
553 | srcdir=$ac_confdir | |
554 | if test ! -r $srcdir/$ac_unique_file; then | |
555 | srcdir=.. | |
556 | fi | |
557 | else | |
558 | ac_srcdir_defaulted=no | |
559 | fi | |
560 | if test ! -r $srcdir/$ac_unique_file; then | |
561 | if test "$ac_srcdir_defaulted" = yes; then | |
562 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
563 | else | |
564 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
565 | fi | |
566 | fi | |
567 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
568 | ||
569 | # Prefer explicitly selected file to automatically selected ones. | |
789b7de5 RO |
570 | if test -z "$CONFIG_SITE"; then |
571 | if test "x$prefix" != xNONE; then | |
572 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
573 | else | |
574 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
861bb6c1 JL |
575 | fi |
576 | fi | |
577 | for ac_site_file in $CONFIG_SITE; do | |
578 | if test -r "$ac_site_file"; then | |
579 | echo "loading site script $ac_site_file" | |
580 | . "$ac_site_file" | |
581 | fi | |
582 | done | |
583 | ||
584 | if test -r "$cache_file"; then | |
585 | echo "loading cache $cache_file" | |
586 | . $cache_file | |
587 | else | |
588 | echo "creating cache $cache_file" | |
589 | > $cache_file | |
590 | fi | |
591 | ||
592 | ac_ext=c | |
593 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
594 | ac_cpp='$CPP $CPPFLAGS' | |
595 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
cd9e5e7c | 596 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
861bb6c1 JL |
597 | cross_compiling=$ac_cv_prog_cc_cross |
598 | ||
cd9e5e7c MK |
599 | ac_exeext= |
600 | ac_objext=o | |
861bb6c1 JL |
601 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then |
602 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
603 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
604 | ac_n= ac_c=' | |
605 | ' ac_t=' ' | |
606 | else | |
607 | ac_n=-n ac_c= ac_t= | |
608 | fi | |
609 | else | |
610 | ac_n= ac_c='\c' ac_t= | |
611 | fi | |
612 | ||
613 | ||
614 | ||
615 | ||
861bb6c1 JL |
616 | remove=rm |
617 | hard_link=ln | |
618 | symbolic_link='ln -s' | |
619 | copy=cp | |
620 | ||
75a39864 JL |
621 | # Check for bogus environment variables. |
622 | # Test if LIBRARY_PATH contains the notation for the current directory | |
623 | # since this would lead to problems installing/building glibc. | |
624 | # LIBRARY_PATH contains the current directory if one of the following | |
625 | # is true: | |
626 | # - one of the terminals (":" and ";") is the first or last sign | |
627 | # - two terminals occur directly after each other | |
628 | # - the path contains an element with a dot in it | |
629 | echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6 | |
07cf4226 | 630 | echo "configure:631: checking LIBRARY_PATH variable" >&5 |
75a39864 JL |
631 | case ${LIBRARY_PATH} in |
632 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
633 | library_path_setting="contains current directory" | |
634 | ;; | |
635 | *) | |
636 | library_path_setting="ok" | |
637 | ;; | |
638 | esac | |
639 | echo "$ac_t""$library_path_setting" 1>&6 | |
640 | if test "$library_path_setting" != "ok"; then | |
641 | { echo "configure: error: | |
642 | *** LIBRARY_PATH shouldn't contain the current directory when | |
079bd08e | 643 | *** building gcc. Please change the environment variable |
75a39864 JL |
644 | *** and run configure again." 1>&2; exit 1; } |
645 | fi | |
646 | ||
647 | # Test if GCC_EXEC_PREFIX contains the notation for the current directory | |
648 | # since this would lead to problems installing/building glibc. | |
649 | # GCC_EXEC_PREFIX contains the current directory if one of the following | |
650 | # is true: | |
651 | # - one of the terminals (":" and ";") is the first or last sign | |
652 | # - two terminals occur directly after each other | |
653 | # - the path contains an element with a dot in it | |
654 | echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6 | |
07cf4226 | 655 | echo "configure:656: checking GCC_EXEC_PREFIX variable" >&5 |
75a39864 JL |
656 | case ${GCC_EXEC_PREFIX} in |
657 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
658 | gcc_exec_prefix_setting="contains current directory" | |
659 | ;; | |
660 | *) | |
661 | gcc_exec_prefix_setting="ok" | |
662 | ;; | |
663 | esac | |
664 | echo "$ac_t""$gcc_exec_prefix_setting" 1>&6 | |
665 | if test "$gcc_exec_prefix_setting" != "ok"; then | |
666 | { echo "configure: error: | |
667 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when | |
079bd08e | 668 | *** building gcc. Please change the environment variable |
75a39864 JL |
669 | *** and run configure again." 1>&2; exit 1; } |
670 | fi | |
671 | ||
861bb6c1 JL |
672 | # Check for additional parameters |
673 | ||
674 | # With GNU ld | |
675 | # Check whether --with-gnu-ld or --without-gnu-ld was given. | |
676 | if test "${with_gnu_ld+set}" = set; then | |
677 | withval="$with_gnu_ld" | |
df6faf79 | 678 | gnu_ld_flag="$with_gnu_ld" |
861bb6c1 | 679 | else |
df6faf79 | 680 | gnu_ld_flag=no |
861bb6c1 JL |
681 | fi |
682 | ||
683 | ||
ab339d62 AO |
684 | # With pre-defined ld |
685 | # Check whether --with-ld or --without-ld was given. | |
686 | if test "${with_ld+set}" = set; then | |
687 | withval="$with_ld" | |
3ccc3a56 | 688 | DEFAULT_LINKER="$with_ld" |
ab339d62 AO |
689 | fi |
690 | ||
3ccc3a56 AO |
691 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
692 | if test ! -x "$DEFAULT_LINKER"; then | |
693 | echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2 | |
e154a394 | 694 | elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
ab339d62 AO |
695 | gnu_ld_flag=yes |
696 | fi | |
697 | cat >> confdefs.h <<EOF | |
3ccc3a56 | 698 | #define DEFAULT_LINKER "$DEFAULT_LINKER" |
ab339d62 AO |
699 | EOF |
700 | ||
701 | fi | |
702 | ||
861bb6c1 JL |
703 | # With GNU as |
704 | # Check whether --with-gnu-as or --without-gnu-as was given. | |
705 | if test "${with_gnu_as+set}" = set; then | |
706 | withval="$with_gnu_as" | |
df6faf79 | 707 | gas_flag="$with_gnu_as" |
861bb6c1 | 708 | else |
df6faf79 | 709 | gas_flag=no |
861bb6c1 JL |
710 | fi |
711 | ||
712 | ||
ab339d62 AO |
713 | # Check whether --with-as or --without-as was given. |
714 | if test "${with_as+set}" = set; then | |
715 | withval="$with_as" | |
3ccc3a56 | 716 | DEFAULT_ASSEMBLER="$with_as" |
ab339d62 AO |
717 | fi |
718 | ||
3ccc3a56 AO |
719 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
720 | if test ! -x "$DEFAULT_ASSEMBLER"; then | |
721 | echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2 | |
e154a394 | 722 | elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
ab339d62 AO |
723 | gas_flag=yes |
724 | fi | |
725 | cat >> confdefs.h <<EOF | |
3ccc3a56 | 726 | #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER" |
ab339d62 AO |
727 | EOF |
728 | ||
3ccc3a56 | 729 | fi |
ab339d62 | 730 | |
861bb6c1 JL |
731 | # With stabs |
732 | # Check whether --with-stabs or --without-stabs was given. | |
733 | if test "${with_stabs+set}" = set; then | |
734 | withval="$with_stabs" | |
535b86ce | 735 | stabs="$with_stabs" |
861bb6c1 JL |
736 | else |
737 | stabs=no | |
738 | fi | |
739 | ||
740 | ||
741 | # With ELF | |
742 | # Check whether --with-elf or --without-elf was given. | |
743 | if test "${with_elf+set}" = set; then | |
744 | withval="$with_elf" | |
535b86ce | 745 | elf="$with_elf" |
861bb6c1 JL |
746 | else |
747 | elf=no | |
748 | fi | |
749 | ||
750 | ||
751 | # Specify the local prefix | |
4e88d51b | 752 | local_prefix= |
861bb6c1 JL |
753 | # Check whether --with-local-prefix or --without-local-prefix was given. |
754 | if test "${with_local_prefix+set}" = set; then | |
755 | withval="$with_local_prefix" | |
4e88d51b JM |
756 | case "${withval}" in |
757 | yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;; | |
758 | no) ;; | |
759 | *) local_prefix=$with_local_prefix ;; | |
760 | esac | |
861bb6c1 JL |
761 | fi |
762 | ||
763 | ||
764 | # Default local prefix if it is empty | |
75bffa71 | 765 | if test x$local_prefix = x; then |
861bb6c1 JL |
766 | local_prefix=/usr/local |
767 | fi | |
768 | ||
8f8d3278 NC |
769 | # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only |
770 | # passed in by the toplevel make and thus we'd get different behavior | |
771 | # depending on where we built the sources. | |
772 | gcc_gxx_include_dir= | |
861bb6c1 JL |
773 | # Specify the g++ header file directory |
774 | # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. | |
775 | if test "${with_gxx_include_dir+set}" = set; then | |
776 | withval="$with_gxx_include_dir" | |
4e88d51b JM |
777 | case "${withval}" in |
778 | yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;; | |
779 | no) ;; | |
8f8d3278 | 780 | *) gcc_gxx_include_dir=$with_gxx_include_dir ;; |
4e88d51b | 781 | esac |
861bb6c1 JL |
782 | fi |
783 | ||
784 | ||
8f8d3278 | 785 | if test x${gcc_gxx_include_dir} = x; then |
4e88d51b | 786 | if test x${enable_version_specific_runtime_libs} = xyes; then |
9137b119 | 787 | gcc_gxx_include_dir='${libsubdir}/include/c++' |
4e88d51b | 788 | else |
a270b446 | 789 | topsrcdir=${srcdir}/.. . ${srcdir}/../config.if |
e2187d3b | 790 | gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir} |
4e88d51b JM |
791 | fi |
792 | fi | |
793 | ||
13c22933 JJ |
794 | # Determine the host, build, and target systems |
795 | ac_aux_dir= | |
796 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do | |
797 | if test -f $ac_dir/install-sh; then | |
798 | ac_aux_dir=$ac_dir | |
799 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
800 | break | |
801 | elif test -f $ac_dir/install.sh; then | |
802 | ac_aux_dir=$ac_dir | |
803 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
804 | break | |
805 | fi | |
806 | done | |
807 | if test -z "$ac_aux_dir"; then | |
808 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } | |
809 | fi | |
810 | ac_config_guess=$ac_aux_dir/config.guess | |
811 | ac_config_sub=$ac_aux_dir/config.sub | |
812 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
813 | ||
814 | ||
815 | # Do some error checking and defaulting for the host and target type. | |
816 | # The inputs are: | |
817 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
818 | # | |
819 | # The rules are: | |
820 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
821 | # same time. | |
822 | # 2. Host defaults to nonopt. | |
823 | # 3. If nonopt is not specified, then host defaults to the current host, | |
824 | # as determined by config.guess. | |
825 | # 4. Target and build default to nonopt. | |
826 | # 5. If nonopt is not specified, then target and build default to host. | |
827 | ||
828 | # The aliases save the names the user supplied, while $host etc. | |
829 | # will get canonicalized. | |
830 | case $host---$target---$nonopt in | |
831 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
832 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
833 | esac | |
834 | ||
835 | ||
836 | # Make sure we can run config.sub. | |
837 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
838 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
839 | fi | |
840 | ||
841 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
842 | echo "configure:843: checking host system type" >&5 | |
843 | ||
844 | host_alias=$host | |
845 | case "$host_alias" in | |
846 | NONE) | |
847 | case $nonopt in | |
848 | NONE) | |
849 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
850 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
851 | fi ;; | |
852 | *) host_alias=$nonopt ;; | |
853 | esac ;; | |
854 | esac | |
855 | ||
856 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
857 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
858 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
859 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
860 | echo "$ac_t""$host" 1>&6 | |
861 | ||
862 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
863 | echo "configure:864: checking target system type" >&5 | |
864 | ||
865 | target_alias=$target | |
866 | case "$target_alias" in | |
867 | NONE) | |
868 | case $nonopt in | |
869 | NONE) target_alias=$host_alias ;; | |
870 | *) target_alias=$nonopt ;; | |
871 | esac ;; | |
872 | esac | |
873 | ||
874 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
875 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
876 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
877 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
878 | echo "$ac_t""$target" 1>&6 | |
879 | ||
880 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
881 | echo "configure:882: checking build system type" >&5 | |
882 | ||
883 | build_alias=$build | |
884 | case "$build_alias" in | |
885 | NONE) | |
886 | case $nonopt in | |
887 | NONE) build_alias=$host_alias ;; | |
888 | *) build_alias=$nonopt ;; | |
889 | esac ;; | |
890 | esac | |
891 | ||
892 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
893 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
894 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
895 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
896 | echo "$ac_t""$build" 1>&6 | |
897 | ||
898 | test "$host_alias" != "$target_alias" && | |
899 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
900 | NONENONEs,x,x, && | |
901 | program_prefix=${target_alias}- | |
902 | ||
903 | ||
904 | # Set program_transform_name | |
905 | if test "$program_transform_name" = s,x,x,; then | |
906 | program_transform_name= | |
907 | else | |
908 | # Double any \ or $. echo might interpret backslashes. | |
909 | cat <<\EOF_SED > conftestsed | |
910 | s,\\,\\\\,g; s,\$,$$,g | |
911 | EOF_SED | |
912 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
913 | rm -f conftestsed | |
914 | fi | |
915 | test "$program_prefix" != NONE && | |
916 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
917 | # Use a double $ so make ignores it. | |
918 | test "$program_suffix" != NONE && | |
919 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
920 | ||
921 | # sed with no file args requires a program. | |
922 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
923 | ||
924 | ||
e9a25f70 JL |
925 | # Find the native compiler |
926 | # Extract the first word of "gcc", so it can be a program name with args. | |
927 | set dummy gcc; ac_word=$2 | |
928 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
9118405f | 929 | echo "configure:930: checking for $ac_word" >&5 |
e9a25f70 JL |
930 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
931 | echo $ac_n "(cached) $ac_c" 1>&6 | |
932 | else | |
933 | if test -n "$CC"; then | |
934 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
935 | else | |
cd9e5e7c | 936 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
937 | ac_dummy="$PATH" |
938 | for ac_dir in $ac_dummy; do | |
e9a25f70 JL |
939 | test -z "$ac_dir" && ac_dir=. |
940 | if test -f $ac_dir/$ac_word; then | |
941 | ac_cv_prog_CC="gcc" | |
942 | break | |
943 | fi | |
944 | done | |
945 | IFS="$ac_save_ifs" | |
946 | fi | |
947 | fi | |
948 | CC="$ac_cv_prog_CC" | |
949 | if test -n "$CC"; then | |
950 | echo "$ac_t""$CC" 1>&6 | |
951 | else | |
952 | echo "$ac_t""no" 1>&6 | |
953 | fi | |
954 | ||
955 | if test -z "$CC"; then | |
956 | # Extract the first word of "cc", so it can be a program name with args. | |
957 | set dummy cc; ac_word=$2 | |
958 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
9118405f | 959 | echo "configure:960: checking for $ac_word" >&5 |
e9a25f70 JL |
960 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
961 | echo $ac_n "(cached) $ac_c" 1>&6 | |
962 | else | |
963 | if test -n "$CC"; then | |
964 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
965 | else | |
cd9e5e7c | 966 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
e9a25f70 | 967 | ac_prog_rejected=no |
b27d2bd5 MK |
968 | ac_dummy="$PATH" |
969 | for ac_dir in $ac_dummy; do | |
e9a25f70 JL |
970 | test -z "$ac_dir" && ac_dir=. |
971 | if test -f $ac_dir/$ac_word; then | |
972 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
973 | ac_prog_rejected=yes | |
974 | continue | |
975 | fi | |
976 | ac_cv_prog_CC="cc" | |
977 | break | |
978 | fi | |
979 | done | |
980 | IFS="$ac_save_ifs" | |
981 | if test $ac_prog_rejected = yes; then | |
982 | # We found a bogon in the path, so make sure we never use it. | |
983 | set dummy $ac_cv_prog_CC | |
984 | shift | |
985 | if test $# -gt 0; then | |
986 | # We chose a different compiler from the bogus one. | |
987 | # However, it has the same basename, so the bogon will be chosen | |
988 | # first if we set CC to just the basename; use the full file name. | |
989 | shift | |
990 | set dummy "$ac_dir/$ac_word" "$@" | |
991 | shift | |
992 | ac_cv_prog_CC="$@" | |
993 | fi | |
994 | fi | |
995 | fi | |
996 | fi | |
997 | CC="$ac_cv_prog_CC" | |
998 | if test -n "$CC"; then | |
999 | echo "$ac_t""$CC" 1>&6 | |
1000 | else | |
1001 | echo "$ac_t""no" 1>&6 | |
1002 | fi | |
1003 | ||
cd9e5e7c MK |
1004 | if test -z "$CC"; then |
1005 | case "`uname -s`" in | |
1006 | *win32* | *WIN32*) | |
1007 | # Extract the first word of "cl", so it can be a program name with args. | |
1008 | set dummy cl; ac_word=$2 | |
1009 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
9118405f | 1010 | echo "configure:1011: checking for $ac_word" >&5 |
cd9e5e7c MK |
1011 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1012 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1013 | else | |
1014 | if test -n "$CC"; then | |
1015 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1016 | else | |
1017 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
b27d2bd5 MK |
1018 | ac_dummy="$PATH" |
1019 | for ac_dir in $ac_dummy; do | |
cd9e5e7c MK |
1020 | test -z "$ac_dir" && ac_dir=. |
1021 | if test -f $ac_dir/$ac_word; then | |
1022 | ac_cv_prog_CC="cl" | |
1023 | break | |
1024 | fi | |
1025 | done | |
1026 | IFS="$ac_save_ifs" | |
1027 | fi | |
1028 | fi | |
1029 | CC="$ac_cv_prog_CC" | |
1030 | if test -n "$CC"; then | |
1031 | echo "$ac_t""$CC" 1>&6 | |
1032 | else | |
1033 | echo "$ac_t""no" 1>&6 | |
1034 | fi | |
1035 | ;; | |
1036 | esac | |
1037 | fi | |
e9a25f70 JL |
1038 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
1039 | fi | |
1040 | ||
1041 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
9118405f | 1042 | echo "configure:1043: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
e9a25f70 JL |
1043 | |
1044 | ac_ext=c | |
1045 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1046 | ac_cpp='$CPP $CPPFLAGS' | |
1047 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
cd9e5e7c | 1048 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
e9a25f70 JL |
1049 | cross_compiling=$ac_cv_prog_cc_cross |
1050 | ||
b27d2bd5 MK |
1051 | cat > conftest.$ac_ext << EOF |
1052 | ||
9118405f | 1053 | #line 1054 "configure" |
e9a25f70 | 1054 | #include "confdefs.h" |
b27d2bd5 | 1055 | |
e9a25f70 JL |
1056 | main(){return(0);} |
1057 | EOF | |
9118405f | 1058 | if { (eval echo configure:1059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
e9a25f70 JL |
1059 | ac_cv_prog_cc_works=yes |
1060 | # If we can't run a trivial program, we are probably using a cross compiler. | |
1061 | if (./conftest; exit) 2>/dev/null; then | |
1062 | ac_cv_prog_cc_cross=no | |
1063 | else | |
1064 | ac_cv_prog_cc_cross=yes | |
1065 | fi | |
1066 | else | |
1067 | echo "configure: failed program was:" >&5 | |
1068 | cat conftest.$ac_ext >&5 | |
1069 | ac_cv_prog_cc_works=no | |
1070 | fi | |
1071 | rm -fr conftest* | |
b27d2bd5 MK |
1072 | ac_ext=c |
1073 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1074 | ac_cpp='$CPP $CPPFLAGS' | |
1075 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1076 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1077 | cross_compiling=$ac_cv_prog_cc_cross | |
e9a25f70 JL |
1078 | |
1079 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
1080 | if test $ac_cv_prog_cc_works = no; then | |
1081 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
1082 | fi | |
1083 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
9118405f | 1084 | echo "configure:1085: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
e9a25f70 JL |
1085 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
1086 | cross_compiling=$ac_cv_prog_cc_cross | |
1087 | ||
1088 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
9118405f | 1089 | echo "configure:1090: checking whether we are using GNU C" >&5 |
e9a25f70 JL |
1090 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
1091 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1092 | else | |
1093 | cat > conftest.c <<EOF | |
1094 | #ifdef __GNUC__ | |
1095 | yes; | |
1096 | #endif | |
1097 | EOF | |
9118405f | 1098 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
e9a25f70 JL |
1099 | ac_cv_prog_gcc=yes |
1100 | else | |
1101 | ac_cv_prog_gcc=no | |
1102 | fi | |
1103 | fi | |
1104 | ||
1105 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
1106 | ||
1107 | if test $ac_cv_prog_gcc = yes; then | |
1108 | GCC=yes | |
cd9e5e7c MK |
1109 | else |
1110 | GCC= | |
1111 | fi | |
1112 | ||
1113 | ac_test_CFLAGS="${CFLAGS+set}" | |
1114 | ac_save_CFLAGS="$CFLAGS" | |
1115 | CFLAGS= | |
1116 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
9118405f | 1117 | echo "configure:1118: checking whether ${CC-cc} accepts -g" >&5 |
e9a25f70 JL |
1118 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
1119 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1120 | else | |
1121 | echo 'void f(){}' > conftest.c | |
1122 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
1123 | ac_cv_prog_cc_g=yes | |
1124 | else | |
1125 | ac_cv_prog_cc_g=no | |
1126 | fi | |
1127 | rm -f conftest* | |
1128 | ||
1129 | fi | |
1130 | ||
1131 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
cd9e5e7c MK |
1132 | if test "$ac_test_CFLAGS" = set; then |
1133 | CFLAGS="$ac_save_CFLAGS" | |
1134 | elif test $ac_cv_prog_cc_g = yes; then | |
1135 | if test "$GCC" = yes; then | |
e9a25f70 JL |
1136 | CFLAGS="-g -O2" |
1137 | else | |
cd9e5e7c | 1138 | CFLAGS="-g" |
81814e35 | 1139 | fi |
3723cad9 | 1140 | else |
cd9e5e7c MK |
1141 | if test "$GCC" = yes; then |
1142 | CFLAGS="-O2" | |
1143 | else | |
1144 | CFLAGS= | |
1145 | fi | |
e9a25f70 JL |
1146 | fi |
1147 | ||
3ec83fc2 RH |
1148 | if test "x$CC" != xcc; then |
1149 | echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 | |
9118405f | 1150 | echo "configure:1151: checking whether $CC and cc understand -c and -o together" >&5 |
3ec83fc2 RH |
1151 | else |
1152 | echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 | |
9118405f | 1153 | echo "configure:1154: checking whether cc understands -c and -o together" >&5 |
3ec83fc2 RH |
1154 | fi |
1155 | set dummy $CC; ac_cc="`echo $2 | | |
1156 | sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" | |
1157 | if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then | |
1158 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1159 | else | |
1160 | echo 'foo(){}' > conftest.c | |
1161 | # Make sure it works both with $CC and with simple cc. | |
1162 | # We do the test twice because some compilers refuse to overwrite an | |
1163 | # existing .o file with -o, though they will create one. | |
1164 | ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' | |
9118405f CR |
1165 | if { (eval echo configure:1166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && |
1166 | test -f conftest.o && { (eval echo configure:1167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; | |
3ec83fc2 RH |
1167 | then |
1168 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
1169 | if test "x$CC" != xcc; then | |
1170 | # Test first that cc exists at all. | |
9118405f | 1171 | if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then |
3ec83fc2 | 1172 | ac_try='cc -c conftest.c -o conftest.o 1>&5' |
9118405f CR |
1173 | if { (eval echo configure:1174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && |
1174 | test -f conftest.o && { (eval echo configure:1175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; | |
3ec83fc2 RH |
1175 | then |
1176 | # cc works too. | |
1177 | : | |
1178 | else | |
1179 | # cc exists but doesn't like -o. | |
1180 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
1181 | fi | |
1182 | fi | |
1183 | fi | |
1184 | else | |
1185 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
1186 | fi | |
1187 | rm -f conftest* | |
1188 | ||
1189 | fi | |
1190 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then | |
1191 | echo "$ac_t""yes" 1>&6 | |
1192 | else | |
1193 | echo "$ac_t""no" 1>&6 | |
1194 | cat >> confdefs.h <<\EOF | |
1195 | #define NO_MINUS_C_MINUS_O 1 | |
1196 | EOF | |
1197 | ||
1198 | fi | |
1199 | ||
414d23ae HPN |
1200 | # autoconf is lame and doesn't give us any substitution variable for this. |
1201 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
1202 | NO_MINUS_C_MINUS_O=yes | |
1203 | else | |
1204 | OUTPUT_OPTION='-o $@' | |
1205 | fi | |
1206 | ||
1207 | ||
1208 | ||
1209 | # See if GNAT has been installed | |
200ef634 GK |
1210 | if test $host != $build; then |
1211 | ac_tool_prefix=${host_alias}- | |
1212 | else | |
1213 | ac_tool_prefix= | |
1214 | fi | |
1215 | ||
1216 | ||
1217 | # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args. | |
1218 | set dummy ${ac_tool_prefix}gnatbind; ac_word=$2 | |
1219 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
9118405f | 1220 | echo "configure:1221: checking for $ac_word" >&5 |
200ef634 GK |
1221 | if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then |
1222 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1223 | else | |
1224 | if test -n "$GNATBIND"; then | |
1225 | ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test. | |
1226 | else | |
1227 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1228 | ac_dummy="$PATH" | |
1229 | for ac_dir in $ac_dummy; do | |
1230 | test -z "$ac_dir" && ac_dir=. | |
1231 | if test -f $ac_dir/$ac_word; then | |
1232 | ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind" | |
1233 | break | |
1234 | fi | |
1235 | done | |
1236 | IFS="$ac_save_ifs" | |
1237 | fi | |
1238 | fi | |
1239 | GNATBIND="$ac_cv_prog_GNATBIND" | |
1240 | if test -n "$GNATBIND"; then | |
1241 | echo "$ac_t""$GNATBIND" 1>&6 | |
1242 | else | |
1243 | echo "$ac_t""no" 1>&6 | |
1244 | fi | |
1245 | ||
1246 | ||
1247 | if test -z "$ac_cv_prog_GNATBIND"; then | |
1248 | if test -n "$ac_tool_prefix"; then | |
1249 | # Extract the first word of "gnatbind", so it can be a program name with args. | |
1250 | set dummy gnatbind; ac_word=$2 | |
1251 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
9118405f | 1252 | echo "configure:1253: checking for $ac_word" >&5 |
200ef634 GK |
1253 | if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then |
1254 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1255 | else | |
1256 | if test -n "$GNATBIND"; then | |
1257 | ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test. | |
1258 | else | |
1259 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1260 | ac_dummy="$PATH" | |
1261 | for ac_dir in $ac_dummy; do | |
1262 | test -z "$ac_dir" && ac_dir=. | |
1263 | if test -f $ac_dir/$ac_word; then | |
1264 | ac_cv_prog_GNATBIND="gnatbind" | |
1265 | break | |
1266 | fi | |
1267 | done | |
1268 | IFS="$ac_save_ifs" | |
1269 | test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no" | |
1270 | fi | |
1271 | fi | |
1272 | GNATBIND="$ac_cv_prog_GNATBIND" | |
1273 | if test -n "$GNATBIND"; then | |
1274 | echo "$ac_t""$GNATBIND" 1>&6 | |
1275 | else | |
1276 | echo "$ac_t""no" 1>&6 | |
1277 | fi | |
1278 | ||
1279 | else | |
1280 | GNATBIND="no" | |
1281 | fi | |
1282 | fi | |
1283 | ||
1284 | echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6 | |
9118405f | 1285 | echo "configure:1286: checking for compiler driver that understands Ada" >&5 |
200ef634 GK |
1286 | if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then |
1287 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1288 | else | |
1289 | cat >conftest.adb <<EOF | |
1290 | procedure conftest is begin null; end conftest; | |
1291 | EOF | |
1292 | gcc_cv_prog_adac=no | |
1293 | # Have to do ac_tool_prefix and user overrides by hand. | |
1294 | user_adac=$ADAC | |
1295 | user_cc=$CC | |
1296 | for cand in ${ac_tool_prefix}$user_adac $user_adac \ | |
1297 | ${ac_tool_prefix}$user_cc $user_cc \ | |
1298 | ${ac_tool_prefix}gcc gcc \ | |
1299 | ${ac_tool_prefix}cc cc \ | |
1300 | ${ac_tool_prefix}gnatgcc gnatgcc \ | |
1301 | ${ac_tool_prefix}gnatcc gnatcc \ | |
1302 | ${ac_tool_prefix}adagcc adagcc \ | |
1303 | ${ac_tool_prefix}adacc adacc ; do | |
1304 | # There is a bug in all released versions of GCC which causes the | |
1305 | # driver to exit successfully when the appropriate language module | |
1306 | # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1. | |
1307 | # Therefore we must check for the error message as well as an | |
1308 | # unsuccessful exit. | |
1309 | errors=`($cand -c conftest.adb) 2>&1 || echo failure` | |
1310 | if test x"$errors" = x; then | |
1311 | gcc_cv_prog_adac=$cand | |
1312 | break | |
1313 | fi | |
1314 | done | |
1315 | rm -f conftest.* | |
1316 | fi | |
1317 | ||
1318 | echo "$ac_t""$gcc_cv_prog_adac" 1>&6 | |
1319 | ADAC=$gcc_cv_prog_adac | |
1320 | ||
1321 | ||
1322 | if test x$GNATBIND != xno && test x$ADAC != xno; then | |
1323 | have_gnat=yes | |
1324 | else | |
1325 | have_gnat=no | |
1326 | fi | |
1327 | ||
1328 | ||
75e93faa | 1329 | echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6 |
9118405f | 1330 | echo "configure:1331: checking whether ${CC-cc} accepts -Wno-long-long" >&5 |
75e93faa ZW |
1331 | if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then |
1332 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1333 | else | |
1334 | save_CFLAGS="$CFLAGS" | |
1335 | CFLAGS="-Wno-long-long" | |
1336 | cat > conftest.$ac_ext <<EOF | |
9118405f | 1337 | #line 1338 "configure" |
75e93faa ZW |
1338 | #include "confdefs.h" |
1339 | ||
1340 | int main() { | |
1341 | ||
1342 | ; return 0; } | |
1343 | EOF | |
9118405f | 1344 | if { (eval echo configure:1345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1345 | rm -rf conftest* |
1346 | ac_cv_prog_cc_no_long_long=yes | |
1347 | else | |
1348 | echo "configure: failed program was:" >&5 | |
1349 | cat conftest.$ac_ext >&5 | |
1350 | rm -rf conftest* | |
1351 | ac_cv_prog_cc_no_long_long=no | |
1352 | fi | |
1353 | rm -f conftest* | |
1354 | CFLAGS="$save_CFLAGS" | |
1355 | fi | |
1356 | ||
1357 | echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6 | |
200ef634 GK |
1358 | |
1359 | if test x$have_gnat != xno ; then | |
1360 | echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6 | |
9118405f | 1361 | echo "configure:1362: checking whether ${ADAC} accepts -Wno-long-long" >&5 |
200ef634 GK |
1362 | if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then |
1363 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1364 | else | |
1365 | cat >conftest.adb <<EOF | |
1366 | procedure conftest is begin null; end conftest; | |
1367 | EOF | |
1368 | if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then | |
1369 | ac_cv_prog_adac_no_long_long=yes | |
1370 | else | |
1371 | ac_cv_prog_adac_no_long_long=no | |
1372 | fi | |
1373 | rm -f conftest* | |
1374 | fi | |
1375 | ||
1376 | echo "$ac_t""$ac_cv_prog_adac_no_long_long" 1>&6 | |
1377 | else | |
1378 | ac_cv_prog_adac_no_long_long=yes | |
1379 | fi | |
1380 | ||
75e93faa | 1381 | strict1_warn= |
200ef634 GK |
1382 | if test $ac_cv_prog_cc_no_long_long = yes && \ |
1383 | test $ac_cv_prog_adac_no_long_long = yes ; then | |
75e93faa ZW |
1384 | strict1_warn="-pedantic -Wno-long-long" |
1385 | fi | |
1386 | ||
1387 | ||
84c041a1 | 1388 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
9118405f | 1389 | echo "configure:1390: checking how to run the C preprocessor" >&5 |
84c041a1 ZW |
1390 | # On Suns, sometimes $CPP names a directory. |
1391 | if test -n "$CPP" && test -d "$CPP"; then | |
1392 | CPP= | |
1393 | fi | |
1394 | if test -z "$CPP"; then | |
1395 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
1396 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1397 | else | |
1398 | # This must be in double quotes, not single quotes, because CPP may get | |
1399 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
1400 | CPP="${CC-cc} -E" | |
1401 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
1402 | # not just through cpp. | |
1403 | cat > conftest.$ac_ext <<EOF | |
9118405f | 1404 | #line 1405 "configure" |
84c041a1 ZW |
1405 | #include "confdefs.h" |
1406 | #include <assert.h> | |
1407 | Syntax Error | |
1408 | EOF | |
1409 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
9118405f | 1410 | { (eval echo configure:1411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
84c041a1 ZW |
1411 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1412 | if test -z "$ac_err"; then | |
1413 | : | |
1414 | else | |
1415 | echo "$ac_err" >&5 | |
1416 | echo "configure: failed program was:" >&5 | |
1417 | cat conftest.$ac_ext >&5 | |
1418 | rm -rf conftest* | |
1419 | CPP="${CC-cc} -E -traditional-cpp" | |
1420 | cat > conftest.$ac_ext <<EOF | |
9118405f | 1421 | #line 1422 "configure" |
84c041a1 ZW |
1422 | #include "confdefs.h" |
1423 | #include <assert.h> | |
1424 | Syntax Error | |
1425 | EOF | |
1426 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
9118405f | 1427 | { (eval echo configure:1428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
84c041a1 ZW |
1428 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1429 | if test -z "$ac_err"; then | |
1430 | : | |
1431 | else | |
1432 | echo "$ac_err" >&5 | |
1433 | echo "configure: failed program was:" >&5 | |
1434 | cat conftest.$ac_ext >&5 | |
1435 | rm -rf conftest* | |
1436 | CPP="${CC-cc} -nologo -E" | |
1437 | cat > conftest.$ac_ext <<EOF | |
9118405f | 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" | |
9118405f | 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 | |
414d23ae HPN |
1449 | echo "$ac_err" >&5 |
1450 | echo "configure: failed program was:" >&5 | |
1451 | cat conftest.$ac_ext >&5 | |
1452 | rm -rf conftest* | |
1453 | CPP=/lib/cpp | |
1454 | fi | |
1455 | rm -f conftest* | |
1456 | fi | |
1457 | rm -f conftest* | |
1458 | fi | |
1459 | rm -f conftest* | |
1460 | ac_cv_prog_CPP="$CPP" | |
1461 | fi | |
1462 | CPP="$ac_cv_prog_CPP" | |
1463 | else | |
1464 | ac_cv_prog_CPP="$CPP" | |
1465 | fi | |
1466 | echo "$ac_t""$CPP" 1>&6 | |
1467 | ||
1468 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
9118405f | 1469 | echo "configure:1470: checking for inline" >&5 |
414d23ae HPN |
1470 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1471 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1472 | else | |
1473 | ac_cv_c_inline=no | |
1474 | for ac_kw in inline __inline__ __inline; do | |
1475 | cat > conftest.$ac_ext <<EOF | |
9118405f | 1476 | #line 1477 "configure" |
414d23ae HPN |
1477 | #include "confdefs.h" |
1478 | ||
1479 | int main() { | |
1480 | } $ac_kw foo() { | |
1481 | ; return 0; } | |
1482 | EOF | |
9118405f | 1483 | if { (eval echo configure:1484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
414d23ae HPN |
1484 | rm -rf conftest* |
1485 | ac_cv_c_inline=$ac_kw; break | |
1486 | else | |
1487 | echo "configure: failed program was:" >&5 | |
1488 | cat conftest.$ac_ext >&5 | |
1489 | fi | |
1490 | rm -f conftest* | |
1491 | done | |
1492 | ||
1493 | fi | |
1494 | ||
1495 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1496 | case "$ac_cv_c_inline" in | |
1497 | inline | yes) ;; | |
1498 | no) cat >> confdefs.h <<\EOF | |
1499 | #define inline | |
1500 | EOF | |
1501 | ;; | |
1502 | *) cat >> confdefs.h <<EOF | |
1503 | #define inline $ac_cv_c_inline | |
1504 | EOF | |
1505 | ;; | |
1506 | esac | |
1507 | ||
1508 | echo $ac_n "checking for volatile""... $ac_c" 1>&6 | |
9118405f | 1509 | echo "configure:1510: checking for volatile" >&5 |
414d23ae HPN |
1510 | if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then |
1511 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1512 | else | |
1513 | cat > conftest.$ac_ext <<EOF | |
9118405f | 1514 | #line 1515 "configure" |
414d23ae HPN |
1515 | #include "confdefs.h" |
1516 | ||
1517 | int main() { | |
1518 | volatile int foo; | |
1519 | ; return 0; } | |
1520 | EOF | |
9118405f | 1521 | if { (eval echo configure:1522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
414d23ae HPN |
1522 | rm -rf conftest* |
1523 | gcc_cv_c_volatile=yes | |
1524 | else | |
1525 | echo "configure: failed program was:" >&5 | |
1526 | cat conftest.$ac_ext >&5 | |
1527 | rm -rf conftest* | |
1528 | gcc_cv_c_volatile=no | |
1529 | fi | |
1530 | rm -f conftest* | |
1531 | fi | |
1532 | ||
1533 | echo "$ac_t""$gcc_cv_c_volatile" 1>&6 | |
1534 | if test $gcc_cv_c_volatile = yes ; then | |
1535 | cat >> confdefs.h <<\EOF | |
1536 | #define HAVE_VOLATILE 1 | |
1537 | EOF | |
1538 | ||
1539 | fi | |
1540 | ||
1541 | ||
1542 | echo $ac_n "checking for long double""... $ac_c" 1>&6 | |
9118405f | 1543 | echo "configure:1544: checking for long double" >&5 |
414d23ae HPN |
1544 | if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then |
1545 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1546 | else | |
1547 | if test "$GCC" = yes; then | |
1548 | gcc_cv_c_long_double=yes | |
1549 | else | |
1550 | cat > conftest.$ac_ext <<EOF | |
9118405f | 1551 | #line 1552 "configure" |
414d23ae HPN |
1552 | #include "confdefs.h" |
1553 | ||
1554 | int main() { | |
1555 | /* The Stardent Vistra knows sizeof(long double), but does not support it. */ | |
1556 | long double foo = 0.0; | |
1557 | /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ | |
1558 | switch (0) case 0: case (sizeof(long double) >= sizeof(double)):; | |
1559 | ; return 0; } | |
1560 | EOF | |
9118405f | 1561 | if { (eval echo configure:1562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
414d23ae HPN |
1562 | rm -rf conftest* |
1563 | gcc_cv_c_long_double=yes | |
1564 | else | |
1565 | echo "configure: failed program was:" >&5 | |
1566 | cat conftest.$ac_ext >&5 | |
1567 | rm -rf conftest* | |
1568 | gcc_cv_c_long_double=no | |
1569 | fi | |
1570 | rm -f conftest* | |
1571 | fi | |
1572 | fi | |
1573 | ||
1574 | echo "$ac_t""$gcc_cv_c_long_double" 1>&6 | |
1575 | if test $gcc_cv_c_long_double = yes; then | |
1576 | cat >> confdefs.h <<\EOF | |
1577 | #define HAVE_LONG_DOUBLE 1 | |
1578 | EOF | |
1579 | ||
1580 | fi | |
1581 | ||
1582 | echo $ac_n "checking for long long int""... $ac_c" 1>&6 | |
9118405f | 1583 | echo "configure:1584: checking for long long int" >&5 |
414d23ae HPN |
1584 | if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then |
1585 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1586 | else | |
1587 | cat > conftest.$ac_ext <<EOF | |
9118405f | 1588 | #line 1589 "configure" |
414d23ae HPN |
1589 | #include "confdefs.h" |
1590 | ||
1591 | int main() { | |
1592 | long long int i; | |
1593 | ; return 0; } | |
1594 | EOF | |
9118405f | 1595 | if { (eval echo configure:1596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
414d23ae HPN |
1596 | rm -rf conftest* |
1597 | ac_cv_c_long_long=yes | |
1598 | else | |
1599 | echo "configure: failed program was:" >&5 | |
1600 | cat conftest.$ac_ext >&5 | |
1601 | rm -rf conftest* | |
1602 | ac_cv_c_long_long=no | |
1603 | fi | |
1604 | rm -f conftest* | |
1605 | fi | |
1606 | ||
1607 | echo "$ac_t""$ac_cv_c_long_long" 1>&6 | |
1608 | if test $ac_cv_c_long_long = yes; then | |
1609 | cat >> confdefs.h <<\EOF | |
1610 | #define HAVE_LONG_LONG 1 | |
1611 | EOF | |
1612 | ||
1613 | fi | |
1614 | echo $ac_n "checking for __int64""... $ac_c" 1>&6 | |
9118405f | 1615 | echo "configure:1616: checking for __int64" >&5 |
414d23ae HPN |
1616 | if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then |
1617 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1618 | else | |
1619 | cat > conftest.$ac_ext <<EOF | |
9118405f | 1620 | #line 1621 "configure" |
414d23ae HPN |
1621 | #include "confdefs.h" |
1622 | ||
1623 | int main() { | |
1624 | __int64 i; | |
1625 | ; return 0; } | |
1626 | EOF | |
9118405f | 1627 | if { (eval echo configure:1628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
414d23ae HPN |
1628 | rm -rf conftest* |
1629 | ac_cv_c___int64=yes | |
1630 | else | |
1631 | echo "configure: failed program was:" >&5 | |
1632 | cat conftest.$ac_ext >&5 | |
1633 | rm -rf conftest* | |
1634 | ac_cv_c___int64=no | |
1635 | fi | |
1636 | rm -f conftest* | |
1637 | fi | |
1638 | ||
1639 | echo "$ac_t""$ac_cv_c___int64" 1>&6 | |
1640 | if test $ac_cv_c___int64 = yes; then | |
1641 | cat >> confdefs.h <<\EOF | |
1642 | #define HAVE___INT64 1 | |
1643 | EOF | |
1644 | ||
1645 | fi | |
1646 | ||
1647 | echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6 | |
9118405f | 1648 | echo "configure:1649: checking for built-in _Bool" >&5 |
414d23ae HPN |
1649 | if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then |
1650 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1651 | else | |
1652 | cat > conftest.$ac_ext <<EOF | |
9118405f | 1653 | #line 1654 "configure" |
414d23ae HPN |
1654 | #include "confdefs.h" |
1655 | ||
1656 | int main() { | |
1657 | _Bool foo; | |
1658 | ; return 0; } | |
1659 | EOF | |
9118405f | 1660 | if { (eval echo configure:1661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
414d23ae HPN |
1661 | rm -rf conftest* |
1662 | gcc_cv_c__bool=yes | |
1663 | else | |
1664 | echo "configure: failed program was:" >&5 | |
1665 | cat conftest.$ac_ext >&5 | |
1666 | rm -rf conftest* | |
1667 | gcc_cv_c__bool=no | |
1668 | fi | |
1669 | rm -f conftest* | |
1670 | ||
1671 | fi | |
1672 | ||
1673 | echo "$ac_t""$gcc_cv_c__bool" 1>&6 | |
1674 | if test $gcc_cv_c__bool = yes; then | |
1675 | cat >> confdefs.h <<\EOF | |
1676 | #define HAVE__BOOL 1 | |
1677 | EOF | |
1678 | ||
1679 | fi | |
1680 | ||
1681 | ||
1682 | # sizeof(char) is 1 by definition. | |
1683 | echo $ac_n "checking size of short""... $ac_c" 1>&6 | |
9118405f | 1684 | echo "configure:1685: checking size of short" >&5 |
414d23ae HPN |
1685 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
1686 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1687 | else | |
1688 | for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. | |
1689 | cat > conftest.$ac_ext <<EOF | |
9118405f | 1690 | #line 1691 "configure" |
414d23ae HPN |
1691 | #include "confdefs.h" |
1692 | #include "confdefs.h" | |
1693 | #include <sys/types.h> | |
1694 | ||
1695 | ||
1696 | int main() { | |
1697 | switch (0) case 0: case (sizeof (short) == $ac_size):; | |
1698 | ; return 0; } | |
1699 | EOF | |
9118405f | 1700 | if { (eval echo configure:1701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
414d23ae HPN |
1701 | rm -rf conftest* |
1702 | ac_cv_sizeof_short=$ac_size | |
1703 | else | |
84c041a1 ZW |
1704 | echo "configure: failed program was:" >&5 |
1705 | cat conftest.$ac_ext >&5 | |
84c041a1 ZW |
1706 | fi |
1707 | rm -f conftest* | |
414d23ae HPN |
1708 | if test x$ac_cv_sizeof_short != x ; then break; fi |
1709 | done | |
1710 | ||
84c041a1 | 1711 | fi |
414d23ae HPN |
1712 | |
1713 | if test x$ac_cv_sizeof_short = x ; then | |
1714 | { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } | |
84c041a1 | 1715 | fi |
414d23ae HPN |
1716 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
1717 | cat >> confdefs.h <<EOF | |
1718 | #define SIZEOF_SHORT $ac_cv_sizeof_short | |
1719 | EOF | |
84c041a1 | 1720 | |
414d23ae HPN |
1721 | |
1722 | echo $ac_n "checking size of int""... $ac_c" 1>&6 | |
9118405f | 1723 | echo "configure:1724: checking size of int" >&5 |
414d23ae | 1724 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
75e93faa ZW |
1725 | echo $ac_n "(cached) $ac_c" 1>&6 |
1726 | else | |
414d23ae | 1727 | for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. |
75e93faa | 1728 | cat > conftest.$ac_ext <<EOF |
9118405f | 1729 | #line 1730 "configure" |
75e93faa | 1730 | #include "confdefs.h" |
414d23ae HPN |
1731 | #include "confdefs.h" |
1732 | #include <sys/types.h> | |
1733 | ||
75e93faa ZW |
1734 | |
1735 | int main() { | |
414d23ae | 1736 | switch (0) case 0: case (sizeof (int) == $ac_size):; |
75e93faa ZW |
1737 | ; return 0; } |
1738 | EOF | |
9118405f | 1739 | if { (eval echo configure:1740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa | 1740 | rm -rf conftest* |
414d23ae | 1741 | ac_cv_sizeof_int=$ac_size |
75e93faa ZW |
1742 | else |
1743 | echo "configure: failed program was:" >&5 | |
1744 | cat conftest.$ac_ext >&5 | |
1745 | fi | |
1746 | rm -f conftest* | |
414d23ae | 1747 | if test x$ac_cv_sizeof_int != x ; then break; fi |
75e93faa ZW |
1748 | done |
1749 | ||
1750 | fi | |
1751 | ||
414d23ae HPN |
1752 | if test x$ac_cv_sizeof_int = x ; then |
1753 | { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } | |
1754 | fi | |
1755 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 | |
1756 | cat >> confdefs.h <<EOF | |
1757 | #define SIZEOF_INT $ac_cv_sizeof_int | |
75e93faa | 1758 | EOF |
75e93faa | 1759 | |
414d23ae HPN |
1760 | |
1761 | echo $ac_n "checking size of long""... $ac_c" 1>&6 | |
9118405f | 1762 | echo "configure:1763: checking size of long" >&5 |
414d23ae | 1763 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
75e93faa ZW |
1764 | echo $ac_n "(cached) $ac_c" 1>&6 |
1765 | else | |
414d23ae | 1766 | for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. |
75e93faa | 1767 | cat > conftest.$ac_ext <<EOF |
9118405f | 1768 | #line 1769 "configure" |
414d23ae | 1769 | #include "confdefs.h" |
75e93faa | 1770 | #include "confdefs.h" |
414d23ae HPN |
1771 | #include <sys/types.h> |
1772 | ||
75e93faa ZW |
1773 | |
1774 | int main() { | |
414d23ae | 1775 | switch (0) case 0: case (sizeof (long) == $ac_size):; |
75e93faa ZW |
1776 | ; return 0; } |
1777 | EOF | |
9118405f | 1778 | if { (eval echo configure:1779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa | 1779 | rm -rf conftest* |
414d23ae | 1780 | ac_cv_sizeof_long=$ac_size |
75e93faa ZW |
1781 | else |
1782 | echo "configure: failed program was:" >&5 | |
1783 | cat conftest.$ac_ext >&5 | |
75e93faa ZW |
1784 | fi |
1785 | rm -f conftest* | |
414d23ae HPN |
1786 | if test x$ac_cv_sizeof_long != x ; then break; fi |
1787 | done | |
75e93faa | 1788 | |
414d23ae | 1789 | fi |
75e93faa | 1790 | |
414d23ae HPN |
1791 | if test x$ac_cv_sizeof_long = x ; then |
1792 | { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } | |
75e93faa | 1793 | fi |
414d23ae HPN |
1794 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
1795 | cat >> confdefs.h <<EOF | |
1796 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
1797 | EOF | |
75e93faa ZW |
1798 | |
1799 | ||
414d23ae HPN |
1800 | if test $ac_cv_c_long_long = yes; then |
1801 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 | |
9118405f | 1802 | echo "configure:1803: checking size of long long" >&5 |
414d23ae | 1803 | if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then |
04cabffc KG |
1804 | echo $ac_n "(cached) $ac_c" 1>&6 |
1805 | else | |
414d23ae HPN |
1806 | for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. |
1807 | cat > conftest.$ac_ext <<EOF | |
9118405f | 1808 | #line 1809 "configure" |
04cabffc | 1809 | #include "confdefs.h" |
414d23ae HPN |
1810 | #include "confdefs.h" |
1811 | #include <sys/types.h> | |
1812 | ||
04cabffc KG |
1813 | |
1814 | int main() { | |
414d23ae | 1815 | switch (0) case 0: case (sizeof (long long) == $ac_size):; |
04cabffc KG |
1816 | ; return 0; } |
1817 | EOF | |
9118405f | 1818 | if { (eval echo configure:1819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
04cabffc | 1819 | rm -rf conftest* |
414d23ae | 1820 | ac_cv_sizeof_long_long=$ac_size |
04cabffc KG |
1821 | else |
1822 | echo "configure: failed program was:" >&5 | |
1823 | cat conftest.$ac_ext >&5 | |
04cabffc KG |
1824 | fi |
1825 | rm -f conftest* | |
414d23ae HPN |
1826 | if test x$ac_cv_sizeof_long_long != x ; then break; fi |
1827 | done | |
1828 | ||
04cabffc KG |
1829 | fi |
1830 | ||
414d23ae HPN |
1831 | if test x$ac_cv_sizeof_long_long = x ; then |
1832 | { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; } | |
1833 | fi | |
1834 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 | |
1835 | cat >> confdefs.h <<EOF | |
1836 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
04cabffc KG |
1837 | EOF |
1838 | ||
04cabffc | 1839 | |
414d23ae HPN |
1840 | fi |
1841 | if test $ac_cv_c___int64 = yes; then | |
1842 | echo $ac_n "checking size of __int64""... $ac_c" 1>&6 | |
9118405f | 1843 | echo "configure:1844: checking size of __int64" >&5 |
414d23ae | 1844 | if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then |
75e93faa ZW |
1845 | echo $ac_n "(cached) $ac_c" 1>&6 |
1846 | else | |
414d23ae | 1847 | for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. |
75e93faa | 1848 | cat > conftest.$ac_ext <<EOF |
9118405f | 1849 | #line 1850 "configure" |
75e93faa | 1850 | #include "confdefs.h" |
414d23ae HPN |
1851 | #include "confdefs.h" |
1852 | #include <sys/types.h> | |
1853 | ||
61842080 | 1854 | |
75e93faa | 1855 | int main() { |
414d23ae | 1856 | switch (0) case 0: case (sizeof (__int64) == $ac_size):; |
75e93faa ZW |
1857 | ; return 0; } |
1858 | EOF | |
9118405f | 1859 | if { (eval echo configure:1860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa | 1860 | rm -rf conftest* |
414d23ae | 1861 | ac_cv_sizeof___int64=$ac_size |
75e93faa ZW |
1862 | else |
1863 | echo "configure: failed program was:" >&5 | |
1864 | cat conftest.$ac_ext >&5 | |
75e93faa ZW |
1865 | fi |
1866 | rm -f conftest* | |
414d23ae HPN |
1867 | if test x$ac_cv_sizeof___int64 != x ; then break; fi |
1868 | done | |
1869 | ||
75e93faa ZW |
1870 | fi |
1871 | ||
414d23ae HPN |
1872 | if test x$ac_cv_sizeof___int64 = x ; then |
1873 | { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; } | |
1874 | fi | |
1875 | echo "$ac_t""$ac_cv_sizeof___int64" 1>&6 | |
1876 | cat >> confdefs.h <<EOF | |
1877 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 | |
75e93faa ZW |
1878 | EOF |
1879 | ||
414d23ae HPN |
1880 | |
1881 | fi | |
1882 | ||
1883 | echo $ac_n "checking execution character set""... $ac_c" 1>&6 | |
9118405f | 1884 | echo "configure:1885: checking execution character set" >&5 |
414d23ae | 1885 | if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then |
5c3bc9fb GK |
1886 | echo $ac_n "(cached) $ac_c" 1>&6 |
1887 | else | |
75e93faa | 1888 | cat > conftest.$ac_ext <<EOF |
9118405f | 1889 | #line 1890 "configure" |
5c3bc9fb | 1890 | #include "confdefs.h" |
414d23ae HPN |
1891 | #if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \ |
1892 | && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21 | |
1893 | ASCII | |
1894 | #endif | |
1895 | EOF | |
1896 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1897 | egrep "ASCII" >/dev/null 2>&1; then | |
1898 | rm -rf conftest* | |
1899 | ac_cv_c_charset=ASCII | |
1900 | fi | |
1901 | rm -f conftest* | |
5c3bc9fb | 1902 | |
414d23ae HPN |
1903 | if test x${ac_cv_c_charset+set} != xset; then |
1904 | cat > conftest.$ac_ext <<EOF | |
9118405f | 1905 | #line 1906 "configure" |
414d23ae HPN |
1906 | #include "confdefs.h" |
1907 | #if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \ | |
1908 | && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A | |
1909 | EBCDIC | |
1910 | #endif | |
75e93faa | 1911 | EOF |
414d23ae HPN |
1912 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
1913 | egrep "EBCDIC" >/dev/null 2>&1; then | |
75e93faa | 1914 | rm -rf conftest* |
414d23ae HPN |
1915 | ac_cv_c_charset=EBCDIC |
1916 | fi | |
1917 | rm -f conftest* | |
1918 | ||
1919 | fi | |
1920 | if test x${ac_cv_c_charset+set} != xset; then | |
1921 | ac_cv_c_charset=unknown | |
1922 | fi | |
1923 | fi | |
1924 | ||
1925 | echo "$ac_t""$ac_cv_c_charset" 1>&6 | |
1926 | if test $ac_cv_c_charset = unknown; then | |
1927 | { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; } | |
1928 | elif test $ac_cv_c_charset = EBCDIC; then | |
1929 | cat >> confdefs.h <<\EOF | |
1930 | #define HOST_EBCDIC 1 | |
1931 | EOF | |
1932 | ||
1933 | fi | |
1934 | ||
1935 | # If the native compiler is GCC, we can enable warnings even in stage1. | |
1936 | # That's useful for people building cross-compilers, or just running a | |
1937 | # quick `make'. | |
1938 | warn_cflags= | |
1939 | if test "x$GCC" = "xyes"; then | |
1940 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
1941 | fi | |
1942 | ||
1943 | ||
1944 | # Determine whether or not multilibs are enabled. | |
1945 | # Check whether --enable-multilib or --disable-multilib was given. | |
1946 | if test "${enable_multilib+set}" = set; then | |
1947 | enableval="$enable_multilib" | |
1948 | : | |
1949 | else | |
1950 | enable_multilib=yes | |
1951 | fi | |
1952 | ||
1953 | ||
1954 | ||
1955 | # Enable expensive internal checks | |
1956 | # Check whether --enable-checking or --disable-checking was given. | |
1957 | if test "${enable_checking+set}" = set; then | |
1958 | enableval="$enable_checking" | |
1959 | ac_checking= | |
1960 | ac_tree_checking= | |
1961 | ac_rtl_checking= | |
1962 | ac_rtlflag_checking= | |
1963 | ac_gc_checking= | |
1964 | ac_gc_always_collect= | |
1965 | case "${enableval}" in | |
1966 | yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ; | |
1967 | ac_rtlflag_checking=1 ;; | |
1968 | no) ;; | |
1969 | *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," | |
1970 | set fnord $enableval; shift | |
1971 | IFS="$ac_save_IFS" | |
1972 | for check | |
1973 | do | |
1974 | case $check in | |
1975 | misc) ac_checking=1 ;; | |
1976 | tree) ac_tree_checking=1 ;; | |
1977 | rtlflag) ac_rtlflag_checking=1 ;; | |
1978 | rtl) ac_rtl_checking=1 ;; | |
1979 | gc) ac_gc_checking=1 ;; | |
1980 | gcac) ac_gc_always_collect=1 ;; | |
1981 | valgrind) ac_checking_valgrind=1 ;; | |
1982 | *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;; | |
1983 | esac | |
1984 | done | |
1985 | ;; | |
1986 | esac | |
1987 | ||
75e93faa | 1988 | else |
414d23ae HPN |
1989 | # Enable some checks by default for development versions of GCC |
1990 | ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1; | |
75e93faa | 1991 | fi |
5c3bc9fb | 1992 | |
414d23ae HPN |
1993 | nocommon_flag="" |
1994 | if test x$ac_checking != x ; then | |
1995 | cat >> confdefs.h <<\EOF | |
1996 | #define ENABLE_CHECKING 1 | |
75e93faa ZW |
1997 | EOF |
1998 | ||
414d23ae HPN |
1999 | nocommon_flag=-fno-common |
2000 | fi | |
827ae6cf | 2001 | |
414d23ae HPN |
2002 | if test x$ac_tree_checking != x ; then |
2003 | cat >> confdefs.h <<\EOF | |
2004 | #define ENABLE_TREE_CHECKING 1 | |
827ae6cf | 2005 | EOF |
827ae6cf RO |
2006 | |
2007 | fi | |
414d23ae HPN |
2008 | if test x$ac_rtl_checking != x ; then |
2009 | cat >> confdefs.h <<\EOF | |
2010 | #define ENABLE_RTL_CHECKING 1 | |
2011 | EOF | |
827ae6cf | 2012 | |
414d23ae HPN |
2013 | fi |
2014 | if test x$ac_rtlflag_checking != x ; then | |
827ae6cf | 2015 | cat >> confdefs.h <<\EOF |
414d23ae | 2016 | #define ENABLE_RTL_FLAG_CHECKING 1 |
827ae6cf RO |
2017 | EOF |
2018 | ||
2019 | fi | |
414d23ae HPN |
2020 | if test x$ac_gc_checking != x ; then |
2021 | cat >> confdefs.h <<\EOF | |
2022 | #define ENABLE_GC_CHECKING 1 | |
2023 | EOF | |
827ae6cf | 2024 | |
414d23ae HPN |
2025 | fi |
2026 | if test x$ac_gc_always_collect != x ; then | |
2027 | cat >> confdefs.h <<\EOF | |
2028 | #define ENABLE_GC_ALWAYS_COLLECT 1 | |
2029 | EOF | |
75e93faa | 2030 | |
414d23ae HPN |
2031 | fi |
2032 | valgrind_path_defines= | |
2033 | valgrind_command= | |
2034 | if test x$ac_checking_valgrind != x ; then | |
2035 | # It is certainly possible that there's valgrind but no valgrind.h. | |
2036 | # GCC relies on making annotations so we must have both. | |
2037 | ac_safe=`echo "valgrind.h" | sed 'y%./+-%__p_%'` | |
2038 | echo $ac_n "checking for valgrind.h""... $ac_c" 1>&6 | |
9118405f | 2039 | echo "configure:2040: checking for valgrind.h" >&5 |
414d23ae | 2040 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
75e93faa ZW |
2041 | echo $ac_n "(cached) $ac_c" 1>&6 |
2042 | else | |
75e93faa | 2043 | cat > conftest.$ac_ext <<EOF |
9118405f | 2044 | #line 2045 "configure" |
75e93faa | 2045 | #include "confdefs.h" |
414d23ae | 2046 | #include <valgrind.h> |
5c3bc9fb | 2047 | EOF |
414d23ae | 2048 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
9118405f | 2049 | { (eval echo configure:2050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
414d23ae HPN |
2050 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2051 | if test -z "$ac_err"; then | |
5c3bc9fb | 2052 | rm -rf conftest* |
414d23ae | 2053 | eval "ac_cv_header_$ac_safe=yes" |
ff5def20 | 2054 | else |
414d23ae | 2055 | echo "$ac_err" >&5 |
5c3bc9fb GK |
2056 | echo "configure: failed program was:" >&5 |
2057 | cat conftest.$ac_ext >&5 | |
414d23ae HPN |
2058 | rm -rf conftest* |
2059 | eval "ac_cv_header_$ac_safe=no" | |
75e93faa ZW |
2060 | fi |
2061 | rm -f conftest* | |
414d23ae HPN |
2062 | fi |
2063 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2064 | echo "$ac_t""yes" 1>&6 | |
2065 | have_valgrind_h=yes | |
2066 | else | |
2067 | echo "$ac_t""no" 1>&6 | |
2068 | have_valgrind_h=no | |
75e93faa ZW |
2069 | fi |
2070 | ||
414d23ae HPN |
2071 | # Extract the first word of "valgrind", so it can be a program name with args. |
2072 | set dummy valgrind; ac_word=$2 | |
2073 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
9118405f | 2074 | echo "configure:2075: checking for $ac_word" >&5 |
414d23ae HPN |
2075 | if eval "test \"`echo '$''{'ac_cv_path_valgrind_path'+set}'`\" = set"; then |
2076 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2077 | else | |
2078 | case "$valgrind_path" in | |
2079 | /*) | |
2080 | ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path. | |
2081 | ;; | |
2082 | *) | |
2083 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2084 | for ac_dir in $PATH; do | |
2085 | test -z "$ac_dir" && ac_dir=. | |
2086 | if test -f $ac_dir/$ac_word; then | |
2087 | if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then | |
2088 | ac_cv_path_valgrind_path="$ac_dir/$ac_word" | |
2089 | break | |
2090 | fi | |
2091 | fi | |
2092 | done | |
2093 | IFS="$ac_save_ifs" | |
2094 | ;; | |
2095 | esac | |
75e93faa | 2096 | fi |
414d23ae HPN |
2097 | valgrind_path="$ac_cv_path_valgrind_path" |
2098 | if test -n "$valgrind_path"; then | |
2099 | echo "$ac_t""$valgrind_path" 1>&6 | |
2100 | else | |
2101 | echo "$ac_t""no" 1>&6 | |
2102 | fi | |
2103 | ||
2104 | if test "x$valgrind_path" = "x" || test $have_valgrind_h = no; then | |
2105 | { echo "configure: error: *** Can't find both valgrind and valgrind.h" 1>&2; exit 1; } | |
2106 | fi | |
2107 | valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"' | |
2108 | valgrind_command="$valgrind_path -q" | |
2109 | cat >> confdefs.h <<\EOF | |
2110 | #define ENABLE_VALGRIND_CHECKING 1 | |
75e93faa ZW |
2111 | EOF |
2112 | ||
414d23ae | 2113 | fi |
75e93faa | 2114 | |
75e93faa ZW |
2115 | |
2116 | ||
414d23ae HPN |
2117 | # Enable code coverage collection |
2118 | # Check whether --enable-coverage or --disable-coverage was given. | |
2119 | if test "${enable_coverage+set}" = set; then | |
2120 | enableval="$enable_coverage" | |
2121 | case "${enableval}" in | |
2122 | yes|noopt) | |
2123 | coverage_flags="-fprofile-arcs -ftest-coverage -O0" | |
2124 | ;; | |
2125 | opt) | |
2126 | coverage_flags="-fprofile-arcs -ftest-coverage -O2" | |
2127 | ;; | |
2128 | *) | |
2129 | { echo "configure: error: unknown coverage setting $enableval" 1>&2; exit 1; } | |
2130 | ;; | |
2131 | esac | |
75e93faa | 2132 | else |
414d23ae | 2133 | coverage_flags="" |
ff5def20 | 2134 | fi |
75e93faa | 2135 | |
5c3bc9fb | 2136 | |
414d23ae HPN |
2137 | |
2138 | # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. | |
2139 | if test "${with_cpp_install_dir+set}" = set; then | |
2140 | withval="$with_cpp_install_dir" | |
2141 | if test x$withval = xyes; then | |
2142 | { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; } | |
2143 | elif test x$withval != xno; then | |
2144 | cpp_install_dir=$withval | |
2145 | fi | |
75e93faa | 2146 | fi |
75e93faa ZW |
2147 | |
2148 | ||
414d23ae HPN |
2149 | # Enable __cxa_atexit for C++. |
2150 | # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given. | |
2151 | if test "${enable___cxa_atexit+set}" = set; then | |
2152 | enableval="$enable___cxa_atexit" | |
2153 | : | |
2154 | fi | |
75e93faa | 2155 | |
414d23ae HPN |
2156 | if test x$enable___cxa_atexit = xyes; then |
2157 | cat >> confdefs.h <<\EOF | |
2158 | #define DEFAULT_USE_CXA_ATEXIT 1 | |
2159 | EOF | |
75e93faa | 2160 | |
414d23ae HPN |
2161 | fi |
2162 | ||
2163 | # Enable Multibyte Characters for C/C++ | |
2164 | # Check whether --enable-c-mbchar or --disable-c-mbchar was given. | |
2165 | if test "${enable_c_mbchar+set}" = set; then | |
2166 | enableval="$enable_c_mbchar" | |
2167 | if test x$enable_c_mbchar != xno; then | |
2168 | cat >> confdefs.h <<\EOF | |
2169 | #define MULTIBYTE_CHARS 1 | |
75e93faa | 2170 | EOF |
414d23ae HPN |
2171 | |
2172 | fi | |
75e93faa | 2173 | fi |
75e93faa | 2174 | |
414d23ae HPN |
2175 | |
2176 | # Enable threads | |
2177 | # Pass with no value to take the default | |
2178 | # Pass with a value to specify a thread package | |
2179 | # Check whether --enable-threads or --disable-threads was given. | |
2180 | if test "${enable_threads+set}" = set; then | |
2181 | enableval="$enable_threads" | |
2182 | : | |
2183 | else | |
2184 | enable_threads='' | |
75e93faa ZW |
2185 | fi |
2186 | ||
414d23ae HPN |
2187 | |
2188 | enable_threads_flag=$enable_threads | |
2189 | # Check if a valid thread package | |
2190 | case x${enable_threads_flag} in | |
2191 | x | xno) | |
2192 | # No threads | |
2193 | target_thread_file='single' | |
2194 | ;; | |
2195 | xyes) | |
2196 | # default | |
2197 | target_thread_file='' | |
2198 | ;; | |
2199 | xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \ | |
2200 | xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix) | |
2201 | target_thread_file=$enable_threads_flag | |
2202 | ;; | |
2203 | *) | |
2204 | echo "$enable_threads is an unknown thread package" 1>&2 | |
2205 | exit 1 | |
2206 | ;; | |
2207 | esac | |
2208 | ||
2209 | # Check whether --enable-objc-gc or --disable-objc-gc was given. | |
2210 | if test "${enable_objc_gc+set}" = set; then | |
2211 | enableval="$enable_objc_gc" | |
2212 | if test x$enable_objc_gc = xno; then | |
2213 | objc_boehm_gc='' | |
2214 | else | |
2215 | objc_boehm_gc=1 | |
2216 | fi | |
2217 | else | |
2218 | objc_boehm_gc='' | |
75e93faa | 2219 | fi |
75e93faa ZW |
2220 | |
2221 | ||
414d23ae HPN |
2222 | # Check whether --with-dwarf2 or --without-dwarf2 was given. |
2223 | if test "${with_dwarf2+set}" = set; then | |
2224 | withval="$with_dwarf2" | |
2225 | dwarf2="$with_dwarf2" | |
75e93faa | 2226 | else |
414d23ae HPN |
2227 | dwarf2=no |
2228 | fi | |
75e93faa ZW |
2229 | |
2230 | ||
414d23ae HPN |
2231 | # Check whether --enable-shared or --disable-shared was given. |
2232 | if test "${enable_shared+set}" = set; then | |
2233 | enableval="$enable_shared" | |
2234 | ||
2235 | case $enable_shared in | |
2236 | yes | no) ;; | |
2237 | *) | |
2238 | enable_shared=no | |
2239 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
2240 | for pkg in $enableval; do | |
2241 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
2242 | enable_shared=yes | |
2243 | fi | |
2244 | done | |
2245 | IFS="$ac_save_ifs" | |
2246 | ;; | |
2247 | esac | |
2248 | ||
75e93faa | 2249 | else |
414d23ae | 2250 | enable_shared=yes |
75e93faa | 2251 | fi |
75e93faa | 2252 | |
75e93faa | 2253 | |
75e93faa | 2254 | |
5b67ad6f | 2255 | # Stage specific cflags for build. |
b8dad04b | 2256 | stage1_cflags= |
5b67ad6f DA |
2257 | case $build in |
2258 | vax-*-*) | |
2259 | if test x$GCC = xyes | |
2260 | then | |
b8dad04b | 2261 | stage1_cflags="-Wa,-J" |
5b67ad6f | 2262 | else |
b8dad04b | 2263 | stage1_cflags="-J" |
5b67ad6f DA |
2264 | fi |
2265 | ;; | |
5dd8a9b1 ZW |
2266 | powerpc-*-darwin*) |
2267 | # The spiffy cpp-precomp chokes on some legitimate constructs in GCC | |
2268 | # sources; use -no-cpp-precomp to get to GNU cpp. | |
2269 | # Apple's GCC has bugs in designated initializer handling, so disable | |
2270 | # that too. | |
2271 | stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0" | |
2272 | ;; | |
5b67ad6f DA |
2273 | esac |
2274 | ||
2275 | ||
e9a25f70 | 2276 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 |
9118405f | 2277 | echo "configure:2278: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
e9a25f70 JL |
2278 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
2279 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
2280 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2281 | else | |
2282 | cat > conftestmake <<\EOF | |
2283 | all: | |
2284 | @echo 'ac_maketemp="${MAKE}"' | |
2285 | EOF | |
2286 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
2287 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
2288 | if test -n "$ac_maketemp"; then | |
2289 | eval ac_cv_prog_make_${ac_make}_set=yes | |
2290 | else | |
2291 | eval ac_cv_prog_make_${ac_make}_set=no | |
2292 | fi | |
2293 | rm -f conftestmake | |
2294 | fi | |
2295 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
2296 | echo "$ac_t""yes" 1>&6 | |
2297 | SET_MAKE= | |
2298 | else | |
2299 | echo "$ac_t""no" 1>&6 | |
2300 | SET_MAKE="MAKE=${MAKE-make}" | |
2301 | fi | |
2302 | ||
2303 | ||
ab339d62 | 2304 | echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6 |
9118405f | 2305 | echo "configure:2306: checking whether a default assembler was specified" >&5 |
3ccc3a56 | 2306 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
e154a394 | 2307 | if test x"$gas_flag" = x"no"; then |
3ccc3a56 | 2308 | echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6 |
ab339d62 | 2309 | else |
3ccc3a56 | 2310 | echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6 |
ab339d62 AO |
2311 | fi |
2312 | else | |
2313 | echo "$ac_t""no" 1>&6 | |
2314 | fi | |
2315 | ||
2316 | echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6 | |
9118405f | 2317 | echo "configure:2318: checking whether a default linker was specified" >&5 |
3ccc3a56 | 2318 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
e154a394 | 2319 | if test x"$gnu_ld_flag" = x"no"; then |
3ccc3a56 | 2320 | echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6 |
ab339d62 | 2321 | else |
3ccc3a56 | 2322 | echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6 |
ab339d62 AO |
2323 | fi |
2324 | else | |
2325 | echo "$ac_t""no" 1>&6 | |
2326 | fi | |
2327 | ||
4070d885 | 2328 | echo $ac_n "checking for GNU C library""... $ac_c" 1>&6 |
9118405f | 2329 | echo "configure:2330: checking for GNU C library" >&5 |
4070d885 AJ |
2330 | if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then |
2331 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2332 | else | |
2333 | cat > conftest.$ac_ext <<EOF | |
9118405f | 2334 | #line 2335 "configure" |
4070d885 AJ |
2335 | #include "confdefs.h" |
2336 | #include <features.h> | |
2337 | int main() { | |
2338 | ||
2339 | #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
2340 | #error Not a GNU C library system | |
2341 | #endif | |
2342 | ; return 0; } | |
2343 | EOF | |
9118405f | 2344 | if { (eval echo configure:2345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
4070d885 AJ |
2345 | rm -rf conftest* |
2346 | gcc_cv_glibc=yes | |
2347 | else | |
2348 | echo "configure: failed program was:" >&5 | |
2349 | cat conftest.$ac_ext >&5 | |
2350 | rm -rf conftest* | |
2351 | gcc_cv_glibc=no | |
2352 | fi | |
2353 | rm -f conftest* | |
2354 | fi | |
2355 | ||
2356 | echo "$ac_t""$gcc_cv_glibc" 1>&6 | |
c2f7d403 | 2357 | if test $gcc_cv_glibc = yes; then |
4070d885 AJ |
2358 | cat >> confdefs.h <<\EOF |
2359 | #define _GNU_SOURCE 1 | |
2360 | EOF | |
2361 | ||
2362 | fi | |
2363 | ||
861bb6c1 | 2364 | # Find some useful tools |
9118405f | 2365 | for ac_prog in gawk mawk nawk awk |
861bb6c1 JL |
2366 | do |
2367 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2368 | set dummy $ac_prog; ac_word=$2 | |
2369 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
9118405f | 2370 | echo "configure:2371: checking for $ac_word" >&5 |
861bb6c1 JL |
2371 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
2372 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2373 | else | |
2374 | if test -n "$AWK"; then | |
2375 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
2376 | else | |
cd9e5e7c | 2377 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
2378 | ac_dummy="$PATH" |
2379 | for ac_dir in $ac_dummy; do | |
861bb6c1 JL |
2380 | test -z "$ac_dir" && ac_dir=. |
2381 | if test -f $ac_dir/$ac_word; then | |
2382 | ac_cv_prog_AWK="$ac_prog" | |
2383 | break | |
2384 | fi | |
2385 | done | |
2386 | IFS="$ac_save_ifs" | |
2387 | fi | |
2388 | fi | |
2389 | AWK="$ac_cv_prog_AWK" | |
2390 | if test -n "$AWK"; then | |
2391 | echo "$ac_t""$AWK" 1>&6 | |
2392 | else | |
2393 | echo "$ac_t""no" 1>&6 | |
2394 | fi | |
2395 | ||
2396 | test -n "$AWK" && break | |
2397 | done | |
2398 | ||
0a4b6309 | 2399 | echo $ac_n "checking whether ln works""... $ac_c" 1>&6 |
9118405f | 2400 | echo "configure:2401: checking whether ln works" >&5 |
0a4b6309 RL |
2401 | if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then |
2402 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2403 | else | |
2404 | rm -f conftestdata_t | |
2405 | echo >conftestdata_f | |
2406 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
2407 | then | |
2408 | gcc_cv_prog_LN="ln" | |
2409 | else | |
2410 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
2411 | then | |
2412 | gcc_cv_prog_LN="ln -s" | |
2413 | else | |
2414 | gcc_cv_prog_LN=cp | |
2415 | fi | |
2416 | fi | |
2417 | rm -f conftestdata_f conftestdata_t | |
2418 | ||
2419 | fi | |
2420 | LN="$gcc_cv_prog_LN" | |
2421 | if test "$gcc_cv_prog_LN" = "ln"; then | |
2422 | echo "$ac_t""yes" 1>&6 | |
2423 | else | |
2424 | if test "$gcc_cv_prog_LN" = "ln -s"; then | |
2425 | echo "$ac_t""no, using ln -s" 1>&6 | |
2426 | else | |
2427 | echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6 | |
2428 | fi | |
2429 | fi | |
2430 | ||
2431 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 | |
9118405f | 2432 | echo "configure:2433: checking whether ln -s works" >&5 |
0a4b6309 RL |
2433 | if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then |
2434 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2435 | else | |
2436 | rm -f conftestdata_t | |
2437 | echo >conftestdata_f | |
2438 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
2439 | then | |
2440 | gcc_cv_prog_LN_S="ln -s" | |
2441 | else | |
2442 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
2443 | then | |
2444 | gcc_cv_prog_LN_S=ln | |
2445 | else | |
2446 | gcc_cv_prog_LN_S=cp | |
2447 | fi | |
2448 | fi | |
2449 | rm -f conftestdata_f conftestdata_t | |
2450 | ||
2451 | fi | |
2452 | LN_S="$gcc_cv_prog_LN_S" | |
2453 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
2454 | echo "$ac_t""yes" 1>&6 | |
2455 | else | |
2456 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
2457 | echo "$ac_t""no, using ln" 1>&6 | |
2458 | else | |
2459 | echo "$ac_t""no, and neither does ln, so using cp" 1>&6 | |
2460 | fi | |
2461 | fi | |
2462 | ||
861bb6c1 JL |
2463 | # Extract the first word of "ranlib", so it can be a program name with args. |
2464 | set dummy ranlib; ac_word=$2 | |
2465 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
9118405f | 2466 | echo "configure:2467: checking for $ac_word" >&5 |
861bb6c1 JL |
2467 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
2468 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2469 | else | |
2470 | if test -n "$RANLIB"; then | |
2471 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2472 | else | |
cd9e5e7c | 2473 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
2474 | ac_dummy="$PATH" |
2475 | for ac_dir in $ac_dummy; do | |
861bb6c1 JL |
2476 | test -z "$ac_dir" && ac_dir=. |
2477 | if test -f $ac_dir/$ac_word; then | |
2478 | ac_cv_prog_RANLIB="ranlib" | |
2479 | break | |
2480 | fi | |
2481 | done | |
2482 | IFS="$ac_save_ifs" | |
2483 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
2484 | fi | |
2485 | fi | |
2486 | RANLIB="$ac_cv_prog_RANLIB" | |
2487 | if test -n "$RANLIB"; then | |
2488 | echo "$ac_t""$RANLIB" 1>&6 | |
2489 | else | |
2490 | echo "$ac_t""no" 1>&6 | |
2491 | fi | |
2492 | ||
0a4b6309 RL |
2493 | # Find a good install program. We prefer a C program (faster), |
2494 | # so one script is as good as another. But avoid the broken or | |
2495 | # incompatible versions: | |
2496 | # SysV /etc/install, /usr/sbin/install | |
2497 | # SunOS /usr/etc/install | |
2498 | # IRIX /sbin/install | |
2499 | # AIX /bin/install | |
2500 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2501 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2502 | # ./install, which can be erroneously created by make from ./install.sh. | |
2503 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
9118405f | 2504 | echo "configure:2505: checking for a BSD compatible install" >&5 |
0a4b6309 RL |
2505 | if test -z "$INSTALL"; then |
2506 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
2507 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2508 | else | |
2509 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
2510 | for ac_dir in $PATH; do | |
2511 | # Account for people who put trailing slashes in PATH elements. | |
2512 | case "$ac_dir/" in | |
2513 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
2514 | *) | |
2515 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2516 | for ac_prog in ginstall scoinst install; do | |
2517 | if test -f $ac_dir/$ac_prog; then | |
2518 | if test $ac_prog = install && | |
2519 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
2520 | # AIX install. It has an incompatible calling convention. | |
2521 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
2522 | : | |
2523 | else | |
2524 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
2525 | break 2 | |
2526 | fi | |
2527 | fi | |
2528 | done | |
2529 | ;; | |
2530 | esac | |
2531 | done | |
2532 | IFS="$ac_save_IFS" | |
2533 | ||
2534 | fi | |
2535 | if test "${ac_cv_path_install+set}" = set; then | |
2536 | INSTALL="$ac_cv_path_install" | |
2537 | else | |
2538 | # As a last resort, use the slow shell script. We don't cache a | |
2539 | # path for INSTALL within a source directory, because that will | |
2540 | # break other packages using the cache if that directory is | |
2541 | # removed, or if the path is relative. | |
2542 | INSTALL="$ac_install_sh" | |
2543 | fi | |
2544 | fi | |
2545 | echo "$ac_t""$INSTALL" 1>&6 | |
2546 | ||
2547 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
2548 | # It thinks the first close brace ends the variable substitution. | |
2549 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
2550 | ||
2551 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
2552 | ||
861bb6c1 | 2553 | |
956d6950 | 2554 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
9118405f | 2555 | echo "configure:2556: checking for ANSI C header files" >&5 |
956d6950 JL |
2556 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
2557 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2558 | else | |
2559 | cat > conftest.$ac_ext <<EOF | |
9118405f | 2560 | #line 2561 "configure" |
956d6950 JL |
2561 | #include "confdefs.h" |
2562 | #include <stdlib.h> | |
2563 | #include <stdarg.h> | |
2564 | #include <string.h> | |
2565 | #include <float.h> | |
2566 | EOF | |
2567 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
9118405f | 2568 | { (eval echo configure:2569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 2569 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
956d6950 JL |
2570 | if test -z "$ac_err"; then |
2571 | rm -rf conftest* | |
2572 | ac_cv_header_stdc=yes | |
2573 | else | |
2574 | echo "$ac_err" >&5 | |
2575 | echo "configure: failed program was:" >&5 | |
2576 | cat conftest.$ac_ext >&5 | |
2577 | rm -rf conftest* | |
2578 | ac_cv_header_stdc=no | |
2579 | fi | |
2580 | rm -f conftest* | |
2581 | ||
2582 | if test $ac_cv_header_stdc = yes; then | |
2583 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
2584 | cat > conftest.$ac_ext <<EOF | |
9118405f | 2585 | #line 2586 "configure" |
956d6950 JL |
2586 | #include "confdefs.h" |
2587 | #include <string.h> | |
2588 | EOF | |
2589 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2590 | egrep "memchr" >/dev/null 2>&1; then | |
2591 | : | |
2592 | else | |
2593 | rm -rf conftest* | |
2594 | ac_cv_header_stdc=no | |
2595 | fi | |
2596 | rm -f conftest* | |
2597 | ||
2598 | fi | |
2599 | ||
2600 | if test $ac_cv_header_stdc = yes; then | |
2601 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
2602 | cat > conftest.$ac_ext <<EOF | |
9118405f | 2603 | #line 2604 "configure" |
956d6950 JL |
2604 | #include "confdefs.h" |
2605 | #include <stdlib.h> | |
2606 | EOF | |
2607 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2608 | egrep "free" >/dev/null 2>&1; then | |
2609 | : | |
2610 | else | |
2611 | rm -rf conftest* | |
2612 | ac_cv_header_stdc=no | |
2613 | fi | |
2614 | rm -f conftest* | |
2615 | ||
2616 | fi | |
2617 | ||
2618 | if test $ac_cv_header_stdc = yes; then | |
2619 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
2620 | if test "$cross_compiling" = yes; then | |
2621 | : | |
2622 | else | |
2623 | cat > conftest.$ac_ext <<EOF | |
9118405f | 2624 | #line 2625 "configure" |
956d6950 JL |
2625 | #include "confdefs.h" |
2626 | #include <ctype.h> | |
2627 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
2628 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
2629 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
2630 | int main () { int i; for (i = 0; i < 256; i++) | |
2631 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
2632 | exit (0); } | |
2633 | ||
2634 | EOF | |
9118405f | 2635 | if { (eval echo configure:2636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
956d6950 JL |
2636 | then |
2637 | : | |
2638 | else | |
2639 | echo "configure: failed program was:" >&5 | |
2640 | cat conftest.$ac_ext >&5 | |
2641 | rm -fr conftest* | |
2642 | ac_cv_header_stdc=no | |
2643 | fi | |
2644 | rm -fr conftest* | |
2645 | fi | |
2646 | ||
2647 | fi | |
2648 | fi | |
2649 | ||
2650 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
2651 | if test $ac_cv_header_stdc = yes; then | |
2652 | cat >> confdefs.h <<\EOF | |
2653 | #define STDC_HEADERS 1 | |
2654 | EOF | |
2655 | ||
2656 | fi | |
2657 | ||
2658 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 | |
9118405f | 2659 | echo "configure:2660: checking whether time.h and sys/time.h may both be included" >&5 |
956d6950 JL |
2660 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
2661 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2662 | else | |
2663 | cat > conftest.$ac_ext <<EOF | |
9118405f | 2664 | #line 2665 "configure" |
956d6950 JL |
2665 | #include "confdefs.h" |
2666 | #include <sys/types.h> | |
2667 | #include <sys/time.h> | |
2668 | #include <time.h> | |
2669 | int main() { | |
2670 | struct tm *tp; | |
2671 | ; return 0; } | |
2672 | EOF | |
9118405f | 2673 | if { (eval echo configure:2674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
956d6950 JL |
2674 | rm -rf conftest* |
2675 | ac_cv_header_time=yes | |
2676 | else | |
2677 | echo "configure: failed program was:" >&5 | |
2678 | cat conftest.$ac_ext >&5 | |
2679 | rm -rf conftest* | |
2680 | ac_cv_header_time=no | |
2681 | fi | |
2682 | rm -f conftest* | |
2683 | fi | |
2684 | ||
2685 | echo "$ac_t""$ac_cv_header_time" 1>&6 | |
2686 | if test $ac_cv_header_time = yes; then | |
2687 | cat >> confdefs.h <<\EOF | |
2688 | #define TIME_WITH_SYS_TIME 1 | |
2689 | EOF | |
2690 | ||
2691 | fi | |
2692 | ||
827ae6cf | 2693 | echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6 |
9118405f | 2694 | echo "configure:2695: checking for working stdbool.h" >&5 |
827ae6cf RO |
2695 | if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then |
2696 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2697 | else | |
2698 | cat > conftest.$ac_ext <<EOF | |
9118405f | 2699 | #line 2700 "configure" |
827ae6cf RO |
2700 | #include "confdefs.h" |
2701 | #include <stdbool.h> | |
2702 | int main() { | |
2703 | bool foo = false; | |
2704 | ; return 0; } | |
2705 | EOF | |
9118405f | 2706 | if { (eval echo configure:2707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
827ae6cf RO |
2707 | rm -rf conftest* |
2708 | ac_cv_header_stdbool_h=yes | |
2709 | else | |
2710 | echo "configure: failed program was:" >&5 | |
2711 | cat conftest.$ac_ext >&5 | |
2712 | rm -rf conftest* | |
2713 | ac_cv_header_stdbool_h=no | |
2714 | fi | |
2715 | rm -f conftest* | |
2716 | fi | |
2717 | ||
2718 | echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6 | |
2719 | if test $ac_cv_header_stdbool_h = yes; then | |
2720 | cat >> confdefs.h <<\EOF | |
2721 | #define HAVE_STDBOOL_H 1 | |
2722 | EOF | |
2723 | ||
2724 | fi | |
2725 | ||
0a4b6309 | 2726 | echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6 |
9118405f | 2727 | echo "configure:2728: checking whether string.h and strings.h may both be included" >&5 |
0a4b6309 RL |
2728 | if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then |
2729 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2730 | else | |
2731 | cat > conftest.$ac_ext <<EOF | |
9118405f | 2732 | #line 2733 "configure" |
0a4b6309 RL |
2733 | #include "confdefs.h" |
2734 | #include <string.h> | |
2735 | #include <strings.h> | |
2736 | int main() { | |
2737 | ||
2738 | ; return 0; } | |
2739 | EOF | |
9118405f | 2740 | if { (eval echo configure:2741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0a4b6309 RL |
2741 | rm -rf conftest* |
2742 | gcc_cv_header_string=yes | |
2743 | else | |
2744 | echo "configure: failed program was:" >&5 | |
2745 | cat conftest.$ac_ext >&5 | |
2746 | rm -rf conftest* | |
2747 | gcc_cv_header_string=no | |
2748 | fi | |
2749 | rm -f conftest* | |
2750 | fi | |
2751 | ||
2752 | echo "$ac_t""$gcc_cv_header_string" 1>&6 | |
2753 | if test $gcc_cv_header_string = yes; then | |
2754 | cat >> confdefs.h <<\EOF | |
2755 | #define STRING_WITH_STRINGS 1 | |
2756 | EOF | |
2757 | ||
2758 | fi | |
2759 | ||
e9831ca0 | 2760 | echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 |
9118405f | 2761 | echo "configure:2762: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
e9831ca0 KG |
2762 | if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then |
2763 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2764 | else | |
2765 | cat > conftest.$ac_ext <<EOF | |
9118405f | 2766 | #line 2767 "configure" |
e9831ca0 KG |
2767 | #include "confdefs.h" |
2768 | #include <sys/types.h> | |
2769 | #include <sys/wait.h> | |
2770 | #ifndef WEXITSTATUS | |
2771 | #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) | |
2772 | #endif | |
2773 | #ifndef WIFEXITED | |
2774 | #define WIFEXITED(stat_val) (((stat_val) & 255) == 0) | |
2775 | #endif | |
2776 | int main() { | |
2777 | int s; | |
2778 | wait (&s); | |
2779 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
2780 | ; return 0; } | |
2781 | EOF | |
9118405f | 2782 | if { (eval echo configure:2783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
e9831ca0 KG |
2783 | rm -rf conftest* |
2784 | ac_cv_header_sys_wait_h=yes | |
2785 | else | |
2786 | echo "configure: failed program was:" >&5 | |
2787 | cat conftest.$ac_ext >&5 | |
2788 | rm -rf conftest* | |
2789 | ac_cv_header_sys_wait_h=no | |
2790 | fi | |
2791 | rm -f conftest* | |
2792 | fi | |
2793 | ||
2794 | echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 | |
2795 | if test $ac_cv_header_sys_wait_h = yes; then | |
2796 | cat >> confdefs.h <<\EOF | |
2797 | #define HAVE_SYS_WAIT_H 1 | |
2798 | EOF | |
2799 | ||
2800 | fi | |
2801 | ||
03c41c05 | 2802 | for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \ |
7719ffbf | 2803 | fcntl.h unistd.h sys/file.h sys/time.h \ |
03c41c05 | 2804 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
f91abfce | 2805 | direct.h malloc.h langinfo.h |
861bb6c1 JL |
2806 | do |
2807 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2808 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
9118405f | 2809 | echo "configure:2810: checking for $ac_hdr" >&5 |
861bb6c1 JL |
2810 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2811 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2812 | else | |
2813 | cat > conftest.$ac_ext <<EOF | |
9118405f | 2814 | #line 2815 "configure" |
861bb6c1 JL |
2815 | #include "confdefs.h" |
2816 | #include <$ac_hdr> | |
2817 | EOF | |
956d6950 | 2818 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
9118405f | 2819 | { (eval echo configure:2820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 2820 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
956d6950 JL |
2821 | if test -z "$ac_err"; then |
2822 | rm -rf conftest* | |
2823 | eval "ac_cv_header_$ac_safe=yes" | |
2824 | else | |
2825 | echo "$ac_err" >&5 | |
2826 | echo "configure: failed program was:" >&5 | |
2827 | cat conftest.$ac_ext >&5 | |
2828 | rm -rf conftest* | |
2829 | eval "ac_cv_header_$ac_safe=no" | |
2830 | fi | |
2831 | rm -f conftest* | |
2832 | fi | |
2833 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2834 | echo "$ac_t""yes" 1>&6 | |
2835 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2836 | cat >> confdefs.h <<EOF | |
2837 | #define $ac_tr_hdr 1 | |
2838 | EOF | |
2839 | ||
2840 | else | |
2841 | echo "$ac_t""no" 1>&6 | |
2842 | fi | |
2843 | done | |
2844 | ||
2845 | ||
f24af81b TT |
2846 | # Check for thread headers. |
2847 | ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'` | |
2848 | echo $ac_n "checking for thread.h""... $ac_c" 1>&6 | |
9118405f | 2849 | echo "configure:2850: checking for thread.h" >&5 |
f24af81b TT |
2850 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2851 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2852 | else | |
2853 | cat > conftest.$ac_ext <<EOF | |
9118405f | 2854 | #line 2855 "configure" |
f24af81b TT |
2855 | #include "confdefs.h" |
2856 | #include <thread.h> | |
2857 | EOF | |
2858 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
9118405f | 2859 | { (eval echo configure:2860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 2860 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
f24af81b TT |
2861 | if test -z "$ac_err"; then |
2862 | rm -rf conftest* | |
2863 | eval "ac_cv_header_$ac_safe=yes" | |
2864 | else | |
2865 | echo "$ac_err" >&5 | |
2866 | echo "configure: failed program was:" >&5 | |
2867 | cat conftest.$ac_ext >&5 | |
2868 | rm -rf conftest* | |
2869 | eval "ac_cv_header_$ac_safe=no" | |
2870 | fi | |
2871 | rm -f conftest* | |
2872 | fi | |
2873 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2874 | echo "$ac_t""yes" 1>&6 | |
2875 | have_thread_h=yes | |
2876 | else | |
2877 | echo "$ac_t""no" 1>&6 | |
2878 | have_thread_h= | |
2879 | fi | |
2880 | ||
2881 | ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'` | |
2882 | echo $ac_n "checking for pthread.h""... $ac_c" 1>&6 | |
9118405f | 2883 | echo "configure:2884: checking for pthread.h" >&5 |
f24af81b TT |
2884 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2885 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2886 | else | |
2887 | cat > conftest.$ac_ext <<EOF | |
9118405f | 2888 | #line 2889 "configure" |
f24af81b TT |
2889 | #include "confdefs.h" |
2890 | #include <pthread.h> | |
2891 | EOF | |
2892 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
9118405f | 2893 | { (eval echo configure:2894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 2894 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
f24af81b TT |
2895 | if test -z "$ac_err"; then |
2896 | rm -rf conftest* | |
2897 | eval "ac_cv_header_$ac_safe=yes" | |
2898 | else | |
2899 | echo "$ac_err" >&5 | |
2900 | echo "configure: failed program was:" >&5 | |
2901 | cat conftest.$ac_ext >&5 | |
2902 | rm -rf conftest* | |
2903 | eval "ac_cv_header_$ac_safe=no" | |
2904 | fi | |
2905 | rm -f conftest* | |
2906 | fi | |
2907 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2908 | echo "$ac_t""yes" 1>&6 | |
2909 | have_pthread_h=yes | |
2910 | else | |
2911 | echo "$ac_t""no" 1>&6 | |
2912 | have_pthread_h= | |
2913 | fi | |
2914 | ||
2915 | ||
84c041a1 | 2916 | # These tests can't be done till we know if we have limits.h. |
75e93faa | 2917 | echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6 |
9118405f | 2918 | echo "configure:2919: checking for CHAR_BIT" >&5 |
75e93faa ZW |
2919 | if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then |
2920 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2921 | else | |
2922 | cat > conftest.$ac_ext <<EOF | |
9118405f | 2923 | #line 2924 "configure" |
75e93faa ZW |
2924 | #include "confdefs.h" |
2925 | #ifdef HAVE_LIMITS_H | |
2926 | #include <limits.h> | |
2927 | #endif | |
2928 | #ifdef CHAR_BIT | |
2929 | found | |
2930 | #endif | |
2931 | EOF | |
2932 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2933 | egrep "found" >/dev/null 2>&1; then | |
2934 | rm -rf conftest* | |
2935 | gcc_cv_decl_char_bit=yes | |
2936 | else | |
2937 | rm -rf conftest* | |
2938 | gcc_cv_decl_char_bit=no | |
2939 | fi | |
2940 | rm -f conftest* | |
2941 | ||
2942 | ||
2943 | fi | |
2944 | ||
2945 | echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6 | |
2946 | if test $gcc_cv_decl_char_bit = no; then | |
2947 | echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6 | |
9118405f | 2948 | echo "configure:2949: checking number of bits in a byte" >&5 |
75e93faa ZW |
2949 | if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then |
2950 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2951 | else | |
2952 | i=8 | |
2953 | gcc_cv_c_nbby= | |
2954 | while test $i -lt 65; do | |
2955 | cat > conftest.$ac_ext <<EOF | |
9118405f | 2956 | #line 2957 "configure" |
75e93faa ZW |
2957 | #include "confdefs.h" |
2958 | ||
2959 | int main() { | |
4e70264f ZW |
2960 | switch(0) { |
2961 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
2962 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
2963 | ; } | |
75e93faa ZW |
2964 | ; return 0; } |
2965 | EOF | |
9118405f | 2966 | if { (eval echo configure:2967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa | 2967 | rm -rf conftest* |
4e70264f | 2968 | gcc_cv_c_nbby=$i; break |
75e93faa ZW |
2969 | else |
2970 | echo "configure: failed program was:" >&5 | |
2971 | cat conftest.$ac_ext >&5 | |
2972 | fi | |
2973 | rm -f conftest* | |
2974 | i=`expr $i + 1` | |
2975 | done | |
2976 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
2977 | ||
2978 | fi | |
2979 | ||
2980 | echo "$ac_t""$gcc_cv_c_nbby" 1>&6 | |
2981 | if test $gcc_cv_c_nbby = failed; then | |
2982 | { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; } | |
2983 | else | |
2984 | cat >> confdefs.h <<EOF | |
2985 | #define CHAR_BIT $gcc_cv_c_nbby | |
2986 | EOF | |
2987 | ||
2988 | fi | |
2989 | fi | |
2d6eb5bf | 2990 | echo $ac_n "checking byte ordering""... $ac_c" 1>&6 |
9118405f | 2991 | echo "configure:2992: checking byte ordering" >&5 |
2d6eb5bf | 2992 | if eval "test \"`echo '$''{'ac_cv_c_compile_endian'+set}'`\" = set"; then |
84c041a1 ZW |
2993 | echo $ac_n "(cached) $ac_c" 1>&6 |
2994 | else | |
2d6eb5bf ZW |
2995 | ac_cv_c_compile_endian=unknown |
2996 | ||
2997 | ac_ext=c | |
2998 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2999 | ac_cpp='$CPP $CPPFLAGS' | |
3000 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
3001 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
3002 | cross_compiling=$ac_cv_prog_cc_cross | |
3003 | ||
3004 | cat > conftest.$ac_ext <<EOF | |
9118405f | 3005 | #line 3006 "configure" |
84c041a1 | 3006 | #include "confdefs.h" |
2d6eb5bf | 3007 | |
84c041a1 | 3008 | #ifdef HAVE_LIMITS_H |
2d6eb5bf | 3009 | # include <limits.h> |
84c041a1 ZW |
3010 | #endif |
3011 | /* This structure must have no internal padding. */ | |
3012 | struct { | |
2d6eb5bf | 3013 | char prefix[sizeof "\nendian:" - 1]; |
84c041a1 | 3014 | short word; |
2d6eb5bf | 3015 | char postfix[2]; |
84c041a1 | 3016 | } tester = { |
2d6eb5bf | 3017 | "\nendian:", |
84c041a1 ZW |
3018 | #if SIZEOF_SHORT == 4 |
3019 | ('A' << (CHAR_BIT * 3)) | ('B' << (CHAR_BIT * 2)) | | |
3020 | #endif | |
2d6eb5bf ZW |
3021 | ('A' << CHAR_BIT) | 'B', |
3022 | 'X', '\n' | |
84c041a1 ZW |
3023 | }; |
3024 | EOF | |
9118405f | 3025 | if { (eval echo configure:3026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
2d6eb5bf | 3026 | od -c conftest.o | |
e48cd290 | 3027 | sed 's/^[0-7]*[ ]*/ / |
2d6eb5bf ZW |
3028 | s/\*/./g |
3029 | s/ \\n/*/g | |
3030 | s/ [0-9][0-9][0-9]/./g | |
3031 | s/ \\[^ ]/./g' | | |
3032 | tr -d ' | |
3033 | ' | tr -s '*' ' | |
3034 | ' | fold | sed '$a\ | |
3035 | ' > conftest.dmp | |
3036 | if grep 'endian:AB' conftest.dmp >/dev/null 2>&1; then | |
3037 | ac_cv_c_compile_endian=big-endian | |
3038 | elif grep 'endian:BA' conftest.dmp >/dev/null 2>&1; then | |
3039 | ac_cv_c_compile_endian=little-endian | |
84c041a1 ZW |
3040 | fi |
3041 | fi | |
84c041a1 | 3042 | rm -rf conftest* |
2d6eb5bf ZW |
3043 | ac_ext=c |
3044 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
3045 | ac_cpp='$CPP $CPPFLAGS' | |
3046 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
3047 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
3048 | cross_compiling=$ac_cv_prog_cc_cross | |
3049 | ||
3050 | ||
84c041a1 ZW |
3051 | fi |
3052 | ||
2d6eb5bf ZW |
3053 | echo "$ac_t""$ac_cv_c_compile_endian" 1>&6 |
3054 | if test $ac_cv_c_compile_endian = unknown; then | |
3055 | { echo "configure: error: *** unable to determine endianness" 1>&2; exit 1; } | |
3056 | elif test $ac_cv_c_compile_endian = big-endian; then | |
84c041a1 ZW |
3057 | cat >> confdefs.h <<\EOF |
3058 | #define HOST_WORDS_BIG_ENDIAN 1 | |
3059 | EOF | |
3060 | ||
3061 | fi | |
3062 | ||
2d6eb5bf | 3063 | echo $ac_n "checking floating point format""... $ac_c" 1>&6 |
9118405f | 3064 | echo "configure:3065: checking floating point format" >&5 |
2d6eb5bf ZW |
3065 | if eval "test \"`echo '$''{'ac_cv_c_float_format'+set}'`\" = set"; then |
3066 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3067 | else | |
3068 | ||
3069 | ac_ext=c | |
3070 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
3071 | ac_cpp='$CPP $CPPFLAGS' | |
3072 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
3073 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
3074 | cross_compiling=$ac_cv_prog_cc_cross | |
3075 | ||
3076 | cat > conftest.$ac_ext <<EOF | |
9118405f | 3077 | #line 3078 "configure" |
2d6eb5bf ZW |
3078 | #include "confdefs.h" |
3079 | /* This will not work unless sizeof(double) == 8. */ | |
3080 | extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1]; | |
3081 | ||
3082 | /* This structure must have no internal padding. */ | |
3083 | struct possibility { | |
3084 | char prefix[8]; | |
3085 | double candidate; | |
3086 | char postfix[8]; | |
3087 | }; | |
3088 | ||
3089 | #define C(cand) { "\nformat:", cand, ":tamrof\n" } | |
3090 | struct possibility table [] = | |
3091 | { | |
3092 | C( 3.25724264705901305206e+01), /* @@IEEEFP - IEEE 754 */ | |
3093 | C( 3.53802595280598432000e+18), /* D__float - VAX */ | |
3094 | C( 5.32201830133125317057e-19), /* D.PDP-10 - PDP-10 - the dot is 0x13a */ | |
3095 | C( 1.77977764695171661377e+10), /* IBMHEXFP - s/390 format, ascii */ | |
3096 | C(-5.22995989424860458374e+10) /* IBMHEXFP - s/390 format, EBCDIC */ | |
3097 | }; | |
3098 | EOF | |
9118405f | 3099 | if { (eval echo configure:3100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
2d6eb5bf | 3100 | od -c conftest.o | |
e48cd290 | 3101 | sed 's/^[0-7]*[ ]*/ / |
2d6eb5bf ZW |
3102 | s/\*/./g |
3103 | s/ \\n/*/g | |
3104 | s/ [0-9][0-9][0-9]/./g | |
3105 | s/ \\[^ ]/./g' | | |
3106 | tr -d ' | |
3107 | ' | tr -s '*' ' | |
3108 | ' | fold | sed '$a\ | |
3109 | ' > conftest.dmp | |
3110 | if grep 'format:.@IEEEF.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
3111 | ac_cv_c_float_format='IEEE (big-endian)' | |
3112 | elif grep 'format:.I@@PFE.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
3113 | ac_cv_c_float_format='IEEE (big-endian)' | |
3114 | elif grep 'format:.FEEEI@.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
3115 | ac_cv_c_float_format='IEEE (little-endian)' | |
3116 | elif grep 'format:.EFP@@I.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
3117 | ac_cv_c_float_format='IEEE (little-endian)' | |
3118 | elif grep 'format:.__floa.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
3119 | ac_cv_c_float_format='VAX D-float' | |
3120 | elif grep 'format:..PDP-1.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
3121 | ac_cv_c_float_format='PDP-10' | |
3122 | elif grep 'format:.BMHEXF.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
3123 | ac_cv_c_float_format='IBM 370 hex' | |
3124 | else | |
3125 | { echo "configure: error: Unknown floating point format" 1>&2; exit 1; } | |
3126 | fi | |
3127 | else | |
3128 | { echo "configure: error: compile failed" 1>&2; exit 1; } | |
3129 | fi | |
3130 | rm -rf conftest* | |
3131 | ac_ext=c | |
3132 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
3133 | ac_cpp='$CPP $CPPFLAGS' | |
3134 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
3135 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
3136 | cross_compiling=$ac_cv_prog_cc_cross | |
3137 | ||
3138 | ||
3139 | fi | |
3140 | ||
3141 | echo "$ac_t""$ac_cv_c_float_format" 1>&6 | |
3142 | # IEEE is the default format. If the float endianness isn't the same | |
3143 | # as the integer endianness, we have to set FLOAT_WORDS_BIG_ENDIAN | |
3144 | # (which is a tristate: yes, no, default). This is only an issue with | |
3145 | # IEEE; the other formats are only supported by a few machines each, | |
3146 | # all with the same endianness. | |
3147 | format= | |
3148 | fbigend= | |
3149 | case $ac_cv_c_float_format in | |
3150 | 'IEEE (big-endian)' ) | |
3151 | if test $ac_cv_c_compile_endian = little-endian; then | |
3152 | fbigend=1 | |
3153 | fi | |
3154 | ;; | |
3155 | 'IEEE (little-endian)' ) | |
3156 | if test $ac_cv_c_compile_endian = big-endian; then | |
3157 | fbigend=0 | |
3158 | fi | |
3159 | ;; | |
3160 | 'VAX D-float' ) | |
3161 | format=VAX_FLOAT_FORMAT | |
3162 | ;; | |
3163 | 'PDP-10' ) | |
3164 | format=PDP10_FLOAT_FORMAT | |
3165 | ;; | |
3166 | 'IBM 370 hex' ) | |
3167 | format=IBM_FLOAT_FORMAT | |
3168 | ;; | |
3169 | esac | |
3170 | if test -n "$format"; then | |
3171 | cat >> confdefs.h <<EOF | |
3172 | #define HOST_FLOAT_FORMAT $format | |
3173 | EOF | |
3174 | ||
3175 | fi | |
3176 | if test -n "$fbigend"; then | |
3177 | cat >> confdefs.h <<EOF | |
3178 | #define HOST_FLOAT_WORDS_BIG_ENDIAN $fbigend | |
3179 | EOF | |
3180 | ||
3181 | fi | |
3182 | ||
75e93faa | 3183 | |
955be633 JM |
3184 | # See if we have the mktemp command. |
3185 | # Extract the first word of "mktemp", so it can be a program name with args. | |
3186 | set dummy mktemp; ac_word=$2 | |
3187 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
9118405f | 3188 | echo "configure:3189: checking for $ac_word" >&5 |
955be633 JM |
3189 | if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then |
3190 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3191 | else | |
3192 | if test -n "$have_mktemp_command"; then | |
3193 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
3194 | else | |
3195 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3196 | ac_dummy="$PATH" | |
3197 | for ac_dir in $ac_dummy; do | |
3198 | test -z "$ac_dir" && ac_dir=. | |
3199 | if test -f $ac_dir/$ac_word; then | |
3200 | ac_cv_prog_have_mktemp_command="yes" | |
3201 | break | |
3202 | fi | |
3203 | done | |
3204 | IFS="$ac_save_ifs" | |
3205 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" | |
3206 | fi | |
3207 | fi | |
3208 | have_mktemp_command="$ac_cv_prog_have_mktemp_command" | |
3209 | if test -n "$have_mktemp_command"; then | |
3210 | echo "$ac_t""$have_mktemp_command" 1>&6 | |
3211 | else | |
3212 | echo "$ac_t""no" 1>&6 | |
3213 | fi | |
3214 | ||
3215 | ||
09fa0705 ZW |
3216 | # Do we have a single-tree copy of texinfo? |
3217 | if test -f $srcdir/../texinfo/Makefile.in; then | |
3218 | MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo' | |
3219 | gcc_cv_prog_makeinfo_modern=yes | |
3220 | echo "$ac_t""Using makeinfo from the unified source tree." 1>&6 | |
3221 | else | |
3222 | # See if makeinfo has been installed and is modern enough | |
3223 | # that we can use it. | |
3224 | # Extract the first word of "makeinfo", so it can be a program name with args. | |
3225 | set dummy makeinfo; ac_word=$2 | |
3226 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
9118405f | 3227 | echo "configure:3228: checking for $ac_word" >&5 |
09fa0705 ZW |
3228 | if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then |
3229 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3230 | else | |
3231 | if test -n "$MAKEINFO"; then | |
3232 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
3233 | else | |
3234 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3235 | ac_dummy="$PATH" | |
3236 | for ac_dir in $ac_dummy; do | |
3237 | test -z "$ac_dir" && ac_dir=. | |
3238 | if test -f $ac_dir/$ac_word; then | |
3239 | ac_cv_prog_MAKEINFO="makeinfo" | |
3240 | break | |
3241 | fi | |
3242 | done | |
3243 | IFS="$ac_save_ifs" | |
3244 | fi | |
3245 | fi | |
3246 | MAKEINFO="$ac_cv_prog_MAKEINFO" | |
3247 | if test -n "$MAKEINFO"; then | |
3248 | echo "$ac_t""$MAKEINFO" 1>&6 | |
3249 | else | |
3250 | echo "$ac_t""no" 1>&6 | |
3251 | fi | |
3252 | ||
3253 | if test -n "$MAKEINFO"; then | |
3254 | # Found it, now check the version. | |
3255 | echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6 | |
9118405f | 3256 | echo "configure:3257: checking for modern makeinfo" >&5 |
09fa0705 ZW |
3257 | if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then |
3258 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3259 | else | |
3260 | ac_prog_version=`$MAKEINFO --version 2>&1 | | |
3261 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
9118405f | 3262 | echo "configure:3263: version of makeinfo is $ac_prog_version" >&5 |
09fa0705 ZW |
3263 | case $ac_prog_version in |
3264 | '') gcc_cv_prog_makeinfo_modern=no;; | |
8e97db8f | 3265 | 4.[1-9]*) |
09fa0705 ZW |
3266 | gcc_cv_prog_makeinfo_modern=yes;; |
3267 | *) gcc_cv_prog_makeinfo_modern=no;; | |
3268 | esac | |
3269 | ||
3270 | fi | |
3271 | ||
3272 | echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6 | |
3273 | else | |
3274 | gcc_cv_prog_makeinfo_modern=no | |
3275 | fi | |
3276 | ||
3277 | fi | |
3278 | ||
3279 | if test $gcc_cv_prog_makeinfo_modern = no; then | |
3280 | echo "configure: warning: | |
3281 | *** Makeinfo is missing or too old. | |
17db6582 | 3282 | *** Info documentation will not be built." 1>&2 |
d21445e7 | 3283 | BUILD_INFO= |
09fa0705 ZW |
3284 | else |
3285 | BUILD_INFO=info | |
09fa0705 ZW |
3286 | fi |
3287 | ||
3f896fc2 JM |
3288 | # Is pod2man recent enough to regenerate manpages? |
3289 | echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6 | |
9118405f | 3290 | echo "configure:3291: checking for recent Pod::Man" >&5 |
7be33370 | 3291 | if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then |
fd939e46 JM |
3292 | echo "$ac_t""yes" 1>&6 |
3293 | GENERATED_MANPAGES=generated-manpages | |
3294 | else | |
3295 | echo "$ac_t""no" 1>&6 | |
3296 | GENERATED_MANPAGES= | |
3297 | fi | |
3298 | ||
1e608388 ZW |
3299 | # How about lex? |
3300 | if test -f $srcdir/../flex/skel.c; then | |
3301 | FLEX='$(objdir)/../flex/flex' | |
3302 | else | |
3303 | # Extract the first word of "flex", so it can be a program name with args. | |
3304 | set dummy flex; ac_word=$2 | |
3305 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
9118405f | 3306 | echo "configure:3307: checking for $ac_word" >&5 |
1e608388 ZW |
3307 | if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then |
3308 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3309 | else | |
3310 | if test -n "$FLEX"; then | |
3311 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
3312 | else | |
3313 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3314 | ac_dummy="$PATH" | |
3315 | for ac_dir in $ac_dummy; do | |
3316 | test -z "$ac_dir" && ac_dir=. | |
3317 | if test -f $ac_dir/$ac_word; then | |
3318 | ac_cv_prog_FLEX="flex" | |
3319 | break | |
3320 | fi | |
3321 | done | |
3322 | IFS="$ac_save_ifs" | |
9118405f | 3323 | test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex" |
1e608388 ZW |
3324 | fi |
3325 | fi | |
3326 | FLEX="$ac_cv_prog_FLEX" | |
3327 | if test -n "$FLEX"; then | |
3328 | echo "$ac_t""$FLEX" 1>&6 | |
3329 | else | |
3330 | echo "$ac_t""no" 1>&6 | |
3331 | fi | |
3332 | ||
3333 | fi | |
3334 | ||
3335 | # Bison? | |
3336 | # The -L switch is so bison can find its skeleton file. | |
3337 | if test -f $srcdir/../bison/bison.simple; then | |
3338 | BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/' | |
3339 | else | |
3340 | # Extract the first word of "bison", so it can be a program name with args. | |
3341 | set dummy bison; ac_word=$2 | |
3342 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
9118405f | 3343 | echo "configure:3344: checking for $ac_word" >&5 |
1e608388 ZW |
3344 | if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then |
3345 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3346 | else | |
3347 | if test -n "$BISON"; then | |
3348 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
3349 | else | |
3350 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3351 | ac_dummy="$PATH" | |
3352 | for ac_dir in $ac_dummy; do | |
3353 | test -z "$ac_dir" && ac_dir=. | |
3354 | if test -f $ac_dir/$ac_word; then | |
3355 | ac_cv_prog_BISON="bison" | |
3356 | break | |
3357 | fi | |
3358 | done | |
3359 | IFS="$ac_save_ifs" | |
9118405f | 3360 | test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison" |
1e608388 ZW |
3361 | fi |
3362 | fi | |
3363 | BISON="$ac_cv_prog_BISON" | |
3364 | if test -n "$BISON"; then | |
3365 | echo "$ac_t""$BISON" 1>&6 | |
3366 | else | |
3367 | echo "$ac_t""no" 1>&6 | |
3368 | fi | |
3369 | ||
3370 | fi | |
3371 | ||
4e70264f ZW |
3372 | # These libraries may be used by collect2. |
3373 | # We may need a special search path to get them linked. | |
3374 | echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6 | |
9118405f | 3375 | echo "configure:3376: checking for collect2 libraries" >&5 |
4e70264f ZW |
3376 | if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then |
3377 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3378 | else | |
3379 | save_LIBS="$LIBS" | |
7f2749d4 | 3380 | for libs in '' -lld -lmld \ |
4e70264f ZW |
3381 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
3382 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
3383 | do | |
3384 | LIBS="$libs" | |
3385 | cat > conftest.$ac_ext <<EOF | |
9118405f | 3386 | #line 3387 "configure" |
4e70264f ZW |
3387 | #include "confdefs.h" |
3388 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3389 | /* We use char because int might match the return type of a gcc2 | |
3390 | builtin and then its argument prototype would still apply. */ | |
3391 | char ldopen(); | |
3392 | ||
3393 | int main() { | |
3394 | ldopen() | |
3395 | ; return 0; } | |
3396 | EOF | |
9118405f | 3397 | if { (eval echo configure:3398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4e70264f ZW |
3398 | rm -rf conftest* |
3399 | gcc_cv_collect2_libs="$libs"; break | |
3400 | else | |
3401 | echo "configure: failed program was:" >&5 | |
3402 | cat conftest.$ac_ext >&5 | |
3403 | fi | |
3404 | rm -f conftest* | |
3405 | done | |
3406 | LIBS="$save_LIBS" | |
3407 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
3408 | fi | |
3409 | ||
3410 | echo "$ac_t""$gcc_cv_collect2_libs" 1>&6 | |
3411 | case $gcc_cv_collect2_libs in | |
3412 | "none required") ;; | |
3413 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
3414 | esac | |
3415 | ||
3416 | ||
7f2749d4 RK |
3417 | # When building Ada code on Alpha, we need exc_resume which is usually in |
3418 | # -lexc. So test for it. | |
3419 | save_LIBS="$LIBS" | |
3420 | LIBS= | |
3421 | ||
3422 | echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6 | |
9118405f | 3423 | echo "configure:3424: checking for library containing exc_resume" >&5 |
7f2749d4 RK |
3424 | if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then |
3425 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3426 | else | |
3427 | ac_func_search_save_LIBS="$LIBS" | |
3428 | ac_cv_search_exc_resume="no" | |
3429 | cat > conftest.$ac_ext <<EOF | |
9118405f | 3430 | #line 3431 "configure" |
7f2749d4 RK |
3431 | #include "confdefs.h" |
3432 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3433 | /* We use char because int might match the return type of a gcc2 | |
3434 | builtin and then its argument prototype would still apply. */ | |
3435 | char exc_resume(); | |
3436 | ||
3437 | int main() { | |
3438 | exc_resume() | |
3439 | ; return 0; } | |
3440 | EOF | |
9118405f | 3441 | if { (eval echo configure:3442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7f2749d4 RK |
3442 | rm -rf conftest* |
3443 | ac_cv_search_exc_resume="none required" | |
3444 | else | |
3445 | echo "configure: failed program was:" >&5 | |
3446 | cat conftest.$ac_ext >&5 | |
3447 | fi | |
3448 | rm -f conftest* | |
3449 | test "$ac_cv_search_exc_resume" = "no" && for i in exc; do | |
3450 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3451 | cat > conftest.$ac_ext <<EOF | |
9118405f | 3452 | #line 3453 "configure" |
7f2749d4 RK |
3453 | #include "confdefs.h" |
3454 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3455 | /* We use char because int might match the return type of a gcc2 | |
3456 | builtin and then its argument prototype would still apply. */ | |
3457 | char exc_resume(); | |
3458 | ||
3459 | int main() { | |
3460 | exc_resume() | |
3461 | ; return 0; } | |
3462 | EOF | |
9118405f | 3463 | if { (eval echo configure:3464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7f2749d4 RK |
3464 | rm -rf conftest* |
3465 | ac_cv_search_exc_resume="-l$i" | |
3466 | break | |
3467 | else | |
3468 | echo "configure: failed program was:" >&5 | |
3469 | cat conftest.$ac_ext >&5 | |
3470 | fi | |
3471 | rm -f conftest* | |
3472 | done | |
3473 | LIBS="$ac_func_search_save_LIBS" | |
3474 | fi | |
3475 | ||
3476 | echo "$ac_t""$ac_cv_search_exc_resume" 1>&6 | |
3477 | if test "$ac_cv_search_exc_resume" != "no"; then | |
3478 | test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS" | |
3479 | ||
3480 | else : | |
3481 | ||
3482 | fi | |
3483 | GNAT_LIBEXC="$LIBS" | |
3484 | LIBS="$save_LIBS" | |
3485 | ||
3486 | ||
890ad3ea | 3487 | # See if the stage1 system preprocessor understands the ANSI C |
4bc5fbd4 | 3488 | # preprocessor stringification operator. (Used by symcat.h.) |
890ad3ea KG |
3489 | |
3490 | ||
3491 | echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6 | |
9118405f | 3492 | echo "configure:3493: checking for preprocessor stringizing operator" >&5 |
890ad3ea | 3493 | if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then |
76844337 RH |
3494 | echo $ac_n "(cached) $ac_c" 1>&6 |
3495 | else | |
3496 | cat > conftest.$ac_ext <<EOF | |
9118405f | 3497 | #line 3498 "configure" |
76844337 RH |
3498 | #include "confdefs.h" |
3499 | ||
890ad3ea KG |
3500 | #define x(y) #y |
3501 | ||
3502 | char *s = x(teststring); | |
3503 | ||
76844337 | 3504 | EOF |
890ad3ea KG |
3505 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
3506 | egrep "#teststring" >/dev/null 2>&1; then | |
76844337 | 3507 | rm -rf conftest* |
890ad3ea | 3508 | ac_cv_c_stringize=no |
76844337 | 3509 | else |
76844337 | 3510 | rm -rf conftest* |
890ad3ea | 3511 | ac_cv_c_stringize=yes |
76844337 RH |
3512 | fi |
3513 | rm -f conftest* | |
890ad3ea | 3514 | |
76844337 RH |
3515 | fi |
3516 | ||
890ad3ea KG |
3517 | if test "${ac_cv_c_stringize}" = yes |
3518 | then | |
3519 | cat >> confdefs.h <<\EOF | |
3520 | #define HAVE_STRINGIZE 1 | |
76844337 RH |
3521 | EOF |
3522 | ||
3523 | fi | |
890ad3ea KG |
3524 | echo "$ac_t""${ac_cv_c_stringize}" 1>&6 |
3525 | ||
76844337 | 3526 | |
956d6950 JL |
3527 | # Use <inttypes.h> only if it exists, |
3528 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
3529 | echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6 | |
9118405f | 3530 | echo "configure:3531: checking for inttypes.h" >&5 |
956d6950 JL |
3531 | if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then |
3532 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3533 | else | |
3534 | cat > conftest.$ac_ext <<EOF | |
9118405f | 3535 | #line 3536 "configure" |
956d6950 JL |
3536 | #include "confdefs.h" |
3537 | #include <sys/types.h> | |
3538 | #include <inttypes.h> | |
3539 | int main() { | |
3540 | intmax_t i = -1; | |
3541 | ; return 0; } | |
3542 | EOF | |
9118405f | 3543 | if { (eval echo configure:3544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
956d6950 | 3544 | rm -rf conftest* |
0056a9b5 | 3545 | gcc_cv_header_inttypes_h=yes |
956d6950 JL |
3546 | else |
3547 | echo "configure: failed program was:" >&5 | |
3548 | cat conftest.$ac_ext >&5 | |
3549 | rm -rf conftest* | |
3550 | gcc_cv_header_inttypes_h=no | |
3551 | fi | |
3552 | rm -f conftest* | |
3553 | fi | |
3554 | ||
3555 | echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6 | |
0056a9b5 KG |
3556 | if test $gcc_cv_header_inttypes_h = yes; then |
3557 | cat >> confdefs.h <<\EOF | |
3558 | #define HAVE_INTTYPES_H 1 | |
3559 | EOF | |
3560 | ||
3561 | fi | |
956d6950 | 3562 | |
c149cc37 | 3563 | |
6af8c740 KG |
3564 | for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \ |
3565 | sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \ | |
a15135c9 MM |
3566 | fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \ |
3567 | scandir alphasort | |
956d6950 JL |
3568 | do |
3569 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
9118405f | 3570 | echo "configure:3571: checking for $ac_func" >&5 |
956d6950 JL |
3571 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3572 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3573 | else | |
3574 | cat > conftest.$ac_ext <<EOF | |
9118405f | 3575 | #line 3576 "configure" |
956d6950 JL |
3576 | #include "confdefs.h" |
3577 | /* System header to define __stub macros and hopefully few prototypes, | |
3578 | which can conflict with char $ac_func(); below. */ | |
3579 | #include <assert.h> | |
3580 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3581 | /* We use char because int might match the return type of a gcc2 | |
3582 | builtin and then its argument prototype would still apply. */ | |
3583 | char $ac_func(); | |
3584 | ||
3585 | int main() { | |
3586 | ||
3587 | /* The GNU C library defines this for functions which it implements | |
3588 | to always fail with ENOSYS. Some functions are actually named | |
3589 | something starting with __ and the normal name is an alias. */ | |
3590 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3591 | choke me | |
3592 | #else | |
99b09ff3 | 3593 | $ac_func(); |
956d6950 JL |
3594 | #endif |
3595 | ||
3596 | ; return 0; } | |
3597 | EOF | |
9118405f | 3598 | if { (eval echo configure:3599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
956d6950 JL |
3599 | rm -rf conftest* |
3600 | eval "ac_cv_func_$ac_func=yes" | |
3601 | else | |
3602 | echo "configure: failed program was:" >&5 | |
3603 | cat conftest.$ac_ext >&5 | |
3604 | rm -rf conftest* | |
3605 | eval "ac_cv_func_$ac_func=no" | |
3606 | fi | |
3607 | rm -f conftest* | |
3608 | fi | |
3609 | ||
3610 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3611 | echo "$ac_t""yes" 1>&6 | |
3612 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3613 | cat >> confdefs.h <<EOF | |
3614 | #define $ac_tr_func 1 | |
3615 | EOF | |
3616 | ||
3617 | else | |
3618 | echo "$ac_t""no" 1>&6 | |
3619 | fi | |
3620 | done | |
3621 | ||
6885fc87 | 3622 | |
f12bc141 | 3623 | echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 |
9118405f | 3624 | echo "configure:3625: checking for ssize_t" >&5 |
f12bc141 ZW |
3625 | if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then |
3626 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3627 | else | |
3628 | cat > conftest.$ac_ext <<EOF | |
9118405f | 3629 | #line 3630 "configure" |
f12bc141 ZW |
3630 | #include "confdefs.h" |
3631 | #include <sys/types.h> | |
3632 | #if STDC_HEADERS | |
3633 | #include <stdlib.h> | |
3634 | #include <stddef.h> | |
3635 | #endif | |
3636 | EOF | |
3637 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3638 | egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
3639 | rm -rf conftest* | |
cb65112a | 3640 | ac_cv_type_ssize_t=yes |
f12bc141 ZW |
3641 | else |
3642 | rm -rf conftest* | |
cb65112a | 3643 | ac_cv_type_ssize_t=no |
f12bc141 ZW |
3644 | fi |
3645 | rm -f conftest* | |
3646 | ||
3647 | fi | |
cb65112a AO |
3648 | echo "$ac_t""$ac_cv_type_ssize_t" 1>&6 |
3649 | if test $ac_cv_type_ssize_t = no; then | |
3650 | cat >> confdefs.h <<\EOF | |
f12bc141 ZW |
3651 | #define ssize_t int |
3652 | EOF | |
3653 | ||
3654 | fi | |
3655 | ||
0b9d02c6 | 3656 | |
e256b8b6 DA |
3657 | # Try to determine the array type of the second argument of getgroups |
3658 | # for the target system (int or gid_t). | |
3659 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 | |
9118405f | 3660 | echo "configure:3661: checking for uid_t in sys/types.h" >&5 |
e256b8b6 DA |
3661 | if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then |
3662 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3663 | else | |
3664 | cat > conftest.$ac_ext <<EOF | |
9118405f | 3665 | #line 3666 "configure" |
e256b8b6 DA |
3666 | #include "confdefs.h" |
3667 | #include <sys/types.h> | |
3668 | EOF | |
3669 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3670 | egrep "uid_t" >/dev/null 2>&1; then | |
3671 | rm -rf conftest* | |
3672 | ac_cv_type_uid_t=yes | |
3673 | else | |
3674 | rm -rf conftest* | |
3675 | ac_cv_type_uid_t=no | |
3676 | fi | |
3677 | rm -f conftest* | |
3678 | ||
3679 | fi | |
3680 | ||
3681 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 | |
3682 | if test $ac_cv_type_uid_t = no; then | |
3683 | cat >> confdefs.h <<\EOF | |
3684 | #define uid_t int | |
3685 | EOF | |
3686 | ||
3687 | cat >> confdefs.h <<\EOF | |
3688 | #define gid_t int | |
3689 | EOF | |
3690 | ||
3691 | fi | |
3692 | ||
3693 | echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 | |
9118405f | 3694 | echo "configure:3695: checking type of array argument to getgroups" >&5 |
e256b8b6 DA |
3695 | if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then |
3696 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3697 | else | |
3698 | if test "$cross_compiling" = yes; then | |
3699 | ac_cv_type_getgroups=cross | |
3700 | else | |
3701 | cat > conftest.$ac_ext <<EOF | |
9118405f | 3702 | #line 3703 "configure" |
e256b8b6 DA |
3703 | #include "confdefs.h" |
3704 | ||
3705 | /* Thanks to Mike Rendell for this test. */ | |
3706 | #include <sys/types.h> | |
3707 | #define NGID 256 | |
3708 | #undef MAX | |
3709 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
3710 | main() | |
3711 | { | |
3712 | gid_t gidset[NGID]; | |
3713 | int i, n; | |
3714 | union { gid_t gval; long lval; } val; | |
3715 | ||
3716 | val.lval = -1; | |
3717 | for (i = 0; i < NGID; i++) | |
3718 | gidset[i] = val.gval; | |
3719 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
3720 | gidset); | |
3721 | /* Exit non-zero if getgroups seems to require an array of ints. This | |
3722 | happens when gid_t is short but getgroups modifies an array of ints. */ | |
3723 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
3724 | } | |
3725 | ||
3726 | EOF | |
9118405f | 3727 | if { (eval echo configure:3728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
e256b8b6 DA |
3728 | then |
3729 | ac_cv_type_getgroups=gid_t | |
3730 | else | |
3731 | echo "configure: failed program was:" >&5 | |
3732 | cat conftest.$ac_ext >&5 | |
3733 | rm -fr conftest* | |
3734 | ac_cv_type_getgroups=int | |
3735 | fi | |
3736 | rm -fr conftest* | |
3737 | fi | |
3738 | ||
3739 | if test $ac_cv_type_getgroups = cross; then | |
3740 | cat > conftest.$ac_ext <<EOF | |
9118405f | 3741 | #line 3742 "configure" |
e256b8b6 DA |
3742 | #include "confdefs.h" |
3743 | #include <unistd.h> | |
3744 | EOF | |
3745 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3746 | egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then | |
3747 | rm -rf conftest* | |
3748 | ac_cv_type_getgroups=gid_t | |
3749 | else | |
3750 | rm -rf conftest* | |
3751 | ac_cv_type_getgroups=int | |
3752 | fi | |
3753 | rm -f conftest* | |
3754 | ||
3755 | fi | |
3756 | fi | |
3757 | ||
3758 | echo "$ac_t""$ac_cv_type_getgroups" 1>&6 | |
3759 | cat >> confdefs.h <<EOF | |
3760 | #define GETGROUPS_T $ac_cv_type_getgroups | |
3761 | EOF | |
3762 | ||
3763 | ||
3764 | if test "${target}" = "${build}"; then | |
3765 | TARGET_GETGROUPS_T=$ac_cv_type_getgroups | |
3766 | else | |
3767 | case "${target}" in | |
3768 | # This condition may need some tweaking. It should include all | |
3769 | # targets where the array type of the second argument of getgroups | |
3770 | # is int and the type of gid_t is not equivalent to int. | |
3771 | *-*-sunos* | *-*-ultrix*) | |
3772 | TARGET_GETGROUPS_T=int | |
3773 | ;; | |
3774 | *) | |
3775 | TARGET_GETGROUPS_T=gid_t | |
3776 | ;; | |
3777 | esac | |
3778 | fi | |
3779 | ||
3780 | ||
0a4b6309 | 3781 | echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6 |
9118405f | 3782 | echo "configure:3783: checking whether the printf functions support %p" >&5 |
0a4b6309 RL |
3783 | if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then |
3784 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3785 | else | |
3786 | if test "$cross_compiling" = yes; then | |
3787 | gcc_cv_func_printf_ptr=no | |
3788 | else | |
3789 | cat > conftest.$ac_ext <<EOF | |
9118405f | 3790 | #line 3791 "configure" |
0a4b6309 RL |
3791 | #include "confdefs.h" |
3792 | #include <stdio.h> | |
3793 | ||
86cf1cbd | 3794 | int main() |
0a4b6309 RL |
3795 | { |
3796 | char buf[64]; | |
3797 | char *p = buf, *q = NULL; | |
3798 | sprintf(buf, "%p", p); | |
3799 | sscanf(buf, "%p", &q); | |
86cf1cbd | 3800 | return (p != q); |
0a4b6309 RL |
3801 | } |
3802 | EOF | |
9118405f | 3803 | if { (eval echo configure:3804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
0a4b6309 RL |
3804 | then |
3805 | gcc_cv_func_printf_ptr=yes | |
3806 | else | |
3807 | echo "configure: failed program was:" >&5 | |
3808 | cat conftest.$ac_ext >&5 | |
3809 | rm -fr conftest* | |
3810 | gcc_cv_func_printf_ptr=no | |
3811 | fi | |
3812 | rm -fr conftest* | |
3813 | fi | |
3814 | ||
3815 | rm -f core core.* *.core | |
3816 | fi | |
3817 | ||
3818 | echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6 | |
3819 | if test $gcc_cv_func_printf_ptr = yes ; then | |
3820 | cat >> confdefs.h <<\EOF | |
3821 | #define HAVE_PRINTF_PTR 1 | |
3822 | EOF | |
3823 | ||
3824 | fi | |
3825 | ||
b27d2bd5 MK |
3826 | |
3827 | case "${host}" in | |
3828 | *-*-uwin*) | |
34fa3e7d MM |
3829 | { echo "configure: error: |
3830 | *** UWIN may not be used as a host platform because | |
3831 | *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; } | |
b27d2bd5 | 3832 | ;; |
ee262b6f DR |
3833 | *-*-*vms*) |
3834 | # Under VMS, vfork works very different than on Unix. The standard test | |
3835 | # won't work, and it isn't easily adaptable. It makes more sense to | |
3836 | # just force it. | |
3837 | ac_cv_func_vfork_works=yes | |
3838 | ;; | |
b27d2bd5 | 3839 | esac |
c375c43b | 3840 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
9118405f | 3841 | echo "configure:3842: checking for pid_t" >&5 |
c375c43b KG |
3842 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
3843 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3844 | else | |
3845 | cat > conftest.$ac_ext <<EOF | |
9118405f | 3846 | #line 3847 "configure" |
c375c43b KG |
3847 | #include "confdefs.h" |
3848 | #include <sys/types.h> | |
3849 | #if STDC_HEADERS | |
3850 | #include <stdlib.h> | |
3851 | #include <stddef.h> | |
3852 | #endif | |
3853 | EOF | |
3854 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
b27d2bd5 | 3855 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
c375c43b | 3856 | rm -rf conftest* |
cb65112a | 3857 | ac_cv_type_pid_t=yes |
c375c43b KG |
3858 | else |
3859 | rm -rf conftest* | |
cb65112a | 3860 | ac_cv_type_pid_t=no |
c375c43b KG |
3861 | fi |
3862 | rm -f conftest* | |
3863 | ||
3864 | fi | |
cb65112a AO |
3865 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
3866 | if test $ac_cv_type_pid_t = no; then | |
3867 | cat >> confdefs.h <<\EOF | |
c375c43b KG |
3868 | #define pid_t int |
3869 | EOF | |
3870 | ||
3871 | fi | |
3872 | ||
3873 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` | |
3874 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
9118405f | 3875 | echo "configure:3876: checking for vfork.h" >&5 |
c375c43b KG |
3876 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3877 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3878 | else | |
3879 | cat > conftest.$ac_ext <<EOF | |
9118405f | 3880 | #line 3881 "configure" |
c375c43b KG |
3881 | #include "confdefs.h" |
3882 | #include <vfork.h> | |
3883 | EOF | |
3884 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
9118405f | 3885 | { (eval echo configure:3886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 3886 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
c375c43b KG |
3887 | if test -z "$ac_err"; then |
3888 | rm -rf conftest* | |
3889 | eval "ac_cv_header_$ac_safe=yes" | |
3890 | else | |
3891 | echo "$ac_err" >&5 | |
3892 | echo "configure: failed program was:" >&5 | |
3893 | cat conftest.$ac_ext >&5 | |
3894 | rm -rf conftest* | |
3895 | eval "ac_cv_header_$ac_safe=no" | |
3896 | fi | |
3897 | rm -f conftest* | |
3898 | fi | |
3899 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3900 | echo "$ac_t""yes" 1>&6 | |
3901 | cat >> confdefs.h <<\EOF | |
3902 | #define HAVE_VFORK_H 1 | |
3903 | EOF | |
3904 | ||
3905 | else | |
3906 | echo "$ac_t""no" 1>&6 | |
3907 | fi | |
3908 | ||
3909 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 | |
9118405f | 3910 | echo "configure:3911: checking for working vfork" >&5 |
c375c43b KG |
3911 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
3912 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3913 | else | |
3914 | if test "$cross_compiling" = yes; then | |
3915 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
9118405f | 3916 | echo "configure:3917: checking for vfork" >&5 |
c375c43b KG |
3917 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
3918 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3919 | else | |
3920 | cat > conftest.$ac_ext <<EOF | |
9118405f | 3921 | #line 3922 "configure" |
c375c43b KG |
3922 | #include "confdefs.h" |
3923 | /* System header to define __stub macros and hopefully few prototypes, | |
3924 | which can conflict with char vfork(); below. */ | |
3925 | #include <assert.h> | |
3926 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3927 | /* We use char because int might match the return type of a gcc2 | |
3928 | builtin and then its argument prototype would still apply. */ | |
3929 | char vfork(); | |
3930 | ||
3931 | int main() { | |
3932 | ||
3933 | /* The GNU C library defines this for functions which it implements | |
3934 | to always fail with ENOSYS. Some functions are actually named | |
3935 | something starting with __ and the normal name is an alias. */ | |
3936 | #if defined (__stub_vfork) || defined (__stub___vfork) | |
3937 | choke me | |
3938 | #else | |
99b09ff3 | 3939 | vfork(); |
c375c43b KG |
3940 | #endif |
3941 | ||
3942 | ; return 0; } | |
3943 | EOF | |
9118405f | 3944 | if { (eval echo configure:3945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c375c43b KG |
3945 | rm -rf conftest* |
3946 | eval "ac_cv_func_vfork=yes" | |
3947 | else | |
3948 | echo "configure: failed program was:" >&5 | |
3949 | cat conftest.$ac_ext >&5 | |
3950 | rm -rf conftest* | |
3951 | eval "ac_cv_func_vfork=no" | |
3952 | fi | |
3953 | rm -f conftest* | |
3954 | fi | |
3955 | ||
3956 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then | |
3957 | echo "$ac_t""yes" 1>&6 | |
3958 | : | |
3959 | else | |
3960 | echo "$ac_t""no" 1>&6 | |
3961 | fi | |
3962 | ||
3963 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
3964 | else | |
3965 | cat > conftest.$ac_ext <<EOF | |
9118405f | 3966 | #line 3967 "configure" |
c375c43b KG |
3967 | #include "confdefs.h" |
3968 | /* Thanks to Paul Eggert for this test. */ | |
3969 | #include <stdio.h> | |
3970 | #include <sys/types.h> | |
3971 | #include <sys/stat.h> | |
3972 | #ifdef HAVE_UNISTD_H | |
3973 | #include <unistd.h> | |
3974 | #endif | |
3975 | #ifdef HAVE_VFORK_H | |
3976 | #include <vfork.h> | |
3977 | #endif | |
3978 | /* On some sparc systems, changes by the child to local and incoming | |
3979 | argument registers are propagated back to the parent. | |
3980 | The compiler is told about this with #include <vfork.h>, | |
3981 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
3982 | Test for this by using a static variable whose address | |
3983 | is put into a register that is clobbered by the vfork. */ | |
3984 | static | |
3985 | #ifdef __cplusplus | |
3986 | sparc_address_test (int arg) | |
3987 | #else | |
3988 | sparc_address_test (arg) int arg; | |
3989 | #endif | |
3990 | { | |
3991 | static pid_t child; | |
3992 | if (!child) { | |
3993 | child = vfork (); | |
3994 | if (child < 0) { | |
3995 | perror ("vfork"); | |
3996 | _exit(2); | |
3997 | } | |
3998 | if (!child) { | |
3999 | arg = getpid(); | |
4000 | write(-1, "", 0); | |
4001 | _exit (arg); | |
4002 | } | |
4003 | } | |
4004 | } | |
4005 | main() { | |
4006 | pid_t parent = getpid (); | |
4007 | pid_t child; | |
4008 | ||
4009 | sparc_address_test (); | |
4010 | ||
4011 | child = vfork (); | |
4012 | ||
4013 | if (child == 0) { | |
4014 | /* Here is another test for sparc vfork register problems. | |
4015 | This test uses lots of local variables, at least | |
4016 | as many local variables as main has allocated so far | |
4017 | including compiler temporaries. 4 locals are enough for | |
4018 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
4019 | A buggy compiler should reuse the register of parent | |
4020 | for one of the local variables, since it will think that | |
4021 | parent can't possibly be used any more in this routine. | |
4022 | Assigning to the local variable will thus munge parent | |
4023 | in the parent process. */ | |
4024 | pid_t | |
4025 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
4026 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
4027 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
4028 | use the same hardware register for all 8 local variables. */ | |
4029 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
4030 | || p != p5 || p != p6 || p != p7) | |
4031 | _exit(1); | |
4032 | ||
4033 | /* On some systems (e.g. IRIX 3.3), | |
4034 | vfork doesn't separate parent from child file descriptors. | |
4035 | If the child closes a descriptor before it execs or exits, | |
4036 | this munges the parent's descriptor as well. | |
4037 | Test for this by closing stdout in the child. */ | |
4038 | _exit(close(fileno(stdout)) != 0); | |
4039 | } else { | |
4040 | int status; | |
4041 | struct stat st; | |
4042 | ||
4043 | while (wait(&status) != child) | |
4044 | ; | |
4045 | exit( | |
4046 | /* Was there some problem with vforking? */ | |
4047 | child < 0 | |
4048 | ||
4049 | /* Did the child fail? (This shouldn't happen.) */ | |
4050 | || status | |
4051 | ||
4052 | /* Did the vfork/compiler bug occur? */ | |
4053 | || parent != getpid() | |
4054 | ||
4055 | /* Did the file descriptor bug occur? */ | |
4056 | || fstat(fileno(stdout), &st) != 0 | |
4057 | ); | |
4058 | } | |
4059 | } | |
4060 | EOF | |
9118405f | 4061 | if { (eval echo configure:4062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c375c43b KG |
4062 | then |
4063 | ac_cv_func_vfork_works=yes | |
4064 | else | |
4065 | echo "configure: failed program was:" >&5 | |
4066 | cat conftest.$ac_ext >&5 | |
4067 | rm -fr conftest* | |
4068 | ac_cv_func_vfork_works=no | |
4069 | fi | |
4070 | rm -fr conftest* | |
4071 | fi | |
4072 | ||
4073 | fi | |
4074 | ||
4075 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 | |
4076 | if test $ac_cv_func_vfork_works = no; then | |
4077 | cat >> confdefs.h <<\EOF | |
4078 | #define vfork fork | |
4079 | EOF | |
4080 | ||
4081 | fi | |
4082 | ||
81bf3d9e | 4083 | for ac_func in getpagesize |
0a4b6309 | 4084 | do |
81bf3d9e | 4085 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
9118405f | 4086 | echo "configure:4087: checking for $ac_func" >&5 |
81bf3d9e | 4087 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
0a4b6309 RL |
4088 | echo $ac_n "(cached) $ac_c" 1>&6 |
4089 | else | |
4090 | cat > conftest.$ac_ext <<EOF | |
9118405f | 4091 | #line 4092 "configure" |
0a4b6309 | 4092 | #include "confdefs.h" |
81bf3d9e RH |
4093 | /* System header to define __stub macros and hopefully few prototypes, |
4094 | which can conflict with char $ac_func(); below. */ | |
4095 | #include <assert.h> | |
4096 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4097 | /* We use char because int might match the return type of a gcc2 | |
4098 | builtin and then its argument prototype would still apply. */ | |
4099 | char $ac_func(); | |
8fa1f09f | 4100 | |
81bf3d9e RH |
4101 | int main() { |
4102 | ||
4103 | /* The GNU C library defines this for functions which it implements | |
4104 | to always fail with ENOSYS. Some functions are actually named | |
4105 | something starting with __ and the normal name is an alias. */ | |
4106 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4107 | choke me | |
c5c76735 | 4108 | #else |
99b09ff3 | 4109 | $ac_func(); |
c5c76735 JL |
4110 | #endif |
4111 | ||
c5c76735 JL |
4112 | ; return 0; } |
4113 | EOF | |
9118405f | 4114 | if { (eval echo configure:4115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c5c76735 | 4115 | rm -rf conftest* |
81bf3d9e | 4116 | eval "ac_cv_func_$ac_func=yes" |
c5c76735 JL |
4117 | else |
4118 | echo "configure: failed program was:" >&5 | |
4119 | cat conftest.$ac_ext >&5 | |
4120 | rm -rf conftest* | |
81bf3d9e | 4121 | eval "ac_cv_func_$ac_func=no" |
c5c76735 JL |
4122 | fi |
4123 | rm -f conftest* | |
4124 | fi | |
4125 | ||
81bf3d9e | 4126 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
c5c76735 | 4127 | echo "$ac_t""yes" 1>&6 |
81bf3d9e | 4128 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
c5c76735 | 4129 | cat >> confdefs.h <<EOF |
81bf3d9e | 4130 | #define $ac_tr_func 1 |
c5c76735 | 4131 | EOF |
81bf3d9e | 4132 | |
c5c76735 JL |
4133 | else |
4134 | echo "$ac_t""no" 1>&6 | |
4135 | fi | |
c5c76735 JL |
4136 | done |
4137 | ||
825b6926 ZW |
4138 | # The test program for the next two tests is the same except for one |
4139 | # set of ifdefs. | |
4140 | cat >ct-mmap.inc <<'EOF' | |
d2cabf16 | 4141 | #include <sys/types.h> |
81bf3d9e | 4142 | #include <sys/mman.h> |
825b6926 ZW |
4143 | #include <fcntl.h> |
4144 | #include <signal.h> | |
4145 | #include <setjmp.h> | |
4146 | #include <stdio.h> | |
0a4b6309 | 4147 | |
4c1331d6 DA |
4148 | #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON) |
4149 | # define MAP_ANONYMOUS MAP_ANON | |
4150 | #endif | |
4151 | ||
81bf3d9e RH |
4152 | /* This mess was copied from the GNU getpagesize.h. */ |
4153 | #ifndef HAVE_GETPAGESIZE | |
4154 | # ifdef HAVE_UNISTD_H | |
4155 | # include <unistd.h> | |
4156 | # endif | |
0a4b6309 | 4157 | |
81bf3d9e RH |
4158 | /* Assume that all systems that can run configure have sys/param.h. */ |
4159 | # ifndef HAVE_SYS_PARAM_H | |
4160 | # define HAVE_SYS_PARAM_H 1 | |
4161 | # endif | |
0a4b6309 | 4162 | |
81bf3d9e RH |
4163 | # ifdef _SC_PAGESIZE |
4164 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
4165 | # else /* no _SC_PAGESIZE */ | |
4166 | # ifdef HAVE_SYS_PARAM_H | |
4167 | # include <sys/param.h> | |
4168 | # ifdef EXEC_PAGESIZE | |
4169 | # define getpagesize() EXEC_PAGESIZE | |
4170 | # else /* no EXEC_PAGESIZE */ | |
4171 | # ifdef NBPG | |
4172 | # define getpagesize() NBPG * CLSIZE | |
4173 | # ifndef CLSIZE | |
4174 | # define CLSIZE 1 | |
4175 | # endif /* no CLSIZE */ | |
4176 | # else /* no NBPG */ | |
4177 | # ifdef NBPC | |
4178 | # define getpagesize() NBPC | |
4179 | # else /* no NBPC */ | |
4180 | # ifdef PAGESIZE | |
4181 | # define getpagesize() PAGESIZE | |
4182 | # endif /* PAGESIZE */ | |
4183 | # endif /* no NBPC */ | |
4184 | # endif /* no NBPG */ | |
4185 | # endif /* no EXEC_PAGESIZE */ | |
4186 | # else /* no HAVE_SYS_PARAM_H */ | |
4187 | # define getpagesize() 8192 /* punt totally */ | |
4188 | # endif /* no HAVE_SYS_PARAM_H */ | |
4189 | # endif /* no _SC_PAGESIZE */ | |
0a4b6309 | 4190 | |
81bf3d9e | 4191 | #endif /* no HAVE_GETPAGESIZE */ |
0a4b6309 | 4192 | |
825b6926 ZW |
4193 | #ifndef MAP_FAILED |
4194 | # define MAP_FAILED -1 | |
4c1331d6 | 4195 | #endif |
81bf3d9e | 4196 | |
825b6926 ZW |
4197 | #undef perror_exit |
4198 | #define perror_exit(str, val) \ | |
4199 | do { perror(str); exit(val); } while (0) | |
4200 | ||
4201 | /* Some versions of cygwin mmap require that munmap is called with the | |
4202 | same parameters as mmap. GCC expects that this is not the case. | |
4203 | Test for various forms of this problem. Warning - icky signal games. */ | |
4204 | ||
4205 | static sigset_t unblock_sigsegv; | |
4206 | static jmp_buf r; | |
4207 | static size_t pg; | |
4208 | static int devzero; | |
4209 | ||
4210 | static char * | |
4211 | anonmap (size) | |
4212 | size_t size; | |
4213 | { | |
4214 | #ifdef USE_MAP_ANON | |
4215 | return (char *) mmap (0, size, PROT_READ|PROT_WRITE, | |
4216 | MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); | |
4c1331d6 | 4217 | #else |
825b6926 ZW |
4218 | return (char *) mmap (0, size, PROT_READ|PROT_WRITE, |
4219 | MAP_PRIVATE, devzero, 0); | |
4c1331d6 | 4220 | #endif |
825b6926 ZW |
4221 | } |
4222 | ||
4223 | static void | |
4224 | sigsegv (unused) | |
4225 | int unused; | |
4226 | { | |
4227 | sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0); | |
4228 | longjmp (r, 1); | |
4229 | } | |
4230 | ||
4231 | /* Basic functionality test. */ | |
4232 | void | |
4233 | test_0 () | |
4234 | { | |
4235 | char *x = anonmap (pg); | |
4236 | if (x == (char *) MAP_FAILED) | |
4237 | perror_exit("test 0 mmap", 2); | |
81bf3d9e | 4238 | |
4acab94b | 4239 | *(int *)x += 1; |
81bf3d9e | 4240 | |
4acab94b | 4241 | if (munmap(x, pg) < 0) |
825b6926 ZW |
4242 | perror_exit("test 0 munmap", 3); |
4243 | } | |
4244 | ||
4245 | /* 1. If we map a 2-page region and unmap its second page, the first page | |
4246 | must remain. */ | |
4247 | static void | |
4248 | test_1 () | |
4249 | { | |
4250 | char *x = anonmap (pg * 2); | |
4251 | if (x == (char *)MAP_FAILED) | |
4252 | perror_exit ("test 1 mmap", 4); | |
4253 | ||
4254 | signal (SIGSEGV, sigsegv); | |
4255 | if (setjmp (r)) | |
4256 | perror_exit ("test 1 fault", 5); | |
4257 | ||
4258 | x[0] = 1; | |
4259 | x[pg] = 1; | |
4260 | ||
4261 | if (munmap (x + pg, pg) < 0) | |
4262 | perror_exit ("test 1 munmap 1", 6); | |
4263 | x[0] = 2; | |
4264 | ||
4265 | if (setjmp (r) == 0) | |
4266 | { | |
4267 | x[pg] = 1; | |
4268 | perror_exit ("test 1 no fault", 7); | |
4269 | } | |
4270 | if (munmap (x, pg) < 0) | |
4271 | perror_exit ("test 1 munmap 2", 8); | |
4272 | } | |
4273 | ||
4274 | /* 2. If we map a 2-page region and unmap its first page, the second | |
4275 | page must remain. */ | |
4276 | static void | |
4277 | test_2 () | |
4278 | { | |
4279 | char *x = anonmap (pg * 2); | |
4280 | if (x == (char *)MAP_FAILED) | |
4281 | perror_exit ("test 2 mmap", 9); | |
4282 | ||
4283 | signal (SIGSEGV, sigsegv); | |
4284 | if (setjmp (r)) | |
4285 | perror_exit ("test 2 fault", 10); | |
4286 | ||
4287 | x[0] = 1; | |
4288 | x[pg] = 1; | |
4289 | ||
4290 | if (munmap (x, pg) < 0) | |
4291 | perror_exit ("test 2 munmap 1", 11); | |
4292 | ||
4293 | x[pg] = 2; | |
4294 | ||
4295 | if (setjmp (r) == 0) | |
4296 | { | |
4297 | x[0] = 1; | |
4298 | perror_exit ("test 2 no fault", 12); | |
4299 | } | |
4300 | ||
4301 | if (munmap (x+pg, pg) < 0) | |
4302 | perror_exit ("test 2 munmap 2", 13); | |
4303 | } | |
4304 | ||
4305 | /* 3. If we map two adjacent 1-page regions and unmap them both with | |
4306 | one munmap, both must go away. | |
4307 | ||
4308 | Getting two adjacent 1-page regions with two mmap calls is slightly | |
4309 | tricky. All OS's tested skip over already-allocated blocks; therefore | |
4310 | we have been careful to unmap all allocated regions in previous tests. | |
4311 | HP/UX allocates pages backward in memory. No OS has yet been observed | |
4312 | to be so perverse as to leave unmapped space between consecutive calls | |
4313 | to mmap. */ | |
4314 | ||
4315 | static void | |
4316 | test_3 () | |
4317 | { | |
4318 | char *x, *y, *z; | |
4319 | ||
4320 | x = anonmap (pg); | |
4321 | if (x == (char *)MAP_FAILED) | |
4322 | perror_exit ("test 3 mmap 1", 14); | |
4323 | y = anonmap (pg); | |
4324 | if (y == (char *)MAP_FAILED) | |
4325 | perror_exit ("test 3 mmap 2", 15); | |
4326 | ||
4327 | if (y != x + pg) | |
4328 | { | |
4329 | if (y == x - pg) | |
4330 | z = y, y = x, x = z; | |
4331 | else | |
4332 | { | |
4333 | fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n", | |
4334 | (unsigned long)x, (unsigned long)y); | |
4335 | exit (16); | |
4336 | } | |
4337 | } | |
4338 | ||
4339 | signal (SIGSEGV, sigsegv); | |
4340 | if (setjmp (r)) | |
4341 | perror_exit ("test 3 fault", 17); | |
4342 | ||
4343 | x[0] = 1; | |
4344 | y[0] = 1; | |
4345 | ||
4346 | if (munmap (x, pg*2) < 0) | |
4347 | perror_exit ("test 3 munmap", 18); | |
4348 | ||
4349 | if (setjmp (r) == 0) | |
4350 | { | |
4351 | x[0] = 1; | |
4352 | perror_exit ("test 3 no fault 1", 19); | |
4353 | } | |
4354 | ||
4355 | signal (SIGSEGV, sigsegv); | |
4356 | if (setjmp (r) == 0) | |
4357 | { | |
4358 | y[0] = 1; | |
4359 | perror_exit ("test 3 no fault 2", 20); | |
4360 | } | |
4361 | } | |
4362 | ||
4363 | int | |
4364 | main () | |
4365 | { | |
4366 | sigemptyset (&unblock_sigsegv); | |
4367 | sigaddset (&unblock_sigsegv, SIGSEGV); | |
4368 | pg = getpagesize (); | |
4369 | #ifndef USE_MAP_ANON | |
4370 | devzero = open ("/dev/zero", O_RDWR); | |
4371 | if (devzero < 0) | |
4372 | perror_exit ("open /dev/zero", 1); | |
4373 | #endif | |
4374 | ||
4375 | test_0(); | |
4376 | test_1(); | |
4377 | test_2(); | |
4378 | test_3(); | |
81bf3d9e | 4379 | |
4acab94b AO |
4380 | exit(0); |
4381 | } | |
81bf3d9e | 4382 | EOF |
825b6926 ZW |
4383 | |
4384 | echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6 | |
9118405f | 4385 | echo "configure:4386: checking for working mmap from /dev/zero" >&5 |
825b6926 ZW |
4386 | if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then |
4387 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4388 | else | |
4389 | if test "$cross_compiling" = yes; then | |
199cbacc GK |
4390 | # When cross-building, assume that this works, unless we know it |
4391 | # doesn't. Of course, we have no way of knowing if there even is a /dev/zero | |
4392 | # on the host, let alone whether mmap will work on it. | |
825b6926 ZW |
4393 | case "$host_os" in |
4394 | cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;; | |
199cbacc GK |
4395 | darwin* ) ac_cv_func_mmap_dev_zero=no ;; |
4396 | * ) ac_cv_func_mmap_dev_zero=yes ;; | |
825b6926 ZW |
4397 | esac |
4398 | else | |
4399 | cat > conftest.$ac_ext <<EOF | |
9118405f | 4400 | #line 4401 "configure" |
825b6926 ZW |
4401 | #include "confdefs.h" |
4402 | #include "ct-mmap.inc" | |
4403 | EOF | |
9118405f | 4404 | if { (eval echo configure:4405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
825b6926 ZW |
4405 | then |
4406 | ac_cv_func_mmap_dev_zero=yes | |
4407 | else | |
4408 | echo "configure: failed program was:" >&5 | |
4409 | cat conftest.$ac_ext >&5 | |
4410 | rm -fr conftest* | |
4411 | if test $? -lt 4 | |
4412 | then ac_cv_func_mmap_dev_zero=no | |
4413 | else ac_cv_func_mmap_dev_zero=buggy | |
4414 | fi | |
4415 | fi | |
4416 | rm -fr conftest* | |
4417 | fi | |
4418 | ||
4419 | ||
4420 | fi | |
4421 | ||
4422 | echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6 | |
4423 | if test $ac_cv_func_mmap_dev_zero = yes; then | |
4424 | cat >> confdefs.h <<\EOF | |
4425 | #define HAVE_MMAP_DEV_ZERO 1 | |
4426 | EOF | |
4427 | ||
4428 | fi | |
4429 | ||
4430 | echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6 | |
9118405f | 4431 | echo "configure:4432: checking for working mmap with MAP_ANON(YMOUS)" >&5 |
825b6926 ZW |
4432 | if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then |
4433 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4434 | else | |
4435 | if test "$cross_compiling" = yes; then | |
4436 | # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works | |
4437 | # just because it's there. Some SCO Un*xen define it but don't implement it. | |
199cbacc GK |
4438 | case "$host_os" in |
4439 | darwin* ) ac_cv_func_mmap_anon=yes ;; | |
4440 | * ) ac_cv_func_mmap_anon=no ;; | |
4441 | esac | |
825b6926 ZW |
4442 | else |
4443 | cat > conftest.$ac_ext <<EOF | |
9118405f | 4444 | #line 4445 "configure" |
825b6926 ZW |
4445 | #include "confdefs.h" |
4446 | #define USE_MAP_ANON | |
4447 | #include "ct-mmap.inc" | |
4448 | EOF | |
9118405f | 4449 | if { (eval echo configure:4450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
81bf3d9e | 4450 | then |
825b6926 | 4451 | ac_cv_func_mmap_anon=yes |
81bf3d9e RH |
4452 | else |
4453 | echo "configure: failed program was:" >&5 | |
4454 | cat conftest.$ac_ext >&5 | |
4455 | rm -fr conftest* | |
825b6926 ZW |
4456 | if test $? -lt 4 |
4457 | then ac_cv_func_mmap_anon=no | |
4458 | else ac_cv_func_mmap_anon=buggy | |
4459 | fi | |
81bf3d9e RH |
4460 | fi |
4461 | rm -fr conftest* | |
4462 | fi | |
4463 | ||
825b6926 | 4464 | |
81bf3d9e RH |
4465 | fi |
4466 | ||
825b6926 ZW |
4467 | echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6 |
4468 | if test $ac_cv_func_mmap_anon = yes; then | |
81bf3d9e | 4469 | cat >> confdefs.h <<\EOF |
825b6926 | 4470 | #define HAVE_MMAP_ANON 1 |
81bf3d9e RH |
4471 | EOF |
4472 | ||
4473 | fi | |
825b6926 | 4474 | rm -f ct-mmap.inc |
81bf3d9e | 4475 | |
56f02b88 | 4476 | echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6 |
9118405f | 4477 | echo "configure:4478: checking for working mmap of a file" >&5 |
56f02b88 ZW |
4478 | if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then |
4479 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4480 | else | |
4481 | # Create a file one thousand bytes long. | |
4482 | for i in 1 2 3 4 5 6 7 8 9 0 | |
4483 | do for j in 1 2 3 4 5 6 7 8 9 0 | |
4484 | do echo $i $j xxxxx | |
4485 | done | |
4486 | done > conftestdata$$ | |
4487 | ||
4488 | if test "$cross_compiling" = yes; then | |
199cbacc GK |
4489 | case "$host_os" in |
4490 | darwin* ) ac_cv_func_mmap_file=yes ;; | |
4491 | * ) ac_cv_func_mmap_file=no ;; | |
4492 | esac | |
56f02b88 ZW |
4493 | else |
4494 | cat > conftest.$ac_ext <<EOF | |
9118405f | 4495 | #line 4496 "configure" |
56f02b88 ZW |
4496 | #include "confdefs.h" |
4497 | ||
4498 | /* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by | |
4499 | Richard Henderson and Alexandre Oliva. | |
4500 | Check whether read-only mmap of a plain file works. */ | |
4501 | #include <sys/types.h> | |
4502 | #include <sys/stat.h> | |
4503 | #include <fcntl.h> | |
4504 | #include <sys/mman.h> | |
4505 | ||
4506 | int main() | |
4507 | { | |
4508 | char *x; | |
4509 | int fd; | |
4510 | struct stat st; | |
4511 | ||
4512 | fd = open("conftestdata$$", O_RDONLY); | |
4513 | if (fd < 0) | |
4514 | exit(1); | |
4515 | ||
4516 | if (fstat (fd, &st)) | |
4517 | exit(2); | |
4518 | ||
4519 | x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); | |
4520 | if (x == (char *) -1) | |
4521 | exit(3); | |
4522 | ||
4523 | if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ') | |
4524 | exit(4); | |
4525 | ||
4526 | if (munmap(x, st.st_size) < 0) | |
4527 | exit(5); | |
4528 | ||
4529 | exit(0); | |
4530 | } | |
4531 | EOF | |
9118405f | 4532 | if { (eval echo configure:4533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
56f02b88 ZW |
4533 | then |
4534 | ac_cv_func_mmap_file=yes | |
4535 | else | |
4536 | echo "configure: failed program was:" >&5 | |
4537 | cat conftest.$ac_ext >&5 | |
4538 | rm -fr conftest* | |
4539 | ac_cv_func_mmap_file=no | |
4540 | fi | |
4541 | rm -fr conftest* | |
4542 | fi | |
4543 | ||
4544 | fi | |
4545 | ||
4546 | echo "$ac_t""$ac_cv_func_mmap_file" 1>&6 | |
4547 | if test $ac_cv_func_mmap_file = yes; then | |
4548 | cat >> confdefs.h <<\EOF | |
4549 | #define HAVE_MMAP_FILE 1 | |
4550 | EOF | |
4551 | ||
4552 | fi | |
4553 | ||
81bf3d9e | 4554 | |
f91abfce TT |
4555 | |
4556 | ||
b7f2fb96 | 4557 | am_cv_lib_iconv_ldpath= |
f91abfce TT |
4558 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. |
4559 | if test "${with_libiconv_prefix+set}" = set; then | |
4560 | withval="$with_libiconv_prefix" | |
4561 | ||
4562 | for dir in `echo "$withval" | tr : ' '`; do | |
4563 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
b7f2fb96 | 4564 | if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi |
f91abfce TT |
4565 | done |
4566 | ||
4567 | fi | |
4568 | ||
4569 | ||
4570 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 | |
9118405f | 4571 | echo "configure:4572: checking for iconv" >&5 |
f91abfce TT |
4572 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
4573 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4574 | else | |
4575 | ||
4576 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
4577 | am_cv_lib_iconv=no | |
4578 | cat > conftest.$ac_ext <<EOF | |
9118405f | 4579 | #line 4580 "configure" |
f91abfce TT |
4580 | #include "confdefs.h" |
4581 | #include <stdlib.h> | |
4582 | #include <iconv.h> | |
4583 | int main() { | |
4584 | iconv_t cd = iconv_open("",""); | |
4585 | iconv(cd,NULL,NULL,NULL,NULL); | |
4586 | iconv_close(cd); | |
4587 | ; return 0; } | |
4588 | EOF | |
9118405f | 4589 | if { (eval echo configure:4590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
f91abfce TT |
4590 | rm -rf conftest* |
4591 | am_cv_func_iconv=yes | |
4592 | else | |
4593 | echo "configure: failed program was:" >&5 | |
4594 | cat conftest.$ac_ext >&5 | |
4595 | fi | |
4596 | rm -f conftest* | |
4597 | if test "$am_cv_func_iconv" != yes; then | |
4598 | am_save_LIBS="$LIBS" | |
b7f2fb96 | 4599 | LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" |
f91abfce | 4600 | cat > conftest.$ac_ext <<EOF |
9118405f | 4601 | #line 4602 "configure" |
f91abfce TT |
4602 | #include "confdefs.h" |
4603 | #include <stdlib.h> | |
4604 | #include <iconv.h> | |
4605 | int main() { | |
4606 | iconv_t cd = iconv_open("",""); | |
4607 | iconv(cd,NULL,NULL,NULL,NULL); | |
4608 | iconv_close(cd); | |
4609 | ; return 0; } | |
4610 | EOF | |
9118405f | 4611 | if { (eval echo configure:4612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
f91abfce TT |
4612 | rm -rf conftest* |
4613 | am_cv_lib_iconv=yes | |
4614 | am_cv_func_iconv=yes | |
4615 | else | |
4616 | echo "configure: failed program was:" >&5 | |
4617 | cat conftest.$ac_ext >&5 | |
4618 | fi | |
4619 | rm -f conftest* | |
4620 | LIBS="$am_save_LIBS" | |
4621 | fi | |
4622 | ||
4623 | fi | |
4624 | ||
4625 | echo "$ac_t""$am_cv_func_iconv" 1>&6 | |
4626 | if test "$am_cv_func_iconv" = yes; then | |
4627 | cat >> confdefs.h <<\EOF | |
4628 | #define HAVE_ICONV 1 | |
4629 | EOF | |
4630 | ||
4631 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 | |
9118405f | 4632 | echo "configure:4633: checking for iconv declaration" >&5 |
f91abfce TT |
4633 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
4634 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4635 | else | |
4636 | ||
4637 | cat > conftest.$ac_ext <<EOF | |
9118405f | 4638 | #line 4639 "configure" |
f91abfce TT |
4639 | #include "confdefs.h" |
4640 | ||
4641 | #include <stdlib.h> | |
4642 | #include <iconv.h> | |
4643 | extern | |
4644 | #ifdef __cplusplus | |
4645 | "C" | |
4646 | #endif | |
4647 | #if defined(__STDC__) || defined(__cplusplus) | |
4648 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
4649 | #else | |
4650 | size_t iconv(); | |
4651 | #endif | |
4652 | ||
4653 | int main() { | |
4654 | ||
4655 | ; return 0; } | |
4656 | EOF | |
9118405f | 4657 | if { (eval echo configure:4658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
f91abfce TT |
4658 | rm -rf conftest* |
4659 | am_cv_proto_iconv_arg1="" | |
4660 | else | |
4661 | echo "configure: failed program was:" >&5 | |
4662 | cat conftest.$ac_ext >&5 | |
4663 | rm -rf conftest* | |
4664 | am_cv_proto_iconv_arg1="const" | |
4665 | fi | |
4666 | rm -f conftest* | |
4667 | 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);" | |
4668 | fi | |
4669 | ||
4670 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
4671 | echo "$ac_t""${ac_t:- | |
4672 | }$am_cv_proto_iconv" 1>&6 | |
4673 | cat >> confdefs.h <<EOF | |
4674 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
4675 | EOF | |
4676 | ||
4677 | fi | |
4678 | LIBICONV= | |
4679 | if test "$am_cv_lib_iconv" = yes; then | |
b7f2fb96 | 4680 | LIBICONV="$am_cv_lib_iconv_ldpath -liconv" |
f91abfce TT |
4681 | fi |
4682 | ||
4683 | ||
4684 | ||
86cf1cbd KG |
4685 | # We will need to find libiberty.h and ansidecl.h |
4686 | saved_CFLAGS="$CFLAGS" | |
4687 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
8e944909 | 4688 | for ac_func in getenv atol sbrk abort atof getcwd getwd \ |
3b681e9d | 4689 | strsignal putc_unlocked fputs_unlocked fwrite_unlocked \ |
a7475ab1 | 4690 | fprintf_unlocked strstr errno vasprintf \ |
c1800ec8 | 4691 | malloc realloc calloc free basename getopt clock |
81bf3d9e | 4692 | do |
f31e826b KG |
4693 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
4694 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 | |
9118405f | 4695 | echo "configure:4696: checking whether $ac_func is declared" >&5 |
f31e826b | 4696 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
81bf3d9e RH |
4697 | echo $ac_n "(cached) $ac_c" 1>&6 |
4698 | else | |
4699 | cat > conftest.$ac_ext <<EOF | |
9118405f | 4700 | #line 4701 "configure" |
81bf3d9e | 4701 | #include "confdefs.h" |
7afe8c41 KG |
4702 | #undef $ac_tr_decl |
4703 | #define $ac_tr_decl 1 | |
4704 | ||
d02af173 | 4705 | #include "ansidecl.h" |
86cf1cbd | 4706 | #include "system.h" |
f31e826b | 4707 | |
81bf3d9e | 4708 | int main() { |
86cf1cbd KG |
4709 | #ifndef $ac_func |
4710 | char *(*pfn) = (char *(*)) $ac_func ; | |
4711 | #endif | |
81bf3d9e RH |
4712 | ; return 0; } |
4713 | EOF | |
9118405f | 4714 | if { (eval echo configure:4715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
81bf3d9e | 4715 | rm -rf conftest* |
f31e826b | 4716 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e RH |
4717 | else |
4718 | echo "configure: failed program was:" >&5 | |
4719 | cat conftest.$ac_ext >&5 | |
4720 | rm -rf conftest* | |
f31e826b | 4721 | eval "gcc_cv_have_decl_$ac_func=no" |
81bf3d9e RH |
4722 | fi |
4723 | rm -f conftest* | |
4724 | fi | |
4725 | ||
f31e826b KG |
4726 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
4727 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF | |
86cf1cbd | 4728 | #define $ac_tr_decl 1 |
81bf3d9e | 4729 | EOF |
86cf1cbd | 4730 | |
81bf3d9e | 4731 | else |
f31e826b KG |
4732 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
4733 | #define $ac_tr_decl 0 | |
4734 | EOF | |
4735 | ||
81bf3d9e RH |
4736 | fi |
4737 | ||
4738 | done | |
86cf1cbd | 4739 | if test x = y ; then |
05e12634 | 4740 | cat >> confdefs.h <<\EOF |
f31e826b | 4741 | #define HAVE_DECL_GETENV 1 |
86cf1cbd | 4742 | EOF |
05e12634 | 4743 | cat >> confdefs.h <<\EOF |
f31e826b | 4744 | #define HAVE_DECL_ATOL 1 |
86cf1cbd | 4745 | EOF |
05e12634 | 4746 | cat >> confdefs.h <<\EOF |
f31e826b | 4747 | #define HAVE_DECL_SBRK 1 |
86cf1cbd | 4748 | EOF |
05e12634 | 4749 | cat >> confdefs.h <<\EOF |
f31e826b | 4750 | #define HAVE_DECL_ABORT 1 |
86cf1cbd | 4751 | EOF |
05e12634 | 4752 | cat >> confdefs.h <<\EOF |
f31e826b | 4753 | #define HAVE_DECL_ATOF 1 |
86cf1cbd | 4754 | EOF |
05e12634 | 4755 | cat >> confdefs.h <<\EOF |
f31e826b | 4756 | #define HAVE_DECL_GETCWD 1 |
86cf1cbd | 4757 | EOF |
05e12634 | 4758 | cat >> confdefs.h <<\EOF |
f31e826b | 4759 | #define HAVE_DECL_GETWD 1 |
86cf1cbd KG |
4760 | EOF |
4761 | \ | |
05e12634 | 4762 | cat >> confdefs.h <<\EOF |
f31e826b | 4763 | #define HAVE_DECL_STRSIGNAL 1 |
86cf1cbd | 4764 | EOF |
05e12634 | 4765 | cat >> confdefs.h <<\EOF |
f31e826b | 4766 | #define HAVE_DECL_PUTC_UNLOCKED 1 |
86cf1cbd | 4767 | EOF |
05e12634 | 4768 | cat >> confdefs.h <<\EOF |
f31e826b | 4769 | #define HAVE_DECL_FPUTS_UNLOCKED 1 |
3b681e9d ZW |
4770 | EOF |
4771 | cat >> confdefs.h <<\EOF | |
4772 | #define HAVE_DECL_FWRITE_UNLOCKED 1 | |
4773 | EOF | |
4774 | \ | |
4775 | cat >> confdefs.h <<\EOF | |
4776 | #define HAVE_DECL_FPRINTF_UNLOCKED 1 | |
86cf1cbd | 4777 | EOF |
05e12634 | 4778 | cat >> confdefs.h <<\EOF |
f31e826b | 4779 | #define HAVE_DECL_STRSTR 1 |
6c889b67 | 4780 | EOF |
05e12634 | 4781 | cat >> confdefs.h <<\EOF |
6c889b67 | 4782 | #define HAVE_DECL_ERRNO 1 |
a7475ab1 HPN |
4783 | EOF |
4784 | cat >> confdefs.h <<\EOF | |
4785 | #define HAVE_DECL_VASPRINTF 1 | |
86cf1cbd KG |
4786 | EOF |
4787 | \ | |
05e12634 | 4788 | cat >> confdefs.h <<\EOF |
f31e826b KG |
4789 | #define HAVE_DECL_MALLOC 1 |
4790 | EOF | |
05e12634 | 4791 | cat >> confdefs.h <<\EOF |
f31e826b | 4792 | #define HAVE_DECL_REALLOC 1 |
86cf1cbd | 4793 | EOF |
05e12634 | 4794 | cat >> confdefs.h <<\EOF |
f31e826b | 4795 | #define HAVE_DECL_CALLOC 1 |
86cf1cbd | 4796 | EOF |
05e12634 | 4797 | cat >> confdefs.h <<\EOF |
f31e826b | 4798 | #define HAVE_DECL_FREE 1 |
86cf1cbd | 4799 | EOF |
05e12634 | 4800 | cat >> confdefs.h <<\EOF |
f31e826b KG |
4801 | #define HAVE_DECL_BASENAME 1 |
4802 | EOF | |
05e12634 | 4803 | cat >> confdefs.h <<\EOF |
f31e826b | 4804 | #define HAVE_DECL_GETOPT 1 |
c1800ec8 | 4805 | EOF |
05e12634 | 4806 | cat >> confdefs.h <<\EOF |
c1800ec8 | 4807 | #define HAVE_DECL_CLOCK 1 |
81bf3d9e | 4808 | EOF |
81bf3d9e RH |
4809 | fi |
4810 | ||
81bf3d9e RH |
4811 | |
4812 | for ac_func in getrlimit setrlimit getrusage | |
4813 | do | |
f31e826b KG |
4814 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
4815 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 | |
9118405f | 4816 | echo "configure:4817: checking whether $ac_func is declared" >&5 |
f31e826b | 4817 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
81bf3d9e RH |
4818 | echo $ac_n "(cached) $ac_c" 1>&6 |
4819 | else | |
4820 | cat > conftest.$ac_ext <<EOF | |
9118405f | 4821 | #line 4822 "configure" |
81bf3d9e | 4822 | #include "confdefs.h" |
7afe8c41 KG |
4823 | #undef $ac_tr_decl |
4824 | #define $ac_tr_decl 1 | |
4825 | ||
d02af173 | 4826 | #include "ansidecl.h" |
86cf1cbd | 4827 | #include "system.h" |
81bf3d9e RH |
4828 | #ifdef HAVE_SYS_RESOURCE_H |
4829 | #include <sys/resource.h> | |
4830 | #endif | |
4831 | ||
f31e826b | 4832 | |
81bf3d9e | 4833 | int main() { |
86cf1cbd KG |
4834 | #ifndef $ac_func |
4835 | char *(*pfn) = (char *(*)) $ac_func ; | |
4836 | #endif | |
81bf3d9e RH |
4837 | ; return 0; } |
4838 | EOF | |
9118405f | 4839 | if { (eval echo configure:4840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
81bf3d9e | 4840 | rm -rf conftest* |
f31e826b | 4841 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e RH |
4842 | else |
4843 | echo "configure: failed program was:" >&5 | |
4844 | cat conftest.$ac_ext >&5 | |
4845 | rm -rf conftest* | |
f31e826b | 4846 | eval "gcc_cv_have_decl_$ac_func=no" |
81bf3d9e RH |
4847 | fi |
4848 | rm -f conftest* | |
4849 | fi | |
4850 | ||
f31e826b KG |
4851 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
4852 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF | |
86cf1cbd | 4853 | #define $ac_tr_decl 1 |
81bf3d9e | 4854 | EOF |
86cf1cbd | 4855 | |
81bf3d9e | 4856 | else |
f31e826b KG |
4857 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
4858 | #define $ac_tr_decl 0 | |
4859 | EOF | |
4860 | ||
81bf3d9e RH |
4861 | fi |
4862 | ||
4863 | done | |
86cf1cbd | 4864 | if test x = y ; then |
05e12634 | 4865 | cat >> confdefs.h <<\EOF |
f31e826b | 4866 | #define HAVE_DECL_GETRLIMIT 1 |
86cf1cbd | 4867 | EOF |
05e12634 | 4868 | cat >> confdefs.h <<\EOF |
f31e826b | 4869 | #define HAVE_DECL_SETRLIMIT 1 |
86cf1cbd | 4870 | EOF |
05e12634 | 4871 | cat >> confdefs.h <<\EOF |
f31e826b | 4872 | #define HAVE_DECL_GETRUSAGE 1 |
86cf1cbd KG |
4873 | EOF |
4874 | fi | |
4875 | ||
81bf3d9e | 4876 | |
c1800ec8 ZW |
4877 | for ac_func in times |
4878 | do | |
4879 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4880 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 | |
9118405f | 4881 | echo "configure:4882: checking whether $ac_func is declared" >&5 |
c1800ec8 ZW |
4882 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4883 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4884 | else | |
4885 | cat > conftest.$ac_ext <<EOF | |
9118405f | 4886 | #line 4887 "configure" |
c1800ec8 ZW |
4887 | #include "confdefs.h" |
4888 | #undef $ac_tr_decl | |
4889 | #define $ac_tr_decl 1 | |
4890 | ||
4891 | #include "ansidecl.h" | |
4892 | #include "system.h" | |
4893 | #ifdef HAVE_SYS_TIMES_H | |
4894 | #include <sys/times.h> | |
4895 | #endif | |
4896 | ||
4897 | ||
4898 | int main() { | |
4899 | #ifndef $ac_func | |
4900 | char *(*pfn) = (char *(*)) $ac_func ; | |
4901 | #endif | |
4902 | ; return 0; } | |
4903 | EOF | |
9118405f | 4904 | if { (eval echo configure:4905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c1800ec8 ZW |
4905 | rm -rf conftest* |
4906 | eval "gcc_cv_have_decl_$ac_func=yes" | |
4907 | else | |
4908 | echo "configure: failed program was:" >&5 | |
4909 | cat conftest.$ac_ext >&5 | |
4910 | rm -rf conftest* | |
4911 | eval "gcc_cv_have_decl_$ac_func=no" | |
4912 | fi | |
4913 | rm -f conftest* | |
4914 | fi | |
4915 | ||
4916 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
4917 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF | |
4918 | #define $ac_tr_decl 1 | |
4919 | EOF | |
4920 | ||
4921 | else | |
4922 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF | |
4923 | #define $ac_tr_decl 0 | |
4924 | EOF | |
4925 | ||
4926 | fi | |
4927 | ||
4928 | done | |
4929 | if test x = y ; then | |
05e12634 | 4930 | cat >> confdefs.h <<\EOF |
c1800ec8 ZW |
4931 | #define HAVE_DECL_TIMES 1 |
4932 | EOF | |
4933 | fi | |
4934 | ||
4935 | ||
4936 | # More time-related stuff. | |
4937 | echo $ac_n "checking for struct tms""... $ac_c" 1>&6 | |
9118405f | 4938 | echo "configure:4939: checking for struct tms" >&5 |
c1800ec8 ZW |
4939 | if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then |
4940 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4941 | else | |
4942 | ||
4943 | cat > conftest.$ac_ext <<EOF | |
9118405f | 4944 | #line 4945 "configure" |
c1800ec8 ZW |
4945 | #include "confdefs.h" |
4946 | ||
4947 | #include "ansidecl.h" | |
4948 | #include "system.h" | |
4949 | #ifdef HAVE_SYS_TIMES_H | |
4950 | #include <sys/times.h> | |
4951 | #endif | |
4952 | ||
4953 | int main() { | |
4954 | struct tms tms; | |
4955 | ; return 0; } | |
4956 | EOF | |
9118405f | 4957 | if { (eval echo configure:4958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c1800ec8 ZW |
4958 | rm -rf conftest* |
4959 | ac_cv_struct_tms=yes | |
4960 | else | |
4961 | echo "configure: failed program was:" >&5 | |
4962 | cat conftest.$ac_ext >&5 | |
4963 | rm -rf conftest* | |
4964 | ac_cv_struct_tms=no | |
4965 | fi | |
4966 | rm -f conftest* | |
4967 | fi | |
4968 | ||
4969 | echo "$ac_t""$ac_cv_struct_tms" 1>&6 | |
4970 | if test $ac_cv_struct_tms = yes; then | |
4971 | cat >> confdefs.h <<\EOF | |
4972 | #define HAVE_STRUCT_TMS 1 | |
4973 | EOF | |
4974 | ||
4975 | fi | |
4976 | ||
4977 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
4978 | # revisit after autoconf 2.50. | |
4979 | echo $ac_n "checking for clock_t""... $ac_c" 1>&6 | |
9118405f | 4980 | echo "configure:4981: checking for clock_t" >&5 |
c1800ec8 ZW |
4981 | if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then |
4982 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4983 | else | |
4984 | ||
4985 | cat > conftest.$ac_ext <<EOF | |
9118405f | 4986 | #line 4987 "configure" |
c1800ec8 ZW |
4987 | #include "confdefs.h" |
4988 | ||
4989 | #include "ansidecl.h" | |
4990 | #include "system.h" | |
4991 | ||
4992 | int main() { | |
4993 | clock_t x; | |
4994 | ; return 0; } | |
4995 | EOF | |
9118405f | 4996 | if { (eval echo configure:4997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c1800ec8 ZW |
4997 | rm -rf conftest* |
4998 | gcc_cv_type_clock_t=yes | |
4999 | else | |
5000 | echo "configure: failed program was:" >&5 | |
5001 | cat conftest.$ac_ext >&5 | |
5002 | rm -rf conftest* | |
5003 | gcc_cv_type_clock_t=no | |
5004 | fi | |
5005 | rm -f conftest* | |
5006 | fi | |
5007 | ||
5008 | echo "$ac_t""$gcc_cv_type_clock_t" 1>&6 | |
5009 | if test $gcc_cv_type_clock_t = yes; then | |
5010 | cat >> confdefs.h <<\EOF | |
5011 | #define HAVE_CLOCK_T 1 | |
5012 | EOF | |
5013 | ||
5014 | fi | |
5015 | ||
07cf4226 DM |
5016 | # Check whether --enable-initfini-array or --disable-initfini-array was given. |
5017 | if test "${enable_initfini_array+set}" = set; then | |
5018 | enableval="$enable_initfini_array" | |
5019 | gcc_cv_initfinit_array=$enableval | |
5020 | else | |
5021 | echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6 | |
9118405f | 5022 | echo "configure:5023: checking for .preinit_array/.init_array/.fini_array support" >&5 |
07cf4226 DM |
5023 | if eval "test \"`echo '$''{'gcc_cv_initfinit_array'+set}'`\" = set"; then |
5024 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5025 | else | |
5026 | cat > conftest.c <<EOF | |
5027 | static int x = -1; | |
5028 | int main (void) { return x; } | |
5029 | int foo (void) { x = 0; } | |
5030 | int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; | |
5031 | EOF | |
9118405f | 5032 | if { ac_try='${CC-cc} -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD'; { (eval echo configure:5033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
07cf4226 DM |
5033 | then |
5034 | if ./conftest; then | |
5035 | gcc_cv_initfinit_array=yes | |
5036 | else | |
5037 | gcc_cv_initfinit_array=no | |
5038 | fi | |
5039 | else | |
5040 | gcc_cv_initfinit_array=no | |
5041 | fi | |
5042 | rm -f conftest* | |
5043 | fi | |
5044 | ||
5045 | echo "$ac_t""$gcc_cv_initfinit_array" 1>&6 | |
5046 | ||
5047 | if test $gcc_cv_initfinit_array = yes; then | |
5048 | cat >> confdefs.h <<\EOF | |
5049 | #define HAVE_INITFINI_ARRAY 1 | |
5050 | EOF | |
5051 | ||
5052 | fi | |
5053 | fi | |
5054 | ||
5055 | ||
86cf1cbd KG |
5056 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
5057 | CFLAGS="$saved_CFLAGS" | |
81bf3d9e | 5058 | |
75923b2f MK |
5059 | # mkdir takes a single argument on some systems. |
5060 | echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6 | |
9118405f | 5061 | echo "configure:5062: checking if mkdir takes one argument" >&5 |
75923b2f MK |
5062 | if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then |
5063 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5064 | else | |
5065 | cat > conftest.$ac_ext <<EOF | |
9118405f | 5066 | #line 5067 "configure" |
75923b2f MK |
5067 | #include "confdefs.h" |
5068 | ||
5069 | #include <sys/types.h> | |
5070 | #ifdef HAVE_SYS_STAT_H | |
5071 | # include <sys/stat.h> | |
5072 | #endif | |
5073 | #ifdef HAVE_UNISTD_H | |
5074 | # include <unistd.h> | |
5075 | #endif | |
5076 | #ifdef HAVE_DIRECT_H | |
5077 | # include <direct.h> | |
5078 | #endif | |
5079 | int main() { | |
5080 | mkdir ("foo", 0); | |
5081 | ; return 0; } | |
5082 | EOF | |
9118405f | 5083 | if { (eval echo configure:5084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75923b2f MK |
5084 | rm -rf conftest* |
5085 | gcc_cv_mkdir_takes_one_arg=no | |
5086 | else | |
5087 | echo "configure: failed program was:" >&5 | |
5088 | cat conftest.$ac_ext >&5 | |
5089 | rm -rf conftest* | |
5090 | gcc_cv_mkdir_takes_one_arg=yes | |
5091 | fi | |
5092 | rm -f conftest* | |
5093 | fi | |
5094 | ||
5095 | echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6 | |
5096 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then | |
5097 | cat >> confdefs.h <<\EOF | |
5098 | #define MKDIR_TAKES_ONE_ARG 1 | |
5099 | EOF | |
5100 | ||
5101 | fi | |
5102 | ||
5103 | ||
861bb6c1 JL |
5104 | # File extensions |
5105 | manext='.1' | |
5106 | objext='.o' | |
5107 | ||
5108 | ||
5109 | ||
ef69da62 | 5110 | target_gtfiles= |
861bb6c1 | 5111 | build_xm_file= |
f6cb0e63 | 5112 | build_xm_defines= |
861bb6c1 JL |
5113 | build_install_headers_dir=install-headers-tar |
5114 | build_exeext= | |
5115 | host_xm_file= | |
f6cb0e63 | 5116 | host_xm_defines= |
861bb6c1 JL |
5117 | host_xmake_file= |
5118 | host_truncate_target= | |
6e26218f | 5119 | host_exeext= |
861bb6c1 JL |
5120 | |
5121 | # Decode the host machine, then the target machine. | |
5122 | # For the host machine, we save the xm_file variable as host_xm_file; | |
5123 | # then we decode the target machine and forget everything else | |
5124 | # that came from the host machine. | |
5125 | for machine in $build $host $target; do | |
61ed06c3 | 5126 | . ${srcdir}/config.gcc |
861bb6c1 JL |
5127 | done |
5128 | ||
5129 | extra_objs="${host_extra_objs} ${extra_objs}" | |
5130 | ||
5131 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 5132 | if test x"$tm_file" = x |
861bb6c1 JL |
5133 | then tm_file=$cpu_type/$cpu_type.h; fi |
5134 | ||
6b2adea9 | 5135 | if test x"$extra_headers" = x |
861bb6c1 JL |
5136 | then extra_headers=; fi |
5137 | ||
75bffa71 | 5138 | if test x$md_file = x |
e98e406f | 5139 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 5140 | |
75bffa71 | 5141 | if test x$out_file = x |
861bb6c1 JL |
5142 | then out_file=$cpu_type/$cpu_type.c; fi |
5143 | ||
75bffa71 | 5144 | if test x"$tmake_file" = x |
861bb6c1 JL |
5145 | then tmake_file=$cpu_type/t-$cpu_type |
5146 | fi | |
5147 | ||
90e6a802 | 5148 | if test x"$dwarf2" = xyes |
756ee602 | 5149 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
5150 | fi |
5151 | ||
861bb6c1 | 5152 | # Say what files are being used for the output code and MD file. |
11642c3a | 5153 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
5154 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
5155 | ||
11642c3a | 5156 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
5157 | # about them and drop them. |
5158 | ||
11642c3a ZW |
5159 | bx= |
5160 | for x in $build_xm_file; do | |
5161 | if test -f $srcdir/config/$x | |
5162 | then bx="$bx $x" | |
11642c3a ZW |
5163 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
5164 | fi | |
5165 | done | |
5166 | build_xm_file="$bx" | |
5167 | ||
5168 | hx= | |
5169 | for x in $host_xm_file; do | |
5170 | if test -f $srcdir/config/$x | |
5171 | then hx="$hx $x" | |
11642c3a ZW |
5172 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
5173 | fi | |
5174 | done | |
5175 | host_xm_file="$hx" | |
5176 | ||
5177 | tx= | |
5178 | for x in $xm_file; do | |
5179 | if test -f $srcdir/config/$x | |
5180 | then tx="$tx $x" | |
11642c3a ZW |
5181 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
5182 | fi | |
5183 | done | |
5184 | xm_file="$tx" | |
5185 | ||
861bb6c1 JL |
5186 | count=a |
5187 | for f in $tm_file; do | |
5188 | count=${count}x | |
5189 | done | |
75bffa71 | 5190 | if test $count = ax; then |
861bb6c1 JL |
5191 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
5192 | else | |
5193 | echo "Using the following target machine macro files:" | |
5194 | for f in $tm_file; do | |
5195 | echo " $srcdir/config/$f" | |
5196 | done | |
5197 | fi | |
5198 | ||
5199 | count=a | |
5200 | for f in $host_xm_file; do | |
5201 | count=${count}x | |
5202 | done | |
11642c3a ZW |
5203 | if test $count = a; then |
5204 | : | |
5205 | elif test $count = ax; then | |
861bb6c1 JL |
5206 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
5207 | else | |
5208 | echo "Using the following host machine macro files:" | |
5209 | for f in $host_xm_file; do | |
5210 | echo " $srcdir/config/$f" | |
5211 | done | |
5212 | fi | |
5213 | ||
75bffa71 | 5214 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
5215 | count=a |
5216 | for f in $build_xm_file; do | |
5217 | count=${count}x | |
5218 | done | |
11642c3a ZW |
5219 | if test $count = a; then |
5220 | : | |
5221 | elif test $count = ax; then | |
861bb6c1 JL |
5222 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
5223 | else | |
5224 | echo "Using the following build machine macro files:" | |
5225 | for f in $build_xm_file; do | |
5226 | echo " $srcdir/config/$f" | |
5227 | done | |
5228 | fi | |
5229 | fi | |
5230 | ||
75bffa71 ILT |
5231 | if test x$thread_file = x; then |
5232 | if test x$target_thread_file != x; then | |
a851212a JW |
5233 | thread_file=$target_thread_file |
5234 | else | |
5235 | thread_file='single' | |
5236 | fi | |
861bb6c1 JL |
5237 | fi |
5238 | ||
a5381466 | 5239 | # Look for a file containing extra machine modes. |
1c0ca89d ZW |
5240 | if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then |
5241 | extra_modes_file='$(srcdir)'/config/${extra_modes} | |
a5381466 ZW |
5242 | |
5243 | cat >> confdefs.h <<EOF | |
1c0ca89d | 5244 | #define EXTRA_MODES_FILE "$extra_modes" |
a5381466 ZW |
5245 | EOF |
5246 | ||
5247 | cat >> confdefs.h <<\EOF | |
5248 | #define EXTRA_CC_MODES 1 | |
5249 | EOF | |
5250 | ||
5251 | fi | |
5252 | ||
b7cb92ad | 5253 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 5254 | # the first file included by config.h. |
b7cb92ad | 5255 | # If host=build, it is correct to have hconfig include auto-host.h |
db81d74a RH |
5256 | # as well. If host!=build, we are in error and need to do more |
5257 | # work to find out the build config parameters. | |
75bffa71 | 5258 | if test x$host = x$build |
db81d74a | 5259 | then |
eaf4e618 | 5260 | build_auto=auto-host.h |
06f0b04c | 5261 | FORBUILD=.. |
b7cb92ad JL |
5262 | else |
5263 | # We create a subdir, then run autoconf in the subdir. | |
5264 | # To prevent recursion we set host and build for the new | |
5265 | # invocation of configure to the build for this invocation | |
5266 | # of configure. | |
5267 | tempdir=build.$$ | |
5268 | rm -rf $tempdir | |
5269 | mkdir $tempdir | |
5270 | cd $tempdir | |
5271 | case ${srcdir} in | |
255b8a49 | 5272 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
5273 | *) realsrcdir=../${srcdir};; |
5274 | esac | |
d920e825 L |
5275 | saved_CFLAGS="${CFLAGS}" |
5276 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
5277 | ${realsrcdir}/configure \ | |
534d0cc0 | 5278 | --target=$target_alias --host=$build_alias --build=$build_alias |
d920e825 | 5279 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
5280 | |
5281 | # We just finished tests for the build machine, so rename | |
5282 | # the file auto-build.h in the gcc directory. | |
5283 | mv auto-host.h ../auto-build.h | |
5284 | cd .. | |
5285 | rm -rf $tempdir | |
eaf4e618 | 5286 | build_auto=auto-build.h |
771a2a66 | 5287 | FORBUILD=../$build_alias |
db81d74a RH |
5288 | fi |
5289 | ||
06f0b04c | 5290 | |
eaf4e618 | 5291 | tm_file="${tm_file} defaults.h" |
d02af173 ZW |
5292 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file} ${tm_file}" |
5293 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file} ${tm_file}" | |
5294 | xm_file="ansidecl.h ${xm_file} ${tm_file}" | |
0056a9b5 | 5295 | |
861bb6c1 | 5296 | # Truncate the target if necessary |
75bffa71 | 5297 | if test x$host_truncate_target != x; then |
861bb6c1 JL |
5298 | target=`echo $target | sed -e 's/\(..............\).*/\1/'` |
5299 | fi | |
5300 | ||
f1943b77 | 5301 | # Get the version trigger filename from the toplevel |
75bffa71 | 5302 | if test "${with_gcc_version_trigger+set}" = set; then |
f1943b77 MH |
5303 | gcc_version_trigger=$with_gcc_version_trigger |
5304 | else | |
5305 | gcc_version_trigger=${srcdir}/version.c | |
5306 | fi | |
022dae81 | 5307 | gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'` |
8763704d | 5308 | gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` |
861bb6c1 | 5309 | |
cc1e60ea | 5310 | # Compile in configure arguments. |
8105825d | 5311 | if test -f configargs.h ; then |
cc1e60ea | 5312 | # Being re-configured. |
022dae81 | 5313 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
5314 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
5315 | else | |
5316 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
5317 | fi | |
5318 | cat > configargs.h <<EOF | |
5319 | /* Generated automatically. */ | |
5320 | static const char configuration_arguments[] = "$gcc_config_arguments"; | |
a6687d2b | 5321 | static const char thread_model[] = "$thread_file"; |
cc1e60ea JM |
5322 | EOF |
5323 | ||
ab87f8c8 JL |
5324 | # Internationalization |
5325 | PACKAGE=gcc | |
5326 | VERSION="$gcc_version" | |
861bb6c1 | 5327 | |
ab87f8c8 JL |
5328 | |
5329 | ||
dc6746e7 | 5330 | # Enable NLS support by default |
ab87f8c8 JL |
5331 | # Check whether --enable-nls or --disable-nls was given. |
5332 | if test "${enable_nls+set}" = set; then | |
5333 | enableval="$enable_nls" | |
5334 | : | |
861bb6c1 | 5335 | else |
dc6746e7 | 5336 | enable_nls=yes |
861bb6c1 | 5337 | fi |
861bb6c1 | 5338 | |
861bb6c1 | 5339 | |
dc6746e7 PT |
5340 | # if cross compiling, disable NLS support. |
5341 | # It's not worth the trouble, at least for now. | |
5342 | ||
063a4b85 | 5343 | if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then |
dc6746e7 PT |
5344 | echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2 |
5345 | enable_nls=no | |
5346 | fi | |
5347 | ||
861bb6c1 | 5348 | |
71a94577 ZW |
5349 | |
5350 | echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6 | |
9118405f | 5351 | echo "configure:5352: checking for library containing strerror" >&5 |
71a94577 | 5352 | if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then |
ab87f8c8 JL |
5353 | echo $ac_n "(cached) $ac_c" 1>&6 |
5354 | else | |
71a94577 ZW |
5355 | ac_func_search_save_LIBS="$LIBS" |
5356 | ac_cv_search_strerror="no" | |
ab87f8c8 | 5357 | cat > conftest.$ac_ext <<EOF |
9118405f | 5358 | #line 5359 "configure" |
ab87f8c8 JL |
5359 | #include "confdefs.h" |
5360 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5361 | /* We use char because int might match the return type of a gcc2 | |
5362 | builtin and then its argument prototype would still apply. */ | |
5363 | char strerror(); | |
861bb6c1 | 5364 | |
ab87f8c8 JL |
5365 | int main() { |
5366 | strerror() | |
5367 | ; return 0; } | |
5368 | EOF | |
9118405f | 5369 | if { (eval echo configure:5370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 5370 | rm -rf conftest* |
71a94577 | 5371 | ac_cv_search_strerror="none required" |
ab87f8c8 JL |
5372 | else |
5373 | echo "configure: failed program was:" >&5 | |
5374 | cat conftest.$ac_ext >&5 | |
861bb6c1 | 5375 | fi |
ab87f8c8 | 5376 | rm -f conftest* |
71a94577 ZW |
5377 | test "$ac_cv_search_strerror" = "no" && for i in cposix; do |
5378 | LIBS="-l$i $ac_func_search_save_LIBS" | |
5379 | cat > conftest.$ac_ext <<EOF | |
9118405f | 5380 | #line 5381 "configure" |
71a94577 ZW |
5381 | #include "confdefs.h" |
5382 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5383 | /* We use char because int might match the return type of a gcc2 | |
5384 | builtin and then its argument prototype would still apply. */ | |
5385 | char strerror(); | |
861bb6c1 | 5386 | |
71a94577 ZW |
5387 | int main() { |
5388 | strerror() | |
5389 | ; return 0; } | |
5390 | EOF | |
9118405f | 5391 | if { (eval echo configure:5392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
71a94577 ZW |
5392 | rm -rf conftest* |
5393 | ac_cv_search_strerror="-l$i" | |
5394 | break | |
861bb6c1 | 5395 | else |
71a94577 ZW |
5396 | echo "configure: failed program was:" >&5 |
5397 | cat conftest.$ac_ext >&5 | |
5398 | fi | |
5399 | rm -f conftest* | |
5400 | done | |
5401 | LIBS="$ac_func_search_save_LIBS" | |
861bb6c1 JL |
5402 | fi |
5403 | ||
71a94577 ZW |
5404 | echo "$ac_t""$ac_cv_search_strerror" 1>&6 |
5405 | if test "$ac_cv_search_strerror" != "no"; then | |
5406 | test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" | |
5407 | ||
5408 | else : | |
5409 | ||
5410 | fi | |
ab87f8c8 | 5411 | |
2ce3c6c6 | 5412 | |
ab87f8c8 | 5413 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
9118405f | 5414 | echo "configure:5415: checking for working const" >&5 |
ab87f8c8 JL |
5415 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
5416 | echo $ac_n "(cached) $ac_c" 1>&6 | |
861bb6c1 | 5417 | else |
ab87f8c8 | 5418 | cat > conftest.$ac_ext <<EOF |
9118405f | 5419 | #line 5420 "configure" |
ab87f8c8 | 5420 | #include "confdefs.h" |
861bb6c1 | 5421 | |
ab87f8c8 JL |
5422 | int main() { |
5423 | ||
5424 | /* Ultrix mips cc rejects this. */ | |
130fadbb | 5425 | typedef int charset[2]; const charset x; |
ab87f8c8 JL |
5426 | /* SunOS 4.1.1 cc rejects this. */ |
5427 | char const *const *ccp; | |
5428 | char **p; | |
5429 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
5430 | struct point {int x, y;}; | |
5431 | static struct point const zero = {0,0}; | |
5432 | /* AIX XL C 1.02.0.0 rejects this. | |
5433 | It does not let you subtract one const X* pointer from another in an arm | |
5434 | of an if-expression whose if-part is not a constant expression */ | |
5435 | const char *g = "string"; | |
5436 | ccp = &g + (g ? g-g : 0); | |
5437 | /* HPUX 7.0 cc rejects these. */ | |
5438 | ++ccp; | |
5439 | p = (char**) ccp; | |
5440 | ccp = (char const *const *) p; | |
5441 | { /* SCO 3.2v4 cc rejects this. */ | |
5442 | char *t; | |
5443 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5444 | ||
5445 | *t++ = 0; | |
5446 | } | |
5447 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
5448 | int x[] = {25, 17}; | |
5449 | const int *foo = &x[0]; | |
5450 | ++foo; | |
5451 | } | |
5452 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
5453 | typedef const int *iptr; | |
5454 | iptr p = 0; | |
5455 | ++p; | |
5456 | } | |
5457 | { /* AIX XL C 1.02.0.0 rejects this saying | |
5458 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
5459 | struct s { int j; const int *ap[3]; }; | |
5460 | struct s *b; b->j = 5; | |
5461 | } | |
5462 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
5463 | const int foo = 10; | |
5464 | } | |
5465 | ||
5466 | ; return 0; } | |
5467 | EOF | |
9118405f | 5468 | if { (eval echo configure:5469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
ab87f8c8 JL |
5469 | rm -rf conftest* |
5470 | ac_cv_c_const=yes | |
861bb6c1 | 5471 | else |
ab87f8c8 JL |
5472 | echo "configure: failed program was:" >&5 |
5473 | cat conftest.$ac_ext >&5 | |
5474 | rm -rf conftest* | |
5475 | ac_cv_c_const=no | |
5476 | fi | |
5477 | rm -f conftest* | |
861bb6c1 JL |
5478 | fi |
5479 | ||
ab87f8c8 JL |
5480 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
5481 | if test $ac_cv_c_const = no; then | |
5482 | cat >> confdefs.h <<\EOF | |
5483 | #define const | |
5484 | EOF | |
5485 | ||
861bb6c1 JL |
5486 | fi |
5487 | ||
ab87f8c8 | 5488 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
9118405f | 5489 | echo "configure:5490: checking for off_t" >&5 |
ab87f8c8 JL |
5490 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
5491 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5492 | else | |
5493 | cat > conftest.$ac_ext <<EOF | |
9118405f | 5494 | #line 5495 "configure" |
ab87f8c8 JL |
5495 | #include "confdefs.h" |
5496 | #include <sys/types.h> | |
5497 | #if STDC_HEADERS | |
5498 | #include <stdlib.h> | |
5499 | #include <stddef.h> | |
5500 | #endif | |
5501 | EOF | |
5502 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
b27d2bd5 | 5503 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
ab87f8c8 | 5504 | rm -rf conftest* |
cb65112a | 5505 | ac_cv_type_off_t=yes |
ab87f8c8 JL |
5506 | else |
5507 | rm -rf conftest* | |
cb65112a | 5508 | ac_cv_type_off_t=no |
ab87f8c8 JL |
5509 | fi |
5510 | rm -f conftest* | |
5511 | ||
5512 | fi | |
cb65112a AO |
5513 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 |
5514 | if test $ac_cv_type_off_t = no; then | |
5515 | cat >> confdefs.h <<\EOF | |
ab87f8c8 JL |
5516 | #define off_t long |
5517 | EOF | |
5518 | ||
5519 | fi | |
5520 | ||
5521 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
9118405f | 5522 | echo "configure:5523: checking for size_t" >&5 |
ab87f8c8 JL |
5523 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
5524 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5525 | else | |
5526 | cat > conftest.$ac_ext <<EOF | |
9118405f | 5527 | #line 5528 "configure" |
ab87f8c8 JL |
5528 | #include "confdefs.h" |
5529 | #include <sys/types.h> | |
5530 | #if STDC_HEADERS | |
5531 | #include <stdlib.h> | |
5532 | #include <stddef.h> | |
5533 | #endif | |
5534 | EOF | |
5535 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
b27d2bd5 | 5536 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
ab87f8c8 | 5537 | rm -rf conftest* |
cb65112a | 5538 | ac_cv_type_size_t=yes |
ab87f8c8 JL |
5539 | else |
5540 | rm -rf conftest* | |
cb65112a | 5541 | ac_cv_type_size_t=no |
ab87f8c8 JL |
5542 | fi |
5543 | rm -f conftest* | |
5544 | ||
5545 | fi | |
cb65112a AO |
5546 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 |
5547 | if test $ac_cv_type_size_t = no; then | |
5548 | cat >> confdefs.h <<\EOF | |
ab87f8c8 JL |
5549 | #define size_t unsigned |
5550 | EOF | |
5551 | ||
5552 | fi | |
5553 | ||
71a94577 ZW |
5554 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
5555 | # for constant arguments. Useless! | |
5556 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
9118405f | 5557 | echo "configure:5558: checking for working alloca.h" >&5 |
71a94577 | 5558 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
ab87f8c8 JL |
5559 | echo $ac_n "(cached) $ac_c" 1>&6 |
5560 | else | |
5561 | cat > conftest.$ac_ext <<EOF | |
9118405f | 5562 | #line 5563 "configure" |
ab87f8c8 | 5563 | #include "confdefs.h" |
71a94577 ZW |
5564 | #include <alloca.h> |
5565 | int main() { | |
5566 | char *p = alloca(2 * sizeof(int)); | |
5567 | ; return 0; } | |
ab87f8c8 | 5568 | EOF |
9118405f | 5569 | if { (eval echo configure:5570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 5570 | rm -rf conftest* |
71a94577 | 5571 | ac_cv_header_alloca_h=yes |
ab87f8c8 | 5572 | else |
ab87f8c8 JL |
5573 | echo "configure: failed program was:" >&5 |
5574 | cat conftest.$ac_ext >&5 | |
5575 | rm -rf conftest* | |
71a94577 | 5576 | ac_cv_header_alloca_h=no |
ab87f8c8 JL |
5577 | fi |
5578 | rm -f conftest* | |
5579 | fi | |
71a94577 ZW |
5580 | |
5581 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
5582 | if test $ac_cv_header_alloca_h = yes; then | |
5583 | cat >> confdefs.h <<\EOF | |
5584 | #define HAVE_ALLOCA_H 1 | |
ab87f8c8 | 5585 | EOF |
71a94577 | 5586 | |
ab87f8c8 | 5587 | fi |
ab87f8c8 | 5588 | |
71a94577 | 5589 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 |
9118405f | 5590 | echo "configure:5591: checking for alloca" >&5 |
71a94577 | 5591 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
ab87f8c8 JL |
5592 | echo $ac_n "(cached) $ac_c" 1>&6 |
5593 | else | |
5594 | cat > conftest.$ac_ext <<EOF | |
9118405f | 5595 | #line 5596 "configure" |
ab87f8c8 | 5596 | #include "confdefs.h" |
ab87f8c8 | 5597 | |
71a94577 ZW |
5598 | #ifdef __GNUC__ |
5599 | # define alloca __builtin_alloca | |
ab87f8c8 | 5600 | #else |
71a94577 ZW |
5601 | # ifdef _MSC_VER |
5602 | # include <malloc.h> | |
5603 | # define alloca _alloca | |
5604 | # else | |
5605 | # if HAVE_ALLOCA_H | |
5606 | # include <alloca.h> | |
5607 | # else | |
5608 | # ifdef _AIX | |
5609 | #pragma alloca | |
5610 | # else | |
5611 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
5612 | char *alloca (); | |
5613 | # endif | |
5614 | # endif | |
5615 | # endif | |
5616 | # endif | |
ab87f8c8 JL |
5617 | #endif |
5618 | ||
71a94577 ZW |
5619 | int main() { |
5620 | char *p = (char *) alloca(1); | |
ab87f8c8 JL |
5621 | ; return 0; } |
5622 | EOF | |
9118405f | 5623 | if { (eval echo configure:5624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 5624 | rm -rf conftest* |
71a94577 | 5625 | ac_cv_func_alloca_works=yes |
ab87f8c8 JL |
5626 | else |
5627 | echo "configure: failed program was:" >&5 | |
5628 | cat conftest.$ac_ext >&5 | |
5629 | rm -rf conftest* | |
71a94577 | 5630 | ac_cv_func_alloca_works=no |
ab87f8c8 JL |
5631 | fi |
5632 | rm -f conftest* | |
5633 | fi | |
5634 | ||
71a94577 ZW |
5635 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 |
5636 | if test $ac_cv_func_alloca_works = yes; then | |
5637 | cat >> confdefs.h <<\EOF | |
5638 | #define HAVE_ALLOCA 1 | |
ab87f8c8 | 5639 | EOF |
71a94577 ZW |
5640 | |
5641 | fi | |
5642 | ||
5643 | if test $ac_cv_func_alloca_works = no; then | |
5644 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
5645 | # that cause trouble. Some versions do not even contain alloca or | |
5646 | # contain a buggy version. If you still want to use their alloca, | |
5647 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
5648 | ALLOCA=alloca.${ac_objext} | |
5649 | cat >> confdefs.h <<\EOF | |
5650 | #define C_ALLOCA 1 | |
5651 | EOF | |
5652 | ||
5653 | ||
5654 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
9118405f | 5655 | echo "configure:5656: checking whether alloca needs Cray hooks" >&5 |
71a94577 ZW |
5656 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
5657 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 5658 | else |
71a94577 | 5659 | cat > conftest.$ac_ext <<EOF |
9118405f | 5660 | #line 5661 "configure" |
71a94577 ZW |
5661 | #include "confdefs.h" |
5662 | #if defined(CRAY) && ! defined(CRAY2) | |
5663 | webecray | |
5664 | #else | |
5665 | wenotbecray | |
5666 | #endif | |
5667 | ||
5668 | EOF | |
5669 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5670 | egrep "webecray" >/dev/null 2>&1; then | |
5671 | rm -rf conftest* | |
5672 | ac_cv_os_cray=yes | |
5673 | else | |
5674 | rm -rf conftest* | |
5675 | ac_cv_os_cray=no | |
ab87f8c8 | 5676 | fi |
71a94577 | 5677 | rm -f conftest* |
ab87f8c8 | 5678 | |
71a94577 | 5679 | fi |
ab87f8c8 | 5680 | |
71a94577 ZW |
5681 | echo "$ac_t""$ac_cv_os_cray" 1>&6 |
5682 | if test $ac_cv_os_cray = yes; then | |
5683 | for ac_func in _getb67 GETB67 getb67; do | |
5684 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
9118405f | 5685 | echo "configure:5686: checking for $ac_func" >&5 |
ab87f8c8 JL |
5686 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5687 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5688 | else | |
5689 | cat > conftest.$ac_ext <<EOF | |
9118405f | 5690 | #line 5691 "configure" |
ab87f8c8 JL |
5691 | #include "confdefs.h" |
5692 | /* System header to define __stub macros and hopefully few prototypes, | |
5693 | which can conflict with char $ac_func(); below. */ | |
5694 | #include <assert.h> | |
5695 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5696 | /* We use char because int might match the return type of a gcc2 | |
5697 | builtin and then its argument prototype would still apply. */ | |
5698 | char $ac_func(); | |
5699 | ||
5700 | int main() { | |
5701 | ||
5702 | /* The GNU C library defines this for functions which it implements | |
5703 | to always fail with ENOSYS. Some functions are actually named | |
5704 | something starting with __ and the normal name is an alias. */ | |
5705 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5706 | choke me | |
5707 | #else | |
99b09ff3 | 5708 | $ac_func(); |
ab87f8c8 JL |
5709 | #endif |
5710 | ||
5711 | ; return 0; } | |
5712 | EOF | |
9118405f | 5713 | if { (eval echo configure:5714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 JL |
5714 | rm -rf conftest* |
5715 | eval "ac_cv_func_$ac_func=yes" | |
5716 | else | |
5717 | echo "configure: failed program was:" >&5 | |
5718 | cat conftest.$ac_ext >&5 | |
5719 | rm -rf conftest* | |
5720 | eval "ac_cv_func_$ac_func=no" | |
5721 | fi | |
5722 | rm -f conftest* | |
5723 | fi | |
5724 | ||
5725 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5726 | echo "$ac_t""yes" 1>&6 | |
ab87f8c8 | 5727 | cat >> confdefs.h <<EOF |
71a94577 | 5728 | #define CRAY_STACKSEG_END $ac_func |
ab87f8c8 | 5729 | EOF |
71a94577 ZW |
5730 | |
5731 | break | |
ab87f8c8 JL |
5732 | else |
5733 | echo "$ac_t""no" 1>&6 | |
5734 | fi | |
ab87f8c8 | 5735 | |
71a94577 ZW |
5736 | done |
5737 | fi | |
ab87f8c8 | 5738 | |
71a94577 | 5739 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 |
9118405f | 5740 | echo "configure:5741: checking stack direction for C alloca" >&5 |
71a94577 | 5741 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
ab87f8c8 | 5742 | echo $ac_n "(cached) $ac_c" 1>&6 |
71a94577 ZW |
5743 | else |
5744 | if test "$cross_compiling" = yes; then | |
5745 | ac_cv_c_stack_direction=0 | |
ab87f8c8 JL |
5746 | else |
5747 | cat > conftest.$ac_ext <<EOF | |
9118405f | 5748 | #line 5749 "configure" |
ab87f8c8 | 5749 | #include "confdefs.h" |
71a94577 ZW |
5750 | find_stack_direction () |
5751 | { | |
5752 | static char *addr = 0; | |
5753 | auto char dummy; | |
5754 | if (addr == 0) | |
5755 | { | |
5756 | addr = &dummy; | |
5757 | return find_stack_direction (); | |
5758 | } | |
5759 | else | |
5760 | return (&dummy > addr) ? 1 : -1; | |
5761 | } | |
5762 | main () | |
5763 | { | |
5764 | exit (find_stack_direction() < 0); | |
5765 | } | |
ab87f8c8 | 5766 | EOF |
9118405f | 5767 | if { (eval echo configure:5768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
71a94577 ZW |
5768 | then |
5769 | ac_cv_c_stack_direction=1 | |
ab87f8c8 JL |
5770 | else |
5771 | echo "configure: failed program was:" >&5 | |
5772 | cat conftest.$ac_ext >&5 | |
71a94577 ZW |
5773 | rm -fr conftest* |
5774 | ac_cv_c_stack_direction=-1 | |
ab87f8c8 | 5775 | fi |
71a94577 | 5776 | rm -fr conftest* |
ab87f8c8 JL |
5777 | fi |
5778 | ||
71a94577 ZW |
5779 | fi |
5780 | ||
5781 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
5782 | cat >> confdefs.h <<EOF | |
5783 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
ab87f8c8 JL |
5784 | EOF |
5785 | ||
ab87f8c8 JL |
5786 | fi |
5787 | ||
ab87f8c8 | 5788 | |
71a94577 | 5789 | echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6 |
9118405f | 5790 | echo "configure:5791: checking whether we are using the GNU C Library 2.1 or newer" >&5 |
71a94577 ZW |
5791 | if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then |
5792 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5793 | else | |
5794 | cat > conftest.$ac_ext <<EOF | |
9118405f | 5795 | #line 5796 "configure" |
71a94577 | 5796 | #include "confdefs.h" |
ab87f8c8 | 5797 | |
71a94577 ZW |
5798 | #include <features.h> |
5799 | #ifdef __GNU_LIBRARY__ | |
5800 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) | |
5801 | Lucky GNU user | |
5802 | #endif | |
5803 | #endif | |
5804 | ||
ab87f8c8 | 5805 | EOF |
71a94577 ZW |
5806 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
5807 | egrep "Lucky GNU user" >/dev/null 2>&1; then | |
5808 | rm -rf conftest* | |
5809 | ac_cv_gnu_library_2_1=yes | |
ab87f8c8 | 5810 | else |
71a94577 ZW |
5811 | rm -rf conftest* |
5812 | ac_cv_gnu_library_2_1=no | |
ab87f8c8 | 5813 | fi |
71a94577 | 5814 | rm -f conftest* |
ab87f8c8 | 5815 | |
71a94577 ZW |
5816 | |
5817 | ||
5818 | fi | |
ab87f8c8 | 5819 | |
71a94577 ZW |
5820 | echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6 |
5821 | ||
5822 | GLIBC21="$ac_cv_gnu_library_2_1" | |
5823 | ||
ab87f8c8 | 5824 | |
71a94577 ZW |
5825 | |
5826 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ | |
5827 | stdlib.h string.h unistd.h sys/param.h | |
5828 | do | |
5829 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5830 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
9118405f | 5831 | echo "configure:5832: checking for $ac_hdr" >&5 |
ab87f8c8 JL |
5832 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5833 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5834 | else | |
5835 | cat > conftest.$ac_ext <<EOF | |
9118405f | 5836 | #line 5837 "configure" |
ab87f8c8 | 5837 | #include "confdefs.h" |
71a94577 | 5838 | #include <$ac_hdr> |
ab87f8c8 JL |
5839 | EOF |
5840 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
9118405f | 5841 | { (eval echo configure:5842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 5842 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
ab87f8c8 JL |
5843 | if test -z "$ac_err"; then |
5844 | rm -rf conftest* | |
5845 | eval "ac_cv_header_$ac_safe=yes" | |
5846 | else | |
5847 | echo "$ac_err" >&5 | |
5848 | echo "configure: failed program was:" >&5 | |
5849 | cat conftest.$ac_ext >&5 | |
5850 | rm -rf conftest* | |
5851 | eval "ac_cv_header_$ac_safe=no" | |
5852 | fi | |
5853 | rm -f conftest* | |
5854 | fi | |
5855 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5856 | echo "$ac_t""yes" 1>&6 | |
71a94577 ZW |
5857 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5858 | cat >> confdefs.h <<EOF | |
5859 | #define $ac_tr_hdr 1 | |
ab87f8c8 | 5860 | EOF |
71a94577 | 5861 | |
ab87f8c8 | 5862 | else |
71a94577 | 5863 | echo "$ac_t""no" 1>&6 |
ab87f8c8 | 5864 | fi |
71a94577 | 5865 | done |
ab87f8c8 | 5866 | |
71a94577 ZW |
5867 | for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \ |
5868 | getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \ | |
5869 | strdup strtoul tsearch __argz_count __argz_stringify __argz_next | |
5870 | do | |
5871 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
9118405f | 5872 | echo "configure:5873: checking for $ac_func" >&5 |
71a94577 | 5873 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
ab87f8c8 JL |
5874 | echo $ac_n "(cached) $ac_c" 1>&6 |
5875 | else | |
71a94577 | 5876 | cat > conftest.$ac_ext <<EOF |
9118405f | 5877 | #line 5878 "configure" |
ab87f8c8 | 5878 | #include "confdefs.h" |
71a94577 ZW |
5879 | /* System header to define __stub macros and hopefully few prototypes, |
5880 | which can conflict with char $ac_func(); below. */ | |
5881 | #include <assert.h> | |
ab87f8c8 JL |
5882 | /* Override any gcc2 internal prototype to avoid an error. */ |
5883 | /* We use char because int might match the return type of a gcc2 | |
5884 | builtin and then its argument prototype would still apply. */ | |
71a94577 | 5885 | char $ac_func(); |
ab87f8c8 JL |
5886 | |
5887 | int main() { | |
71a94577 ZW |
5888 | |
5889 | /* The GNU C library defines this for functions which it implements | |
5890 | to always fail with ENOSYS. Some functions are actually named | |
5891 | something starting with __ and the normal name is an alias. */ | |
5892 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5893 | choke me | |
5894 | #else | |
5895 | $ac_func(); | |
5896 | #endif | |
5897 | ||
ab87f8c8 JL |
5898 | ; return 0; } |
5899 | EOF | |
9118405f | 5900 | if { (eval echo configure:5901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 5901 | rm -rf conftest* |
71a94577 | 5902 | eval "ac_cv_func_$ac_func=yes" |
ab87f8c8 JL |
5903 | else |
5904 | echo "configure: failed program was:" >&5 | |
5905 | cat conftest.$ac_ext >&5 | |
5906 | rm -rf conftest* | |
71a94577 | 5907 | eval "ac_cv_func_$ac_func=no" |
ab87f8c8 JL |
5908 | fi |
5909 | rm -f conftest* | |
ab87f8c8 | 5910 | fi |
71a94577 ZW |
5911 | |
5912 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
ab87f8c8 | 5913 | echo "$ac_t""yes" 1>&6 |
71a94577 ZW |
5914 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
5915 | cat >> confdefs.h <<EOF | |
5916 | #define $ac_tr_func 1 | |
5917 | EOF | |
5918 | ||
ab87f8c8 | 5919 | else |
71a94577 ZW |
5920 | echo "$ac_t""no" 1>&6 |
5921 | fi | |
5922 | done | |
5923 | ||
5924 | ||
5925 | ||
5926 | ||
b7f2fb96 | 5927 | am_cv_lib_iconv_ldpath= |
71a94577 ZW |
5928 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. |
5929 | if test "${with_libiconv_prefix+set}" = set; then | |
5930 | withval="$with_libiconv_prefix" | |
5931 | ||
5932 | for dir in `echo "$withval" | tr : ' '`; do | |
5933 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
b7f2fb96 | 5934 | if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi |
71a94577 ZW |
5935 | done |
5936 | ||
5937 | fi | |
ab87f8c8 | 5938 | |
71a94577 ZW |
5939 | |
5940 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 | |
9118405f | 5941 | echo "configure:5942: checking for iconv" >&5 |
71a94577 ZW |
5942 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
5943 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5944 | else | |
5945 | ||
5946 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
5947 | am_cv_lib_iconv=no | |
5948 | cat > conftest.$ac_ext <<EOF | |
9118405f | 5949 | #line 5950 "configure" |
71a94577 ZW |
5950 | #include "confdefs.h" |
5951 | #include <stdlib.h> | |
5952 | #include <iconv.h> | |
ab87f8c8 | 5953 | int main() { |
71a94577 ZW |
5954 | iconv_t cd = iconv_open("",""); |
5955 | iconv(cd,NULL,NULL,NULL,NULL); | |
5956 | iconv_close(cd); | |
ab87f8c8 JL |
5957 | ; return 0; } |
5958 | EOF | |
9118405f | 5959 | if { (eval echo configure:5960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 5960 | rm -rf conftest* |
71a94577 | 5961 | am_cv_func_iconv=yes |
ab87f8c8 JL |
5962 | else |
5963 | echo "configure: failed program was:" >&5 | |
5964 | cat conftest.$ac_ext >&5 | |
ab87f8c8 JL |
5965 | fi |
5966 | rm -f conftest* | |
71a94577 ZW |
5967 | if test "$am_cv_func_iconv" != yes; then |
5968 | am_save_LIBS="$LIBS" | |
b7f2fb96 | 5969 | LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" |
71a94577 | 5970 | cat > conftest.$ac_ext <<EOF |
9118405f | 5971 | #line 5972 "configure" |
71a94577 ZW |
5972 | #include "confdefs.h" |
5973 | #include <stdlib.h> | |
5974 | #include <iconv.h> | |
5975 | int main() { | |
5976 | iconv_t cd = iconv_open("",""); | |
5977 | iconv(cd,NULL,NULL,NULL,NULL); | |
5978 | iconv_close(cd); | |
5979 | ; return 0; } | |
5980 | EOF | |
9118405f | 5981 | if { (eval echo configure:5982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
71a94577 ZW |
5982 | rm -rf conftest* |
5983 | am_cv_lib_iconv=yes | |
5984 | am_cv_func_iconv=yes | |
ab87f8c8 | 5985 | else |
71a94577 ZW |
5986 | echo "configure: failed program was:" >&5 |
5987 | cat conftest.$ac_ext >&5 | |
ab87f8c8 | 5988 | fi |
71a94577 ZW |
5989 | rm -f conftest* |
5990 | LIBS="$am_save_LIBS" | |
5991 | fi | |
5992 | ||
ab87f8c8 JL |
5993 | fi |
5994 | ||
71a94577 ZW |
5995 | echo "$ac_t""$am_cv_func_iconv" 1>&6 |
5996 | if test "$am_cv_func_iconv" = yes; then | |
5997 | cat >> confdefs.h <<\EOF | |
5998 | #define HAVE_ICONV 1 | |
5999 | EOF | |
6000 | ||
6001 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 | |
9118405f | 6002 | echo "configure:6003: checking for iconv declaration" >&5 |
71a94577 ZW |
6003 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
6004 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6005 | else |
71a94577 ZW |
6006 | |
6007 | cat > conftest.$ac_ext <<EOF | |
9118405f | 6008 | #line 6009 "configure" |
71a94577 | 6009 | #include "confdefs.h" |
ab87f8c8 | 6010 | |
71a94577 ZW |
6011 | #include <stdlib.h> |
6012 | #include <iconv.h> | |
6013 | extern | |
6014 | #ifdef __cplusplus | |
6015 | "C" | |
6016 | #endif | |
6017 | #if defined(__STDC__) || defined(__cplusplus) | |
6018 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
6019 | #else | |
6020 | size_t iconv(); | |
6021 | #endif | |
ab87f8c8 | 6022 | |
71a94577 | 6023 | int main() { |
380a627a | 6024 | |
71a94577 | 6025 | ; return 0; } |
ab87f8c8 | 6026 | EOF |
9118405f | 6027 | if { (eval echo configure:6028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
71a94577 ZW |
6028 | rm -rf conftest* |
6029 | am_cv_proto_iconv_arg1="" | |
ab87f8c8 | 6030 | else |
71a94577 ZW |
6031 | echo "configure: failed program was:" >&5 |
6032 | cat conftest.$ac_ext >&5 | |
6033 | rm -rf conftest* | |
6034 | am_cv_proto_iconv_arg1="const" | |
ab87f8c8 | 6035 | fi |
71a94577 ZW |
6036 | rm -f conftest* |
6037 | 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 | 6038 | fi |
71a94577 ZW |
6039 | |
6040 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
6041 | echo "$ac_t""${ac_t:- | |
6042 | }$am_cv_proto_iconv" 1>&6 | |
6043 | cat >> confdefs.h <<EOF | |
6044 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
6045 | EOF | |
6046 | ||
6047 | fi | |
6048 | LIBICONV= | |
6049 | if test "$am_cv_lib_iconv" = yes; then | |
b7f2fb96 | 6050 | LIBICONV="$am_cv_lib_iconv_ldpath -liconv" |
71a94577 ZW |
6051 | fi |
6052 | ||
6053 | ||
6054 | ||
6055 | echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6 | |
9118405f | 6056 | echo "configure:6057: checking for nl_langinfo and CODESET" >&5 |
71a94577 | 6057 | if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then |
ab87f8c8 JL |
6058 | echo $ac_n "(cached) $ac_c" 1>&6 |
6059 | else | |
6060 | cat > conftest.$ac_ext <<EOF | |
9118405f | 6061 | #line 6062 "configure" |
ab87f8c8 | 6062 | #include "confdefs.h" |
71a94577 | 6063 | #include <langinfo.h> |
ab87f8c8 | 6064 | int main() { |
71a94577 | 6065 | char* cs = nl_langinfo(CODESET); |
ab87f8c8 JL |
6066 | ; return 0; } |
6067 | EOF | |
9118405f | 6068 | if { (eval echo configure:6069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 6069 | rm -rf conftest* |
71a94577 | 6070 | am_cv_langinfo_codeset=yes |
ab87f8c8 JL |
6071 | else |
6072 | echo "configure: failed program was:" >&5 | |
6073 | cat conftest.$ac_ext >&5 | |
6074 | rm -rf conftest* | |
71a94577 | 6075 | am_cv_langinfo_codeset=no |
ab87f8c8 JL |
6076 | fi |
6077 | rm -f conftest* | |
71a94577 | 6078 | |
ab87f8c8 JL |
6079 | fi |
6080 | ||
71a94577 ZW |
6081 | echo "$ac_t""$am_cv_langinfo_codeset" 1>&6 |
6082 | if test $am_cv_langinfo_codeset = yes; then | |
6083 | cat >> confdefs.h <<\EOF | |
6084 | #define HAVE_LANGINFO_CODESET 1 | |
ab87f8c8 | 6085 | EOF |
ab87f8c8 | 6086 | |
71a94577 ZW |
6087 | fi |
6088 | ||
6089 | if test $ac_cv_header_locale_h = yes; then | |
6090 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
9118405f | 6091 | echo "configure:6092: checking for LC_MESSAGES" >&5 |
71a94577 | 6092 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
ab87f8c8 JL |
6093 | echo $ac_n "(cached) $ac_c" 1>&6 |
6094 | else | |
71a94577 | 6095 | cat > conftest.$ac_ext <<EOF |
9118405f | 6096 | #line 6097 "configure" |
71a94577 ZW |
6097 | #include "confdefs.h" |
6098 | #include <locale.h> | |
6099 | int main() { | |
6100 | return LC_MESSAGES | |
6101 | ; return 0; } | |
6102 | EOF | |
9118405f | 6103 | if { (eval echo configure:6104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
71a94577 ZW |
6104 | rm -rf conftest* |
6105 | am_cv_val_LC_MESSAGES=yes | |
6106 | else | |
6107 | echo "configure: failed program was:" >&5 | |
6108 | cat conftest.$ac_ext >&5 | |
6109 | rm -rf conftest* | |
6110 | am_cv_val_LC_MESSAGES=no | |
6111 | fi | |
6112 | rm -f conftest* | |
6113 | fi | |
6114 | ||
6115 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
6116 | if test $am_cv_val_LC_MESSAGES = yes; then | |
6117 | cat >> confdefs.h <<\EOF | |
6118 | #define HAVE_LC_MESSAGES 1 | |
6119 | EOF | |
6120 | ||
ab87f8c8 | 6121 | fi |
71a94577 ZW |
6122 | fi |
6123 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
9118405f | 6124 | echo "configure:6125: checking whether NLS is requested" >&5 |
71a94577 ZW |
6125 | # Check whether --enable-nls or --disable-nls was given. |
6126 | if test "${enable_nls+set}" = set; then | |
6127 | enableval="$enable_nls" | |
6128 | USE_NLS=$enableval | |
6129 | else | |
6130 | USE_NLS=yes | |
ab87f8c8 | 6131 | fi |
71a94577 ZW |
6132 | |
6133 | echo "$ac_t""$USE_NLS" 1>&6 | |
6134 | ||
6135 | ||
6136 | BUILD_INCLUDED_LIBINTL=no | |
6137 | USE_INCLUDED_LIBINTL=no | |
6138 | INTLLIBS= | |
77c06844 | 6139 | INTLDEPS= |
71a94577 ZW |
6140 | |
6141 | if test "$USE_NLS" = "yes"; then | |
6142 | cat >> confdefs.h <<\EOF | |
6143 | #define ENABLE_NLS 1 | |
6144 | EOF | |
6145 | ||
6146 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
9118405f | 6147 | echo "configure:6148: checking whether included gettext is requested" >&5 |
71a94577 ZW |
6148 | # Check whether --with-included-gettext or --without-included-gettext was given. |
6149 | if test "${with_included_gettext+set}" = set; then | |
6150 | withval="$with_included_gettext" | |
6151 | nls_cv_force_use_gnu_gettext=$withval | |
ab87f8c8 | 6152 | else |
71a94577 | 6153 | nls_cv_force_use_gnu_gettext=no |
ab87f8c8 JL |
6154 | fi |
6155 | ||
71a94577 ZW |
6156 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 |
6157 | ||
6158 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
6159 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
6160 | CATOBJEXT=NONE | |
6161 | ||
6162 | ||
6163 | ||
6164 | ||
6165 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
6166 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
9118405f | 6167 | echo "configure:6168: checking for libintl.h" >&5 |
71a94577 | 6168 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
ab87f8c8 JL |
6169 | echo $ac_n "(cached) $ac_c" 1>&6 |
6170 | else | |
71a94577 | 6171 | cat > conftest.$ac_ext <<EOF |
9118405f | 6172 | #line 6173 "configure" |
71a94577 ZW |
6173 | #include "confdefs.h" |
6174 | #include <libintl.h> | |
6175 | EOF | |
6176 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
9118405f | 6177 | { (eval echo configure:6178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
71a94577 ZW |
6178 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6179 | if test -z "$ac_err"; then | |
6180 | rm -rf conftest* | |
6181 | eval "ac_cv_header_$ac_safe=yes" | |
ab87f8c8 | 6182 | else |
71a94577 ZW |
6183 | echo "$ac_err" >&5 |
6184 | echo "configure: failed program was:" >&5 | |
6185 | cat conftest.$ac_ext >&5 | |
6186 | rm -rf conftest* | |
6187 | eval "ac_cv_header_$ac_safe=no" | |
ab87f8c8 | 6188 | fi |
71a94577 ZW |
6189 | rm -f conftest* |
6190 | fi | |
6191 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
6192 | echo "$ac_t""yes" 1>&6 | |
191bf464 ZW |
6193 | cat >> confdefs.h <<\EOF |
6194 | #define HAVE_LIBINTL_H 1 | |
6195 | EOF | |
6196 | ||
6197 | echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6 | |
9118405f | 6198 | echo "configure:6199: checking for GNU gettext in libc" >&5 |
71a94577 ZW |
6199 | if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then |
6200 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6201 | else | |
6202 | cat > conftest.$ac_ext <<EOF | |
9118405f | 6203 | #line 6204 "configure" |
ab87f8c8 | 6204 | #include "confdefs.h" |
71a94577 | 6205 | #include <libintl.h> |
ab87f8c8 | 6206 | extern int _nl_msg_cat_cntr; |
71a94577 ZW |
6207 | int main() { |
6208 | bindtextdomain ("", ""); | |
6209 | return (int) gettext ("") + _nl_msg_cat_cntr | |
ab87f8c8 JL |
6210 | ; return 0; } |
6211 | EOF | |
9118405f | 6212 | if { (eval echo configure:6213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 6213 | rm -rf conftest* |
71a94577 | 6214 | gt_cv_func_gnugettext1_libc=yes |
ab87f8c8 JL |
6215 | else |
6216 | echo "configure: failed program was:" >&5 | |
6217 | cat conftest.$ac_ext >&5 | |
6218 | rm -rf conftest* | |
71a94577 | 6219 | gt_cv_func_gnugettext1_libc=no |
ab87f8c8 JL |
6220 | fi |
6221 | rm -f conftest* | |
ab87f8c8 JL |
6222 | fi |
6223 | ||
71a94577 | 6224 | echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6 |
ab87f8c8 | 6225 | |
71a94577 ZW |
6226 | if test "$gt_cv_func_gnugettext1_libc" != "yes"; then |
6227 | echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6 | |
9118405f | 6228 | echo "configure:6229: checking for GNU gettext in libintl" >&5 |
71a94577 | 6229 | if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then |
ab87f8c8 JL |
6230 | echo $ac_n "(cached) $ac_c" 1>&6 |
6231 | else | |
71a94577 ZW |
6232 | gt_save_LIBS="$LIBS" |
6233 | LIBS="$LIBS -lintl $LIBICONV" | |
6234 | cat > conftest.$ac_ext <<EOF | |
9118405f | 6235 | #line 6236 "configure" |
ab87f8c8 | 6236 | #include "confdefs.h" |
71a94577 ZW |
6237 | #include <libintl.h> |
6238 | extern int _nl_msg_cat_cntr; | |
ab87f8c8 | 6239 | int main() { |
71a94577 ZW |
6240 | bindtextdomain ("", ""); |
6241 | return (int) gettext ("") + _nl_msg_cat_cntr | |
ab87f8c8 JL |
6242 | ; return 0; } |
6243 | EOF | |
9118405f | 6244 | if { (eval echo configure:6245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 6245 | rm -rf conftest* |
71a94577 | 6246 | gt_cv_func_gnugettext1_libintl=yes |
ab87f8c8 JL |
6247 | else |
6248 | echo "configure: failed program was:" >&5 | |
6249 | cat conftest.$ac_ext >&5 | |
6250 | rm -rf conftest* | |
71a94577 | 6251 | gt_cv_func_gnugettext1_libintl=no |
ab87f8c8 JL |
6252 | fi |
6253 | rm -f conftest* | |
71a94577 | 6254 | LIBS="$gt_save_LIBS" |
ab87f8c8 | 6255 | fi |
71a94577 ZW |
6256 | |
6257 | echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6 | |
6258 | fi | |
6259 | ||
6260 | if test "$gt_cv_func_gnugettext1_libc" = "yes" \ | |
6261 | || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \ | |
6262 | && test "$PACKAGE" != gettext; }; then | |
6263 | cat >> confdefs.h <<\EOF | |
6264 | #define HAVE_GETTEXT 1 | |
ab87f8c8 JL |
6265 | EOF |
6266 | ||
ab87f8c8 | 6267 | |
71a94577 ZW |
6268 | if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then |
6269 | INTLLIBS="-lintl $LIBICONV" | |
6270 | fi | |
ab87f8c8 | 6271 | |
71a94577 ZW |
6272 | gt_save_LIBS="$LIBS" |
6273 | LIBS="$LIBS $INTLLIBS" | |
6274 | for ac_func in dcgettext | |
6275 | do | |
6276 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
9118405f | 6277 | echo "configure:6278: checking for $ac_func" >&5 |
71a94577 | 6278 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
ab87f8c8 JL |
6279 | echo $ac_n "(cached) $ac_c" 1>&6 |
6280 | else | |
6281 | cat > conftest.$ac_ext <<EOF | |
9118405f | 6282 | #line 6283 "configure" |
ab87f8c8 JL |
6283 | #include "confdefs.h" |
6284 | /* System header to define __stub macros and hopefully few prototypes, | |
71a94577 | 6285 | which can conflict with char $ac_func(); below. */ |
ab87f8c8 JL |
6286 | #include <assert.h> |
6287 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6288 | /* We use char because int might match the return type of a gcc2 | |
6289 | builtin and then its argument prototype would still apply. */ | |
71a94577 | 6290 | char $ac_func(); |
ab87f8c8 JL |
6291 | |
6292 | int main() { | |
6293 | ||
6294 | /* The GNU C library defines this for functions which it implements | |
6295 | to always fail with ENOSYS. Some functions are actually named | |
6296 | something starting with __ and the normal name is an alias. */ | |
71a94577 | 6297 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
ab87f8c8 JL |
6298 | choke me |
6299 | #else | |
71a94577 | 6300 | $ac_func(); |
ab87f8c8 JL |
6301 | #endif |
6302 | ||
6303 | ; return 0; } | |
6304 | EOF | |
9118405f | 6305 | if { (eval echo configure:6306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 | 6306 | rm -rf conftest* |
71a94577 | 6307 | eval "ac_cv_func_$ac_func=yes" |
ab87f8c8 JL |
6308 | else |
6309 | echo "configure: failed program was:" >&5 | |
6310 | cat conftest.$ac_ext >&5 | |
6311 | rm -rf conftest* | |
71a94577 | 6312 | eval "ac_cv_func_$ac_func=no" |
ab87f8c8 JL |
6313 | fi |
6314 | rm -f conftest* | |
6315 | fi | |
6316 | ||
71a94577 | 6317 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
ab87f8c8 | 6318 | echo "$ac_t""yes" 1>&6 |
71a94577 ZW |
6319 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
6320 | cat >> confdefs.h <<EOF | |
6321 | #define $ac_tr_func 1 | |
ab87f8c8 | 6322 | EOF |
71a94577 ZW |
6323 | |
6324 | else | |
6325 | echo "$ac_t""no" 1>&6 | |
6326 | fi | |
6327 | done | |
ab87f8c8 | 6328 | |
71a94577 ZW |
6329 | LIBS="$gt_save_LIBS" |
6330 | ||
6331 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
6332 | set dummy msgfmt; ac_word=$2 | |
ab87f8c8 | 6333 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
9118405f | 6334 | echo "configure:6335: checking for $ac_word" >&5 |
71a94577 | 6335 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
ab87f8c8 JL |
6336 | echo $ac_n "(cached) $ac_c" 1>&6 |
6337 | else | |
71a94577 | 6338 | case "$MSGFMT" in |
ab87f8c8 | 6339 | /*) |
71a94577 | 6340 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6341 | ;; |
6342 | *) | |
71a94577 ZW |
6343 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
6344 | for ac_dir in $PATH; do | |
ab87f8c8 JL |
6345 | test -z "$ac_dir" && ac_dir=. |
6346 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6347 | if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then |
6348 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
6349 | break | |
6350 | fi | |
ab87f8c8 JL |
6351 | fi |
6352 | done | |
6353 | IFS="$ac_save_ifs" | |
71a94577 | 6354 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" |
ab87f8c8 JL |
6355 | ;; |
6356 | esac | |
6357 | fi | |
71a94577 ZW |
6358 | MSGFMT="$ac_cv_path_MSGFMT" |
6359 | if test "$MSGFMT" != ":"; then | |
6360 | echo "$ac_t""$MSGFMT" 1>&6 | |
ab87f8c8 JL |
6361 | else |
6362 | echo "$ac_t""no" 1>&6 | |
6363 | fi | |
71a94577 ZW |
6364 | |
6365 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
ab87f8c8 JL |
6366 | set dummy gmsgfmt; ac_word=$2 |
6367 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
9118405f | 6368 | echo "configure:6369: checking for $ac_word" >&5 |
71a94577 | 6369 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
ab87f8c8 JL |
6370 | echo $ac_n "(cached) $ac_c" 1>&6 |
6371 | else | |
6372 | case "$GMSGFMT" in | |
6373 | /*) | |
71a94577 | 6374 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6375 | ;; |
6376 | ?:/*) | |
71a94577 | 6377 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. |
ab87f8c8 JL |
6378 | ;; |
6379 | *) | |
cd9e5e7c | 6380 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
6381 | ac_dummy="$PATH" |
6382 | for ac_dir in $ac_dummy; do | |
ab87f8c8 JL |
6383 | test -z "$ac_dir" && ac_dir=. |
6384 | if test -f $ac_dir/$ac_word; then | |
71a94577 | 6385 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" |
ab87f8c8 JL |
6386 | break |
6387 | fi | |
6388 | done | |
6389 | IFS="$ac_save_ifs" | |
71a94577 | 6390 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" |
ab87f8c8 JL |
6391 | ;; |
6392 | esac | |
6393 | fi | |
71a94577 | 6394 | GMSGFMT="$ac_cv_path_GMSGFMT" |
ab87f8c8 JL |
6395 | if test -n "$GMSGFMT"; then |
6396 | echo "$ac_t""$GMSGFMT" 1>&6 | |
6397 | else | |
6398 | echo "$ac_t""no" 1>&6 | |
6399 | fi | |
6400 | ||
ab87f8c8 | 6401 | |
71a94577 | 6402 | # Extract the first word of "xgettext", so it can be a program name with args. |
ab87f8c8 JL |
6403 | set dummy xgettext; ac_word=$2 |
6404 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
9118405f | 6405 | echo "configure:6406: checking for $ac_word" >&5 |
71a94577 | 6406 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
ab87f8c8 JL |
6407 | echo $ac_n "(cached) $ac_c" 1>&6 |
6408 | else | |
6409 | case "$XGETTEXT" in | |
6410 | /*) | |
71a94577 | 6411 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. |
ab87f8c8 JL |
6412 | ;; |
6413 | *) | |
6414 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6415 | for ac_dir in $PATH; do | |
6416 | test -z "$ac_dir" && ac_dir=. | |
6417 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6418 | if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then |
6419 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
ab87f8c8 JL |
6420 | break |
6421 | fi | |
6422 | fi | |
6423 | done | |
6424 | IFS="$ac_save_ifs" | |
71a94577 | 6425 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" |
ab87f8c8 JL |
6426 | ;; |
6427 | esac | |
6428 | fi | |
71a94577 ZW |
6429 | XGETTEXT="$ac_cv_path_XGETTEXT" |
6430 | if test "$XGETTEXT" != ":"; then | |
ab87f8c8 JL |
6431 | echo "$ac_t""$XGETTEXT" 1>&6 |
6432 | else | |
6433 | echo "$ac_t""no" 1>&6 | |
6434 | fi | |
6435 | ||
71a94577 ZW |
6436 | |
6437 | CATOBJEXT=.gmo | |
6438 | fi | |
6439 | ||
ab87f8c8 JL |
6440 | else |
6441 | echo "$ac_t""no" 1>&6 | |
6442 | fi | |
6443 | ||
ab87f8c8 JL |
6444 | |
6445 | if test "$CATOBJEXT" = "NONE"; then | |
6446 | nls_cv_use_gnu_gettext=yes | |
6447 | fi | |
6448 | fi | |
6449 | ||
6450 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
6451 | INTLOBJS="\$(GETTOBJS)" | |
6452 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
6453 | set dummy msgfmt; ac_word=$2 | |
6454 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
9118405f | 6455 | echo "configure:6456: checking for $ac_word" >&5 |
71a94577 | 6456 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
ab87f8c8 JL |
6457 | echo $ac_n "(cached) $ac_c" 1>&6 |
6458 | else | |
6459 | case "$MSGFMT" in | |
6460 | /*) | |
71a94577 | 6461 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6462 | ;; |
6463 | *) | |
6464 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6465 | for ac_dir in $PATH; do | |
6466 | test -z "$ac_dir" && ac_dir=. | |
6467 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6468 | if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then |
6469 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
ab87f8c8 JL |
6470 | break |
6471 | fi | |
6472 | fi | |
6473 | done | |
6474 | IFS="$ac_save_ifs" | |
71a94577 | 6475 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" |
ab87f8c8 JL |
6476 | ;; |
6477 | esac | |
6478 | fi | |
71a94577 ZW |
6479 | MSGFMT="$ac_cv_path_MSGFMT" |
6480 | if test "$MSGFMT" != ":"; then | |
ab87f8c8 JL |
6481 | echo "$ac_t""$MSGFMT" 1>&6 |
6482 | else | |
6483 | echo "$ac_t""no" 1>&6 | |
6484 | fi | |
6485 | ||
6486 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
6487 | set dummy gmsgfmt; ac_word=$2 | |
6488 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
9118405f | 6489 | echo "configure:6490: checking for $ac_word" >&5 |
71a94577 | 6490 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
ab87f8c8 JL |
6491 | echo $ac_n "(cached) $ac_c" 1>&6 |
6492 | else | |
6493 | case "$GMSGFMT" in | |
6494 | /*) | |
71a94577 | 6495 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6496 | ;; |
6497 | ?:/*) | |
71a94577 | 6498 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. |
ab87f8c8 JL |
6499 | ;; |
6500 | *) | |
cd9e5e7c | 6501 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
6502 | ac_dummy="$PATH" |
6503 | for ac_dir in $ac_dummy; do | |
ab87f8c8 JL |
6504 | test -z "$ac_dir" && ac_dir=. |
6505 | if test -f $ac_dir/$ac_word; then | |
71a94577 | 6506 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" |
ab87f8c8 JL |
6507 | break |
6508 | fi | |
6509 | done | |
6510 | IFS="$ac_save_ifs" | |
71a94577 | 6511 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" |
ab87f8c8 JL |
6512 | ;; |
6513 | esac | |
6514 | fi | |
71a94577 | 6515 | GMSGFMT="$ac_cv_path_GMSGFMT" |
ab87f8c8 JL |
6516 | if test -n "$GMSGFMT"; then |
6517 | echo "$ac_t""$GMSGFMT" 1>&6 | |
6518 | else | |
6519 | echo "$ac_t""no" 1>&6 | |
6520 | fi | |
6521 | ||
6522 | # Extract the first word of "xgettext", so it can be a program name with args. | |
6523 | set dummy xgettext; ac_word=$2 | |
6524 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
9118405f | 6525 | echo "configure:6526: checking for $ac_word" >&5 |
71a94577 | 6526 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
ab87f8c8 JL |
6527 | echo $ac_n "(cached) $ac_c" 1>&6 |
6528 | else | |
6529 | case "$XGETTEXT" in | |
6530 | /*) | |
71a94577 | 6531 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. |
ab87f8c8 JL |
6532 | ;; |
6533 | *) | |
6534 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6535 | for ac_dir in $PATH; do | |
6536 | test -z "$ac_dir" && ac_dir=. | |
6537 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6538 | if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then |
6539 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
ab87f8c8 JL |
6540 | break |
6541 | fi | |
6542 | fi | |
6543 | done | |
6544 | IFS="$ac_save_ifs" | |
71a94577 | 6545 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" |
ab87f8c8 JL |
6546 | ;; |
6547 | esac | |
6548 | fi | |
71a94577 ZW |
6549 | XGETTEXT="$ac_cv_path_XGETTEXT" |
6550 | if test "$XGETTEXT" != ":"; then | |
ab87f8c8 JL |
6551 | echo "$ac_t""$XGETTEXT" 1>&6 |
6552 | else | |
6553 | echo "$ac_t""no" 1>&6 | |
6554 | fi | |
6555 | ||
6556 | ||
71a94577 | 6557 | BUILD_INCLUDED_LIBINTL=yes |
ab87f8c8 JL |
6558 | USE_INCLUDED_LIBINTL=yes |
6559 | CATOBJEXT=.gmo | |
71a94577 | 6560 | INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV" |
77c06844 | 6561 | INTLDEPS="\$(top_builddir)/intl/libintl.a" |
71a94577 ZW |
6562 | LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` |
6563 | fi | |
6564 | ||
6565 | if test "$GMSGFMT" != ":"; then | |
6566 | if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then | |
6567 | : ; | |
6568 | else | |
6569 | echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6 | |
6570 | GMSGFMT=":" | |
6571 | fi | |
ab87f8c8 JL |
6572 | fi |
6573 | ||
71a94577 ZW |
6574 | if test "$XGETTEXT" != ":"; then |
6575 | if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then | |
ab87f8c8 JL |
6576 | : ; |
6577 | else | |
6578 | echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6 | |
6579 | XGETTEXT=":" | |
6580 | fi | |
6581 | fi | |
6582 | ||
71a94577 ZW |
6583 | POSUB=po |
6584 | fi | |
6585 | ||
17297c41 PT |
6586 | |
6587 | ||
71a94577 ZW |
6588 | if test "$PACKAGE" = gettext; then |
6589 | BUILD_INCLUDED_LIBINTL=yes | |
ab87f8c8 | 6590 | fi |
ab87f8c8 | 6591 | |
71a94577 ZW |
6592 | for ac_prog in bison |
6593 | do | |
6594 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
6595 | set dummy $ac_prog; ac_word=$2 | |
6596 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
9118405f | 6597 | echo "configure:6598: checking for $ac_word" >&5 |
71a94577 ZW |
6598 | if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then |
6599 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6600 | else | |
6601 | if test -n "$INTLBISON"; then | |
6602 | ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test. | |
6603 | else | |
6604 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
6605 | ac_dummy="$PATH" | |
6606 | for ac_dir in $ac_dummy; do | |
6607 | test -z "$ac_dir" && ac_dir=. | |
6608 | if test -f $ac_dir/$ac_word; then | |
6609 | ac_cv_prog_INTLBISON="$ac_prog" | |
6610 | break | |
6611 | fi | |
6612 | done | |
6613 | IFS="$ac_save_ifs" | |
6614 | fi | |
6615 | fi | |
6616 | INTLBISON="$ac_cv_prog_INTLBISON" | |
6617 | if test -n "$INTLBISON"; then | |
6618 | echo "$ac_t""$INTLBISON" 1>&6 | |
6619 | else | |
6620 | echo "$ac_t""no" 1>&6 | |
6621 | fi | |
6622 | ||
6623 | test -n "$INTLBISON" && break | |
6624 | done | |
ab87f8c8 | 6625 | |
71a94577 ZW |
6626 | if test -z "$INTLBISON"; then |
6627 | ac_verc_fail=yes | |
6628 | else | |
6629 | echo $ac_n "checking version of bison""... $ac_c" 1>&6 | |
9118405f | 6630 | echo "configure:6631: checking version of bison" >&5 |
71a94577 ZW |
6631 | ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` |
6632 | case $ac_prog_version in | |
6633 | '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; | |
6634 | 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) | |
6635 | ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; | |
6636 | *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; | |
6637 | esac | |
6638 | echo "$ac_t""$ac_prog_version" 1>&6 | |
6639 | fi | |
6640 | if test $ac_verc_fail = yes; then | |
6641 | INTLBISON=: | |
ab87f8c8 JL |
6642 | fi |
6643 | ||
ab87f8c8 | 6644 | |
9f6682b7 | 6645 | |
ab87f8c8 JL |
6646 | |
6647 | ||
6648 | ||
6649 | ||
6650 | ||
6651 | ||
77c06844 | 6652 | |
191bf464 ZW |
6653 | if test $USE_INCLUDED_LIBINTL = yes; then |
6654 | cat >> confdefs.h <<\EOF | |
6655 | #define USE_INCLUDED_LIBINTL 1 | |
6656 | EOF | |
6657 | ||
6658 | fi | |
71a94577 ZW |
6659 | |
6660 | nls_cv_header_intl= | |
6661 | nls_cv_header_libgt= | |
6662 | ||
6663 | DATADIRNAME=share | |
ab87f8c8 | 6664 | |
71a94577 ZW |
6665 | |
6666 | INSTOBJEXT=.mo | |
ab87f8c8 | 6667 | |
ab87f8c8 | 6668 | |
71a94577 ZW |
6669 | GENCAT=gencat |
6670 | ||
6671 | ||
9fdf713f | 6672 | |
9f6682b7 ZW |
6673 | if test "x$CATOBJEXT" != x; then |
6674 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
9118405f | 6675 | echo "configure:6676: checking for catalogs to be installed" >&5 |
9f6682b7 ZW |
6676 | # Look for .po and .gmo files in the source directory. |
6677 | CATALOGS= | |
6678 | XLINGUAS= | |
6679 | for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do | |
6680 | # If there aren't any .gmo files the shell will give us the | |
6681 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
6682 | # weeded out. | |
6683 | case "$cat" in *\**) | |
6684 | continue;; | |
6685 | esac | |
6686 | # The quadruple backslash is collapsed to a double backslash | |
6687 | # by the backticks, then collapsed again by the double quotes, | |
6688 | # leaving us with one backslash in the sed expression (right | |
6689 | # before the dot that mustn't act as a wildcard). The dot to | |
6690 | # be escaped in the second expression is hiding inside CATOBJEXT. | |
6691 | cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"` | |
6692 | lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"` | |
6693 | # The user is allowed to set LINGUAS to a list of languages to | |
6694 | # install catalogs for. If it's empty that means "all of them." | |
6695 | if test "x$LINGUAS" = x; then | |
6696 | CATALOGS="$CATALOGS $cat" | |
6697 | XLINGUAS="$XLINGUAS $lang" | |
6698 | else | |
6699 | case "$LINGUAS" in *$lang*) | |
6700 | CATALOGS="$CATALOGS $cat" | |
6701 | XLINGUAS="$XLINGUAS $lang" | |
6702 | ;; | |
6703 | esac | |
6704 | fi | |
6705 | done | |
6706 | LINGUAS="$XLINGUAS" | |
6707 | echo "$ac_t""$LINGUAS" 1>&6 | |
ab87f8c8 JL |
6708 | fi |
6709 | ||
ab87f8c8 JL |
6710 | MKINSTALLDIRS= |
6711 | if test -n "$ac_aux_dir"; then | |
6712 | MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" | |
6713 | fi | |
6714 | if test -z "$MKINSTALLDIRS"; then | |
6715 | MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" | |
6716 | fi | |
6717 | ||
6718 | ||
71a94577 | 6719 | INTL_LIBTOOL_SUFFIX_PREFIX= |
ab87f8c8 | 6720 | |
ab87f8c8 | 6721 | |
ab87f8c8 | 6722 | |
f4ab28e3 MK |
6723 | # Windows32 Registry support for specifying GCC installation paths. |
6724 | # Check whether --enable-win32-registry or --disable-win32-registry was given. | |
6725 | if test "${enable_win32_registry+set}" = set; then | |
6726 | enableval="$enable_win32_registry" | |
6727 | : | |
6728 | fi | |
6729 | ||
4e70264f ZW |
6730 | case $host_os in |
6731 | win32 | pe | cygwin* | mingw32* | uwin*) | |
f4ab28e3 | 6732 | echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6 |
9118405f | 6733 | echo "configure:6734: checking whether windows registry support is requested" >&5 |
9dd53f2c | 6734 | if test "x$enable_win32_registry" != xno; then |
f4ab28e3 MK |
6735 | cat >> confdefs.h <<\EOF |
6736 | #define ENABLE_WIN32_REGISTRY 1 | |
6737 | EOF | |
6738 | ||
6739 | echo "$ac_t""yes" 1>&6 | |
4e70264f ZW |
6740 | |
6741 | echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6 | |
9118405f | 6742 | echo "configure:6743: checking for library containing RegOpenKeyExA" >&5 |
4e70264f ZW |
6743 | if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then |
6744 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6745 | else | |
6746 | ac_func_search_save_LIBS="$LIBS" | |
6747 | ac_cv_search_RegOpenKeyExA="no" | |
6748 | cat > conftest.$ac_ext <<EOF | |
9118405f | 6749 | #line 6750 "configure" |
4e70264f ZW |
6750 | #include "confdefs.h" |
6751 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6752 | /* We use char because int might match the return type of a gcc2 | |
6753 | builtin and then its argument prototype would still apply. */ | |
6754 | char RegOpenKeyExA(); | |
6755 | ||
6756 | int main() { | |
6757 | RegOpenKeyExA() | |
6758 | ; return 0; } | |
6759 | EOF | |
9118405f | 6760 | if { (eval echo configure:6761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4e70264f ZW |
6761 | rm -rf conftest* |
6762 | ac_cv_search_RegOpenKeyExA="none required" | |
6763 | else | |
6764 | echo "configure: failed program was:" >&5 | |
6765 | cat conftest.$ac_ext >&5 | |
6766 | fi | |
6767 | rm -f conftest* | |
6768 | test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do | |
6769 | LIBS="-l$i $ac_func_search_save_LIBS" | |
6770 | cat > conftest.$ac_ext <<EOF | |
9118405f | 6771 | #line 6772 "configure" |
4e70264f ZW |
6772 | #include "confdefs.h" |
6773 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6774 | /* We use char because int might match the return type of a gcc2 | |
6775 | builtin and then its argument prototype would still apply. */ | |
6776 | char RegOpenKeyExA(); | |
6777 | ||
6778 | int main() { | |
6779 | RegOpenKeyExA() | |
6780 | ; return 0; } | |
6781 | EOF | |
9118405f | 6782 | if { (eval echo configure:6783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4e70264f ZW |
6783 | rm -rf conftest* |
6784 | ac_cv_search_RegOpenKeyExA="-l$i" | |
6785 | break | |
6786 | else | |
6787 | echo "configure: failed program was:" >&5 | |
6788 | cat conftest.$ac_ext >&5 | |
6789 | fi | |
6790 | rm -f conftest* | |
6791 | done | |
6792 | LIBS="$ac_func_search_save_LIBS" | |
6793 | fi | |
6794 | ||
6795 | echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6 | |
6796 | if test "$ac_cv_search_RegOpenKeyExA" != "no"; then | |
6797 | test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS" | |
6798 | ||
6799 | else : | |
6800 | ||
6801 | fi | |
f4ab28e3 MK |
6802 | else |
6803 | echo "$ac_t""no" 1>&6 | |
6804 | fi | |
6805 | ||
6806 | # Check if user specified a different registry key. | |
9dd53f2c | 6807 | case "x${enable_win32_registry}" in |
f4ab28e3 MK |
6808 | x | xyes) |
6809 | # default. | |
6810 | gcc_cv_win32_registry_key="$VERSION" | |
6811 | ;; | |
6812 | xno) | |
6813 | # no registry lookup. | |
6814 | gcc_cv_win32_registry_key='' | |
6815 | ;; | |
6816 | *) | |
6817 | # user-specified key. | |
6818 | gcc_cv_win32_registry_key="$enable_win32_registry" | |
6819 | ;; | |
6820 | esac | |
6821 | ||
9dd53f2c | 6822 | if test "x$enable_win32_registry" != xno; then |
f4ab28e3 | 6823 | echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6 |
9118405f | 6824 | echo "configure:6825: checking registry key on windows hosts" >&5 |
f4ab28e3 MK |
6825 | cat >> confdefs.h <<EOF |
6826 | #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key" | |
6827 | EOF | |
6828 | ||
6829 | echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6 | |
6830 | fi | |
4e70264f ZW |
6831 | ;; |
6832 | esac | |
f4ab28e3 | 6833 | |
ab87f8c8 | 6834 | # Get an absolute path to the GCC top-level source directory |
1e6347d8 | 6835 | holddir=`${PWDCMD-pwd}` |
ab87f8c8 | 6836 | cd $srcdir |
1e6347d8 | 6837 | topdir=`${PWDCMD-pwd}` |
ab87f8c8 JL |
6838 | cd $holddir |
6839 | ||
6840 | # Conditionalize the makefile for this host machine. | |
6841 | # Make-host contains the concatenation of all host makefile fragments | |
6842 | # [there can be more than one]. This file is built by configure.frag. | |
6843 | host_overrides=Make-host | |
6844 | dep_host_xmake_file= | |
6845 | for f in .. ${host_xmake_file} | |
6846 | do | |
6847 | if test -f ${srcdir}/config/$f | |
6848 | then | |
6849 | dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f" | |
6850 | fi | |
6851 | done | |
6852 | ||
6853 | # Conditionalize the makefile for this target machine. | |
6854 | # Make-target contains the concatenation of all host makefile fragments | |
6855 | # [there can be more than one]. This file is built by configure.frag. | |
6856 | target_overrides=Make-target | |
6857 | dep_tmake_file= | |
6858 | for f in .. ${tmake_file} | |
6859 | do | |
6860 | if test -f ${srcdir}/config/$f | |
6861 | then | |
6862 | dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f" | |
6863 | fi | |
6864 | done | |
6865 | ||
6866 | # If the host doesn't support symlinks, modify CC in | |
6867 | # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. | |
6868 | # Otherwise, we can use "CC=$(CC)". | |
6869 | rm -f symtest.tem | |
6870 | if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null | |
6871 | then | |
6872 | cc_set_by_configure="\$(CC)" | |
5aa82ace | 6873 | quoted_cc_set_by_configure="\$(CC)" |
ab87f8c8 | 6874 | stage_prefix_set_by_configure="\$(STAGE_PREFIX)" |
596151e1 | 6875 | quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)" |
ab87f8c8 JL |
6876 | else |
6877 | rm -f symtest.tem | |
6878 | if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null | |
6879 | then | |
6880 | symbolic_link="cp -p" | |
6881 | else | |
6882 | symbolic_link="cp" | |
6883 | fi | |
6884 | cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" | |
5aa82ace | 6885 | quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`" |
ab87f8c8 | 6886 | stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" |
596151e1 | 6887 | quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`" |
ab87f8c8 JL |
6888 | fi |
6889 | rm -f symtest.tem | |
6890 | ||
6891 | out_object_file=`basename $out_file .c`.o | |
6892 | ||
6893 | tm_file_list= | |
6894 | for f in $tm_file; do | |
64ccbc99 | 6895 | case $f in |
d02af173 ZW |
6896 | ansidecl.h ) |
6897 | tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
6898 | defaults.h ) | |
e2500fed | 6899 | tm_file_list="${tm_file_list} \$(srcdir)/$f" ;; |
64ccbc99 KG |
6900 | *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;; |
6901 | esac | |
ab87f8c8 JL |
6902 | done |
6903 | ||
11642c3a ZW |
6904 | tm_p_file_list= |
6905 | for f in $tm_p_file; do | |
6906 | tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" | |
6907 | done | |
6908 | ||
ab87f8c8 JL |
6909 | host_xm_file_list= |
6910 | for f in $host_xm_file; do | |
64ccbc99 | 6911 | case $f in |
d02af173 ZW |
6912 | ansidecl.h ) |
6913 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
e2500fed | 6914 | auto-host.h ) |
64ccbc99 | 6915 | host_xm_file_list="${host_xm_file_list} $f" ;; |
e2500fed GK |
6916 | defaults.h ) |
6917 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;; | |
64ccbc99 KG |
6918 | *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;; |
6919 | esac | |
ab87f8c8 JL |
6920 | done |
6921 | ||
6922 | build_xm_file_list= | |
6923 | for f in $build_xm_file; do | |
64ccbc99 | 6924 | case $f in |
d02af173 ZW |
6925 | ansidecl.h ) |
6926 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
e2500fed | 6927 | auto-build.h | auto-host.h ) |
64ccbc99 | 6928 | build_xm_file_list="${build_xm_file_list} $f" ;; |
e2500fed GK |
6929 | defaults.h ) |
6930 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;; | |
64ccbc99 KG |
6931 | *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;; |
6932 | esac | |
ab87f8c8 JL |
6933 | done |
6934 | ||
a078a589 ZW |
6935 | # Define macro CROSS_COMPILE in compilation if this is a cross-compiler. |
6936 | # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR. | |
6937 | CROSS= | |
6938 | ALL=all.internal | |
6939 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
6940 | if test x$host != x$target |
6941 | then | |
a078a589 ZW |
6942 | CROSS="-DCROSS_COMPILE" |
6943 | ALL=all.cross | |
6944 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
343f59d9 AM |
6945 | case "$host","$target" in |
6946 | i?86-*-*,x86_64-*-* \ | |
6947 | | powerpc*-*-*,powerpc64*-*-*) | |
6948 | CROSS="$CROSS -DNATIVE_CROSS" ;; | |
6949 | esac | |
ab87f8c8 JL |
6950 | fi |
6951 | ||
b39d221a EC |
6952 | # If this is a cross-compiler that does not |
6953 | # have its own set of headers then define | |
6954 | # inhibit_libc | |
6955 | ||
fecd6201 ZW |
6956 | # If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS. |
6957 | # This prevents libgcc2 from containing any code which requires libc | |
6958 | # support. | |
b39d221a EC |
6959 | inhibit_libc= |
6960 | if test x$host != x$target && test x$with_headers = x; then | |
6961 | inhibit_libc=-Dinhibit_libc | |
6962 | else | |
6963 | if test x$with_newlib = xyes; then | |
6964 | inhibit_libc=-Dinhibit_libc | |
6965 | fi | |
6966 | fi | |
6967 | ||
6968 | ||
a078a589 ZW |
6969 | # When building gcc with a cross-compiler, we need to adjust things so |
6970 | # that the generator programs are still built with the native compiler. | |
6971 | # Also, we cannot run fixincludes or fix-header. | |
6972 | # Note that the terminology here is wrong; it should be BUILD_* throughout. | |
6973 | # FIXME. | |
6974 | ||
6975 | # These are the normal (build=host) settings: | |
5c35940c NN |
6976 | BUILD_PREFIX= |
6977 | BUILD_PREFIX_1=ignore- | |
a078a589 ZW |
6978 | HOST_CC='$(CC)' |
6979 | HOST_CFLAGS='$(ALL_CFLAGS)' | |
6980 | ||
6981 | STMP_FIXINC=stmp-fixinc | |
6982 | STMP_FIXPROTO=stmp-fixproto | |
6983 | ||
6984 | # And these apply if build != host. | |
ab87f8c8 JL |
6985 | if test x$build != x$host |
6986 | then | |
5c35940c NN |
6987 | BUILD_PREFIX=build- |
6988 | BUILD_PREFIX_1=build- | |
a078a589 ZW |
6989 | HOST_CC='$(CC_FOR_BUILD)' |
6990 | HOST_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)' | |
6991 | ||
6992 | STMP_FIXINC= | |
6993 | STMP_FIXPROTO= | |
ab87f8c8 JL |
6994 | fi |
6995 | ||
6996 | # Expand extra_headers to include complete path. | |
6997 | # This substitutes for lots of t-* files. | |
6998 | extra_headers_list= | |
6999 | if test "x$extra_headers" = x | |
7000 | then true | |
7001 | else | |
29f7a208 | 7002 | # Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers. |
ab87f8c8 JL |
7003 | for file in $extra_headers; |
7004 | do | |
29f7a208 | 7005 | extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}" |
ab87f8c8 JL |
7006 | done |
7007 | fi | |
7008 | ||
7009 | if test x$use_collect2 = xno; then | |
7010 | use_collect2= | |
7011 | fi | |
7012 | ||
7013 | # Add a definition of USE_COLLECT2 if system wants one. | |
2cc07db4 | 7014 | if test x$use_collect2 != x |
ab87f8c8 | 7015 | then |
2cc07db4 RH |
7016 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
7017 | xm_defines="${xm_defines} USE_COLLECT2" | |
ab87f8c8 JL |
7018 | fi |
7019 | ||
ab87f8c8 JL |
7020 | # If we have gas in the build tree, make a link to it. |
7021 | if test -f ../gas/Makefile; then | |
7022 | rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null | |
7023 | fi | |
7024 | ||
3cae5780 | 7025 | # If we have nm and objdump in the build tree, make a link to them. |
ab87f8c8 JL |
7026 | if test -f ../binutils/Makefile; then |
7027 | rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null | |
3cae5780 | 7028 | rm -f objdump; $symbolic_link ../binutils/objdump$host_exeext objdump$host_exeext 2>/dev/null |
ab87f8c8 JL |
7029 | fi |
7030 | ||
7031 | # If we have ld in the build tree, make a link to it. | |
7032 | if test -f ../ld/Makefile; then | |
2cc07db4 | 7033 | rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null |
ab87f8c8 JL |
7034 | fi |
7035 | ||
981d4858 JM |
7036 | # Figure out what assembler we will be using. |
7037 | echo $ac_n "checking what assembler to use""... $ac_c" 1>&6 | |
9118405f | 7038 | echo "configure:7039: checking what assembler to use" >&5 |
ab87f8c8 | 7039 | gcc_cv_as= |
981d4858 JM |
7040 | gcc_cv_gas_major_version= |
7041 | gcc_cv_gas_minor_version= | |
ab87f8c8 | 7042 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas |
0936a455 | 7043 | gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd |
ab87f8c8 JL |
7044 | if test -x "$DEFAULT_ASSEMBLER"; then |
7045 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
7046 | elif test -x "$AS"; then | |
7047 | gcc_cv_as="$AS" | |
7048 | elif test -x as$host_exeext; then | |
7049 | # Build using assembler in the current directory. | |
7050 | gcc_cv_as=./as$host_exeext | |
7051 | elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then | |
7052 | # Single tree build which includes gas. | |
0936a455 | 7053 | 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 |
7054 | do |
7055 | gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` | |
7056 | if test x$gcc_cv_gas_version != x; then | |
7057 | break | |
7058 | fi | |
7059 | done | |
7060 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
7061 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
c72931a6 | 7062 | gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"` |
981d4858 | 7063 | fi |
9e423e6d | 7064 | |
534d0cc0 | 7065 | if test "x$gcc_cv_as" = x; then |
779243f7 JL |
7066 | # Search the same directories that the installed compiler will |
7067 | # search. Else we may find the wrong assembler and lose. If we | |
7068 | # do not find a suitable assembler binary, then try the user's | |
7069 | # path. | |
7070 | # | |
7071 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
7072 | # user's path. Unfortunately, there is no good way to get at the | |
7073 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
7074 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
7075 | # to be fixed as part of the make/configure rewrite too. | |
7076 | ||
7077 | if test "x$exec_prefix" = xNONE; then | |
7078 | if test "x$prefix" = xNONE; then | |
7079 | test_prefix=/usr/local | |
7080 | else | |
7081 | test_prefix=$prefix | |
7082 | fi | |
7083 | else | |
7084 | test_prefix=$exec_prefix | |
7085 | fi | |
7086 | ||
7087 | # If the loop below does not find an assembler, then use whatever | |
7088 | # one we can find in the users's path. | |
7089 | # user's path. | |
55a2ea2a AM |
7090 | if test "x$program_prefix" != xNONE; then |
7091 | gcc_cv_as=${program_prefix}as$host_exeext | |
7092 | else | |
7093 | gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext | |
7094 | fi | |
7095 | ||
7096 | test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \ | |
7097 | $test_prefix/lib/gcc-lib/$target_alias \ | |
7098 | /usr/lib/gcc/$target_alias/$gcc_version \ | |
7099 | /usr/lib/gcc/$target_alias \ | |
7100 | $test_prefix/$target_alias/bin/$target_alias/$gcc_version \ | |
7101 | $test_prefix/$target_alias/bin" | |
7102 | ||
7103 | if test x$host = x$target; then | |
7104 | test_dirs="$test_dirs \ | |
779243f7 JL |
7105 | /usr/libexec \ |
7106 | /usr/ccs/gcc \ | |
7107 | /usr/ccs/bin \ | |
7108 | /udk/usr/ccs/bin \ | |
7109 | /bsd43/usr/lib/cmplrs/cc \ | |
7110 | /usr/cross64/usr/bin \ | |
7111 | /usr/lib/cmplrs/cc \ | |
7112 | /sysv/usr/lib/cmplrs/cc \ | |
7113 | /svr4/usr/lib/cmplrs/cc \ | |
7114 | /usr/bin" | |
55a2ea2a | 7115 | fi |
779243f7 JL |
7116 | |
7117 | for dir in $test_dirs; do | |
55a2ea2a | 7118 | if test -x $dir/as$host_exeext; then |
779243f7 JL |
7119 | gcc_cv_as=$dir/as$host_exeext |
7120 | break; | |
7121 | fi | |
7122 | done | |
9e423e6d | 7123 | fi |
981d4858 JM |
7124 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
7125 | echo "$ac_t"""newly built gas"" 1>&6 | |
7126 | else | |
7127 | echo "$ac_t""$gcc_cv_as" 1>&6 | |
7128 | fi | |
7129 | ||
275b60d6 JJ |
7130 | # Figure out what linker we will be using. |
7131 | echo $ac_n "checking what linker to use""... $ac_c" 1>&6 | |
9118405f | 7132 | echo "configure:7133: checking what linker to use" >&5 |
275b60d6 JJ |
7133 | gcc_cv_ld= |
7134 | gcc_cv_gld_major_version= | |
7135 | gcc_cv_gld_minor_version= | |
7136 | gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld | |
7137 | gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
7138 | if test -x "$DEFAULT_LINKER"; then | |
7139 | gcc_cv_ld="$DEFAULT_LINKER" | |
7140 | elif test -x "$LD"; then | |
7141 | gcc_cv_ld="$LD" | |
7142 | elif test -x ld$host_exeext; then | |
7143 | # Build using linker in the current directory. | |
7144 | gcc_cv_ld=./ld$host_exeext | |
7145 | elif test -f $gcc_cv_ld_gld_srcdir/configure.in -a -f ../ld/Makefile; then | |
7146 | # Single tree build which includes ld. | |
7147 | for f in $gcc_cv_ld_bfd_srcdir/configure $gcc_cv_ld_gld_srcdir/configure $gcc_cv_ld_gld_srcdir/configure.in $gcc_cv_ld_gld_srcdir/Makefile.in | |
7148 | do | |
7149 | gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` | |
7150 | if test x$gcc_cv_gld_version != x; then | |
7151 | break | |
7152 | fi | |
7153 | done | |
7154 | gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` | |
7155 | gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
7156 | fi | |
7157 | ||
534d0cc0 | 7158 | if test "x$gcc_cv_ld" = x; then |
275b60d6 JJ |
7159 | # Search the same directories that the installed compiler will |
7160 | # search. Else we may find the wrong linker and lose. If we | |
7161 | # do not find a suitable linker binary, then try the user's | |
7162 | # path. | |
7163 | # | |
7164 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
7165 | # user's path. Unfortunately, there is no good way to get at the | |
7166 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
7167 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
7168 | # to be fixed as part of the make/configure rewrite too. | |
7169 | ||
7170 | if test "x$exec_prefix" = xNONE; then | |
7171 | if test "x$prefix" = xNONE; then | |
7172 | test_prefix=/usr/local | |
7173 | else | |
7174 | test_prefix=$prefix | |
7175 | fi | |
7176 | else | |
7177 | test_prefix=$exec_prefix | |
7178 | fi | |
7179 | ||
7180 | # If the loop below does not find an linker, then use whatever | |
7181 | # one we can find in the users's path. | |
7182 | # user's path. | |
55a2ea2a AM |
7183 | if test "x$program_prefix" != xNONE; then |
7184 | gcc_cv_ld=${program_prefix}ld$host_exeext | |
7185 | else | |
7186 | gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext | |
7187 | fi | |
7188 | ||
7189 | test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \ | |
7190 | $test_prefix/lib/gcc-lib/$target_alias \ | |
7191 | /usr/lib/gcc/$target_alias/$gcc_version \ | |
7192 | /usr/lib/gcc/$target_alias \ | |
7193 | $test_prefix/$target_alias/bin/$target_alias/$gcc_version \ | |
7194 | $test_prefix/$target_alias/bin" | |
7195 | ||
7196 | if test x$host = x$target; then | |
7197 | test_dirs="$test_dirs \ | |
275b60d6 JJ |
7198 | /usr/libexec \ |
7199 | /usr/ccs/gcc \ | |
7200 | /usr/ccs/bin \ | |
7201 | /udk/usr/ccs/bin \ | |
7202 | /bsd43/usr/lib/cmplrs/cc \ | |
7203 | /usr/cross64/usr/bin \ | |
7204 | /usr/lib/cmplrs/cc \ | |
7205 | /sysv/usr/lib/cmplrs/cc \ | |
7206 | /svr4/usr/lib/cmplrs/cc \ | |
7207 | /usr/bin" | |
55a2ea2a | 7208 | fi |
275b60d6 JJ |
7209 | |
7210 | for dir in $test_dirs; do | |
55a2ea2a | 7211 | if test -x $dir/ld$host_exeext; then |
275b60d6 JJ |
7212 | gcc_cv_ld=$dir/ld$host_exeext |
7213 | break; | |
7214 | fi | |
7215 | done | |
7216 | fi | |
7217 | if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then | |
7218 | echo "$ac_t"""newly built ld"" 1>&6 | |
7219 | else | |
7220 | echo "$ac_t""$gcc_cv_ld" 1>&6 | |
7221 | fi | |
7222 | ||
981d4858 JM |
7223 | # Figure out what nm we will be using. |
7224 | echo $ac_n "checking what nm to use""... $ac_c" 1>&6 | |
9118405f | 7225 | echo "configure:7226: checking what nm to use" >&5 |
981d4858 JM |
7226 | if test -x nm$host_exeext; then |
7227 | gcc_cv_nm=./nm$host_exeext | |
534d0cc0 AM |
7228 | elif test "x$program_prefix" != xNONE; then |
7229 | gcc_cv_nm=${program_prefix}nm$host_exeext | |
7230 | else | |
7231 | gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext | |
981d4858 JM |
7232 | fi |
7233 | echo "$ac_t""$gcc_cv_nm" 1>&6 | |
7234 | ||
3cae5780 AS |
7235 | # Figure out what objdump we will be using. |
7236 | echo $ac_n "checking what objdump to use""... $ac_c" 1>&6 | |
9118405f | 7237 | echo "configure:7238: checking what objdump to use" >&5 |
3cae5780 AS |
7238 | if test -x objdump$host_exeext; then |
7239 | gcc_cv_objdump=./objdump$host_exeext | |
534d0cc0 AM |
7240 | elif test "x$program_prefix" != xNONE; then |
7241 | gcc_cv_objdump=${program_prefix}objdump$host_exeext | |
7242 | else | |
7243 | gcc_cv_objdump=`echo objdump | sed ${program_transform_name}`$host_exeext | |
3cae5780 AS |
7244 | fi |
7245 | echo "$ac_t""$gcc_cv_objdump" 1>&6 | |
7246 | ||
981d4858 JM |
7247 | # Figure out what assembler alignment features are present. |
7248 | echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6 | |
9118405f | 7249 | echo "configure:7250: checking assembler alignment features" >&5 |
9d147085 | 7250 | gcc_cv_as_alignment_features=none |
981d4858 JM |
7251 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
7252 | # Gas version 2.6 and later support for .balign and .p2align. | |
7253 | # bytes to skip when using .p2align. | |
7254 | 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 | |
7255 | gcc_cv_as_alignment_features=".balign and .p2align" | |
7256 | cat >> confdefs.h <<\EOF | |
7257 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 | |
7258 | EOF | |
7259 | ||
7260 | fi | |
7261 | # Gas version 2.8 and later support specifying the maximum | |
7262 | # bytes to skip when using .p2align. | |
7263 | 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 | |
7264 | gcc_cv_as_alignment_features=".p2align including maximum skip" | |
7265 | cat >> confdefs.h <<\EOF | |
7266 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 | |
7267 | EOF | |
7268 | ||
7269 | fi | |
7270 | elif test x$gcc_cv_as != x; then | |
00ccc16d JL |
7271 | # Check if we have .balign and .p2align |
7272 | echo ".balign 4" > conftest.s | |
7273 | echo ".p2align 2" >> conftest.s | |
7274 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7275 | gcc_cv_as_alignment_features=".balign and .p2align" | |
7276 | cat >> confdefs.h <<\EOF | |
7277 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 | |
7278 | EOF | |
7279 | ||
7280 | fi | |
7281 | rm -f conftest.s conftest.o | |
9e423e6d JW |
7282 | # Check if specifying the maximum bytes to skip when |
7283 | # using .p2align is supported. | |
7284 | echo ".p2align 4,,7" > conftest.s | |
7285 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7286 | gcc_cv_as_alignment_features=".p2align including maximum skip" | |
7287 | cat >> confdefs.h <<\EOF | |
7288 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 | |
7289 | EOF | |
7290 | ||
7291 | fi | |
7292 | rm -f conftest.s conftest.o | |
7293 | fi | |
7294 | echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6 | |
7295 | ||
d1accaa3 | 7296 | echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6 |
9118405f | 7297 | echo "configure:7298: checking assembler subsection support" >&5 |
9d147085 | 7298 | gcc_cv_as_subsections=no |
981d4858 JM |
7299 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
7300 | 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 | |
7301 | gcc_cv_as_subsections="working .subsection -1" | |
7302 | fi | |
7303 | elif test x$gcc_cv_as != x; then | |
d1accaa3 JJ |
7304 | # Check if we have .subsection |
7305 | echo ".subsection 1" > conftest.s | |
7306 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7307 | gcc_cv_as_subsections=".subsection" | |
d1accaa3 JJ |
7308 | if test x$gcc_cv_nm != x; then |
7309 | cat > conftest.s <<EOF | |
7310 | conftest_label1: .word 0 | |
7311 | .subsection -1 | |
7312 | conftest_label2: .word 0 | |
7313 | .previous | |
7314 | EOF | |
7315 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7316 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
7317 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
1b015bec AO |
7318 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then |
7319 | : | |
7320 | else | |
d1accaa3 | 7321 | gcc_cv_as_subsections="working .subsection -1" |
d1accaa3 JJ |
7322 | fi |
7323 | fi | |
7324 | fi | |
7325 | fi | |
7326 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
981d4858 JM |
7327 | fi |
7328 | if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then | |
7329 | cat >> confdefs.h <<\EOF | |
7330 | #define HAVE_GAS_SUBSECTION_ORDERING 1 | |
7331 | EOF | |
7332 | ||
d1accaa3 JJ |
7333 | fi |
7334 | echo "$ac_t""$gcc_cv_as_subsections" 1>&6 | |
7335 | ||
12822146 | 7336 | echo $ac_n "checking assembler weak support""... $ac_c" 1>&6 |
9118405f | 7337 | echo "configure:7338: checking assembler weak support" >&5 |
9d147085 | 7338 | gcc_cv_as_weak=no |
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 2 -o "$gcc_cv_gas_major_version" -gt 2; then | |
7341 | gcc_cv_as_weak="yes" | |
7342 | fi | |
7343 | elif test x$gcc_cv_as != x; then | |
12822146 JL |
7344 | # Check if we have .weak |
7345 | echo " .weak foobar" > conftest.s | |
7346 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
12822146 JL |
7347 | gcc_cv_as_weak="yes" |
7348 | fi | |
7349 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
981d4858 JM |
7350 | fi |
7351 | if test x"$gcc_cv_as_weak" = xyes; then | |
7352 | cat >> confdefs.h <<\EOF | |
7353 | #define HAVE_GAS_WEAK 1 | |
7354 | EOF | |
7355 | ||
12822146 JL |
7356 | fi |
7357 | echo "$ac_t""$gcc_cv_as_weak" 1>&6 | |
7358 | ||
6a9c5260 | 7359 | echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6 |
9118405f | 7360 | echo "configure:7361: checking assembler hidden support" >&5 |
9d147085 | 7361 | gcc_cv_as_hidden=no |
981d4858 | 7362 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
c72931a6 RH |
7363 | if test "$gcc_cv_gas_major_version" -eq 2 \ |
7364 | -a "$gcc_cv_gas_minor_version" -eq 12 \ | |
7365 | -a "$gcc_cv_gas_patch_version" -ge 1 \ | |
7366 | -o "$gcc_cv_gas_major_version" -eq 2 \ | |
7367 | -a "$gcc_cv_gas_minor_version" -gt 12 \ | |
7368 | -o "$gcc_cv_gas_major_version" -gt 2 \ | |
7369 | && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
981d4858 JM |
7370 | gcc_cv_as_hidden="yes" |
7371 | fi | |
7372 | elif test x$gcc_cv_as != x; then | |
6a9c5260 UD |
7373 | # Check if we have .hidden |
7374 | echo " .hidden foobar" > conftest.s | |
7375 | echo "foobar:" >> conftest.s | |
7376 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
6a9c5260 UD |
7377 | gcc_cv_as_hidden="yes" |
7378 | fi | |
7379 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
c72931a6 RH |
7380 | |
7381 | # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | |
7382 | # This is irritatingly difficult to feature test for. Look for | |
7383 | # the date string after the version number. | |
7384 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1` | |
7385 | if echo "$ld_ver" | grep GNU > /dev/null; then | |
4832c9e1 JJ |
7386 | ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\([ ].*\|\)$,\1,p'` |
7387 | ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'` | |
c72931a6 | 7388 | if test 0"$ld_date" -lt 20020404; then |
4832c9e1 JJ |
7389 | if test -n "$ld_date"; then |
7390 | # If there was date string, but was earlier than 2002-04-04, fail | |
7391 | gcc_cv_as_hidden="no" | |
7392 | elif test -z "$ld_vers"; then | |
7393 | # If there was no date string nor ld version number, something is wrong | |
7394 | gcc_cv_as_hidden="no" | |
7395 | else | |
7396 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` | |
7397 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
7398 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |
7399 | test -z "$ld_vers_patch" && ld_vers_patch=0 | |
7400 | if test "$ld_vers_major" -lt 2; then | |
7401 | gcc_cv_as_hidden="no" | |
7402 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
7403 | gcc_cv_as_hidden="no" | |
7404 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \ | |
7405 | -a "$ld_vers_patch" -eq 0; then | |
7406 | gcc_cv_as_hidden="no" | |
7407 | fi | |
7408 | fi | |
c72931a6 RH |
7409 | fi |
7410 | fi | |
981d4858 JM |
7411 | fi |
7412 | if test x"$gcc_cv_as_hidden" = xyes; then | |
7413 | cat >> confdefs.h <<\EOF | |
7414 | #define HAVE_GAS_HIDDEN 1 | |
7415 | EOF | |
7416 | ||
6a9c5260 UD |
7417 | fi |
7418 | echo "$ac_t""$gcc_cv_as_hidden" 1>&6 | |
9e944a16 | 7419 | libgcc_visibility=$gcc_cv_as_hidden |
789b7de5 RO |
7420 | case "$target" in |
7421 | mips-sgi-irix6*o32) | |
7422 | if test x"$gnu_ld_flag" = x"no"; then | |
7423 | # Even if using gas with .hidden support, the resulting object files | |
7424 | # cannot be linked with the IRIX 6 O32 linker. | |
7425 | libgcc_visibility=no | |
7426 | fi | |
7427 | ;; | |
7428 | esac | |
9e944a16 | 7429 | |
6a9c5260 | 7430 | |
b7460f24 | 7431 | echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6 |
9118405f | 7432 | echo "configure:7433: checking assembler leb128 support" >&5 |
fbe42b1b | 7433 | gcc_cv_as_leb128=no |
b7460f24 | 7434 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
fbe42b1b | 7435 | 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 |
7436 | gcc_cv_as_leb128="yes" |
7437 | fi | |
7438 | elif test x$gcc_cv_as != x; then | |
7439 | # Check if we have .[us]leb128, and support symbol arithmetic with it. | |
7440 | cat > conftest.s <<EOF | |
7441 | .data | |
7442 | .uleb128 L2 - L1 | |
7443 | L1: | |
7444 | .uleb128 1280 | |
7445 | .sleb128 -1010 | |
7446 | L2: | |
7447 | EOF | |
7448 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
78e766a0 RH |
7449 | gcc_cv_as_leb128="yes" |
7450 | ||
7451 | # GAS versions before 2.11 do not support uleb128, | |
7452 | # despite appearing to. | |
7453 | # ??? There exists an elf-specific test that will crash | |
7454 | # the assembler. Perhaps it's better to figure out whether | |
7455 | # arbitrary sections are supported and try the test. | |
7456 | as_ver=`$gcc_cv_as --version 2>/dev/null | head -1` | |
7457 | if echo "$as_ver" | grep GNU > /dev/null; then | |
5fed851d | 7458 | as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` |
78e766a0 | 7459 | as_major=`echo $as_ver | sed 's/\..*//'` |
3d399d67 | 7460 | as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` |
78e766a0 RH |
7461 | if test $as_major -eq 2 -a $as_minor -lt 11; then |
7462 | gcc_cv_as_leb128="no" | |
7463 | fi | |
fbe42b1b | 7464 | fi |
b7460f24 RH |
7465 | fi |
7466 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
7467 | fi | |
7468 | if test x"$gcc_cv_as_leb128" = xyes; then | |
7469 | cat >> confdefs.h <<\EOF | |
7470 | #define HAVE_AS_LEB128 1 | |
7471 | EOF | |
7472 | ||
7473 | fi | |
7474 | echo "$ac_t""$gcc_cv_as_leb128" 1>&6 | |
7475 | ||
c64688ae | 7476 | echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6 |
9118405f | 7477 | echo "configure:7478: checking assembler eh_frame optimization" >&5 |
c64688ae RH |
7478 | gcc_cv_as_eh_frame=no |
7479 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then | |
7480 | 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 | |
7481 | gcc_cv_as_eh_frame="yes" | |
7482 | fi | |
7483 | elif test x$gcc_cv_as != x; then | |
7484 | # Check if this is GAS. | |
41948db5 SS |
7485 | as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1` |
7486 | rm -f a.out 2> /dev/null | |
c64688ae RH |
7487 | if echo "$as_ver" | grep GNU > /dev/null; then |
7488 | # Versions up to and including 2.11.0 may mis-optimize | |
7489 | # .eh_frame data. Try something. | |
7490 | cat > conftest.s <<EOF | |
7491 | .text | |
7492 | .LFB1: | |
7493 | .4byte 0 | |
7494 | .L1: | |
7495 | .4byte 0 | |
7496 | .LFE1: | |
7497 | .section .eh_frame,"aw",@progbits | |
7498 | __FRAME_BEGIN__: | |
7499 | .4byte .LECIE1-.LSCIE1 | |
7500 | .LSCIE1: | |
7501 | .4byte 0x0 | |
7502 | .byte 0x1 | |
7503 | .ascii "z\0" | |
7504 | .byte 0x1 | |
7505 | .byte 0x78 | |
7506 | .byte 0x1a | |
7507 | .byte 0x0 | |
7508 | .byte 0x4 | |
7509 | .4byte 1 | |
7510 | .p2align 1 | |
7511 | .LECIE1: | |
7512 | .LSFDE1: | |
7513 | .4byte .LEFDE1-.LASFDE1 | |
7514 | .LASFDE1: | |
7515 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
7516 | .4byte .LFB1 | |
7517 | .4byte .LFE1-.LFB1 | |
7518 | .byte 0x4 | |
7519 | .4byte .LFE1-.LFB1 | |
7520 | .byte 0x4 | |
7521 | .4byte .L1-.LFB1 | |
7522 | .LEFDE1: | |
7523 | EOF | |
01efb963 | 7524 | cat > conftest.lit <<EOF |
c64688ae RH |
7525 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
7526 | 0010 01000000 12000000 18000000 00000000 ................ | |
7527 | 0020 08000000 04080000 0044 .........D | |
01efb963 AS |
7528 | EOF |
7529 | cat > conftest.big <<EOF | |
7530 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... | |
7531 | 0010 00000001 00000012 00000018 00000000 ................ | |
7532 | 0020 00000008 04000000 0844 .........D | |
c64688ae RH |
7533 | EOF |
7534 | # If the assembler didn't choke, and we can objdump, | |
7535 | # and we got the correct data, then succeed. | |
7536 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ | |
3cae5780 | 7537 | && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ |
c64688ae | 7538 | | tail -3 > conftest.got \ |
01efb963 AS |
7539 | && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ |
7540 | || cmp conftest.big conftest.got > /dev/null 2>&1; } | |
c64688ae RH |
7541 | then |
7542 | gcc_cv_as_eh_frame="yes" | |
7543 | else | |
7544 | gcc_cv_as_eh_frame="bad" | |
7545 | if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then | |
7546 | cat >> confdefs.h <<\EOF | |
7547 | #define USE_AS_TRADITIONAL_FORMAT 1 | |
7548 | EOF | |
7549 | ||
7550 | fi | |
7551 | fi | |
7552 | fi | |
7553 | rm -f conftest.* | |
7554 | fi | |
7555 | echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6 | |
7556 | ||
201556f0 | 7557 | echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6 |
9118405f | 7558 | echo "configure:7559: checking assembler section merging support" >&5 |
201556f0 JJ |
7559 | gcc_cv_as_shf_merge=no |
7560 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then | |
7561 | 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 | 7562 | gcc_cv_as_shf_merge=yes |
201556f0 JJ |
7563 | fi |
7564 | elif test x$gcc_cv_as != x; then | |
7565 | # Check if we support SHF_MERGE sections | |
7566 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s | |
a8b7afb9 | 7567 | if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then |
201556f0 JJ |
7568 | gcc_cv_as_shf_merge=yes |
7569 | fi | |
7570 | rm -f conftest.s conftest.o | |
7571 | fi | |
7572 | if test x"$gcc_cv_as_shf_merge" = xyes; then | |
7573 | cat >> confdefs.h <<\EOF | |
7574 | #define HAVE_GAS_SHF_MERGE 1 | |
7575 | EOF | |
7576 | ||
7577 | fi | |
7578 | echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6 | |
7579 | ||
f996902d | 7580 | echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6 |
9118405f | 7581 | echo "configure:7582: checking assembler thread-local storage support" >&5 |
f996902d RH |
7582 | gcc_cv_as_tls=no |
7583 | conftest_s= | |
7584 | tls_first_major= | |
7585 | tls_first_minor= | |
7586 | case "$target" in | |
6f9b006d RH |
7587 | alpha*-*-*) |
7588 | conftest_s=' | |
7589 | .section ".tdata","awT",@progbits | |
7590 | foo: .long 25 | |
7591 | .text | |
7592 | ldq $27,__tls_get_addr($29) !literal!1 | |
7593 | lda $16,foo($29) !tlsgd!1 | |
7594 | jsr $26,($27),__tls_get_addr !lituse_tlsgd!1 | |
7595 | ldq $27,__tls_get_addr($29) !literal!2 | |
7596 | lda $16,foo($29) !tlsldm!2 | |
7597 | jsr $26,($27),__tls_get_addr !lituse_tlsldm!2 | |
7598 | ldq $1,foo($29) !gotdtprel | |
7599 | ldah $2,foo($29) !dtprelhi | |
7600 | lda $3,foo($2) !dtprello | |
7601 | lda $4,foo($29) !dtprel | |
7602 | ldq $1,foo($29) !gottprel | |
7603 | ldah $2,foo($29) !tprelhi | |
7604 | lda $3,foo($2) !tprello | |
7605 | lda $4,foo($29) !tprel' | |
7606 | tls_first_major=2 | |
7607 | tls_first_minor=13 | |
7608 | ;; | |
f996902d RH |
7609 | i[34567]86-*-*) |
7610 | conftest_s=' | |
7611 | .section ".tdata","awT",@progbits | |
7612 | foo: .long 25 | |
7613 | .text | |
7614 | movl %gs:0, %eax | |
7615 | leal foo@TLSGD(,%ebx,1), %eax | |
7616 | leal foo@TLSLDM(%ebx), %eax | |
7617 | leal foo@DTPOFF(%eax), %edx | |
7618 | movl foo@GOTTPOFF(%ebx), %eax | |
7619 | subl foo@GOTTPOFF(%ebx), %eax | |
75d38379 JJ |
7620 | addl foo@GOTNTPOFF(%ebx), %eax |
7621 | movl foo@INDNTPOFF, %eax | |
f996902d RH |
7622 | movl $foo@TPOFF, %eax |
7623 | subl $foo@TPOFF, %eax | |
7624 | leal foo@NTPOFF(%ecx), %eax' | |
7625 | tls_first_major=2 | |
75d38379 JJ |
7626 | tls_first_minor=14 |
7627 | ;; | |
7628 | x86_64-*-*) | |
7629 | conftest_s=' | |
7630 | .section ".tdata","awT",@progbits | |
7631 | foo: .long 25 | |
7632 | .text | |
7633 | movq %fs:0, %rax | |
7634 | leaq foo@TLSGD(%rip), %rdi | |
7635 | leaq foo@TLSLD(%rip), %rdi | |
7636 | leaq foo@DTPOFF(%rax), %rdx | |
7637 | movq foo@GOTTPOFF(%rip), %rax | |
7638 | movq $foo@TPOFF, %rax' | |
7639 | tls_first_major=2 | |
7640 | tls_first_minor=14 | |
f996902d | 7641 | ;; |
7b6e506e RH |
7642 | ia64-*-*) |
7643 | conftest_s=' | |
7644 | .section ".tdata","awT",@progbits | |
7645 | foo: data8 25 | |
7646 | .text | |
7647 | addl r16 = @ltoff(@dtpmod(foo#)), gp | |
7648 | addl r17 = @ltoff(@dtprel(foo#)), gp | |
7649 | addl r18 = @ltoff(@tprel(foo#)), gp | |
7650 | addl r19 = @dtprel(foo#), gp | |
7651 | adds r21 = @dtprel(foo#), r13 | |
7652 | movl r23 = @dtprel(foo#) | |
7653 | addl r20 = @tprel(foo#), gp | |
7654 | adds r22 = @tprel(foo#), r13 | |
7655 | movl r24 = @tprel(foo#)' | |
7656 | tls_first_major=2 | |
7657 | tls_first_minor=13 | |
7658 | ;; | |
f996902d RH |
7659 | esac |
7660 | if test -z "$tls_first_major"; then | |
7661 | : | |
7662 | elif test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x | |
7663 | then | |
7664 | if test "$gcc_cv_gas_major_version" -eq "$tls_first_major" \ | |
7665 | -a "$gcc_cv_gas_minor_version" -ge "$tls_first_minor" \ | |
7666 | -o "$gcc_cv_gas_major_version" -gt "$tls_first_major"; then | |
7667 | gcc_cv_as_tls=yes | |
7668 | fi | |
7669 | elif test x$gcc_cv_as != x; then | |
7670 | echo "$conftest_s" > conftest.s | |
7671 | if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1 | |
7672 | then | |
7673 | gcc_cv_as_tls=yes | |
7674 | fi | |
7675 | rm -f conftest.s conftest.o | |
7676 | fi | |
7677 | if test "$gcc_cv_as_tls" = yes; then | |
7678 | cat >> confdefs.h <<\EOF | |
7679 | #define HAVE_AS_TLS 1 | |
7680 | EOF | |
7681 | ||
7682 | fi | |
7683 | echo "$ac_t""$gcc_cv_as_tls" 1>&6 | |
7684 | ||
3a37b08e RH |
7685 | case "$target" in |
7686 | # All TARGET_ABI_OSF targets. | |
7687 | alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) | |
7688 | echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6 | |
9118405f | 7689 | echo "configure:7690: checking assembler supports explicit relocations" >&5 |
3a37b08e RH |
7690 | if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then |
7691 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7692 | else | |
7693 | ||
7694 | gcc_cv_as_explicit_relocs=unknown | |
7695 | if test x$gcc_cv_gas_major_version != x \ | |
7696 | -a x$gcc_cv_gas_minor_version != x | |
7697 | then | |
7698 | if test "$gcc_cv_gas_major_version" -eq 2 \ | |
7699 | -a "$gcc_cv_gas_minor_version" -ge 12 \ | |
7700 | -o "$gcc_cv_gas_major_version" -gt 2; then | |
7701 | gcc_cv_as_explicit_relocs=yes | |
7702 | fi | |
7703 | elif test x$gcc_cv_as != x; then | |
7704 | cat > conftest.s << 'EOF' | |
7705 | .set nomacro | |
7706 | .text | |
7707 | extbl $3, $2, $3 !lituse_bytoff!1 | |
7708 | ldq $2, a($29) !literal!1 | |
7709 | ldq $4, b($29) !literal!2 | |
7710 | ldq_u $3, 0($2) !lituse_base!1 | |
7711 | ldq $27, f($29) !literal!5 | |
7712 | jsr $26, ($27), f !lituse_jsr!5 | |
7713 | ldah $29, 0($26) !gpdisp!3 | |
7714 | lda $0, c($29) !gprel | |
7715 | ldah $1, d($29) !gprelhigh | |
7716 | lda $1, d($1) !gprellow | |
7717 | lda $29, 0($29) !gpdisp!3 | |
7718 | EOF | |
7719 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7720 | gcc_cv_as_explicit_relocs=yes | |
7721 | else | |
7722 | gcc_cv_as_explicit_relocs=no | |
7723 | fi | |
7724 | rm -f conftest.s conftest.o | |
7725 | fi | |
7726 | ||
7727 | fi | |
7728 | ||
7729 | echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6 | |
7730 | if test "x$gcc_cv_as_explicit_relocs" = xyes; then | |
7731 | cat >> confdefs.h <<\EOF | |
7732 | #define HAVE_AS_EXPLICIT_RELOCS 1 | |
7733 | EOF | |
7734 | ||
7735 | fi | |
7736 | ;; | |
1cb36a98 RH |
7737 | sparc*-*-*) |
7738 | echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6 | |
9118405f | 7739 | echo "configure:7740: checking assembler .register pseudo-op support" >&5 |
5b68c389 AO |
7740 | if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then |
7741 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7742 | else | |
7743 | ||
7744 | gcc_cv_as_register_pseudo_op=unknown | |
7745 | if test x$gcc_cv_as != x; then | |
7746 | # Check if we have .register | |
7747 | echo ".register %g2, #scratch" > conftest.s | |
7748 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
1cb36a98 | 7749 | gcc_cv_as_register_pseudo_op=yes |
5b68c389 AO |
7750 | else |
7751 | gcc_cv_as_register_pseudo_op=no | |
7752 | fi | |
7753 | rm -f conftest.s conftest.o | |
7754 | fi | |
7755 | ||
7756 | fi | |
7757 | ||
7758 | echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6 | |
7759 | if test "x$gcc_cv_as_register_pseudo_op" = xyes; then | |
7760 | cat >> confdefs.h <<\EOF | |
1cb36a98 RH |
7761 | #define HAVE_AS_REGISTER_PSEUDO_OP 1 |
7762 | EOF | |
7763 | ||
1cb36a98 | 7764 | fi |
1cb36a98 | 7765 | |
e95b1e6a | 7766 | echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6 |
9118405f | 7767 | echo "configure:7768: checking assembler supports -relax" >&5 |
e95b1e6a JJ |
7768 | if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then |
7769 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7770 | else | |
7771 | ||
7772 | gcc_cv_as_relax_opt=unknown | |
7773 | if test x$gcc_cv_as != x; then | |
7774 | # Check if gas supports -relax | |
7775 | echo ".text" > conftest.s | |
7776 | if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then | |
7777 | gcc_cv_as_relax_opt=yes | |
7778 | else | |
7779 | gcc_cv_as_relax_opt=no | |
7780 | fi | |
7781 | rm -f conftest.s conftest.o | |
7782 | fi | |
7783 | ||
7784 | fi | |
7785 | ||
7786 | echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6 | |
7787 | if test "x$gcc_cv_as_relax_opt" = xyes; then | |
7788 | cat >> confdefs.h <<\EOF | |
7789 | #define HAVE_AS_RELAX_OPTION 1 | |
7790 | EOF | |
7791 | ||
7792 | fi | |
7793 | ||
17e9e88c | 7794 | echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6 |
9118405f | 7795 | echo "configure:7796: checking assembler and linker support unaligned pc related relocs" >&5 |
17e9e88c JJ |
7796 | if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then |
7797 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7798 | else | |
7799 | ||
7800 | gcc_cv_as_sparc_ua_pcrel=unknown | |
7801 | if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then | |
7802 | gcc_cv_as_sparc_ua_pcrel=no | |
7803 | echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s | |
cf7b8b0d JJ |
7804 | if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \ |
7805 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then | |
7806 | gcc_cv_as_sparc_ua_pcrel=yes | |
17e9e88c JJ |
7807 | fi |
7808 | rm -f conftest.s conftest.o conftest | |
7809 | fi | |
7810 | ||
7811 | fi | |
7812 | ||
7813 | echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6 | |
7814 | if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then | |
7815 | cat >> confdefs.h <<\EOF | |
7816 | #define HAVE_AS_SPARC_UA_PCREL 1 | |
7817 | EOF | |
7818 | ||
7819 | fi | |
7820 | ||
fc06c4b2 | 7821 | echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6 |
9118405f | 7822 | echo "configure:7823: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5 |
cf7b8b0d JJ |
7823 | if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then |
7824 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7825 | else | |
7826 | ||
7827 | if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then | |
7828 | gcc_cv_as_sparc_ua_pcrel_hidden=unknown | |
7829 | if test x$gcc_cv_objdump != x; then | |
7830 | gcc_cv_as_sparc_ua_pcrel_hidden=no | |
7831 | echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s | |
7832 | echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s | |
7833 | echo "foo: .skip 4" >> conftest.s | |
7834 | if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \ | |
7835 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ | |
7836 | && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ | |
7837 | | grep ' 31000000 07323334' > /dev/null 2>&1; then | |
7838 | if $gcc_cv_objdump -R conftest 2> /dev/null \ | |
7839 | | grep 'DISP32' > /dev/null 2>&1; then | |
7840 | : | |
7841 | else | |
7842 | gcc_cv_as_sparc_ua_pcrel_hidden=yes | |
7843 | fi | |
7844 | fi | |
7845 | fi | |
7846 | rm -f conftest.s conftest.o conftest | |
7847 | else | |
7848 | gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel" | |
7849 | fi | |
7850 | ||
7851 | fi | |
7852 | ||
7853 | echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6 | |
7854 | if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then | |
7855 | cat >> confdefs.h <<\EOF | |
7856 | #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1 | |
7857 | EOF | |
7858 | ||
7859 | fi | |
7860 | ||
22252625 | 7861 | echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6 |
9118405f | 7862 | echo "configure:7863: checking for assembler offsetable %lo() support" >&5 |
5b68c389 AO |
7863 | if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then |
7864 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7865 | else | |
7866 | ||
22252625 JJ |
7867 | gcc_cv_as_offsetable_lo10=unknown |
7868 | if test "x$gcc_cv_as" != x; then | |
7869 | # Check if assembler has offsetable %lo() | |
7870 | echo "or %g1, %lo(ab) + 12, %g1" > conftest.s | |
7871 | echo "or %g1, %lo(ab + 12), %g1" > conftest1.s | |
7872 | if $gcc_cv_as -xarch=v9 -o conftest.o conftest.s \ | |
7873 | > /dev/null 2>&1 && | |
7874 | $gcc_cv_as -xarch=v9 -o conftest1.o conftest1.s \ | |
7875 | > /dev/null 2>&1; then | |
7876 | if cmp conftest.o conftest1.o > /dev/null 2>&1; then | |
5b68c389 | 7877 | gcc_cv_as_offsetable_lo10=no |
22252625 JJ |
7878 | else |
7879 | gcc_cv_as_offsetable_lo10=yes | |
5b68c389 | 7880 | fi |
22252625 JJ |
7881 | else |
7882 | gcc_cv_as_offsetable_lo10=no | |
5b68c389 | 7883 | fi |
22252625 JJ |
7884 | rm -f conftest.s conftest.o conftest1.s conftest1.o |
7885 | fi | |
7886 | ||
5b68c389 AO |
7887 | fi |
7888 | ||
7889 | echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6 | |
22252625 JJ |
7890 | if test "x$gcc_cv_as_offsetable_lo10" = xyes; then |
7891 | cat >> confdefs.h <<\EOF | |
1cb36a98 RH |
7892 | #define HAVE_AS_OFFSETABLE_LO10 1 |
7893 | EOF | |
7894 | ||
1cb36a98 | 7895 | fi |
43160d01 | 7896 | |
1cb36a98 RH |
7897 | ;; |
7898 | ||
c307e6dd | 7899 | i[34567]86-*-* | x86_64-*-*) |
1cb36a98 | 7900 | echo $ac_n "checking assembler instructions""... $ac_c" 1>&6 |
9118405f | 7901 | echo "configure:7902: checking assembler instructions" >&5 |
1cb36a98 | 7902 | gcc_cv_as_instructions= |
981d4858 JM |
7903 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
7904 | 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 | |
7905 | gcc_cv_as_instructions="filds fists" | |
7906 | fi | |
7907 | elif test x$gcc_cv_as != x; then | |
53b5ce19 JW |
7908 | set "filds fists" "filds mem; fists mem" |
7909 | while test $# -gt 0 | |
7910 | do | |
7911 | echo "$2" > conftest.s | |
7912 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7913 | gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" " | |
53b5ce19 JW |
7914 | fi |
7915 | shift 2 | |
7916 | done | |
7917 | rm -f conftest.s conftest.o | |
1cb36a98 | 7918 | fi |
981d4858 JM |
7919 | if test x"$gcc_cv_as_instructions" != x; then |
7920 | cat >> confdefs.h <<EOF | |
ee7692d2 | 7921 | #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1 |
981d4858 JM |
7922 | EOF |
7923 | ||
7924 | fi | |
1cb36a98 | 7925 | echo "$ac_t""$gcc_cv_as_instructions" 1>&6 |
f88c65f7 RH |
7926 | |
7927 | echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6 | |
9118405f | 7928 | echo "configure:7929: checking assembler GOTOFF in data directives" >&5 |
f88c65f7 RH |
7929 | gcc_cv_as_gotoff_in_data=no |
7930 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x | |
7931 | then | |
7932 | if test "$gcc_cv_gas_major_version" -eq 2 \ | |
7933 | -a "$gcc_cv_gas_minor_version" -ge 11 \ | |
7934 | -o "$gcc_cv_gas_major_version" -gt 2; then | |
7935 | gcc_cv_as_gotoff_in_data=yes | |
7936 | fi | |
7937 | elif test x$gcc_cv_as != x; then | |
7938 | cat > conftest.s <<EOF | |
7939 | .text | |
7940 | .L0: | |
7941 | nop | |
7942 | .data | |
7943 | .long .L0@GOTOFF | |
7944 | EOF | |
7945 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7946 | gcc_cv_as_gotoff_in_data=yes | |
7947 | fi | |
7948 | fi | |
7949 | cat >> confdefs.h <<EOF | |
7950 | #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi` | |
7951 | EOF | |
7952 | ||
7953 | echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6 | |
1cb36a98 RH |
7954 | ;; |
7955 | esac | |
53b5ce19 | 7956 | |
9d147085 | 7957 | echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6 |
9118405f | 7958 | echo "configure:7959: checking assembler dwarf2 debug_line support" >&5 |
9d147085 RH |
7959 | gcc_cv_as_dwarf2_debug_line=no |
7960 | # ??? Not all targets support dwarf2 debug_line, even within a version | |
7961 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
7962 | # info to the output file. So, as supported targets are added to gas 2.11, | |
7963 | # add some instruction here to (also) show we expect this might work. | |
7964 | # ??? Once 2.11 is released, probably need to add first known working | |
7965 | # version to the per-target configury. | |
7966 | case "$target" in | |
80486e06 DJ |
7967 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ |
7968 | | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-*) | |
9d147085 RH |
7969 | insn="nop" |
7970 | ;; | |
7971 | ia64*-*-*) | |
7972 | insn="nop 0" | |
7973 | ;; | |
7974 | esac | |
7975 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; | |
7976 | then | |
7977 | if test "$gcc_cv_gas_major_version" -eq 2 \ | |
7978 | -a "$gcc_cv_gas_minor_version" -ge 11 \ | |
7979 | -o "$gcc_cv_gas_major_version" -gt 2 \ | |
7980 | && grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
7981 | && test x"$insn" != x ; then | |
7982 | gcc_cv_as_dwarf2_debug_line="yes" | |
7983 | fi | |
7984 | elif test x$gcc_cv_as != x -a x"$insn" != x ; then | |
acc187f5 RH |
7985 | echo ' .file 1 "conftest.s"' > conftest.s |
7986 | echo ' .loc 1 3 0' >> conftest.s | |
9d147085 | 7987 | echo " $insn" >> conftest.s |
981975b6 | 7988 | # ??? This fails with non-gnu grep. |
9d147085 RH |
7989 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ |
7990 | && grep debug_line conftest.o > /dev/null 2>&1 ; then | |
981975b6 | 7991 | # The .debug_line file table must be in the exact order that |
eaec9b3d | 7992 | # we specified the files, since these indices are also used |
981975b6 RH |
7993 | # by DW_AT_decl_file. Approximate this test by testing if |
7994 | # the assembler bitches if the same index is assigned twice. | |
7995 | echo ' .file 1 "foo.s"' > conftest.s | |
7996 | echo ' .file 1 "bar.s"' >> conftest.s | |
7997 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 | |
7998 | then | |
7999 | gcc_cv_as_dwarf2_debug_line="no" | |
8000 | else | |
8001 | gcc_cv_as_dwarf2_debug_line="yes" | |
8002 | fi | |
9d147085 RH |
8003 | fi |
8004 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
8005 | fi | |
8006 | if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then | |
8007 | cat >> confdefs.h <<\EOF | |
8008 | #define HAVE_AS_DWARF2_DEBUG_LINE 1 | |
8009 | EOF | |
8010 | ||
8011 | fi | |
8012 | echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6 | |
8013 | ||
5f0e9ea2 | 8014 | echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6 |
9118405f | 8015 | echo "configure:8016: checking assembler --gdwarf2 support" >&5 |
5f0e9ea2 GK |
8016 | gcc_cv_as_gdwarf2_flag=no |
8017 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; | |
8018 | then | |
8019 | if test "$gcc_cv_gas_major_version" -eq 2 \ | |
8020 | -a "$gcc_cv_gas_minor_version" -ge 11 \ | |
8021 | -o "$gcc_cv_gas_major_version" -gt 2 \ | |
8022 | && grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
8023 | && test x"$insn" != x ; then | |
da77408f | 8024 | gcc_cv_as_gdwarf2_flag="yes" |
5f0e9ea2 GK |
8025 | fi |
8026 | elif test x$gcc_cv_as != x -a x"$insn" != x ; then | |
8027 | echo '' > conftest.s | |
8028 | # ??? This fails with non-gnu grep. | |
8029 | if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1 | |
8030 | then | |
8031 | gcc_cv_as_gdwarf2_flag="yes" | |
8032 | fi | |
8033 | rm -f conftest.s conftest.o | |
8034 | fi | |
8035 | if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then | |
8036 | cat >> confdefs.h <<\EOF | |
8037 | #define HAVE_AS_GDWARF2_DEBUG_FLAG 1 | |
8038 | EOF | |
8039 | ||
8040 | fi | |
8041 | echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6 | |
8042 | ||
8043 | echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6 | |
9118405f | 8044 | echo "configure:8045: checking assembler --gstabs support" >&5 |
5f0e9ea2 GK |
8045 | gcc_cv_as_gstabs_flag=no |
8046 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; | |
8047 | then | |
8048 | if test "$gcc_cv_gas_major_version" -eq 2 \ | |
8049 | -a "$gcc_cv_gas_minor_version" -ge 11 \ | |
8050 | -o "$gcc_cv_gas_major_version" -gt 2 \ | |
8051 | && grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
8052 | && test x"$insn" != x ; then | |
da77408f | 8053 | gcc_cv_as_gstabs_flag="yes" |
5f0e9ea2 GK |
8054 | fi |
8055 | elif test x$gcc_cv_as != x -a x"$insn" != x ; then | |
8056 | echo '' > conftest.s | |
8057 | # ??? This fails with non-gnu grep. | |
8058 | if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then | |
8059 | gcc_cv_as_gstabs_flag="yes" | |
8060 | fi | |
8061 | rm -f conftest.s conftest.o | |
8062 | fi | |
8063 | if test x"$gcc_cv_as_gstabs_flag" = xyes; then | |
8064 | cat >> confdefs.h <<\EOF | |
8065 | #define HAVE_AS_GSTABS_DEBUG_FLAG 1 | |
8066 | EOF | |
8067 | ||
8068 | fi | |
8069 | echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6 | |
8070 | ||
96d0f4dc | 8071 | echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6 |
9118405f | 8072 | echo "configure:8073: checking linker read-only and read-write section mixing" >&5 |
96d0f4dc JJ |
8073 | gcc_cv_ld_ro_rw_mix=unknown |
8074 | if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then | |
8075 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then | |
8076 | gcc_cv_ld_ro_rw_mix=read-write | |
8077 | fi | |
8078 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
8079 | echo '.section "myfoosect", "a"' > conftest1.s | |
8080 | echo '.section "myfoosect", "aw"' > conftest2.s | |
8081 | echo '.byte 1' >> conftest2.s | |
8082 | echo '.section "myfoosect", "a"' > conftest3.s | |
8083 | echo '.byte 0' >> conftest3.s | |
8084 | if $gcc_cv_as -o conftest1.o conftest1.s \ | |
8085 | && $gcc_cv_as -o conftest2.o conftest2.s \ | |
8086 | && $gcc_cv_as -o conftest3.o conftest3.s \ | |
8087 | && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ | |
8088 | conftest2.o conftest3.o; then | |
8089 | gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ | |
8090 | | grep -A1 myfoosect` | |
8091 | if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then | |
8092 | if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then | |
8093 | gcc_cv_ld_ro_rw_mix=read-only | |
8094 | else | |
8095 | gcc_cv_ld_ro_rw_mix=read-write | |
8096 | fi | |
8097 | fi | |
8098 | fi | |
8099 | rm -f conftest.* conftest[123].* | |
8100 | fi | |
8101 | if test x$gcc_cv_ld_ro_rw_mix = xread-write; then | |
8102 | cat >> confdefs.h <<\EOF | |
8103 | #define HAVE_LD_RO_RW_SECTION_MIXING 1 | |
8104 | EOF | |
8105 | ||
8106 | fi | |
8107 | echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6 | |
8108 | ||
275b60d6 | 8109 | echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6 |
9118405f | 8110 | echo "configure:8111: checking linker PT_GNU_EH_FRAME support" >&5 |
275b60d6 JJ |
8111 | gcc_cv_ld_eh_frame_hdr=no |
8112 | if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then | |
8113 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then | |
8114 | gcc_cv_ld_eh_frame_hdr=yes | |
8115 | fi | |
8116 | elif test x$gcc_cv_ld != x; then | |
8117 | # Check if linker supports --eh-frame-hdr option | |
8118 | if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then | |
8119 | gcc_cv_ld_eh_frame_hdr=yes | |
8120 | fi | |
8121 | fi | |
8122 | if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then | |
8123 | cat >> confdefs.h <<\EOF | |
8124 | #define HAVE_LD_EH_FRAME_HDR 1 | |
8125 | EOF | |
8126 | ||
8127 | fi | |
8128 | echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6 | |
8129 | ||
4357a6c3 CD |
8130 | # Miscellaneous target-specific checks. |
8131 | case "$target" in | |
8132 | mips*-*-*) | |
8133 | echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6 | |
9118405f | 8134 | echo "configure:8135: checking whether libgloss uses STARTUP directives consistently" >&5 |
4357a6c3 CD |
8135 | gcc_cv_mips_libgloss_startup=no |
8136 | gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss | |
8137 | if test "x$exec_prefix" = xNONE; then | |
8138 | if test "x$prefix" = xNONE; then | |
8139 | test_prefix=/usr/local | |
8140 | else | |
8141 | test_prefix=$prefix | |
8142 | fi | |
8143 | else | |
8144 | test_prefix=$exec_prefix | |
8145 | fi | |
8146 | for f in $gcc_cv_libgloss_srcdir/mips/idt.ld $test_prefix/$target_alias/lib/idt.ld | |
8147 | do | |
8148 | if grep '^STARTUP' $f > /dev/null 2>&1; then | |
8149 | gcc_cv_mips_libgloss_startup=yes | |
8150 | break | |
8151 | fi | |
8152 | done | |
8153 | if test x"$gcc_cv_mips_libgloss_startup" = xyes; then | |
8154 | cat >> confdefs.h <<\EOF | |
8155 | #define HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES 1 | |
8156 | EOF | |
8157 | ||
8158 | fi | |
8159 | echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6 | |
8160 | ;; | |
8161 | esac | |
8162 | ||
3ec5d64d | 8163 | if test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then |
793e9558 PB |
8164 | cat >> confdefs.h <<EOF |
8165 | #define PREFIX_INCLUDE_DIR "$prefix/include" | |
8166 | EOF | |
8167 | ||
8168 | fi | |
8169 | ||
861bb6c1 | 8170 | # Figure out what language subdirectories are present. |
71205e0b MH |
8171 | # Look if the user specified --enable-languages="..."; if not, use |
8172 | # the environment variable $LANGUAGES if defined. $LANGUAGES might | |
8173 | # go away some day. | |
cc9a08e0 | 8174 | # NB: embedded tabs in this IF block -- do not untabify |
71205e0b MH |
8175 | if test x"${enable_languages+set}" != xset; then |
8176 | if test x"${LANGUAGES+set}" = xset; then | |
cc9a08e0 PE |
8177 | enable_languages="${LANGUAGES}" |
8178 | echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2 | |
8179 | ||
71205e0b MH |
8180 | else |
8181 | enable_languages=all | |
8182 | fi | |
d6c6b553 | 8183 | else |
015089dd TJ |
8184 | if test x"${enable_languages}" = x \ |
8185 | || test x"${enable_languages}" = xyes; | |
cc9a08e0 PE |
8186 | then |
8187 | { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; } | |
d6c6b553 | 8188 | fi |
71205e0b | 8189 | fi |
cc9a08e0 | 8190 | enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'` |
75382c6d TT |
8191 | |
8192 | # First scan to see if an enabled language requires some other language. | |
8193 | # We assume that a given config-lang.in will list all the language | |
8194 | # front ends it requires, even if some are required indirectly. | |
8195 | for lang in ${srcdir}/*/config-lang.in .. | |
8196 | do | |
8197 | case $lang in | |
8198 | ..) | |
8199 | ;; | |
8200 | # The odd quoting in the next line works around | |
8201 | # an apparent bug in bash 1.12 on linux. | |
8202 | ${srcdir}/[*]/config-lang.in) | |
8203 | ;; | |
8204 | *) | |
8205 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
8206 | this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang` | |
8207 | for other in $this_lang_requires | |
8208 | do | |
8209 | case ,${enable_languages}, in | |
8210 | *,$other,*) | |
8211 | ;; | |
8212 | *,all,*) | |
8213 | ;; | |
1bf17cc4 | 8214 | *,$lang_alias,*) |
75382c6d TT |
8215 | enable_languages="$enable_languages,$other" |
8216 | ;; | |
8217 | esac | |
8218 | done | |
8219 | ;; | |
8220 | esac | |
8221 | done | |
8222 | ||
015089dd TJ |
8223 | expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'` |
8224 | found_languages= | |
861bb6c1 JL |
8225 | subdirs= |
8226 | for lang in ${srcdir}/*/config-lang.in .. | |
8227 | do | |
8228 | case $lang in | |
8229 | ..) ;; | |
8230 | # The odd quoting in the next line works around | |
8231 | # an apparent bug in bash 1.12 on linux. | |
8232 | ${srcdir}/[*]/config-lang.in) ;; | |
71205e0b MH |
8233 | *) |
8234 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
2b60b2cb AO |
8235 | this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang` |
8236 | build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang` | |
71205e0b MH |
8237 | if test "x$lang_alias" = x |
8238 | then | |
8239 | echo "$lang doesn't set \$language." 1>&2 | |
8240 | exit 1 | |
8241 | fi | |
2b60b2cb AO |
8242 | case ${build_by_default},${enable_languages}, in |
8243 | *,$lang_alias,*) add_this_lang=yes ;; | |
8244 | no,*) add_this_lang=no ;; | |
8245 | *,all,*) add_this_lang=yes ;; | |
8246 | *) add_this_lang=no ;; | |
8247 | esac | |
015089dd | 8248 | found_languages="${found_languages} ${lang_alias}" |
71205e0b MH |
8249 | if test x"${add_this_lang}" = xyes; then |
8250 | case $lang in | |
8251 | ${srcdir}/ada/config-lang.in) | |
1ffc5c6e | 8252 | if test x$have_gnat = xyes ; then |
71205e0b MH |
8253 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" |
8254 | fi | |
8255 | ;; | |
8256 | *) | |
8257 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" | |
8258 | ;; | |
8259 | esac | |
8260 | fi | |
8261 | ;; | |
861bb6c1 JL |
8262 | esac |
8263 | done | |
8264 | ||
015089dd TJ |
8265 | missing_languages= |
8266 | for expected_language in ${expected_languages} .. | |
8267 | do | |
8268 | if test "${expected_language}" != ..; then | |
8269 | missing_language="${expected_language}" | |
8270 | if test "${expected_language}" = "c" \ | |
8271 | || test "${expected_language}" = "all"; then | |
8272 | missing_language= | |
8273 | fi | |
8274 | for found_language in ${found_languages} .. | |
8275 | do | |
8276 | if test "${found_language}" != ..; then | |
8277 | if test "${expected_language}" = "${found_language}"; then | |
8278 | missing_language= | |
8279 | fi | |
8280 | fi | |
8281 | done | |
8282 | if test "x${missing_language}" != x; then | |
8283 | missing_languages="${missing_languages} ${missing_language}" | |
8284 | fi | |
8285 | fi | |
8286 | done | |
8287 | ||
8288 | if test "x$missing_languages" != x; then | |
8289 | { echo "configure: error: | |
8290 | The following requested languages were not found:${missing_languages} | |
8291 | The following languages were available: c${found_languages}" 1>&2; exit 1; } | |
02ef40d9 TJ |
8292 | fi |
8293 | ||
f24af81b TT |
8294 | # Make gthr-default.h if we have a thread file. |
8295 | gthread_flags= | |
75bffa71 | 8296 | if test $thread_file != single; then |
f24af81b | 8297 | rm -f gthr-default.h |
db0d1ed9 | 8298 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h |
f24af81b TT |
8299 | gthread_flags=-DHAVE_GTHR_DEFAULT |
8300 | fi | |
8301 | ||
8302 | ||
81bf3d9e RH |
8303 | # Find out what GC implementation we want, or may, use. |
8304 | # Check whether --with-gc or --without-gc was given. | |
8305 | if test "${with_gc+set}" = set; then | |
8306 | withval="$with_gc" | |
8307 | case "$withval" in | |
8308 | simple | page) | |
8309 | GGC=ggc-$withval | |
8310 | ;; | |
8311 | *) | |
8312 | { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; } | |
8313 | ;; | |
8314 | esac | |
8315 | else | |
005537df | 8316 | GGC=ggc-page |
81bf3d9e RH |
8317 | fi |
8318 | ||
8319 | ||
8320 | echo "Using $GGC for garbage collection." | |
8321 | ||
3c809ba4 | 8322 | # Use the system's zlib library. |
b8dad04b ZW |
8323 | zlibdir=-L../zlib |
8324 | zlibinc="-I\$(srcdir)/../zlib" | |
3c809ba4 AG |
8325 | # Check whether --with-system-zlib or --without-system-zlib was given. |
8326 | if test "${with_system_zlib+set}" = set; then | |
8327 | withval="$with_system_zlib" | |
8328 | zlibdir= | |
8329 | zlibinc= | |
8330 | ||
8331 | fi | |
8332 | ||
8333 | ||
8334 | ||
8335 | ||
dc6746e7 PT |
8336 | |
8337 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 | |
9118405f | 8338 | echo "configure:8339: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
dc6746e7 PT |
8339 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
8340 | if test "${enable_maintainer_mode+set}" = set; then | |
8341 | enableval="$enable_maintainer_mode" | |
8342 | maintainer_mode=$enableval | |
8343 | else | |
8344 | maintainer_mode=no | |
8345 | fi | |
8346 | ||
8347 | ||
8348 | echo "$ac_t""$maintainer_mode" 1>&6 | |
8349 | ||
8350 | if test "$maintainer_mode" = "yes"; then | |
8351 | MAINT='' | |
8352 | else | |
8353 | MAINT='#' | |
8354 | fi | |
8355 | ||
531073e7 RH |
8356 | # With Setjmp/Longjmp based exception handling. |
8357 | # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. | |
8358 | if test "${enable_sjlj_exceptions+set}" = set; then | |
8359 | enableval="$enable_sjlj_exceptions" | |
8360 | sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` | |
8361 | cat >> confdefs.h <<EOF | |
8362 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj | |
8363 | EOF | |
8364 | ||
8365 | fi | |
8366 | ||
8367 | ||
893a047c SE |
8368 | # Use libunwind based exception handling. |
8369 | # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given. | |
8370 | if test "${enable_libunwind_exceptions+set}" = set; then | |
8371 | enableval="$enable_libunwind_exceptions" | |
8372 | use_libunwind_exceptions=$enableval | |
8373 | else | |
8374 | use_libunwind_exceptions=no | |
8375 | fi | |
8376 | ||
8377 | if test x"$use_libunwind_exceptions" = xyes; then | |
8378 | cat >> confdefs.h <<\EOF | |
8379 | #define USE_LIBUNWIND_EXCEPTIONS 1 | |
8380 | EOF | |
8381 | ||
8382 | fi | |
8383 | ||
861bb6c1 JL |
8384 | # Make empty files to contain the specs and options for each language. |
8385 | # Then add #include lines to for a compiler that has specs and/or options. | |
8386 | ||
8387 | lang_specs_files= | |
8388 | lang_options_files= | |
3103b7db | 8389 | lang_tree_files= |
861bb6c1 JL |
8390 | for subdir in . $subdirs |
8391 | do | |
75bffa71 | 8392 | if test -f $srcdir/$subdir/lang-specs.h; then |
0d24f4d1 | 8393 | lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" |
861bb6c1 | 8394 | fi |
75bffa71 | 8395 | if test -f $srcdir/$subdir/lang-options.h; then |
0d24f4d1 | 8396 | lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h" |
861bb6c1 | 8397 | fi |
3103b7db | 8398 | if test -f $srcdir/$subdir/$subdir-tree.def; then |
0d24f4d1 | 8399 | lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" |
3103b7db | 8400 | fi |
861bb6c1 JL |
8401 | done |
8402 | ||
8403 | # These (without "all_") are set in each config-lang.in. | |
8404 | # `language' must be a single word so is spelled singularly. | |
8405 | all_languages= | |
8406 | all_boot_languages= | |
8407 | all_compilers= | |
8408 | all_stagestuff= | |
e34a3d31 | 8409 | all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders' |
861bb6c1 JL |
8410 | # List of language makefile fragments. |
8411 | all_lang_makefiles= | |
e2500fed | 8412 | # Files for gengtype |
ef69da62 | 8413 | all_gtfiles="$target_gtfiles" |
8ac9d31f TJ |
8414 | # Files for gengtype with language |
8415 | all_gtfiles_files_langs= | |
8416 | all_gtfiles_files_files= | |
861bb6c1 JL |
8417 | |
8418 | # Add the language fragments. | |
8419 | # Languages are added via two mechanisms. Some information must be | |
8420 | # recorded in makefile variables, these are defined in config-lang.in. | |
8421 | # We accumulate them and plug them into the main Makefile. | |
8422 | # The other mechanism is a set of hooks for each of the main targets | |
8423 | # like `clean', `install', etc. | |
8424 | ||
8425 | language_fragments="Make-lang" | |
8426 | language_hooks="Make-hooks" | |
861bb6c1 JL |
8427 | |
8428 | for s in .. $subdirs | |
8429 | do | |
75bffa71 | 8430 | if test $s != ".." |
861bb6c1 JL |
8431 | then |
8432 | language= | |
8433 | boot_language= | |
8434 | compilers= | |
8435 | stagestuff= | |
861bb6c1 | 8436 | outputs= |
e2500fed | 8437 | gtfiles= |
861bb6c1 | 8438 | . ${srcdir}/$s/config-lang.in |
75bffa71 | 8439 | if test "x$language" = x |
861bb6c1 JL |
8440 | then |
8441 | echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2 | |
8442 | exit 1 | |
8443 | fi | |
72aaffbd ZW |
8444 | all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in" |
8445 | if test -f ${srcdir}/$s/Makefile.in | |
8446 | then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in" | |
8447 | fi | |
861bb6c1 | 8448 | all_languages="$all_languages $language" |
75bffa71 | 8449 | if test "x$boot_language" = xyes |
861bb6c1 JL |
8450 | then |
8451 | all_boot_languages="$all_boot_languages $language" | |
8452 | fi | |
8453 | all_compilers="$all_compilers $compilers" | |
8454 | all_stagestuff="$all_stagestuff $stagestuff" | |
861bb6c1 | 8455 | all_outputs="$all_outputs $outputs" |
e2500fed | 8456 | all_gtfiles="$all_gtfiles $gtfiles" |
8ac9d31f TJ |
8457 | for f in .. $gtfiles |
8458 | do | |
8459 | if test $f != ".." | |
8460 | then | |
8461 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " | |
8462 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8463 | fi | |
8464 | done | |
861bb6c1 JL |
8465 | fi |
8466 | done | |
8467 | ||
8ac9d31f TJ |
8468 | # Pick up gtfiles for c |
8469 | gtfiles= | |
8470 | s="c" | |
8471 | . ${srcdir}/c-config-lang.in | |
8472 | all_gtfiles="$all_gtfiles $gtfiles" | |
8473 | for f in .. $gtfiles | |
8474 | do | |
8475 | if test $f != ".." | |
8476 | then | |
8477 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " | |
8478 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8479 | fi | |
8480 | done | |
8481 | ||
cbc59f01 DD |
8482 | check_languages= |
8483 | for language in .. $all_languages | |
8484 | do | |
8485 | if test $language != ".." | |
8486 | then | |
8487 | check_languages="$check_languages check-$language" | |
8488 | fi | |
8489 | done | |
8490 | ||
861bb6c1 JL |
8491 | # Since we can't use `::' targets, we link each language in |
8492 | # with a set of hooks, reached indirectly via lang.${target}. | |
8493 | ||
8494 | rm -f Make-hooks | |
8495 | touch Make-hooks | |
8496 | target_list="all.build all.cross start.encap rest.encap \ | |
d3945f0a | 8497 | info dvi generated-manpages \ |
861bb6c1 | 8498 | install-normal install-common install-info install-man \ |
436a88a6 | 8499 | uninstall \ |
861bb6c1 JL |
8500 | mostlyclean clean distclean extraclean maintainer-clean \ |
8501 | stage1 stage2 stage3 stage4" | |
8502 | for t in $target_list | |
8503 | do | |
8504 | x= | |
ab87f8c8 | 8505 | for lang in .. $all_languages |
861bb6c1 | 8506 | do |
ab87f8c8 JL |
8507 | if test $lang != ".."; then |
8508 | x="$x $lang.$t" | |
861bb6c1 JL |
8509 | fi |
8510 | done | |
8511 | echo "lang.$t: $x" >> Make-hooks | |
8512 | done | |
8513 | ||
cc06d68c | 8514 | # Create .gdbinit. |
861bb6c1 | 8515 | |
cc06d68c GP |
8516 | echo "dir ." > .gdbinit |
8517 | echo "dir ${srcdir}" >> .gdbinit | |
8518 | if test x$gdb_needs_out_file_path = xyes | |
8519 | then | |
8520 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
8521 | fi | |
8522 | if test "x$subdirs" != x; then | |
8523 | for s in $subdirs | |
8524 | do | |
8525 | echo "dir ${srcdir}/$s" >> .gdbinit | |
8526 | done | |
861bb6c1 | 8527 | fi |
cc06d68c | 8528 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 8529 | |
88111b26 JL |
8530 | # Define variables host_canonical and build_canonical |
8531 | # because some Cygnus local changes in the Makefile depend on them. | |
8532 | build_canonical=${build} | |
8533 | host_canonical=${host} | |
8534 | target_subdir= | |
75bffa71 | 8535 | if test "${host}" != "${target}" ; then |
924c96eb | 8536 | target_subdir=${target_alias}/ |
88111b26 JL |
8537 | fi |
8538 | ||
8539 | ||
8540 | ||
8541 | ||
8f8d3278 NC |
8542 | # If $(exec_prefix) exists and is not the same as $(prefix), then compute an |
8543 | # absolute path for gcc_tooldir based on inserting the number of up-directory | |
8544 | # movements required to get from $(exec_prefix) to $(prefix) into the basic | |
8545 | # $(libsubdir)/@(unlibsubdir) based path. | |
82cbf8f7 JL |
8546 | # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel |
8547 | # make and thus we'd get different behavior depending on where we built the | |
8548 | # sources. | |
5949a9fc | 8549 | if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then |
d062c304 JL |
8550 | gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)' |
8551 | else | |
8f8d3278 NC |
8552 | # An explanation of the sed strings: |
8553 | # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix' | |
8554 | # -e 's|/$||' match a trailing forward slash and eliminates it | |
8555 | # -e 's|^[^/]|/|' forces the string to start with a forward slash (*) | |
ff7cc307 | 8556 | # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../ |
8f8d3278 NC |
8557 | # |
8558 | # (*) Note this pattern overwrites the first character of the string | |
8559 | # with a forward slash if one is not already present. This is not a | |
8560 | # problem because the exact names of the sub-directories concerned is | |
8561 | # unimportant, just the number of them matters. | |
8562 | # | |
8563 | # The practical upshot of these patterns is like this: | |
8564 | # | |
8565 | # prefix exec_prefix result | |
8566 | # ------ ----------- ------ | |
8567 | # /foo /foo/bar ../ | |
8568 | # /foo/ /foo/bar ../ | |
8569 | # /foo /foo/bar/ ../ | |
8570 | # /foo/ /foo/bar/ ../ | |
8571 | # /foo /foo/bar/ugg ../../ | |
8572 | # | |
4c112cda NC |
8573 | dollar='$$' |
8574 | gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)" | |
d062c304 JL |
8575 | fi |
8576 | ||
8577 | ||
2ce3c6c6 | 8578 | |
2bbea3a6 RH |
8579 | # Find a directory in which to install a shared libgcc. |
8580 | ||
8581 | # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. | |
8582 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
8583 | enableval="$enable_version_specific_runtime_libs" | |
8584 | : | |
8585 | fi | |
8586 | ||
8587 | ||
5b15f277 RH |
8588 | # Check whether --with-slibdir or --without-slibdir was given. |
8589 | if test "${with_slibdir+set}" = set; then | |
8590 | withval="$with_slibdir" | |
8591 | slibdir="$with_slibdir" | |
8592 | else | |
8593 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 8594 | slibdir='$(libsubdir)' |
5b15f277 | 8595 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
8596 | slibdir='$(build_tooldir)/lib' |
8597 | else | |
5b15f277 | 8598 | slibdir='$(libdir)' |
2bbea3a6 | 8599 | fi |
5b15f277 RH |
8600 | fi |
8601 | ||
2bbea3a6 RH |
8602 | |
8603 | ||
1e6347d8 | 8604 | objdir=`${PWDCMD-pwd}` |
7e717196 JL |
8605 | |
8606 | ||
861bb6c1 JL |
8607 | # Process the language and host/target makefile fragments. |
8608 | ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file" | |
8609 | ||
8610 | # Substitute configuration variables | |
8611 | ||
8612 | ||
8613 | ||
8614 | ||
8615 | ||
8616 | ||
8617 | ||
8618 | ||
8619 | ||
8620 | ||
8621 | ||
8622 | ||
8623 | ||
8624 | ||
8625 | ||
8626 | ||
8627 | ||
8628 | ||
8629 | ||
8630 | ||
8631 | ||
8632 | ||
8633 | ||
8634 | ||
8635 | ||
8636 | ||
8637 | ||
8638 | ||
8639 | ||
8640 | ||
8641 | ||
8642 | ||
8643 | ||
8644 | ||
8645 | ||
8646 | ||
8647 | ||
8648 | ||
8649 | ||
8650 | ||
8651 | ||
8652 | ||
8653 | ||
8654 | ||
8655 | ||
8656 | ||
9b16d2c4 | 8657 | |
e9a25f70 | 8658 | |
6e26218f | 8659 | |
c8724862 | 8660 | |
e061d1ce | 8661 | |
d8bb17c8 | 8662 | |
11642c3a ZW |
8663 | |
8664 | ||
8665 | ||
8666 | ||
8667 | ||
8668 | ||
8669 | ||
3d9d2476 | 8670 | |
596151e1 | 8671 | |
8ac9d31f TJ |
8672 | |
8673 | ||
8674 | ||
e2500fed | 8675 | |
d5355cb2 | 8676 | |
861bb6c1 JL |
8677 | |
8678 | ||
8679 | # Echo that links are built | |
75bffa71 | 8680 | if test x$host = x$target |
861bb6c1 JL |
8681 | then |
8682 | str1="native " | |
8683 | else | |
8684 | str1="cross-" | |
8685 | str2=" from $host" | |
8686 | fi | |
8687 | ||
75bffa71 | 8688 | if test x$host != x$build |
861bb6c1 JL |
8689 | then |
8690 | str3=" on a $build system" | |
8691 | fi | |
8692 | ||
75bffa71 | 8693 | if test "x$str2" != x || test "x$str3" != x |
861bb6c1 JL |
8694 | then |
8695 | str4= | |
8696 | fi | |
8697 | ||
8698 | echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2 | |
8699 | ||
75bffa71 | 8700 | if test "x$str2" != x || test "x$str3" != x |
861bb6c1 JL |
8701 | then |
8702 | echo " ${str2}${str3}." 1>&2 | |
8703 | fi | |
8704 | ||
f6cb0e63 | 8705 | # Truncate the target if necessary |
75bffa71 | 8706 | if test x$host_truncate_target != x; then |
f6cb0e63 JL |
8707 | target=`echo $target | sed -e 's/\(..............\).*/\1/'` |
8708 | fi | |
8709 | ||
861bb6c1 JL |
8710 | # Configure the subdirectories |
8711 | # AC_CONFIG_SUBDIRS($subdirs) | |
8712 | ||
8713 | # Create the Makefile | |
8714 | # and configure language subdirectories | |
8715 | trap '' 1 2 15 | |
8716 | cat > confcache <<\EOF | |
8717 | # This file is a shell script that caches the results of configure | |
8718 | # tests run on this system so they can be shared between configure | |
8719 | # scripts and configure runs. It is not useful on other systems. | |
8720 | # If it contains results you don't want to keep, you may remove or edit it. | |
8721 | # | |
8722 | # By default, configure uses ./config.cache as the cache file, | |
8723 | # creating it if it does not exist already. You can give configure | |
8724 | # the --cache-file=FILE option to use a different cache file; that is | |
8725 | # what configure does when it calls configure scripts in | |
8726 | # subdirectories, so they share the cache. | |
8727 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
8728 | # config.status only pays attention to the cache file if you give it the | |
8729 | # --recheck option to rerun configure. | |
8730 | # | |
8731 | EOF | |
8732 | # The following way of writing the cache mishandles newlines in values, | |
8733 | # but we know of no workaround that is simple, portable, and efficient. | |
8734 | # So, don't put newlines in cache variables' values. | |
8735 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
8736 | # and sets the high bit in the cache file unless we assign to the vars. | |
8737 | (set) 2>&1 | | |
b27d2bd5 | 8738 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
861bb6c1 JL |
8739 | *ac_space=\ *) |
8740 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
8741 | # turns \\\\ into \\, and sed turns \\ into \). | |
8742 | sed -n \ | |
8743 | -e "s/'/'\\\\''/g" \ | |
8744 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
8745 | ;; | |
8746 | *) | |
8747 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
8748 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
8749 | ;; | |
8750 | esac >> confcache | |
8751 | if cmp -s $cache_file confcache; then | |
8752 | : | |
8753 | else | |
8754 | if test -w $cache_file; then | |
8755 | echo "updating cache $cache_file" | |
8756 | cat confcache > $cache_file | |
8757 | else | |
8758 | echo "not updating unwritable cache $cache_file" | |
8759 | fi | |
8760 | fi | |
8761 | rm -f confcache | |
8762 | ||
8763 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
8764 | ||
8765 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
8766 | # Let make expand exec_prefix. | |
8767 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
8768 | ||
8769 | # Any assignment to VPATH causes Sun make to only execute | |
8770 | # the first set of double-colon rules, so remove it if not needed. | |
8771 | # If there is a colon in the path, we need to keep it. | |
8772 | if test "x$srcdir" = x.; then | |
8773 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
8774 | fi | |
8775 | ||
8776 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
8777 | ||
8778 | DEFS=-DHAVE_CONFIG_H | |
8779 | ||
8780 | # Without the "./", some shells look in PATH for config.status. | |
8781 | : ${CONFIG_STATUS=./config.status} | |
8782 | ||
8783 | echo creating $CONFIG_STATUS | |
8784 | rm -f $CONFIG_STATUS | |
8785 | cat > $CONFIG_STATUS <<EOF | |
8786 | #! /bin/sh | |
8787 | # Generated automatically by configure. | |
8788 | # Run this file to recreate the current configuration. | |
8789 | # This directory was configured as follows, | |
8790 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
8791 | # | |
8792 | # $0 $ac_configure_args | |
8793 | # | |
8794 | # Compiler output produced by configure, useful for debugging | |
8795 | # configure, is in ./config.log if it exists. | |
8796 | ||
8797 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
8798 | for ac_option | |
8799 | do | |
8800 | case "\$ac_option" in | |
8801 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
8802 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
8803 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
8804 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
b27d2bd5 | 8805 | echo "$CONFIG_STATUS generated by autoconf version 2.13" |
861bb6c1 JL |
8806 | exit 0 ;; |
8807 | -help | --help | --hel | --he | --h) | |
8808 | echo "\$ac_cs_usage"; exit 0 ;; | |
8809 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
8810 | esac | |
8811 | done | |
8812 | ||
8813 | ac_given_srcdir=$srcdir | |
861bb6c1 | 8814 | |
b7cb92ad | 8815 | trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
861bb6c1 JL |
8816 | EOF |
8817 | cat >> $CONFIG_STATUS <<EOF | |
8818 | ||
8819 | # Protect against being on the right side of a sed subst in config.status. | |
8820 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
8821 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
8822 | $ac_vpsub | |
8823 | $extrasub | |
6f144c9c | 8824 | s%@SHELL@%$SHELL%g |
861bb6c1 JL |
8825 | s%@CFLAGS@%$CFLAGS%g |
8826 | s%@CPPFLAGS@%$CPPFLAGS%g | |
8827 | s%@CXXFLAGS@%$CXXFLAGS%g | |
b27d2bd5 | 8828 | s%@FFLAGS@%$FFLAGS%g |
861bb6c1 JL |
8829 | s%@DEFS@%$DEFS%g |
8830 | s%@LDFLAGS@%$LDFLAGS%g | |
8831 | s%@LIBS@%$LIBS%g | |
8832 | s%@exec_prefix@%$exec_prefix%g | |
8833 | s%@prefix@%$prefix%g | |
8834 | s%@program_transform_name@%$program_transform_name%g | |
8835 | s%@bindir@%$bindir%g | |
8836 | s%@sbindir@%$sbindir%g | |
8837 | s%@libexecdir@%$libexecdir%g | |
8838 | s%@datadir@%$datadir%g | |
8839 | s%@sysconfdir@%$sysconfdir%g | |
8840 | s%@sharedstatedir@%$sharedstatedir%g | |
8841 | s%@localstatedir@%$localstatedir%g | |
8842 | s%@libdir@%$libdir%g | |
8843 | s%@includedir@%$includedir%g | |
8844 | s%@oldincludedir@%$oldincludedir%g | |
8845 | s%@infodir@%$infodir%g | |
8846 | s%@mandir@%$mandir%g | |
8847 | s%@host@%$host%g | |
8848 | s%@host_alias@%$host_alias%g | |
8849 | s%@host_cpu@%$host_cpu%g | |
8850 | s%@host_vendor@%$host_vendor%g | |
8851 | s%@host_os@%$host_os%g | |
13c22933 JJ |
8852 | s%@target@%$target%g |
8853 | s%@target_alias@%$target_alias%g | |
8854 | s%@target_cpu@%$target_cpu%g | |
8855 | s%@target_vendor@%$target_vendor%g | |
8856 | s%@target_os@%$target_os%g | |
861bb6c1 JL |
8857 | s%@build@%$build%g |
8858 | s%@build_alias@%$build_alias%g | |
8859 | s%@build_cpu@%$build_cpu%g | |
8860 | s%@build_vendor@%$build_vendor%g | |
8861 | s%@build_os@%$build_os%g | |
13c22933 JJ |
8862 | s%@CC@%$CC%g |
8863 | s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g | |
8864 | s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g | |
200ef634 GK |
8865 | s%@GNATBIND@%$GNATBIND%g |
8866 | s%@ADAC@%$ADAC%g | |
b8dad04b | 8867 | s%@strict1_warn@%$strict1_warn%g |
84c041a1 | 8868 | s%@CPP@%$CPP%g |
b8dad04b | 8869 | s%@warn_cflags@%$warn_cflags%g |
414d23ae HPN |
8870 | s%@enable_multilib@%$enable_multilib%g |
8871 | s%@nocommon_flag@%$nocommon_flag%g | |
8872 | s%@valgrind_path@%$valgrind_path%g | |
8873 | s%@valgrind_path_defines@%$valgrind_path_defines%g | |
8874 | s%@valgrind_command@%$valgrind_command%g | |
8875 | s%@coverage_flags@%$coverage_flags%g | |
8876 | s%@enable_shared@%$enable_shared%g | |
b8dad04b | 8877 | s%@stage1_cflags@%$stage1_cflags%g |
e9a25f70 | 8878 | s%@SET_MAKE@%$SET_MAKE%g |
861bb6c1 | 8879 | s%@AWK@%$AWK%g |
0a4b6309 RL |
8880 | s%@LN@%$LN%g |
8881 | s%@LN_S@%$LN_S%g | |
861bb6c1 | 8882 | s%@RANLIB@%$RANLIB%g |
0a4b6309 RL |
8883 | s%@INSTALL@%$INSTALL%g |
8884 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g | |
8885 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
955be633 | 8886 | s%@have_mktemp_command@%$have_mktemp_command%g |
09fa0705 ZW |
8887 | s%@MAKEINFO@%$MAKEINFO%g |
8888 | s%@BUILD_INFO@%$BUILD_INFO%g | |
fd939e46 | 8889 | s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g |
1e608388 ZW |
8890 | s%@FLEX@%$FLEX%g |
8891 | s%@BISON@%$BISON%g | |
4e70264f | 8892 | s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g |
7f2749d4 | 8893 | s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g |
e256b8b6 | 8894 | s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g |
f91abfce | 8895 | s%@LIBICONV@%$LIBICONV%g |
07cf4226 | 8896 | s%@gcc_cv_initfinit_array@%$gcc_cv_initfinit_array%g |
861bb6c1 | 8897 | s%@manext@%$manext%g |
992d1248 | 8898 | s%@objext@%$objext%g |
a5381466 | 8899 | s%@extra_modes_file@%$extra_modes_file%g |
06f0b04c | 8900 | s%@FORBUILD@%$FORBUILD%g |
ab87f8c8 JL |
8901 | s%@PACKAGE@%$PACKAGE%g |
8902 | s%@VERSION@%$VERSION%g | |
71a94577 ZW |
8903 | s%@ALLOCA@%$ALLOCA%g |
8904 | s%@GLIBC21@%$GLIBC21%g | |
ab87f8c8 JL |
8905 | s%@USE_NLS@%$USE_NLS%g |
8906 | s%@MSGFMT@%$MSGFMT%g | |
8907 | s%@GMSGFMT@%$GMSGFMT%g | |
8908 | s%@XGETTEXT@%$XGETTEXT%g | |
71a94577 ZW |
8909 | s%@INTLBISON@%$INTLBISON%g |
8910 | s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g | |
ab87f8c8 JL |
8911 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g |
8912 | s%@CATALOGS@%$CATALOGS%g | |
8913 | s%@CATOBJEXT@%$CATOBJEXT%g | |
ab87f8c8 | 8914 | s%@INTLLIBS@%$INTLLIBS%g |
77c06844 | 8915 | s%@INTLDEPS@%$INTLDEPS%g |
ab87f8c8 | 8916 | s%@INTLOBJS@%$INTLOBJS%g |
ab87f8c8 | 8917 | s%@POSUB@%$POSUB%g |
71a94577 ZW |
8918 | s%@DATADIRNAME@%$DATADIRNAME%g |
8919 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
8920 | s%@GENCAT@%$GENCAT%g | |
ab87f8c8 | 8921 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g |
71a94577 | 8922 | s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g |
a078a589 ZW |
8923 | s%@CROSS@%$CROSS%g |
8924 | s%@ALL@%$ALL%g | |
8925 | s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g | |
b39d221a | 8926 | s%@inhibit_libc@%$inhibit_libc%g |
5c35940c NN |
8927 | s%@BUILD_PREFIX@%$BUILD_PREFIX%g |
8928 | s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g | |
a078a589 ZW |
8929 | s%@HOST_CC@%$HOST_CC%g |
8930 | s%@HOST_CFLAGS@%$HOST_CFLAGS%g | |
8931 | s%@STMP_FIXINC@%$STMP_FIXINC%g | |
8932 | s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g | |
9e944a16 | 8933 | s%@libgcc_visibility@%$libgcc_visibility%g |
f24af81b | 8934 | s%@gthread_flags@%$gthread_flags%g |
81bf3d9e | 8935 | s%@GGC@%$GGC%g |
3c809ba4 AG |
8936 | s%@zlibdir@%$zlibdir%g |
8937 | s%@zlibinc@%$zlibinc%g | |
dc6746e7 | 8938 | s%@MAINT@%$MAINT%g |
88111b26 JL |
8939 | s%@build_canonical@%$build_canonical%g |
8940 | s%@host_canonical@%$host_canonical%g | |
8941 | s%@target_subdir@%$target_subdir%g | |
d062c304 | 8942 | s%@gcc_tooldir@%$gcc_tooldir%g |
4c112cda | 8943 | s%@dollar@%$dollar%g |
2bbea3a6 | 8944 | s%@slibdir@%$slibdir%g |
7e717196 | 8945 | s%@objdir@%$objdir%g |
861bb6c1 | 8946 | s%@subdirs@%$subdirs%g |
8ac9d31f | 8947 | s%@srcdir@%$srcdir%g |
861bb6c1 JL |
8948 | s%@all_boot_languages@%$all_boot_languages%g |
8949 | s%@all_compilers@%$all_compilers%g | |
e2500fed | 8950 | s%@all_gtfiles@%$all_gtfiles%g |
8ac9d31f TJ |
8951 | s%@all_gtfiles_files_langs@%$all_gtfiles_files_langs%g |
8952 | s%@all_gtfiles_files_files@%$all_gtfiles_files_files%g | |
4f3ae93c BK |
8953 | s%@all_lang_makefiles@%$all_lang_makefiles%g |
8954 | s%@all_languages@%$all_languages%g | |
4f3ae93c BK |
8955 | s%@all_stagestuff@%$all_stagestuff%g |
8956 | s%@build_exeext@%$build_exeext%g | |
8957 | s%@build_install_headers_dir@%$build_install_headers_dir%g | |
8958 | s%@build_xm_file_list@%$build_xm_file_list%g | |
11642c3a ZW |
8959 | s%@build_xm_file@%$build_xm_file%g |
8960 | s%@build_xm_defines@%$build_xm_defines%g | |
cbc59f01 | 8961 | s%@check_languages@%$check_languages%g |
4f3ae93c | 8962 | s%@cc_set_by_configure@%$cc_set_by_configure%g |
5aa82ace | 8963 | s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g |
4f3ae93c | 8964 | s%@cpp_install_dir@%$cpp_install_dir%g |
4f3ae93c BK |
8965 | s%@dep_host_xmake_file@%$dep_host_xmake_file%g |
8966 | s%@dep_tmake_file@%$dep_tmake_file%g | |
4f3ae93c | 8967 | s%@extra_headers_list@%$extra_headers_list%g |
861bb6c1 | 8968 | s%@extra_objs@%$extra_objs%g |
4f3ae93c BK |
8969 | s%@extra_parts@%$extra_parts%g |
8970 | s%@extra_passes@%$extra_passes%g | |
8971 | s%@extra_programs@%$extra_programs%g | |
4f3ae93c | 8972 | s%@float_h_file@%$float_h_file%g |
cc1e60ea | 8973 | s%@gcc_config_arguments@%$gcc_config_arguments%g |
4f3ae93c | 8974 | s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g |
e2187d3b | 8975 | s%@libstdcxx_incdir@%$libstdcxx_incdir%g |
4f3ae93c | 8976 | s%@gcc_version@%$gcc_version%g |
8763704d | 8977 | s%@gcc_version_full@%$gcc_version_full%g |
4f3ae93c BK |
8978 | s%@gcc_version_trigger@%$gcc_version_trigger%g |
8979 | s%@host_exeext@%$host_exeext%g | |
861bb6c1 | 8980 | s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g |
861bb6c1 | 8981 | s%@host_xm_file_list@%$host_xm_file_list%g |
11642c3a ZW |
8982 | s%@host_xm_file@%$host_xm_file%g |
8983 | s%@host_xm_defines@%$host_xm_defines%g | |
4f3ae93c | 8984 | s%@install@%$install%g |
861bb6c1 | 8985 | s%@lang_options_files@%$lang_options_files%g |
4f3ae93c | 8986 | s%@lang_specs_files@%$lang_specs_files%g |
3103b7db | 8987 | s%@lang_tree_files@%$lang_tree_files%g |
861bb6c1 | 8988 | s%@local_prefix@%$local_prefix%g |
4f3ae93c BK |
8989 | s%@md_file@%$md_file%g |
8990 | s%@objc_boehm_gc@%$objc_boehm_gc%g | |
8991 | s%@out_file@%$out_file%g | |
8992 | s%@out_object_file@%$out_object_file%g | |
861bb6c1 | 8993 | s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g |
596151e1 | 8994 | s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g |
e9a25f70 | 8995 | s%@symbolic_link@%$symbolic_link%g |
4f3ae93c BK |
8996 | s%@thread_file@%$thread_file%g |
8997 | s%@tm_file_list@%$tm_file_list%g | |
11642c3a | 8998 | s%@tm_file@%$tm_file%g |
d5355cb2 | 8999 | s%@tm_defines@%$tm_defines%g |
11642c3a ZW |
9000 | s%@tm_p_file_list@%$tm_p_file_list%g |
9001 | s%@tm_p_file@%$tm_p_file%g | |
9002 | s%@xm_file@%$xm_file%g | |
3d9d2476 | 9003 | s%@xm_defines@%$xm_defines%g |
aac69a49 NC |
9004 | s%@c_target_objs@%$c_target_objs%g |
9005 | s%@cxx_target_objs@%$cxx_target_objs%g | |
11642c3a | 9006 | s%@target_cpu_default@%$target_cpu_default%g |
861bb6c1 JL |
9007 | /@target_overrides@/r $target_overrides |
9008 | s%@target_overrides@%%g | |
9009 | /@host_overrides@/r $host_overrides | |
9010 | s%@host_overrides@%%g | |
861bb6c1 JL |
9011 | /@language_fragments@/r $language_fragments |
9012 | s%@language_fragments@%%g | |
9013 | /@language_hooks@/r $language_hooks | |
9014 | s%@language_hooks@%%g | |
9015 | ||
9016 | CEOF | |
9017 | EOF | |
9018 | ||
9019 | cat >> $CONFIG_STATUS <<\EOF | |
9020 | ||
9021 | # Split the substitutions into bite-sized pieces for seds with | |
9022 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
9023 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
9024 | ac_file=1 # Number of current file. | |
9025 | ac_beg=1 # First line for current file. | |
9026 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
9027 | ac_more_lines=: | |
9028 | ac_sed_cmds="" | |
9029 | while $ac_more_lines; do | |
9030 | if test $ac_beg -gt 1; then | |
9031 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
9032 | else | |
9033 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
9034 | fi | |
9035 | if test ! -s conftest.s$ac_file; then | |
9036 | ac_more_lines=false | |
9037 | rm -f conftest.s$ac_file | |
9038 | else | |
9039 | if test -z "$ac_sed_cmds"; then | |
9040 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
9041 | else | |
9042 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
9043 | fi | |
9044 | ac_file=`expr $ac_file + 1` | |
9045 | ac_beg=$ac_end | |
9046 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
9047 | fi | |
9048 | done | |
9049 | if test -z "$ac_sed_cmds"; then | |
9050 | ac_sed_cmds=cat | |
9051 | fi | |
9052 | EOF | |
9053 | ||
9054 | cat >> $CONFIG_STATUS <<EOF | |
9055 | ||
9056 | CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"} | |
9057 | EOF | |
9058 | cat >> $CONFIG_STATUS <<\EOF | |
9059 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
9060 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
9061 | case "$ac_file" in | |
9062 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
9063 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
9064 | *) ac_file_in="${ac_file}.in" ;; | |
9065 | esac | |
9066 | ||
9067 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
9068 | ||
9069 | # Remove last slash and all that follows it. Not all systems have dirname. | |
9070 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
9071 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
9072 | # The file is in a subdirectory. | |
9073 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
9074 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
9075 | # A "../" for each directory in $ac_dir_suffix. | |
9076 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
9077 | else | |
9078 | ac_dir_suffix= ac_dots= | |
9079 | fi | |
9080 | ||
9081 | case "$ac_given_srcdir" in | |
9082 | .) srcdir=. | |
9083 | if test -z "$ac_dots"; then top_srcdir=. | |
9084 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
9085 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
9086 | *) # Relative path. | |
9087 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
9088 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
9089 | esac | |
9090 | ||
861bb6c1 JL |
9091 | |
9092 | echo creating "$ac_file" | |
9093 | rm -f "$ac_file" | |
9094 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
9095 | case "$ac_file" in | |
9096 | *Makefile*) ac_comsub="1i\\ | |
9097 | # $configure_input" ;; | |
9098 | *) ac_comsub= ;; | |
9099 | esac | |
9100 | ||
9101 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
9102 | sed -e "$ac_comsub | |
9103 | s%@configure_input@%$configure_input%g | |
9104 | s%@srcdir@%$srcdir%g | |
9105 | s%@top_srcdir@%$top_srcdir%g | |
861bb6c1 JL |
9106 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
9107 | fi; done | |
9108 | rm -f conftest.s* | |
9109 | ||
9110 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
9111 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
9112 | # | |
9113 | # ac_d sets the value in "#define NAME VALUE" lines. | |
9114 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
9115 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
9116 | ac_dC='\3' | |
9117 | ac_dD='%g' | |
9118 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
9119 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
9120 | ac_uB='\([ ]\)%\1#\2define\3' | |
9121 | ac_uC=' ' | |
9122 | ac_uD='\4%g' | |
9123 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
9124 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
9125 | ac_eB='$%\1#\2define\3' | |
9126 | ac_eC=' ' | |
9127 | ac_eD='%g' | |
9128 | ||
9129 | if test "${CONFIG_HEADERS+set}" != set; then | |
9130 | EOF | |
9131 | cat >> $CONFIG_STATUS <<EOF | |
b7cb92ad | 9132 | CONFIG_HEADERS="auto-host.h:config.in" |
861bb6c1 JL |
9133 | EOF |
9134 | cat >> $CONFIG_STATUS <<\EOF | |
9135 | fi | |
9136 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
9137 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
9138 | case "$ac_file" in | |
9139 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
9140 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
9141 | *) ac_file_in="${ac_file}.in" ;; | |
9142 | esac | |
9143 | ||
9144 | echo creating $ac_file | |
9145 | ||
9146 | rm -f conftest.frag conftest.in conftest.out | |
9147 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
9148 | cat $ac_file_inputs > conftest.in | |
9149 | ||
9150 | EOF | |
9151 | ||
9152 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
9153 | # the proper values into config.h.in to produce config.h. And first: | |
9154 | # Protect against being on the right side of a sed subst in config.status. | |
9155 | # Protect against being in an unquoted here document in config.status. | |
9156 | rm -f conftest.vals | |
9157 | cat > conftest.hdr <<\EOF | |
9158 | s/[\\&%]/\\&/g | |
9159 | s%[\\$`]%\\&%g | |
9160 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
9161 | s%ac_d%ac_u%gp | |
9162 | s%ac_u%ac_e%gp | |
9163 | EOF | |
9164 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
9165 | rm -f conftest.hdr | |
9166 | ||
9167 | # This sed command replaces #undef with comments. This is necessary, for | |
9168 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
9169 | # on some systems where configure will not decide to define it. | |
9170 | cat >> conftest.vals <<\EOF | |
9171 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
9172 | EOF | |
9173 | ||
9174 | # Break up conftest.vals because some shells have a limit on | |
9175 | # the size of here documents, and old seds have small limits too. | |
9176 | ||
9177 | rm -f conftest.tail | |
9178 | while : | |
9179 | do | |
9180 | ac_lines=`grep -c . conftest.vals` | |
9181 | # grep -c gives empty output for an empty file on some AIX systems. | |
9182 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
9183 | # Write a limited-size here document to conftest.frag. | |
9184 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
9185 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
9186 | echo 'CEOF | |
9187 | sed -f conftest.frag conftest.in > conftest.out | |
9188 | rm -f conftest.in | |
9189 | mv conftest.out conftest.in | |
9190 | ' >> $CONFIG_STATUS | |
9191 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
9192 | rm -f conftest.vals | |
9193 | mv conftest.tail conftest.vals | |
9194 | done | |
9195 | rm -f conftest.vals | |
9196 | ||
9197 | cat >> $CONFIG_STATUS <<\EOF | |
9198 | rm -f conftest.frag conftest.h | |
9199 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
9200 | cat conftest.in >> conftest.h | |
9201 | rm -f conftest.in | |
9202 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
9203 | echo "$ac_file is unchanged" | |
9204 | rm -f conftest.h | |
9205 | else | |
9206 | # Remove last slash and all that follows it. Not all systems have dirname. | |
9207 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
9208 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
9209 | # The file is in a subdirectory. | |
9210 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
9211 | fi | |
9212 | rm -f $ac_file | |
9213 | mv conftest.h $ac_file | |
9214 | fi | |
9215 | fi; done | |
9216 | ||
9217 | EOF | |
9218 | cat >> $CONFIG_STATUS <<EOF | |
9219 | ||
0d24f4d1 ZW |
9220 | subdirs='$subdirs' |
9221 | symbolic_link='$symbolic_link' | |
861bb6c1 JL |
9222 | |
9223 | EOF | |
9224 | cat >> $CONFIG_STATUS <<\EOF | |
71a94577 ZW |
9225 | for ac_file in $CONFIG_FILES; do |
9226 | # Support "outfile[:infile[:infile...]]" | |
9227 | case "$ac_file" in | |
9228 | *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
9229 | esac | |
9230 | # PO directories have a Makefile.in generated from Makefile.in.in. | |
9231 | case "$ac_file" in */Makefile.in) | |
9232 | # Adjust a relative srcdir. | |
9233 | ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` | |
9234 | ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" | |
9235 | ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` | |
9236 | # In autoconf-2.13 it is called $ac_given_srcdir. | |
9237 | # In autoconf-2.50 it is called $srcdir. | |
9238 | test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" | |
9239 | case "$ac_given_srcdir" in | |
9240 | .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; | |
9241 | /*) top_srcdir="$ac_given_srcdir" ;; | |
9242 | *) top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
9243 | esac | |
9244 | if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then | |
9245 | rm -f "$ac_dir/POTFILES" | |
9246 | test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" | |
9247 | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES" | |
9248 | test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" | |
9249 | sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" | |
9250 | fi | |
9251 | ;; | |
9252 | esac | |
9253 | done | |
861bb6c1 | 9254 | |
861bb6c1 | 9255 | case x$CONFIG_HEADERS in |
b7cb92ad | 9256 | xauto-host.h:config.in) |
861bb6c1 JL |
9257 | echo > cstamp-h ;; |
9258 | esac | |
93cf819d BK |
9259 | # If the host supports symlinks, point stage[1234] at ../stage[1234] so |
9260 | # bootstrapping and the installation procedure can still use | |
9261 | # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks, | |
9262 | # FLAGS_TO_PASS has been modified to solve the problem there. | |
9263 | # This is virtually a duplicate of what happens in configure.lang; we do | |
9264 | # an extra check to make sure this only happens if ln -s can be used. | |
75bffa71 | 9265 | if test "$symbolic_link" = "ln -s"; then |
d8140df6 | 9266 | for d in .. ${subdirs} fixinc ; do |
75bffa71 | 9267 | if test $d != ..; then |
1e6347d8 | 9268 | STARTDIR=`${PWDCMD-pwd}` |
4e8a434e BK |
9269 | cd $d |
9270 | for t in stage1 stage2 stage3 stage4 include | |
9271 | do | |
9272 | rm -f $t | |
9273 | $symbolic_link ../$t $t 2>/dev/null | |
9274 | done | |
9275 | cd $STARTDIR | |
93cf819d BK |
9276 | fi |
9277 | done | |
9278 | else true ; fi | |
ab87f8c8 JL |
9279 | # Avoid having to add intl to our include paths. |
9280 | if test -f intl/libintl.h; then | |
9281 | echo creating libintl.h | |
9282 | echo '#include "intl/libintl.h"' >libintl.h | |
9283 | fi | |
861bb6c1 JL |
9284 | |
9285 | exit 0 | |
9286 | EOF | |
9287 | chmod +x $CONFIG_STATUS | |
9288 | rm -fr confdefs* $ac_clean_files | |
9289 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
9290 |