]>
Commit | Line | Data |
---|---|---|
005537df | 1 | #! /bin/sh |
861bb6c1 JL |
2 | |
3 | # Guess values for system-dependent variables and create Makefiles. | |
b27d2bd5 | 4 | # Generated automatically using autoconf version 2.13 |
861bb6c1 JL |
5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
6 | # | |
7 | # This configure script is free software; the Free Software Foundation | |
8 | # gives unlimited permission to copy, distribute and modify it. | |
9 | ||
10 | # Defaults: | |
11 | ac_help= | |
12 | ac_default_prefix=/usr/local | |
13 | # Any additions from configure.in: | |
14 | ac_help="$ac_help | |
15 | --with-gnu-ld arrange to work with GNU ld." | |
ab339d62 | 16 | ac_help="$ac_help |
e8bec136 | 17 | --with-ld arrange to use the specified ld (full pathname)" |
861bb6c1 | 18 | ac_help="$ac_help |
e8bec136 | 19 | --with-gnu-as arrange to work with GNU as" |
ab339d62 | 20 | ac_help="$ac_help |
e8bec136 | 21 | --with-as arrange to use the specified as (full pathname)" |
861bb6c1 | 22 | ac_help="$ac_help |
e8bec136 | 23 | --with-stabs arrange to use stabs instead of host debug format" |
861bb6c1 | 24 | ac_help="$ac_help |
e8bec136 | 25 | --with-elf arrange to use ELF instead of host debug format" |
861bb6c1 | 26 | ac_help="$ac_help |
e8bec136 | 27 | --with-local-prefix=DIR specifies directory to put local include" |
861bb6c1 JL |
28 | ac_help="$ac_help |
29 | --with-gxx-include-dir=DIR | |
e8bec136 | 30 | specifies directory to put g++ header files" |
39d6f2e8 | 31 | ac_help="$ac_help |
e8bec136 | 32 | --enable-multilib enable library support for multiple ABIs" |
a494747c | 33 | ac_help="$ac_help |
f4524c9e ZW |
34 | --enable-checking[=LIST] |
35 | enable expensive run-time checks. With LIST, | |
36 | enable only specific categories of checks. | |
37 | Categories are: misc,tree,rtl,gc,gcac; default | |
59f406b7 | 38 | is misc,tree,gc" |
3ecc3258 | 39 | ac_help="$ac_help |
e8bec136 | 40 | --disable-cpp don't provide a user-visible C preprocessor" |
3ecc3258 ZW |
41 | ac_help="$ac_help |
42 | --with-cpp-install-dir=DIR | |
43 | install the user visible C preprocessor in DIR | |
e8bec136 | 44 | (relative to PREFIX) as well as PREFIX/bin" |
c5c76735 | 45 | ac_help="$ac_help |
e8bec136 | 46 | --enable-c-mbchar enable multibyte characters for C and C++" |
861bb6c1 | 47 | ac_help="$ac_help |
e8bec136 RO |
48 | --enable-threads enable thread usage for target GCC |
49 | --enable-threads=LIB use LIB thread package for target GCC" | |
d8bb17c8 OP |
50 | ac_help="$ac_help |
51 | --enable-objc-gc enable the use of Boehm's garbage collector with | |
e8bec136 | 52 | the GNU Objective-C runtime" |
90e6a802 | 53 | ac_help="$ac_help |
e8bec136 | 54 | --with-dwarf2 force the default debug format to be DWARF 2" |
50503ac8 | 55 | ac_help="$ac_help |
e8bec136 | 56 | --disable-shared don't provide a shared libgcc" |
f91abfce TT |
57 | ac_help="$ac_help |
58 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" | |
ab87f8c8 | 59 | ac_help="$ac_help |
dc6746e7 | 60 | --enable-nls use Native Language Support (default)" |
ab87f8c8 JL |
61 | ac_help="$ac_help |
62 | --disable-nls do not use Native Language Support" | |
63 | ac_help="$ac_help | |
64 | --with-included-gettext use the GNU gettext library included here" | |
65 | ac_help="$ac_help | |
66 | --with-catgets use catgets functions if available" | |
f4ab28e3 MK |
67 | ac_help="$ac_help |
68 | --disable-win32-registry | |
e8bec136 RO |
69 | disable lookup of installation paths in the |
70 | Registry on Windows hosts | |
71 | --enable-win32-registry enable registry lookup (default) | |
f4ab28e3 | 72 | --enable-win32-registry=KEY |
e8bec136 RO |
73 | use KEY instead of GCC version as the last portion |
74 | of the registry key" | |
81bf3d9e | 75 | ac_help="$ac_help |
e8bec136 RO |
76 | --with-gc={simple,page} choose the garbage collection mechanism to use |
77 | with the compiler" | |
3c809ba4 AG |
78 | ac_help="$ac_help |
79 | --with-system-zlib use installed libz" | |
dc6746e7 | 80 | ac_help="$ac_help |
e8bec136 RO |
81 | --enable-maintainer-mode |
82 | enable make rules and dependencies not useful | |
dc6746e7 | 83 | (and sometimes confusing) to the casual installer" |
531073e7 | 84 | ac_help="$ac_help |
e8bec136 RO |
85 | --enable-sjlj-exceptions |
86 | arrange to use setjmp/longjmp exception handling" | |
2bbea3a6 | 87 | ac_help="$ac_help |
e8bec136 RO |
88 | --enable-version-specific-runtime-libs |
89 | specify that runtime libraries should be | |
90 | installed in a compiler-specific directory" | |
5b15f277 RH |
91 | ac_help="$ac_help |
92 | --with-slibdir=DIR shared libraries in DIR [LIBDIR]" | |
861bb6c1 JL |
93 | |
94 | # Initialize some variables set by options. | |
95 | # The variables have the same names as the options, with | |
96 | # dashes changed to underlines. | |
97 | build=NONE | |
98 | cache_file=./config.cache | |
99 | exec_prefix=NONE | |
100 | host=NONE | |
101 | no_create= | |
102 | nonopt=NONE | |
103 | no_recursion= | |
104 | prefix=NONE | |
105 | program_prefix=NONE | |
106 | program_suffix=NONE | |
107 | program_transform_name=s,x,x, | |
108 | silent= | |
109 | site= | |
110 | srcdir= | |
111 | target=NONE | |
112 | verbose= | |
113 | x_includes=NONE | |
114 | x_libraries=NONE | |
115 | bindir='${exec_prefix}/bin' | |
116 | sbindir='${exec_prefix}/sbin' | |
117 | libexecdir='${exec_prefix}/libexec' | |
118 | datadir='${prefix}/share' | |
119 | sysconfdir='${prefix}/etc' | |
120 | sharedstatedir='${prefix}/com' | |
121 | localstatedir='${prefix}/var' | |
122 | libdir='${exec_prefix}/lib' | |
123 | includedir='${prefix}/include' | |
124 | oldincludedir='/usr/include' | |
125 | infodir='${prefix}/info' | |
126 | mandir='${prefix}/man' | |
127 | ||
128 | # Initialize some other variables. | |
129 | subdirs= | |
130 | MFLAGS= MAKEFLAGS= | |
6f144c9c | 131 | SHELL=${CONFIG_SHELL-/bin/sh} |
861bb6c1 JL |
132 | # Maximum number of lines to put in a shell here document. |
133 | ac_max_here_lines=12 | |
134 | ||
135 | ac_prev= | |
136 | for ac_option | |
137 | do | |
138 | ||
139 | # If the previous option needs an argument, assign it. | |
140 | if test -n "$ac_prev"; then | |
141 | eval "$ac_prev=\$ac_option" | |
142 | ac_prev= | |
143 | continue | |
144 | fi | |
145 | ||
146 | case "$ac_option" in | |
147 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
148 | *) ac_optarg= ;; | |
149 | esac | |
150 | ||
151 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
152 | ||
153 | case "$ac_option" in | |
154 | ||
155 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
156 | ac_prev=bindir ;; | |
157 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
158 | bindir="$ac_optarg" ;; | |
159 | ||
160 | -build | --build | --buil | --bui | --bu) | |
161 | ac_prev=build ;; | |
162 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
163 | build="$ac_optarg" ;; | |
164 | ||
165 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
166 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
167 | ac_prev=cache_file ;; | |
168 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
169 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
170 | cache_file="$ac_optarg" ;; | |
171 | ||
172 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
173 | ac_prev=datadir ;; | |
174 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
175 | | --da=*) | |
176 | datadir="$ac_optarg" ;; | |
177 | ||
178 | -disable-* | --disable-*) | |
179 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
180 | # Reject names that are not valid shell variable names. | |
181 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
182 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
183 | fi | |
184 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
185 | eval "enable_${ac_feature}=no" ;; | |
186 | ||
187 | -enable-* | --enable-*) | |
188 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
189 | # Reject names that are not valid shell variable names. | |
190 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
191 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
192 | fi | |
193 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
194 | case "$ac_option" in | |
195 | *=*) ;; | |
196 | *) ac_optarg=yes ;; | |
197 | esac | |
198 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
199 | ||
200 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
201 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
202 | | --exec | --exe | --ex) | |
203 | ac_prev=exec_prefix ;; | |
204 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
205 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
206 | | --exec=* | --exe=* | --ex=*) | |
207 | exec_prefix="$ac_optarg" ;; | |
208 | ||
209 | -gas | --gas | --ga | --g) | |
210 | # Obsolete; use --with-gas. | |
211 | with_gas=yes ;; | |
212 | ||
213 | -help | --help | --hel | --he) | |
214 | # Omit some internal or obsolete options to make the list less imposing. | |
215 | # This message is too long to be a string in the A/UX 3.1 sh. | |
216 | cat << EOF | |
217 | Usage: configure [options] [host] | |
218 | Options: [defaults in brackets after descriptions] | |
219 | Configuration: | |
220 | --cache-file=FILE cache test results in FILE | |
221 | --help print this message | |
222 | --no-create do not create output files | |
223 | --quiet, --silent do not print \`checking...' messages | |
224 | --version print the version of autoconf that created configure | |
225 | Directory and file names: | |
226 | --prefix=PREFIX install architecture-independent files in PREFIX | |
227 | [$ac_default_prefix] | |
228 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
229 | [same as prefix] | |
230 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
231 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
232 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
233 | --datadir=DIR read-only architecture-independent data in DIR | |
234 | [PREFIX/share] | |
235 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
236 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
237 | [PREFIX/com] | |
238 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
239 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
240 | --includedir=DIR C header files in DIR [PREFIX/include] | |
241 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
242 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
243 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
244 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
245 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
246 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
247 | --program-transform-name=PROGRAM | |
248 | run sed PROGRAM on installed program names | |
249 | EOF | |
250 | cat << EOF | |
251 | Host type: | |
252 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
253 | --host=HOST configure for HOST [guessed] | |
254 | --target=TARGET configure for TARGET [TARGET=HOST] | |
255 | Features and packages: | |
256 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
257 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
258 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
259 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
260 | --x-includes=DIR X include files are in DIR | |
261 | --x-libraries=DIR X library files are in DIR | |
262 | EOF | |
263 | if test -n "$ac_help"; then | |
264 | echo "--enable and --with options recognized:$ac_help" | |
265 | fi | |
266 | exit 0 ;; | |
267 | ||
268 | -host | --host | --hos | --ho) | |
269 | ac_prev=host ;; | |
270 | -host=* | --host=* | --hos=* | --ho=*) | |
271 | host="$ac_optarg" ;; | |
272 | ||
273 | -includedir | --includedir | --includedi | --included | --include \ | |
274 | | --includ | --inclu | --incl | --inc) | |
275 | ac_prev=includedir ;; | |
276 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
277 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
278 | includedir="$ac_optarg" ;; | |
279 | ||
280 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
281 | ac_prev=infodir ;; | |
282 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
283 | infodir="$ac_optarg" ;; | |
284 | ||
285 | -libdir | --libdir | --libdi | --libd) | |
286 | ac_prev=libdir ;; | |
287 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
288 | libdir="$ac_optarg" ;; | |
289 | ||
290 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
291 | | --libexe | --libex | --libe) | |
292 | ac_prev=libexecdir ;; | |
293 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
294 | | --libexe=* | --libex=* | --libe=*) | |
295 | libexecdir="$ac_optarg" ;; | |
296 | ||
297 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
298 | | --localstate | --localstat | --localsta | --localst \ | |
299 | | --locals | --local | --loca | --loc | --lo) | |
300 | ac_prev=localstatedir ;; | |
301 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
302 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
303 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
304 | localstatedir="$ac_optarg" ;; | |
305 | ||
306 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
307 | ac_prev=mandir ;; | |
308 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
309 | mandir="$ac_optarg" ;; | |
310 | ||
311 | -nfp | --nfp | --nf) | |
312 | # Obsolete; use --without-fp. | |
313 | with_fp=no ;; | |
314 | ||
315 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
316 | | --no-cr | --no-c) | |
317 | no_create=yes ;; | |
318 | ||
319 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
320 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
321 | no_recursion=yes ;; | |
322 | ||
323 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
324 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
325 | | --oldin | --oldi | --old | --ol | --o) | |
326 | ac_prev=oldincludedir ;; | |
327 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
328 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
329 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
330 | oldincludedir="$ac_optarg" ;; | |
331 | ||
332 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
333 | ac_prev=prefix ;; | |
334 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
335 | prefix="$ac_optarg" ;; | |
336 | ||
337 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
338 | | --program-pre | --program-pr | --program-p) | |
339 | ac_prev=program_prefix ;; | |
340 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
341 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
342 | program_prefix="$ac_optarg" ;; | |
343 | ||
344 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
345 | | --program-suf | --program-su | --program-s) | |
346 | ac_prev=program_suffix ;; | |
347 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
348 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
349 | program_suffix="$ac_optarg" ;; | |
350 | ||
351 | -program-transform-name | --program-transform-name \ | |
352 | | --program-transform-nam | --program-transform-na \ | |
353 | | --program-transform-n | --program-transform- \ | |
354 | | --program-transform | --program-transfor \ | |
355 | | --program-transfo | --program-transf \ | |
356 | | --program-trans | --program-tran \ | |
357 | | --progr-tra | --program-tr | --program-t) | |
358 | ac_prev=program_transform_name ;; | |
359 | -program-transform-name=* | --program-transform-name=* \ | |
360 | | --program-transform-nam=* | --program-transform-na=* \ | |
361 | | --program-transform-n=* | --program-transform-=* \ | |
362 | | --program-transform=* | --program-transfor=* \ | |
363 | | --program-transfo=* | --program-transf=* \ | |
364 | | --program-trans=* | --program-tran=* \ | |
365 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
366 | program_transform_name="$ac_optarg" ;; | |
367 | ||
368 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
369 | | -silent | --silent | --silen | --sile | --sil) | |
370 | silent=yes ;; | |
371 | ||
372 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
373 | ac_prev=sbindir ;; | |
374 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
375 | | --sbi=* | --sb=*) | |
376 | sbindir="$ac_optarg" ;; | |
377 | ||
378 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
379 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
380 | | --sharedst | --shareds | --shared | --share | --shar \ | |
381 | | --sha | --sh) | |
382 | ac_prev=sharedstatedir ;; | |
383 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
384 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
385 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
386 | | --sha=* | --sh=*) | |
387 | sharedstatedir="$ac_optarg" ;; | |
388 | ||
389 | -site | --site | --sit) | |
390 | ac_prev=site ;; | |
391 | -site=* | --site=* | --sit=*) | |
392 | site="$ac_optarg" ;; | |
393 | ||
394 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
395 | ac_prev=srcdir ;; | |
396 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
397 | srcdir="$ac_optarg" ;; | |
398 | ||
399 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
400 | | --syscon | --sysco | --sysc | --sys | --sy) | |
401 | ac_prev=sysconfdir ;; | |
402 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
403 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
404 | sysconfdir="$ac_optarg" ;; | |
405 | ||
406 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
407 | ac_prev=target ;; | |
408 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
409 | target="$ac_optarg" ;; | |
410 | ||
411 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
412 | verbose=yes ;; | |
413 | ||
414 | -version | --version | --versio | --versi | --vers) | |
b27d2bd5 | 415 | echo "configure generated by autoconf version 2.13" |
861bb6c1 JL |
416 | exit 0 ;; |
417 | ||
418 | -with-* | --with-*) | |
419 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
420 | # Reject names that are not valid shell variable names. | |
421 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
422 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
423 | fi | |
424 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
425 | case "$ac_option" in | |
426 | *=*) ;; | |
427 | *) ac_optarg=yes ;; | |
428 | esac | |
429 | eval "with_${ac_package}='$ac_optarg'" ;; | |
430 | ||
431 | -without-* | --without-*) | |
432 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
433 | # Reject names that are not valid shell variable names. | |
434 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
435 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
436 | fi | |
437 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
438 | eval "with_${ac_package}=no" ;; | |
439 | ||
440 | --x) | |
441 | # Obsolete; use --with-x. | |
442 | with_x=yes ;; | |
443 | ||
444 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
445 | | --x-incl | --x-inc | --x-in | --x-i) | |
446 | ac_prev=x_includes ;; | |
447 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
448 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
449 | x_includes="$ac_optarg" ;; | |
450 | ||
451 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
452 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
453 | ac_prev=x_libraries ;; | |
454 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
455 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
456 | x_libraries="$ac_optarg" ;; | |
457 | ||
458 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
459 | ;; | |
460 | ||
461 | *) | |
462 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
463 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
464 | fi | |
465 | if test "x$nonopt" != xNONE; then | |
466 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
467 | fi | |
468 | nonopt="$ac_option" | |
469 | ;; | |
470 | ||
471 | esac | |
472 | done | |
473 | ||
474 | if test -n "$ac_prev"; then | |
475 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
476 | fi | |
477 | ||
478 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
479 | ||
480 | # File descriptor usage: | |
481 | # 0 standard input | |
482 | # 1 file creation | |
483 | # 2 errors and warnings | |
484 | # 3 some systems may open it to /dev/tty | |
485 | # 4 used on the Kubota Titan | |
486 | # 6 checking for... messages and results | |
487 | # 5 compiler messages saved in config.log | |
488 | if test "$silent" = yes; then | |
489 | exec 6>/dev/null | |
490 | else | |
491 | exec 6>&1 | |
492 | fi | |
493 | exec 5>./config.log | |
494 | ||
495 | echo "\ | |
496 | This file contains any messages produced by compilers while | |
497 | running configure, to aid debugging if configure makes a mistake. | |
498 | " 1>&5 | |
499 | ||
500 | # Strip out --no-create and --no-recursion so they do not pile up. | |
501 | # Also quote any args containing shell metacharacters. | |
502 | ac_configure_args= | |
503 | for ac_arg | |
504 | do | |
505 | case "$ac_arg" in | |
506 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
507 | | --no-cr | --no-c) ;; | |
508 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
509 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
510 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
511 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
512 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
513 | esac | |
514 | done | |
515 | ||
516 | # NLS nuisances. | |
517 | # Only set these to C if already set. These must not be set unconditionally | |
518 | # because not all systems understand e.g. LANG=C (notably SCO). | |
519 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
520 | # Non-C LC_CTYPE values break the ctype check. | |
521 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
522 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
523 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
524 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
525 | ||
526 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
527 | rm -rf conftest* confdefs.h | |
528 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
529 | echo > confdefs.h | |
530 | ||
531 | # A filename unique to this package, relative to the directory that | |
532 | # configure is in, which we can look for to find out if srcdir is correct. | |
533 | ac_unique_file=tree.c | |
534 | ||
535 | # Find the source files, if location was not specified. | |
536 | if test -z "$srcdir"; then | |
537 | ac_srcdir_defaulted=yes | |
538 | # Try the directory containing this script, then its parent. | |
539 | ac_prog=$0 | |
540 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
541 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
542 | srcdir=$ac_confdir | |
543 | if test ! -r $srcdir/$ac_unique_file; then | |
544 | srcdir=.. | |
545 | fi | |
546 | else | |
547 | ac_srcdir_defaulted=no | |
548 | fi | |
549 | if test ! -r $srcdir/$ac_unique_file; then | |
550 | if test "$ac_srcdir_defaulted" = yes; then | |
551 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
552 | else | |
553 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
554 | fi | |
555 | fi | |
556 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
557 | ||
558 | # Prefer explicitly selected file to automatically selected ones. | |
e08f13ee JS |
559 | if test -z "$CONFIG_SITE"; then |
560 | if test "x$prefix" != xNONE; then | |
561 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
562 | else | |
563 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
861bb6c1 JL |
564 | fi |
565 | fi | |
566 | for ac_site_file in $CONFIG_SITE; do | |
567 | if test -r "$ac_site_file"; then | |
568 | echo "loading site script $ac_site_file" | |
569 | . "$ac_site_file" | |
570 | fi | |
571 | done | |
572 | ||
573 | if test -r "$cache_file"; then | |
574 | echo "loading cache $cache_file" | |
575 | . $cache_file | |
576 | else | |
577 | echo "creating cache $cache_file" | |
578 | > $cache_file | |
579 | fi | |
580 | ||
581 | ac_ext=c | |
582 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
583 | ac_cpp='$CPP $CPPFLAGS' | |
584 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
cd9e5e7c | 585 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
861bb6c1 JL |
586 | cross_compiling=$ac_cv_prog_cc_cross |
587 | ||
cd9e5e7c MK |
588 | ac_exeext= |
589 | ac_objext=o | |
861bb6c1 JL |
590 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then |
591 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
592 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
593 | ac_n= ac_c=' | |
594 | ' ac_t=' ' | |
595 | else | |
596 | ac_n=-n ac_c= ac_t= | |
597 | fi | |
598 | else | |
599 | ac_n= ac_c='\c' ac_t= | |
600 | fi | |
601 | ||
602 | ||
603 | ||
604 | ||
861bb6c1 JL |
605 | remove=rm |
606 | hard_link=ln | |
607 | symbolic_link='ln -s' | |
608 | copy=cp | |
609 | ||
75a39864 JL |
610 | # Check for bogus environment variables. |
611 | # Test if LIBRARY_PATH contains the notation for the current directory | |
612 | # since this would lead to problems installing/building glibc. | |
613 | # LIBRARY_PATH contains the current directory if one of the following | |
614 | # is true: | |
615 | # - one of the terminals (":" and ";") is the first or last sign | |
616 | # - two terminals occur directly after each other | |
617 | # - the path contains an element with a dot in it | |
618 | echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6 | |
e08f13ee | 619 | echo "configure:620: checking LIBRARY_PATH variable" >&5 |
75a39864 JL |
620 | case ${LIBRARY_PATH} in |
621 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
622 | library_path_setting="contains current directory" | |
623 | ;; | |
624 | *) | |
625 | library_path_setting="ok" | |
626 | ;; | |
627 | esac | |
628 | echo "$ac_t""$library_path_setting" 1>&6 | |
629 | if test "$library_path_setting" != "ok"; then | |
630 | { echo "configure: error: | |
631 | *** LIBRARY_PATH shouldn't contain the current directory when | |
079bd08e | 632 | *** building gcc. Please change the environment variable |
75a39864 JL |
633 | *** and run configure again." 1>&2; exit 1; } |
634 | fi | |
635 | ||
636 | # Test if GCC_EXEC_PREFIX contains the notation for the current directory | |
637 | # since this would lead to problems installing/building glibc. | |
638 | # GCC_EXEC_PREFIX contains the current directory if one of the following | |
639 | # is true: | |
640 | # - one of the terminals (":" and ";") is the first or last sign | |
641 | # - two terminals occur directly after each other | |
642 | # - the path contains an element with a dot in it | |
643 | echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6 | |
e08f13ee | 644 | echo "configure:645: checking GCC_EXEC_PREFIX variable" >&5 |
75a39864 JL |
645 | case ${GCC_EXEC_PREFIX} in |
646 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
647 | gcc_exec_prefix_setting="contains current directory" | |
648 | ;; | |
649 | *) | |
650 | gcc_exec_prefix_setting="ok" | |
651 | ;; | |
652 | esac | |
653 | echo "$ac_t""$gcc_exec_prefix_setting" 1>&6 | |
654 | if test "$gcc_exec_prefix_setting" != "ok"; then | |
655 | { echo "configure: error: | |
656 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when | |
079bd08e | 657 | *** building gcc. Please change the environment variable |
75a39864 JL |
658 | *** and run configure again." 1>&2; exit 1; } |
659 | fi | |
660 | ||
861bb6c1 JL |
661 | # Check for additional parameters |
662 | ||
663 | # With GNU ld | |
664 | # Check whether --with-gnu-ld or --without-gnu-ld was given. | |
665 | if test "${with_gnu_ld+set}" = set; then | |
666 | withval="$with_gnu_ld" | |
df6faf79 | 667 | gnu_ld_flag="$with_gnu_ld" |
861bb6c1 | 668 | else |
df6faf79 | 669 | gnu_ld_flag=no |
861bb6c1 JL |
670 | fi |
671 | ||
672 | ||
ab339d62 AO |
673 | # With pre-defined ld |
674 | # Check whether --with-ld or --without-ld was given. | |
675 | if test "${with_ld+set}" = set; then | |
676 | withval="$with_ld" | |
3ccc3a56 | 677 | DEFAULT_LINKER="$with_ld" |
ab339d62 AO |
678 | fi |
679 | ||
3ccc3a56 AO |
680 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
681 | if test ! -x "$DEFAULT_LINKER"; then | |
682 | echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2 | |
e154a394 | 683 | elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
ab339d62 AO |
684 | gnu_ld_flag=yes |
685 | fi | |
686 | cat >> confdefs.h <<EOF | |
3ccc3a56 | 687 | #define DEFAULT_LINKER "$DEFAULT_LINKER" |
ab339d62 AO |
688 | EOF |
689 | ||
690 | fi | |
691 | ||
861bb6c1 JL |
692 | # With GNU as |
693 | # Check whether --with-gnu-as or --without-gnu-as was given. | |
694 | if test "${with_gnu_as+set}" = set; then | |
695 | withval="$with_gnu_as" | |
df6faf79 | 696 | gas_flag="$with_gnu_as" |
861bb6c1 | 697 | else |
df6faf79 | 698 | gas_flag=no |
861bb6c1 JL |
699 | fi |
700 | ||
701 | ||
ab339d62 AO |
702 | # Check whether --with-as or --without-as was given. |
703 | if test "${with_as+set}" = set; then | |
704 | withval="$with_as" | |
3ccc3a56 | 705 | DEFAULT_ASSEMBLER="$with_as" |
ab339d62 AO |
706 | fi |
707 | ||
3ccc3a56 AO |
708 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
709 | if test ! -x "$DEFAULT_ASSEMBLER"; then | |
710 | echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2 | |
e154a394 | 711 | elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
ab339d62 AO |
712 | gas_flag=yes |
713 | fi | |
714 | cat >> confdefs.h <<EOF | |
3ccc3a56 | 715 | #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER" |
ab339d62 AO |
716 | EOF |
717 | ||
3ccc3a56 | 718 | fi |
ab339d62 | 719 | |
861bb6c1 JL |
720 | # With stabs |
721 | # Check whether --with-stabs or --without-stabs was given. | |
722 | if test "${with_stabs+set}" = set; then | |
723 | withval="$with_stabs" | |
535b86ce | 724 | stabs="$with_stabs" |
861bb6c1 JL |
725 | else |
726 | stabs=no | |
727 | fi | |
728 | ||
729 | ||
730 | # With ELF | |
731 | # Check whether --with-elf or --without-elf was given. | |
732 | if test "${with_elf+set}" = set; then | |
733 | withval="$with_elf" | |
535b86ce | 734 | elf="$with_elf" |
861bb6c1 JL |
735 | else |
736 | elf=no | |
737 | fi | |
738 | ||
739 | ||
740 | # Specify the local prefix | |
4e88d51b | 741 | local_prefix= |
861bb6c1 JL |
742 | # Check whether --with-local-prefix or --without-local-prefix was given. |
743 | if test "${with_local_prefix+set}" = set; then | |
744 | withval="$with_local_prefix" | |
4e88d51b JM |
745 | case "${withval}" in |
746 | yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;; | |
747 | no) ;; | |
748 | *) local_prefix=$with_local_prefix ;; | |
749 | esac | |
861bb6c1 JL |
750 | fi |
751 | ||
752 | ||
753 | # Default local prefix if it is empty | |
75bffa71 | 754 | if test x$local_prefix = x; then |
861bb6c1 JL |
755 | local_prefix=/usr/local |
756 | fi | |
757 | ||
8f8d3278 NC |
758 | # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only |
759 | # passed in by the toplevel make and thus we'd get different behavior | |
760 | # depending on where we built the sources. | |
761 | gcc_gxx_include_dir= | |
861bb6c1 JL |
762 | # Specify the g++ header file directory |
763 | # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. | |
764 | if test "${with_gxx_include_dir+set}" = set; then | |
765 | withval="$with_gxx_include_dir" | |
4e88d51b JM |
766 | case "${withval}" in |
767 | yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;; | |
768 | no) ;; | |
8f8d3278 | 769 | *) gcc_gxx_include_dir=$with_gxx_include_dir ;; |
4e88d51b | 770 | esac |
861bb6c1 JL |
771 | fi |
772 | ||
773 | ||
8f8d3278 | 774 | if test x${gcc_gxx_include_dir} = x; then |
4e88d51b | 775 | if test x${enable_version_specific_runtime_libs} = xyes; then |
8f8d3278 | 776 | gcc_gxx_include_dir='${libsubdir}/include/g++' |
4e88d51b | 777 | else |
a270b446 | 778 | topsrcdir=${srcdir}/.. . ${srcdir}/../config.if |
e2187d3b | 779 | gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir} |
4e88d51b JM |
780 | fi |
781 | fi | |
782 | ||
39d6f2e8 MM |
783 | # Determine whether or not multilibs are enabled. |
784 | # Check whether --enable-multilib or --disable-multilib was given. | |
785 | if test "${enable_multilib+set}" = set; then | |
786 | enableval="$enable_multilib" | |
787 | : | |
788 | else | |
789 | enable_multilib=yes | |
790 | fi | |
791 | ||
792 | ||
793 | ||
a494747c MM |
794 | # Enable expensive internal checks |
795 | # Check whether --enable-checking or --disable-checking was given. | |
796 | if test "${enable_checking+set}" = set; then | |
797 | enableval="$enable_checking" | |
119d24d1 KG |
798 | ac_checking= |
799 | ac_tree_checking= | |
800 | ac_rtl_checking= | |
801 | ac_gc_checking= | |
802 | ac_gc_always_collect= | |
803 | case "${enableval}" in | |
51d0e20c | 804 | yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;; |
4e88d51b | 805 | no) ;; |
59f406b7 | 806 | *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," |
f4524c9e ZW |
807 | set fnord $enableval; shift |
808 | IFS="$ac_save_IFS" | |
c62e45ad KG |
809 | for check |
810 | do | |
f4524c9e | 811 | case $check in |
119d24d1 KG |
812 | misc) ac_checking=1 ;; |
813 | tree) ac_tree_checking=1 ;; | |
814 | rtl) ac_rtl_checking=1 ;; | |
815 | gc) ac_gc_checking=1 ;; | |
816 | gcac) ac_gc_always_collect=1 ;; | |
817 | *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;; | |
818 | esac | |
819 | done | |
820 | ;; | |
821 | esac | |
51d0e20c AJ |
822 | |
823 | else | |
824 | # Enable some checks by default for development versions of GCC | |
825 | ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; | |
826 | fi | |
827 | ||
119d24d1 KG |
828 | if test x$ac_checking != x ; then |
829 | cat >> confdefs.h <<\EOF | |
f4524c9e ZW |
830 | #define ENABLE_CHECKING 1 |
831 | EOF | |
119d24d1 KG |
832 | |
833 | fi | |
834 | if test x$ac_tree_checking != x ; then | |
835 | cat >> confdefs.h <<\EOF | |
f4524c9e ZW |
836 | #define ENABLE_TREE_CHECKING 1 |
837 | EOF | |
119d24d1 KG |
838 | |
839 | fi | |
840 | if test x$ac_rtl_checking != x ; then | |
841 | cat >> confdefs.h <<\EOF | |
f4524c9e ZW |
842 | #define ENABLE_RTL_CHECKING 1 |
843 | EOF | |
119d24d1 KG |
844 | |
845 | fi | |
846 | if test x$ac_gc_checking != x ; then | |
847 | cat >> confdefs.h <<\EOF | |
f4524c9e ZW |
848 | #define ENABLE_GC_CHECKING 1 |
849 | EOF | |
119d24d1 KG |
850 | |
851 | fi | |
852 | if test x$ac_gc_always_collect != x ; then | |
853 | cat >> confdefs.h <<\EOF | |
f4524c9e ZW |
854 | #define ENABLE_GC_ALWAYS_COLLECT 1 |
855 | EOF | |
119d24d1 KG |
856 | |
857 | fi | |
858 | ||
a494747c | 859 | |
3ecc3258 ZW |
860 | # Check whether --enable-cpp or --disable-cpp was given. |
861 | if test "${enable_cpp+set}" = set; then | |
862 | enableval="$enable_cpp" | |
863 | : | |
864 | else | |
865 | enable_cpp=yes | |
866 | fi | |
867 | ||
868 | ||
869 | # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. | |
870 | if test "${with_cpp_install_dir+set}" = set; then | |
871 | withval="$with_cpp_install_dir" | |
872 | if test x$withval = xyes; then | |
873 | { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; } | |
874 | elif test x$withval != xno; then | |
875 | cpp_install_dir=$withval | |
876 | fi | |
877 | fi | |
878 | ||
879 | ||
c5c76735 JL |
880 | # Enable Multibyte Characters for C/C++ |
881 | # Check whether --enable-c-mbchar or --disable-c-mbchar was given. | |
882 | if test "${enable_c_mbchar+set}" = set; then | |
883 | enableval="$enable_c_mbchar" | |
2618c083 | 884 | if test x$enable_c_mbchar != xno; then |
9ec7291f ZW |
885 | cat >> confdefs.h <<\EOF |
886 | #define MULTIBYTE_CHARS 1 | |
887 | EOF | |
888 | ||
c5c76735 JL |
889 | fi |
890 | fi | |
891 | ||
892 | ||
861bb6c1 JL |
893 | # Enable threads |
894 | # Pass with no value to take the default | |
895 | # Pass with a value to specify a thread package | |
896 | # Check whether --enable-threads or --disable-threads was given. | |
897 | if test "${enable_threads+set}" = set; then | |
898 | enableval="$enable_threads" | |
981d4858 | 899 | : |
861bb6c1 JL |
900 | else |
901 | enable_threads='' | |
902 | fi | |
903 | ||
904 | ||
e445171e | 905 | enable_threads_flag=$enable_threads |
861bb6c1 | 906 | # Check if a valid thread package |
e445171e | 907 | case x${enable_threads_flag} in |
861bb6c1 JL |
908 | x | xno) |
909 | # No threads | |
a851212a | 910 | target_thread_file='single' |
861bb6c1 JL |
911 | ;; |
912 | xyes) | |
913 | # default | |
a851212a | 914 | target_thread_file='' |
861bb6c1 JL |
915 | ;; |
916 | xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \ | |
e08f13ee | 917 | xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix) |
e445171e | 918 | target_thread_file=$enable_threads_flag |
861bb6c1 JL |
919 | ;; |
920 | *) | |
921 | echo "$enable_threads is an unknown thread package" 1>&2 | |
922 | exit 1 | |
923 | ;; | |
924 | esac | |
925 | ||
d8bb17c8 OP |
926 | # Check whether --enable-objc-gc or --disable-objc-gc was given. |
927 | if test "${enable_objc_gc+set}" = set; then | |
928 | enableval="$enable_objc_gc" | |
2618c083 | 929 | if test x$enable_objc_gc = xno; then |
d8bb17c8 OP |
930 | objc_boehm_gc='' |
931 | else | |
932 | objc_boehm_gc=1 | |
933 | fi | |
934 | else | |
935 | objc_boehm_gc='' | |
936 | fi | |
937 | ||
938 | ||
90e6a802 RL |
939 | # Check whether --with-dwarf2 or --without-dwarf2 was given. |
940 | if test "${with_dwarf2+set}" = set; then | |
941 | withval="$with_dwarf2" | |
942 | dwarf2="$with_dwarf2" | |
943 | else | |
944 | dwarf2=no | |
945 | fi | |
946 | ||
947 | ||
50503ac8 RH |
948 | # Check whether --enable-shared or --disable-shared was given. |
949 | if test "${enable_shared+set}" = set; then | |
950 | enableval="$enable_shared" | |
c785e0fa AO |
951 | |
952 | case $enable_shared in | |
953 | yes | no) ;; | |
954 | *) | |
955 | enable_shared=no | |
956 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
957 | for pkg in $enableval; do | |
958 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
959 | enable_shared=yes | |
960 | fi | |
961 | done | |
962 | IFS="$ac_save_ifs" | |
963 | ;; | |
964 | esac | |
965 | ||
50503ac8 RH |
966 | else |
967 | enable_shared=yes | |
968 | fi | |
969 | ||
970 | ||
971 | ||
861bb6c1 JL |
972 | # Determine the host, build, and target systems |
973 | ac_aux_dir= | |
974 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do | |
975 | if test -f $ac_dir/install-sh; then | |
976 | ac_aux_dir=$ac_dir | |
977 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
978 | break | |
979 | elif test -f $ac_dir/install.sh; then | |
980 | ac_aux_dir=$ac_dir | |
981 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
982 | break | |
983 | fi | |
984 | done | |
985 | if test -z "$ac_aux_dir"; then | |
986 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } | |
987 | fi | |
988 | ac_config_guess=$ac_aux_dir/config.guess | |
989 | ac_config_sub=$ac_aux_dir/config.sub | |
990 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
991 | ||
992 | ||
993 | # Do some error checking and defaulting for the host and target type. | |
994 | # The inputs are: | |
995 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
996 | # | |
997 | # The rules are: | |
998 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
999 | # same time. | |
1000 | # 2. Host defaults to nonopt. | |
1001 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1002 | # as determined by config.guess. | |
1003 | # 4. Target and build default to nonopt. | |
1004 | # 5. If nonopt is not specified, then target and build default to host. | |
1005 | ||
1006 | # The aliases save the names the user supplied, while $host etc. | |
1007 | # will get canonicalized. | |
1008 | case $host---$target---$nonopt in | |
1009 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1010 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1011 | esac | |
1012 | ||
1013 | ||
1014 | # Make sure we can run config.sub. | |
6f144c9c | 1015 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : |
861bb6c1 JL |
1016 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } |
1017 | fi | |
1018 | ||
1019 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
e08f13ee | 1020 | echo "configure:1021: checking host system type" >&5 |
861bb6c1 JL |
1021 | |
1022 | host_alias=$host | |
1023 | case "$host_alias" in | |
1024 | NONE) | |
1025 | case $nonopt in | |
1026 | NONE) | |
6f144c9c | 1027 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : |
861bb6c1 JL |
1028 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } |
1029 | fi ;; | |
1030 | *) host_alias=$nonopt ;; | |
1031 | esac ;; | |
1032 | esac | |
1033 | ||
6f144c9c | 1034 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` |
861bb6c1 JL |
1035 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
1036 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1037 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1038 | echo "$ac_t""$host" 1>&6 | |
1039 | ||
1040 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
e08f13ee | 1041 | echo "configure:1042: checking target system type" >&5 |
861bb6c1 JL |
1042 | |
1043 | target_alias=$target | |
1044 | case "$target_alias" in | |
1045 | NONE) | |
1046 | case $nonopt in | |
1047 | NONE) target_alias=$host_alias ;; | |
1048 | *) target_alias=$nonopt ;; | |
1049 | esac ;; | |
1050 | esac | |
1051 | ||
6f144c9c | 1052 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` |
861bb6c1 JL |
1053 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
1054 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1055 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1056 | echo "$ac_t""$target" 1>&6 | |
1057 | ||
1058 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
e08f13ee | 1059 | echo "configure:1060: checking build system type" >&5 |
861bb6c1 JL |
1060 | |
1061 | build_alias=$build | |
1062 | case "$build_alias" in | |
1063 | NONE) | |
1064 | case $nonopt in | |
1065 | NONE) build_alias=$host_alias ;; | |
1066 | *) build_alias=$nonopt ;; | |
1067 | esac ;; | |
1068 | esac | |
1069 | ||
6f144c9c | 1070 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` |
861bb6c1 JL |
1071 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
1072 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1073 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1074 | echo "$ac_t""$build" 1>&6 | |
1075 | ||
1076 | test "$host_alias" != "$target_alias" && | |
1077 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1078 | NONENONEs,x,x, && | |
1079 | program_prefix=${target_alias}- | |
1080 | ||
1081 | ||
e9a25f70 JL |
1082 | # Find the native compiler |
1083 | # Extract the first word of "gcc", so it can be a program name with args. | |
1084 | set dummy gcc; ac_word=$2 | |
1085 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e08f13ee | 1086 | echo "configure:1087: checking for $ac_word" >&5 |
e9a25f70 JL |
1087 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1088 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1089 | else | |
1090 | if test -n "$CC"; then | |
1091 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1092 | else | |
cd9e5e7c | 1093 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
1094 | ac_dummy="$PATH" |
1095 | for ac_dir in $ac_dummy; do | |
e9a25f70 JL |
1096 | test -z "$ac_dir" && ac_dir=. |
1097 | if test -f $ac_dir/$ac_word; then | |
1098 | ac_cv_prog_CC="gcc" | |
1099 | break | |
1100 | fi | |
1101 | done | |
1102 | IFS="$ac_save_ifs" | |
1103 | fi | |
1104 | fi | |
1105 | CC="$ac_cv_prog_CC" | |
1106 | if test -n "$CC"; then | |
1107 | echo "$ac_t""$CC" 1>&6 | |
1108 | else | |
1109 | echo "$ac_t""no" 1>&6 | |
1110 | fi | |
1111 | ||
1112 | if test -z "$CC"; then | |
1113 | # Extract the first word of "cc", so it can be a program name with args. | |
1114 | set dummy cc; ac_word=$2 | |
1115 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e08f13ee | 1116 | echo "configure:1117: checking for $ac_word" >&5 |
e9a25f70 JL |
1117 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1118 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1119 | else | |
1120 | if test -n "$CC"; then | |
1121 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1122 | else | |
cd9e5e7c | 1123 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
e9a25f70 | 1124 | ac_prog_rejected=no |
b27d2bd5 MK |
1125 | ac_dummy="$PATH" |
1126 | for ac_dir in $ac_dummy; do | |
e9a25f70 JL |
1127 | test -z "$ac_dir" && ac_dir=. |
1128 | if test -f $ac_dir/$ac_word; then | |
1129 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
1130 | ac_prog_rejected=yes | |
1131 | continue | |
1132 | fi | |
1133 | ac_cv_prog_CC="cc" | |
1134 | break | |
1135 | fi | |
1136 | done | |
1137 | IFS="$ac_save_ifs" | |
1138 | if test $ac_prog_rejected = yes; then | |
1139 | # We found a bogon in the path, so make sure we never use it. | |
1140 | set dummy $ac_cv_prog_CC | |
1141 | shift | |
1142 | if test $# -gt 0; then | |
1143 | # We chose a different compiler from the bogus one. | |
1144 | # However, it has the same basename, so the bogon will be chosen | |
1145 | # first if we set CC to just the basename; use the full file name. | |
1146 | shift | |
1147 | set dummy "$ac_dir/$ac_word" "$@" | |
1148 | shift | |
1149 | ac_cv_prog_CC="$@" | |
1150 | fi | |
1151 | fi | |
1152 | fi | |
1153 | fi | |
1154 | CC="$ac_cv_prog_CC" | |
1155 | if test -n "$CC"; then | |
1156 | echo "$ac_t""$CC" 1>&6 | |
1157 | else | |
1158 | echo "$ac_t""no" 1>&6 | |
1159 | fi | |
1160 | ||
cd9e5e7c MK |
1161 | if test -z "$CC"; then |
1162 | case "`uname -s`" in | |
1163 | *win32* | *WIN32*) | |
1164 | # Extract the first word of "cl", so it can be a program name with args. | |
1165 | set dummy cl; ac_word=$2 | |
1166 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e08f13ee | 1167 | echo "configure:1168: checking for $ac_word" >&5 |
cd9e5e7c MK |
1168 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1169 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1170 | else | |
1171 | if test -n "$CC"; then | |
1172 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1173 | else | |
1174 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
b27d2bd5 MK |
1175 | ac_dummy="$PATH" |
1176 | for ac_dir in $ac_dummy; do | |
cd9e5e7c MK |
1177 | test -z "$ac_dir" && ac_dir=. |
1178 | if test -f $ac_dir/$ac_word; then | |
1179 | ac_cv_prog_CC="cl" | |
1180 | break | |
1181 | fi | |
1182 | done | |
1183 | IFS="$ac_save_ifs" | |
1184 | fi | |
1185 | fi | |
1186 | CC="$ac_cv_prog_CC" | |
1187 | if test -n "$CC"; then | |
1188 | echo "$ac_t""$CC" 1>&6 | |
1189 | else | |
1190 | echo "$ac_t""no" 1>&6 | |
1191 | fi | |
1192 | ;; | |
1193 | esac | |
1194 | fi | |
e9a25f70 JL |
1195 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
1196 | fi | |
1197 | ||
1198 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
e08f13ee | 1199 | echo "configure:1200: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
e9a25f70 JL |
1200 | |
1201 | ac_ext=c | |
1202 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1203 | ac_cpp='$CPP $CPPFLAGS' | |
1204 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
cd9e5e7c | 1205 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
e9a25f70 JL |
1206 | cross_compiling=$ac_cv_prog_cc_cross |
1207 | ||
b27d2bd5 MK |
1208 | cat > conftest.$ac_ext << EOF |
1209 | ||
e08f13ee | 1210 | #line 1211 "configure" |
e9a25f70 | 1211 | #include "confdefs.h" |
b27d2bd5 | 1212 | |
e9a25f70 JL |
1213 | main(){return(0);} |
1214 | EOF | |
e08f13ee | 1215 | if { (eval echo configure:1216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
e9a25f70 JL |
1216 | ac_cv_prog_cc_works=yes |
1217 | # If we can't run a trivial program, we are probably using a cross compiler. | |
1218 | if (./conftest; exit) 2>/dev/null; then | |
1219 | ac_cv_prog_cc_cross=no | |
1220 | else | |
1221 | ac_cv_prog_cc_cross=yes | |
1222 | fi | |
1223 | else | |
1224 | echo "configure: failed program was:" >&5 | |
1225 | cat conftest.$ac_ext >&5 | |
1226 | ac_cv_prog_cc_works=no | |
1227 | fi | |
1228 | rm -fr conftest* | |
b27d2bd5 MK |
1229 | ac_ext=c |
1230 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1231 | ac_cpp='$CPP $CPPFLAGS' | |
1232 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1233 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1234 | cross_compiling=$ac_cv_prog_cc_cross | |
e9a25f70 JL |
1235 | |
1236 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
1237 | if test $ac_cv_prog_cc_works = no; then | |
1238 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
1239 | fi | |
1240 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
e08f13ee | 1241 | echo "configure:1242: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
e9a25f70 JL |
1242 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
1243 | cross_compiling=$ac_cv_prog_cc_cross | |
1244 | ||
1245 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
e08f13ee | 1246 | echo "configure:1247: checking whether we are using GNU C" >&5 |
e9a25f70 JL |
1247 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
1248 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1249 | else | |
1250 | cat > conftest.c <<EOF | |
1251 | #ifdef __GNUC__ | |
1252 | yes; | |
1253 | #endif | |
1254 | EOF | |
e08f13ee | 1255 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
e9a25f70 JL |
1256 | ac_cv_prog_gcc=yes |
1257 | else | |
1258 | ac_cv_prog_gcc=no | |
1259 | fi | |
1260 | fi | |
1261 | ||
1262 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
1263 | ||
1264 | if test $ac_cv_prog_gcc = yes; then | |
1265 | GCC=yes | |
cd9e5e7c MK |
1266 | else |
1267 | GCC= | |
1268 | fi | |
1269 | ||
1270 | ac_test_CFLAGS="${CFLAGS+set}" | |
1271 | ac_save_CFLAGS="$CFLAGS" | |
1272 | CFLAGS= | |
1273 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
e08f13ee | 1274 | echo "configure:1275: checking whether ${CC-cc} accepts -g" >&5 |
e9a25f70 JL |
1275 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
1276 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1277 | else | |
1278 | echo 'void f(){}' > conftest.c | |
1279 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
1280 | ac_cv_prog_cc_g=yes | |
1281 | else | |
1282 | ac_cv_prog_cc_g=no | |
1283 | fi | |
1284 | rm -f conftest* | |
1285 | ||
1286 | fi | |
1287 | ||
1288 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
cd9e5e7c MK |
1289 | if test "$ac_test_CFLAGS" = set; then |
1290 | CFLAGS="$ac_save_CFLAGS" | |
1291 | elif test $ac_cv_prog_cc_g = yes; then | |
1292 | if test "$GCC" = yes; then | |
e9a25f70 JL |
1293 | CFLAGS="-g -O2" |
1294 | else | |
cd9e5e7c | 1295 | CFLAGS="-g" |
81814e35 | 1296 | fi |
3723cad9 | 1297 | else |
cd9e5e7c MK |
1298 | if test "$GCC" = yes; then |
1299 | CFLAGS="-O2" | |
1300 | else | |
1301 | CFLAGS= | |
1302 | fi | |
e9a25f70 JL |
1303 | fi |
1304 | ||
3ec83fc2 RH |
1305 | if test "x$CC" != xcc; then |
1306 | echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 | |
e08f13ee | 1307 | echo "configure:1308: checking whether $CC and cc understand -c and -o together" >&5 |
3ec83fc2 RH |
1308 | else |
1309 | echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 | |
e08f13ee | 1310 | echo "configure:1311: checking whether cc understands -c and -o together" >&5 |
3ec83fc2 RH |
1311 | fi |
1312 | set dummy $CC; ac_cc="`echo $2 | | |
1313 | sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" | |
1314 | if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then | |
1315 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1316 | else | |
1317 | echo 'foo(){}' > conftest.c | |
1318 | # Make sure it works both with $CC and with simple cc. | |
1319 | # We do the test twice because some compilers refuse to overwrite an | |
1320 | # existing .o file with -o, though they will create one. | |
1321 | ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' | |
e08f13ee JS |
1322 | if { (eval echo configure:1323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && |
1323 | test -f conftest.o && { (eval echo configure:1324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; | |
3ec83fc2 RH |
1324 | then |
1325 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
1326 | if test "x$CC" != xcc; then | |
1327 | # Test first that cc exists at all. | |
e08f13ee | 1328 | if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then |
3ec83fc2 | 1329 | ac_try='cc -c conftest.c -o conftest.o 1>&5' |
e08f13ee JS |
1330 | if { (eval echo configure:1331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && |
1331 | test -f conftest.o && { (eval echo configure:1332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; | |
3ec83fc2 RH |
1332 | then |
1333 | # cc works too. | |
1334 | : | |
1335 | else | |
1336 | # cc exists but doesn't like -o. | |
1337 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
1338 | fi | |
1339 | fi | |
1340 | fi | |
1341 | else | |
1342 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
1343 | fi | |
1344 | rm -f conftest* | |
1345 | ||
1346 | fi | |
1347 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then | |
1348 | echo "$ac_t""yes" 1>&6 | |
1349 | else | |
1350 | echo "$ac_t""no" 1>&6 | |
1351 | cat >> confdefs.h <<\EOF | |
1352 | #define NO_MINUS_C_MINUS_O 1 | |
1353 | EOF | |
1354 | ||
1355 | fi | |
1356 | ||
b8dad04b | 1357 | # autoconf is lame and doesn't give us any substitution variable for this. |
e38df833 | 1358 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then |
b4c7e567 | 1359 | NO_MINUS_C_MINUS_O=yes |
b8dad04b ZW |
1360 | else |
1361 | OUTPUT_OPTION='-o $@' | |
b4c7e567 | 1362 | fi |
3ec83fc2 RH |
1363 | |
1364 | ||
b8dad04b | 1365 | |
75e93faa | 1366 | echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6 |
e08f13ee | 1367 | echo "configure:1368: checking whether ${CC-cc} accepts -Wno-long-long" >&5 |
75e93faa ZW |
1368 | if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then |
1369 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1370 | else | |
1371 | save_CFLAGS="$CFLAGS" | |
1372 | CFLAGS="-Wno-long-long" | |
1373 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 1374 | #line 1375 "configure" |
75e93faa ZW |
1375 | #include "confdefs.h" |
1376 | ||
1377 | int main() { | |
1378 | ||
1379 | ; return 0; } | |
1380 | EOF | |
e08f13ee | 1381 | if { (eval echo configure:1382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1382 | rm -rf conftest* |
1383 | ac_cv_prog_cc_no_long_long=yes | |
1384 | else | |
1385 | echo "configure: failed program was:" >&5 | |
1386 | cat conftest.$ac_ext >&5 | |
1387 | rm -rf conftest* | |
1388 | ac_cv_prog_cc_no_long_long=no | |
1389 | fi | |
1390 | rm -f conftest* | |
1391 | CFLAGS="$save_CFLAGS" | |
1392 | fi | |
1393 | ||
1394 | echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6 | |
1395 | strict1_warn= | |
1396 | if test $ac_cv_prog_cc_no_long_long = yes; then | |
1397 | strict1_warn="-pedantic -Wno-long-long" | |
1398 | fi | |
1399 | ||
1400 | ||
84c041a1 | 1401 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
e08f13ee | 1402 | echo "configure:1403: checking how to run the C preprocessor" >&5 |
84c041a1 ZW |
1403 | # On Suns, sometimes $CPP names a directory. |
1404 | if test -n "$CPP" && test -d "$CPP"; then | |
1405 | CPP= | |
1406 | fi | |
1407 | if test -z "$CPP"; then | |
1408 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
1409 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1410 | else | |
1411 | # This must be in double quotes, not single quotes, because CPP may get | |
1412 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
1413 | CPP="${CC-cc} -E" | |
1414 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
1415 | # not just through cpp. | |
1416 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 1417 | #line 1418 "configure" |
84c041a1 ZW |
1418 | #include "confdefs.h" |
1419 | #include <assert.h> | |
1420 | Syntax Error | |
1421 | EOF | |
1422 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e08f13ee | 1423 | { (eval echo configure:1424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
84c041a1 ZW |
1424 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1425 | if test -z "$ac_err"; then | |
1426 | : | |
1427 | else | |
1428 | echo "$ac_err" >&5 | |
1429 | echo "configure: failed program was:" >&5 | |
1430 | cat conftest.$ac_ext >&5 | |
1431 | rm -rf conftest* | |
1432 | CPP="${CC-cc} -E -traditional-cpp" | |
1433 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 1434 | #line 1435 "configure" |
84c041a1 ZW |
1435 | #include "confdefs.h" |
1436 | #include <assert.h> | |
1437 | Syntax Error | |
1438 | EOF | |
1439 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e08f13ee | 1440 | { (eval echo configure:1441: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
84c041a1 ZW |
1441 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1442 | if test -z "$ac_err"; then | |
1443 | : | |
1444 | else | |
1445 | echo "$ac_err" >&5 | |
1446 | echo "configure: failed program was:" >&5 | |
1447 | cat conftest.$ac_ext >&5 | |
1448 | rm -rf conftest* | |
1449 | CPP="${CC-cc} -nologo -E" | |
1450 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 1451 | #line 1452 "configure" |
84c041a1 ZW |
1452 | #include "confdefs.h" |
1453 | #include <assert.h> | |
1454 | Syntax Error | |
1455 | EOF | |
1456 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e08f13ee | 1457 | { (eval echo configure:1458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
84c041a1 ZW |
1458 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1459 | if test -z "$ac_err"; then | |
1460 | : | |
1461 | else | |
1462 | echo "$ac_err" >&5 | |
1463 | echo "configure: failed program was:" >&5 | |
1464 | cat conftest.$ac_ext >&5 | |
1465 | rm -rf conftest* | |
1466 | CPP=/lib/cpp | |
1467 | fi | |
1468 | rm -f conftest* | |
1469 | fi | |
1470 | rm -f conftest* | |
1471 | fi | |
1472 | rm -f conftest* | |
1473 | ac_cv_prog_CPP="$CPP" | |
1474 | fi | |
1475 | CPP="$ac_cv_prog_CPP" | |
1476 | else | |
1477 | ac_cv_prog_CPP="$CPP" | |
1478 | fi | |
1479 | echo "$ac_t""$CPP" 1>&6 | |
1480 | ||
75e93faa | 1481 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
e08f13ee | 1482 | echo "configure:1483: checking for inline" >&5 |
75e93faa ZW |
1483 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1484 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1485 | else | |
1486 | ac_cv_c_inline=no | |
1487 | for ac_kw in inline __inline__ __inline; do | |
1488 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 1489 | #line 1490 "configure" |
75e93faa ZW |
1490 | #include "confdefs.h" |
1491 | ||
1492 | int main() { | |
1493 | } $ac_kw foo() { | |
1494 | ; return 0; } | |
1495 | EOF | |
e08f13ee | 1496 | if { (eval echo configure:1497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1497 | rm -rf conftest* |
1498 | ac_cv_c_inline=$ac_kw; break | |
1499 | else | |
1500 | echo "configure: failed program was:" >&5 | |
1501 | cat conftest.$ac_ext >&5 | |
1502 | fi | |
1503 | rm -f conftest* | |
1504 | done | |
1505 | ||
1506 | fi | |
1507 | ||
1508 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1509 | case "$ac_cv_c_inline" in | |
1510 | inline | yes) ;; | |
1511 | no) cat >> confdefs.h <<\EOF | |
1512 | #define inline | |
1513 | EOF | |
1514 | ;; | |
1515 | *) cat >> confdefs.h <<EOF | |
1516 | #define inline $ac_cv_c_inline | |
1517 | EOF | |
1518 | ;; | |
1519 | esac | |
1520 | ||
1521 | echo $ac_n "checking for volatile""... $ac_c" 1>&6 | |
e08f13ee | 1522 | echo "configure:1523: checking for volatile" >&5 |
75e93faa ZW |
1523 | if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then |
1524 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1525 | else | |
1526 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 1527 | #line 1528 "configure" |
75e93faa ZW |
1528 | #include "confdefs.h" |
1529 | ||
1530 | int main() { | |
1531 | volatile int foo; | |
1532 | ; return 0; } | |
1533 | EOF | |
e08f13ee | 1534 | if { (eval echo configure:1535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1535 | rm -rf conftest* |
1536 | gcc_cv_c_volatile=yes | |
1537 | else | |
1538 | echo "configure: failed program was:" >&5 | |
1539 | cat conftest.$ac_ext >&5 | |
1540 | rm -rf conftest* | |
1541 | gcc_cv_c_volatile=no | |
1542 | fi | |
1543 | rm -f conftest* | |
1544 | fi | |
1545 | ||
1546 | echo "$ac_t""$gcc_cv_c_volatile" 1>&6 | |
1547 | if test $gcc_cv_c_volatile = yes ; then | |
1548 | cat >> confdefs.h <<\EOF | |
1549 | #define HAVE_VOLATILE 1 | |
1550 | EOF | |
1551 | ||
1552 | fi | |
1553 | ||
1554 | ||
04cabffc | 1555 | echo $ac_n "checking for long double""... $ac_c" 1>&6 |
e08f13ee | 1556 | echo "configure:1557: checking for long double" >&5 |
04cabffc KG |
1557 | if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then |
1558 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1559 | else | |
1560 | if test "$GCC" = yes; then | |
1561 | gcc_cv_c_long_double=yes | |
1562 | else | |
1563 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 1564 | #line 1565 "configure" |
04cabffc KG |
1565 | #include "confdefs.h" |
1566 | ||
1567 | int main() { | |
1568 | /* The Stardent Vistra knows sizeof(long double), but does not support it. */ | |
1569 | long double foo = 0.0; | |
1570 | /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ | |
1571 | switch (0) case 0: case (sizeof(long double) >= sizeof(double)):; | |
1572 | ; return 0; } | |
1573 | EOF | |
e08f13ee | 1574 | if { (eval echo configure:1575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
04cabffc KG |
1575 | rm -rf conftest* |
1576 | gcc_cv_c_long_double=yes | |
1577 | else | |
1578 | echo "configure: failed program was:" >&5 | |
1579 | cat conftest.$ac_ext >&5 | |
1580 | rm -rf conftest* | |
1581 | gcc_cv_c_long_double=no | |
1582 | fi | |
1583 | rm -f conftest* | |
1584 | fi | |
1585 | fi | |
1586 | ||
1587 | echo "$ac_t""$gcc_cv_c_long_double" 1>&6 | |
1588 | if test $gcc_cv_c_long_double = yes; then | |
1589 | cat >> confdefs.h <<\EOF | |
1590 | #define HAVE_LONG_DOUBLE 1 | |
1591 | EOF | |
1592 | ||
1593 | fi | |
1594 | ||
75e93faa | 1595 | echo $ac_n "checking for long long int""... $ac_c" 1>&6 |
e08f13ee | 1596 | echo "configure:1597: checking for long long int" >&5 |
75e93faa ZW |
1597 | if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then |
1598 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1599 | else | |
1600 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 1601 | #line 1602 "configure" |
75e93faa | 1602 | #include "confdefs.h" |
61842080 | 1603 | |
75e93faa ZW |
1604 | int main() { |
1605 | long long int i; | |
1606 | ; return 0; } | |
1607 | EOF | |
e08f13ee | 1608 | if { (eval echo configure:1609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1609 | rm -rf conftest* |
1610 | ac_cv_c_long_long=yes | |
1611 | else | |
1612 | echo "configure: failed program was:" >&5 | |
1613 | cat conftest.$ac_ext >&5 | |
1614 | rm -rf conftest* | |
1615 | ac_cv_c_long_long=no | |
1616 | fi | |
1617 | rm -f conftest* | |
1618 | fi | |
1619 | ||
1620 | echo "$ac_t""$ac_cv_c_long_long" 1>&6 | |
1621 | if test $ac_cv_c_long_long = yes; then | |
1622 | cat >> confdefs.h <<\EOF | |
1623 | #define HAVE_LONG_LONG 1 | |
1624 | EOF | |
1625 | ||
1626 | fi | |
1627 | echo $ac_n "checking for __int64""... $ac_c" 1>&6 | |
e08f13ee | 1628 | echo "configure:1629: checking for __int64" >&5 |
75e93faa | 1629 | if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then |
5c3bc9fb GK |
1630 | echo $ac_n "(cached) $ac_c" 1>&6 |
1631 | else | |
75e93faa | 1632 | cat > conftest.$ac_ext <<EOF |
e08f13ee | 1633 | #line 1634 "configure" |
5c3bc9fb GK |
1634 | #include "confdefs.h" |
1635 | ||
1636 | int main() { | |
75e93faa ZW |
1637 | __int64 i; |
1638 | ; return 0; } | |
1639 | EOF | |
e08f13ee | 1640 | if { (eval echo configure:1641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1641 | rm -rf conftest* |
1642 | ac_cv_c___int64=yes | |
1643 | else | |
1644 | echo "configure: failed program was:" >&5 | |
1645 | cat conftest.$ac_ext >&5 | |
1646 | rm -rf conftest* | |
1647 | ac_cv_c___int64=no | |
1648 | fi | |
1649 | rm -f conftest* | |
1650 | fi | |
5c3bc9fb | 1651 | |
75e93faa ZW |
1652 | echo "$ac_t""$ac_cv_c___int64" 1>&6 |
1653 | if test $ac_cv_c___int64 = yes; then | |
1654 | cat >> confdefs.h <<\EOF | |
1655 | #define HAVE___INT64 1 | |
1656 | EOF | |
1657 | ||
1658 | fi | |
1659 | ||
827ae6cf | 1660 | echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6 |
e08f13ee | 1661 | echo "configure:1662: checking for built-in _Bool" >&5 |
827ae6cf RO |
1662 | if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then |
1663 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1664 | else | |
1665 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 1666 | #line 1667 "configure" |
827ae6cf RO |
1667 | #include "confdefs.h" |
1668 | ||
1669 | int main() { | |
1670 | _Bool foo; | |
1671 | ; return 0; } | |
1672 | EOF | |
e08f13ee | 1673 | if { (eval echo configure:1674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
827ae6cf RO |
1674 | rm -rf conftest* |
1675 | gcc_cv_c__bool=yes | |
1676 | else | |
1677 | echo "configure: failed program was:" >&5 | |
1678 | cat conftest.$ac_ext >&5 | |
1679 | rm -rf conftest* | |
1680 | gcc_cv_c__bool=no | |
1681 | fi | |
1682 | rm -f conftest* | |
1683 | ||
1684 | fi | |
1685 | ||
1686 | echo "$ac_t""$gcc_cv_c__bool" 1>&6 | |
1687 | if test $gcc_cv_c__bool = yes; then | |
1688 | cat >> confdefs.h <<\EOF | |
1689 | #define HAVE__BOOL 1 | |
1690 | EOF | |
1691 | ||
1692 | fi | |
1693 | ||
75e93faa ZW |
1694 | |
1695 | # sizeof(char) is 1 by definition. | |
1696 | echo $ac_n "checking size of short""... $ac_c" 1>&6 | |
e08f13ee | 1697 | echo "configure:1698: checking size of short" >&5 |
75e93faa ZW |
1698 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
1699 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1700 | else | |
1701 | for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. | |
1702 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 1703 | #line 1704 "configure" |
75e93faa ZW |
1704 | #include "confdefs.h" |
1705 | #include "confdefs.h" | |
1706 | #include <sys/types.h> | |
1707 | ||
1708 | ||
1709 | int main() { | |
1710 | switch (0) case 0: case (sizeof (short) == $ac_size):; | |
5c3bc9fb GK |
1711 | ; return 0; } |
1712 | EOF | |
e08f13ee | 1713 | if { (eval echo configure:1714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5c3bc9fb | 1714 | rm -rf conftest* |
75e93faa | 1715 | ac_cv_sizeof_short=$ac_size |
ff5def20 | 1716 | else |
5c3bc9fb GK |
1717 | echo "configure: failed program was:" >&5 |
1718 | cat conftest.$ac_ext >&5 | |
75e93faa ZW |
1719 | fi |
1720 | rm -f conftest* | |
1721 | if test x$ac_cv_sizeof_short != x ; then break; fi | |
1722 | done | |
1723 | ||
1724 | fi | |
1725 | ||
1726 | if test x$ac_cv_sizeof_short = x ; then | |
1727 | { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } | |
1728 | fi | |
1729 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 | |
1730 | cat >> confdefs.h <<EOF | |
1731 | #define SIZEOF_SHORT $ac_cv_sizeof_short | |
1732 | EOF | |
1733 | ||
1734 | ||
1735 | echo $ac_n "checking size of int""... $ac_c" 1>&6 | |
e08f13ee | 1736 | echo "configure:1737: checking size of int" >&5 |
75e93faa ZW |
1737 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
1738 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1739 | else | |
1740 | for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. | |
1741 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 1742 | #line 1743 "configure" |
75e93faa ZW |
1743 | #include "confdefs.h" |
1744 | #include "confdefs.h" | |
1745 | #include <sys/types.h> | |
1746 | ||
1747 | ||
1748 | int main() { | |
1749 | switch (0) case 0: case (sizeof (int) == $ac_size):; | |
1750 | ; return 0; } | |
1751 | EOF | |
e08f13ee | 1752 | if { (eval echo configure:1753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5c3bc9fb | 1753 | rm -rf conftest* |
75e93faa ZW |
1754 | ac_cv_sizeof_int=$ac_size |
1755 | else | |
1756 | echo "configure: failed program was:" >&5 | |
1757 | cat conftest.$ac_ext >&5 | |
ff5def20 DA |
1758 | fi |
1759 | rm -f conftest* | |
75e93faa ZW |
1760 | if test x$ac_cv_sizeof_int != x ; then break; fi |
1761 | done | |
1762 | ||
5c3bc9fb GK |
1763 | fi |
1764 | ||
75e93faa ZW |
1765 | if test x$ac_cv_sizeof_int = x ; then |
1766 | { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } | |
1767 | fi | |
1768 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 | |
1769 | cat >> confdefs.h <<EOF | |
1770 | #define SIZEOF_INT $ac_cv_sizeof_int | |
1771 | EOF | |
1772 | ||
1773 | ||
1774 | echo $ac_n "checking size of long""... $ac_c" 1>&6 | |
e08f13ee | 1775 | echo "configure:1776: checking size of long" >&5 |
75e93faa ZW |
1776 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
1777 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1778 | else | |
1779 | for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. | |
1780 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 1781 | #line 1782 "configure" |
75e93faa ZW |
1782 | #include "confdefs.h" |
1783 | #include "confdefs.h" | |
1784 | #include <sys/types.h> | |
1785 | ||
1786 | ||
1787 | int main() { | |
1788 | switch (0) case 0: case (sizeof (long) == $ac_size):; | |
1789 | ; return 0; } | |
1790 | EOF | |
e08f13ee | 1791 | if { (eval echo configure:1792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1792 | rm -rf conftest* |
1793 | ac_cv_sizeof_long=$ac_size | |
1794 | else | |
1795 | echo "configure: failed program was:" >&5 | |
1796 | cat conftest.$ac_ext >&5 | |
1797 | fi | |
1798 | rm -f conftest* | |
1799 | if test x$ac_cv_sizeof_long != x ; then break; fi | |
1800 | done | |
1801 | ||
1802 | fi | |
1803 | ||
1804 | if test x$ac_cv_sizeof_long = x ; then | |
1805 | { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } | |
1806 | fi | |
1807 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 | |
1808 | cat >> confdefs.h <<EOF | |
1809 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
1810 | EOF | |
1811 | ||
1812 | ||
1813 | if test $ac_cv_c_long_long = yes; then | |
1814 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 | |
e08f13ee | 1815 | echo "configure:1816: checking size of long long" >&5 |
75e93faa ZW |
1816 | if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then |
1817 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1818 | else | |
1819 | for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. | |
1820 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 1821 | #line 1822 "configure" |
75e93faa ZW |
1822 | #include "confdefs.h" |
1823 | #include "confdefs.h" | |
1824 | #include <sys/types.h> | |
1825 | ||
1826 | ||
1827 | int main() { | |
1828 | switch (0) case 0: case (sizeof (long long) == $ac_size):; | |
1829 | ; return 0; } | |
1830 | EOF | |
e08f13ee | 1831 | if { (eval echo configure:1832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1832 | rm -rf conftest* |
1833 | ac_cv_sizeof_long_long=$ac_size | |
1834 | else | |
1835 | echo "configure: failed program was:" >&5 | |
1836 | cat conftest.$ac_ext >&5 | |
1837 | fi | |
1838 | rm -f conftest* | |
1839 | if test x$ac_cv_sizeof_long_long != x ; then break; fi | |
1840 | done | |
1841 | ||
1842 | fi | |
1843 | ||
1844 | if test x$ac_cv_sizeof_long_long = x ; then | |
1845 | { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; } | |
1846 | fi | |
1847 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 | |
1848 | cat >> confdefs.h <<EOF | |
1849 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
1850 | EOF | |
1851 | ||
1852 | ||
b8dad04b | 1853 | fi |
75e93faa ZW |
1854 | if test $ac_cv_c___int64 = yes; then |
1855 | echo $ac_n "checking size of __int64""... $ac_c" 1>&6 | |
e08f13ee | 1856 | echo "configure:1857: checking size of __int64" >&5 |
75e93faa ZW |
1857 | if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then |
1858 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1859 | else | |
1860 | for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. | |
1861 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 1862 | #line 1863 "configure" |
75e93faa ZW |
1863 | #include "confdefs.h" |
1864 | #include "confdefs.h" | |
1865 | #include <sys/types.h> | |
b8dad04b | 1866 | |
ff5def20 | 1867 | |
75e93faa ZW |
1868 | int main() { |
1869 | switch (0) case 0: case (sizeof (__int64) == $ac_size):; | |
1870 | ; return 0; } | |
1871 | EOF | |
e08f13ee | 1872 | if { (eval echo configure:1873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1873 | rm -rf conftest* |
1874 | ac_cv_sizeof___int64=$ac_size | |
1875 | else | |
1876 | echo "configure: failed program was:" >&5 | |
1877 | cat conftest.$ac_ext >&5 | |
1878 | fi | |
1879 | rm -f conftest* | |
1880 | if test x$ac_cv_sizeof___int64 != x ; then break; fi | |
1881 | done | |
1882 | ||
1883 | fi | |
1884 | ||
1885 | if test x$ac_cv_sizeof___int64 = x ; then | |
1886 | { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; } | |
1887 | fi | |
1888 | echo "$ac_t""$ac_cv_sizeof___int64" 1>&6 | |
1889 | cat >> confdefs.h <<EOF | |
1890 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 | |
1891 | EOF | |
1892 | ||
1893 | ||
1894 | fi | |
1895 | ||
84c041a1 | 1896 | echo $ac_n "checking execution character set""... $ac_c" 1>&6 |
e08f13ee | 1897 | echo "configure:1898: checking execution character set" >&5 |
84c041a1 ZW |
1898 | if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then |
1899 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1900 | else | |
1901 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 1902 | #line 1903 "configure" |
84c041a1 ZW |
1903 | #include "confdefs.h" |
1904 | #if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \ | |
1905 | && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21 | |
1906 | ASCII | |
1907 | #endif | |
1908 | EOF | |
1909 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1910 | egrep "ASCII" >/dev/null 2>&1; then | |
1911 | rm -rf conftest* | |
1912 | ac_cv_c_charset=ASCII | |
1913 | fi | |
1914 | rm -f conftest* | |
1915 | ||
1916 | if test x${ac_cv_c_charset+set} != xset; then | |
1917 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 1918 | #line 1919 "configure" |
84c041a1 ZW |
1919 | #include "confdefs.h" |
1920 | #if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \ | |
1921 | && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A | |
1922 | EBCDIC | |
1923 | #endif | |
1924 | EOF | |
1925 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1926 | egrep "EBCDIC" >/dev/null 2>&1; then | |
1927 | rm -rf conftest* | |
1928 | ac_cv_c_charset=EBCDIC | |
1929 | fi | |
1930 | rm -f conftest* | |
1931 | ||
1932 | fi | |
1933 | if test x${ac_cv_c_charset+set} != xset; then | |
1934 | ac_cv_c_charset=unknown | |
1935 | fi | |
1936 | fi | |
1937 | ||
1938 | echo "$ac_t""$ac_cv_c_charset" 1>&6 | |
1939 | if test $ac_cv_c_charset = unknown; then | |
1940 | { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; } | |
1941 | elif test $ac_cv_c_charset = EBCDIC; then | |
1942 | cat >> confdefs.h <<\EOF | |
1943 | #define HOST_EBCDIC 1 | |
1944 | EOF | |
1945 | ||
1946 | fi | |
84c041a1 | 1947 | |
61842080 MM |
1948 | # If the native compiler is GCC, we can enable warnings even in stage1. |
1949 | # That's useful for people building cross-compilers, or just running a | |
1950 | # quick `make'. | |
b8dad04b ZW |
1951 | warn_cflags= |
1952 | if test "x$GCC" = "xyes"; then | |
1953 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
61842080 MM |
1954 | fi |
1955 | ||
b8dad04b | 1956 | |
5b67ad6f | 1957 | # Stage specific cflags for build. |
b8dad04b | 1958 | stage1_cflags= |
5b67ad6f DA |
1959 | case $build in |
1960 | vax-*-*) | |
1961 | if test x$GCC = xyes | |
1962 | then | |
b8dad04b | 1963 | stage1_cflags="-Wa,-J" |
5b67ad6f | 1964 | else |
b8dad04b | 1965 | stage1_cflags="-J" |
5b67ad6f DA |
1966 | fi |
1967 | ;; | |
1968 | esac | |
1969 | ||
1970 | ||
e9a25f70 | 1971 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 |
e08f13ee | 1972 | echo "configure:1973: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
e9a25f70 JL |
1973 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1974 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1975 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1976 | else | |
1977 | cat > conftestmake <<\EOF | |
1978 | all: | |
1979 | @echo 'ac_maketemp="${MAKE}"' | |
1980 | EOF | |
1981 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1982 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1983 | if test -n "$ac_maketemp"; then | |
1984 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1985 | else | |
1986 | eval ac_cv_prog_make_${ac_make}_set=no | |
1987 | fi | |
1988 | rm -f conftestmake | |
1989 | fi | |
1990 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1991 | echo "$ac_t""yes" 1>&6 | |
1992 | SET_MAKE= | |
1993 | else | |
1994 | echo "$ac_t""no" 1>&6 | |
1995 | SET_MAKE="MAKE=${MAKE-make}" | |
1996 | fi | |
1997 | ||
1998 | ||
ab339d62 | 1999 | echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6 |
e08f13ee | 2000 | echo "configure:2001: checking whether a default assembler was specified" >&5 |
3ccc3a56 | 2001 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
e154a394 | 2002 | if test x"$gas_flag" = x"no"; then |
3ccc3a56 | 2003 | echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6 |
ab339d62 | 2004 | else |
3ccc3a56 | 2005 | echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6 |
ab339d62 AO |
2006 | fi |
2007 | else | |
2008 | echo "$ac_t""no" 1>&6 | |
2009 | fi | |
2010 | ||
2011 | echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6 | |
e08f13ee | 2012 | echo "configure:2013: checking whether a default linker was specified" >&5 |
3ccc3a56 | 2013 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
e154a394 | 2014 | if test x"$gnu_ld_flag" = x"no"; then |
3ccc3a56 | 2015 | echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6 |
ab339d62 | 2016 | else |
3ccc3a56 | 2017 | echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6 |
ab339d62 AO |
2018 | fi |
2019 | else | |
2020 | echo "$ac_t""no" 1>&6 | |
2021 | fi | |
2022 | ||
4070d885 | 2023 | echo $ac_n "checking for GNU C library""... $ac_c" 1>&6 |
e08f13ee | 2024 | echo "configure:2025: checking for GNU C library" >&5 |
4070d885 AJ |
2025 | if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then |
2026 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2027 | else | |
2028 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 2029 | #line 2030 "configure" |
4070d885 AJ |
2030 | #include "confdefs.h" |
2031 | #include <features.h> | |
2032 | int main() { | |
2033 | ||
2034 | #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
2035 | #error Not a GNU C library system | |
2036 | #endif | |
2037 | ; return 0; } | |
2038 | EOF | |
e08f13ee | 2039 | if { (eval echo configure:2040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
4070d885 AJ |
2040 | rm -rf conftest* |
2041 | gcc_cv_glibc=yes | |
2042 | else | |
2043 | echo "configure: failed program was:" >&5 | |
2044 | cat conftest.$ac_ext >&5 | |
2045 | rm -rf conftest* | |
2046 | gcc_cv_glibc=no | |
2047 | fi | |
2048 | rm -f conftest* | |
2049 | fi | |
2050 | ||
2051 | echo "$ac_t""$gcc_cv_glibc" 1>&6 | |
c2f7d403 | 2052 | if test $gcc_cv_glibc = yes; then |
4070d885 AJ |
2053 | cat >> confdefs.h <<\EOF |
2054 | #define _GNU_SOURCE 1 | |
2055 | EOF | |
2056 | ||
2057 | fi | |
2058 | ||
861bb6c1 | 2059 | # Find some useful tools |
3b681e9d | 2060 | for ac_prog in mawk gawk nawk awk |
861bb6c1 JL |
2061 | do |
2062 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2063 | set dummy $ac_prog; ac_word=$2 | |
2064 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e08f13ee | 2065 | echo "configure:2066: checking for $ac_word" >&5 |
861bb6c1 JL |
2066 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
2067 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2068 | else | |
2069 | if test -n "$AWK"; then | |
2070 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
2071 | else | |
cd9e5e7c | 2072 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
2073 | ac_dummy="$PATH" |
2074 | for ac_dir in $ac_dummy; do | |
861bb6c1 JL |
2075 | test -z "$ac_dir" && ac_dir=. |
2076 | if test -f $ac_dir/$ac_word; then | |
2077 | ac_cv_prog_AWK="$ac_prog" | |
2078 | break | |
2079 | fi | |
2080 | done | |
2081 | IFS="$ac_save_ifs" | |
2082 | fi | |
2083 | fi | |
2084 | AWK="$ac_cv_prog_AWK" | |
2085 | if test -n "$AWK"; then | |
2086 | echo "$ac_t""$AWK" 1>&6 | |
2087 | else | |
2088 | echo "$ac_t""no" 1>&6 | |
2089 | fi | |
2090 | ||
2091 | test -n "$AWK" && break | |
2092 | done | |
2093 | ||
0a4b6309 | 2094 | echo $ac_n "checking whether ln works""... $ac_c" 1>&6 |
e08f13ee | 2095 | echo "configure:2096: checking whether ln works" >&5 |
0a4b6309 RL |
2096 | if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then |
2097 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2098 | else | |
2099 | rm -f conftestdata_t | |
2100 | echo >conftestdata_f | |
2101 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
2102 | then | |
2103 | gcc_cv_prog_LN="ln" | |
2104 | else | |
2105 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
2106 | then | |
2107 | gcc_cv_prog_LN="ln -s" | |
2108 | else | |
2109 | gcc_cv_prog_LN=cp | |
2110 | fi | |
2111 | fi | |
2112 | rm -f conftestdata_f conftestdata_t | |
2113 | ||
2114 | fi | |
2115 | LN="$gcc_cv_prog_LN" | |
2116 | if test "$gcc_cv_prog_LN" = "ln"; then | |
2117 | echo "$ac_t""yes" 1>&6 | |
2118 | else | |
2119 | if test "$gcc_cv_prog_LN" = "ln -s"; then | |
2120 | echo "$ac_t""no, using ln -s" 1>&6 | |
2121 | else | |
2122 | echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6 | |
2123 | fi | |
2124 | fi | |
2125 | ||
2126 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 | |
e08f13ee | 2127 | echo "configure:2128: checking whether ln -s works" >&5 |
0a4b6309 RL |
2128 | if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then |
2129 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2130 | else | |
2131 | rm -f conftestdata_t | |
2132 | echo >conftestdata_f | |
2133 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
2134 | then | |
2135 | gcc_cv_prog_LN_S="ln -s" | |
2136 | else | |
2137 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
2138 | then | |
2139 | gcc_cv_prog_LN_S=ln | |
2140 | else | |
2141 | gcc_cv_prog_LN_S=cp | |
2142 | fi | |
2143 | fi | |
2144 | rm -f conftestdata_f conftestdata_t | |
2145 | ||
2146 | fi | |
2147 | LN_S="$gcc_cv_prog_LN_S" | |
2148 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
2149 | echo "$ac_t""yes" 1>&6 | |
2150 | else | |
2151 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
2152 | echo "$ac_t""no, using ln" 1>&6 | |
2153 | else | |
2154 | echo "$ac_t""no, and neither does ln, so using cp" 1>&6 | |
2155 | fi | |
2156 | fi | |
2157 | ||
861bb6c1 JL |
2158 | # Extract the first word of "ranlib", so it can be a program name with args. |
2159 | set dummy ranlib; ac_word=$2 | |
2160 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e08f13ee | 2161 | echo "configure:2162: checking for $ac_word" >&5 |
861bb6c1 JL |
2162 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
2163 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2164 | else | |
2165 | if test -n "$RANLIB"; then | |
2166 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2167 | else | |
cd9e5e7c | 2168 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
2169 | ac_dummy="$PATH" |
2170 | for ac_dir in $ac_dummy; do | |
861bb6c1 JL |
2171 | test -z "$ac_dir" && ac_dir=. |
2172 | if test -f $ac_dir/$ac_word; then | |
2173 | ac_cv_prog_RANLIB="ranlib" | |
2174 | break | |
2175 | fi | |
2176 | done | |
2177 | IFS="$ac_save_ifs" | |
2178 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
2179 | fi | |
2180 | fi | |
2181 | RANLIB="$ac_cv_prog_RANLIB" | |
2182 | if test -n "$RANLIB"; then | |
2183 | echo "$ac_t""$RANLIB" 1>&6 | |
2184 | else | |
2185 | echo "$ac_t""no" 1>&6 | |
2186 | fi | |
2187 | ||
0a4b6309 RL |
2188 | # Find a good install program. We prefer a C program (faster), |
2189 | # so one script is as good as another. But avoid the broken or | |
2190 | # incompatible versions: | |
2191 | # SysV /etc/install, /usr/sbin/install | |
2192 | # SunOS /usr/etc/install | |
2193 | # IRIX /sbin/install | |
2194 | # AIX /bin/install | |
2195 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2196 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2197 | # ./install, which can be erroneously created by make from ./install.sh. | |
2198 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
e08f13ee | 2199 | echo "configure:2200: checking for a BSD compatible install" >&5 |
0a4b6309 RL |
2200 | if test -z "$INSTALL"; then |
2201 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
2202 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2203 | else | |
2204 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
2205 | for ac_dir in $PATH; do | |
2206 | # Account for people who put trailing slashes in PATH elements. | |
2207 | case "$ac_dir/" in | |
2208 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
2209 | *) | |
2210 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2211 | for ac_prog in ginstall scoinst install; do | |
2212 | if test -f $ac_dir/$ac_prog; then | |
2213 | if test $ac_prog = install && | |
2214 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
2215 | # AIX install. It has an incompatible calling convention. | |
2216 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
2217 | : | |
2218 | else | |
2219 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
2220 | break 2 | |
2221 | fi | |
2222 | fi | |
2223 | done | |
2224 | ;; | |
2225 | esac | |
2226 | done | |
2227 | IFS="$ac_save_IFS" | |
2228 | ||
2229 | fi | |
2230 | if test "${ac_cv_path_install+set}" = set; then | |
2231 | INSTALL="$ac_cv_path_install" | |
2232 | else | |
2233 | # As a last resort, use the slow shell script. We don't cache a | |
2234 | # path for INSTALL within a source directory, because that will | |
2235 | # break other packages using the cache if that directory is | |
2236 | # removed, or if the path is relative. | |
2237 | INSTALL="$ac_install_sh" | |
2238 | fi | |
2239 | fi | |
2240 | echo "$ac_t""$INSTALL" 1>&6 | |
2241 | ||
2242 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
2243 | # It thinks the first close brace ends the variable substitution. | |
2244 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
2245 | ||
2246 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
2247 | ||
861bb6c1 | 2248 | |
956d6950 | 2249 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
e08f13ee | 2250 | echo "configure:2251: checking for ANSI C header files" >&5 |
956d6950 JL |
2251 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
2252 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2253 | else | |
2254 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 2255 | #line 2256 "configure" |
956d6950 JL |
2256 | #include "confdefs.h" |
2257 | #include <stdlib.h> | |
2258 | #include <stdarg.h> | |
2259 | #include <string.h> | |
2260 | #include <float.h> | |
2261 | EOF | |
2262 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e08f13ee | 2263 | { (eval echo configure:2264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 2264 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
956d6950 JL |
2265 | if test -z "$ac_err"; then |
2266 | rm -rf conftest* | |
2267 | ac_cv_header_stdc=yes | |
2268 | else | |
2269 | echo "$ac_err" >&5 | |
2270 | echo "configure: failed program was:" >&5 | |
2271 | cat conftest.$ac_ext >&5 | |
2272 | rm -rf conftest* | |
2273 | ac_cv_header_stdc=no | |
2274 | fi | |
2275 | rm -f conftest* | |
2276 | ||
2277 | if test $ac_cv_header_stdc = yes; then | |
2278 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
2279 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 2280 | #line 2281 "configure" |
956d6950 JL |
2281 | #include "confdefs.h" |
2282 | #include <string.h> | |
2283 | EOF | |
2284 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2285 | egrep "memchr" >/dev/null 2>&1; then | |
2286 | : | |
2287 | else | |
2288 | rm -rf conftest* | |
2289 | ac_cv_header_stdc=no | |
2290 | fi | |
2291 | rm -f conftest* | |
2292 | ||
2293 | fi | |
2294 | ||
2295 | if test $ac_cv_header_stdc = yes; then | |
2296 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
2297 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 2298 | #line 2299 "configure" |
956d6950 JL |
2299 | #include "confdefs.h" |
2300 | #include <stdlib.h> | |
2301 | EOF | |
2302 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2303 | egrep "free" >/dev/null 2>&1; then | |
2304 | : | |
2305 | else | |
2306 | rm -rf conftest* | |
2307 | ac_cv_header_stdc=no | |
2308 | fi | |
2309 | rm -f conftest* | |
2310 | ||
2311 | fi | |
2312 | ||
2313 | if test $ac_cv_header_stdc = yes; then | |
2314 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
2315 | if test "$cross_compiling" = yes; then | |
2316 | : | |
2317 | else | |
2318 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 2319 | #line 2320 "configure" |
956d6950 JL |
2320 | #include "confdefs.h" |
2321 | #include <ctype.h> | |
2322 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
2323 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
2324 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
2325 | int main () { int i; for (i = 0; i < 256; i++) | |
2326 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
2327 | exit (0); } | |
2328 | ||
2329 | EOF | |
e08f13ee | 2330 | if { (eval echo configure:2331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
956d6950 JL |
2331 | then |
2332 | : | |
2333 | else | |
2334 | echo "configure: failed program was:" >&5 | |
2335 | cat conftest.$ac_ext >&5 | |
2336 | rm -fr conftest* | |
2337 | ac_cv_header_stdc=no | |
2338 | fi | |
2339 | rm -fr conftest* | |
2340 | fi | |
2341 | ||
2342 | fi | |
2343 | fi | |
2344 | ||
2345 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
2346 | if test $ac_cv_header_stdc = yes; then | |
2347 | cat >> confdefs.h <<\EOF | |
2348 | #define STDC_HEADERS 1 | |
2349 | EOF | |
2350 | ||
2351 | fi | |
2352 | ||
2353 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 | |
e08f13ee | 2354 | echo "configure:2355: checking whether time.h and sys/time.h may both be included" >&5 |
956d6950 JL |
2355 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
2356 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2357 | else | |
2358 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 2359 | #line 2360 "configure" |
956d6950 JL |
2360 | #include "confdefs.h" |
2361 | #include <sys/types.h> | |
2362 | #include <sys/time.h> | |
2363 | #include <time.h> | |
2364 | int main() { | |
2365 | struct tm *tp; | |
2366 | ; return 0; } | |
2367 | EOF | |
e08f13ee | 2368 | if { (eval echo configure:2369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
956d6950 JL |
2369 | rm -rf conftest* |
2370 | ac_cv_header_time=yes | |
2371 | else | |
2372 | echo "configure: failed program was:" >&5 | |
2373 | cat conftest.$ac_ext >&5 | |
2374 | rm -rf conftest* | |
2375 | ac_cv_header_time=no | |
2376 | fi | |
2377 | rm -f conftest* | |
2378 | fi | |
2379 | ||
2380 | echo "$ac_t""$ac_cv_header_time" 1>&6 | |
2381 | if test $ac_cv_header_time = yes; then | |
2382 | cat >> confdefs.h <<\EOF | |
2383 | #define TIME_WITH_SYS_TIME 1 | |
2384 | EOF | |
2385 | ||
2386 | fi | |
2387 | ||
827ae6cf | 2388 | echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6 |
e08f13ee | 2389 | echo "configure:2390: checking for working stdbool.h" >&5 |
827ae6cf RO |
2390 | if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then |
2391 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2392 | else | |
2393 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 2394 | #line 2395 "configure" |
827ae6cf RO |
2395 | #include "confdefs.h" |
2396 | #include <stdbool.h> | |
2397 | int main() { | |
2398 | bool foo = false; | |
2399 | ; return 0; } | |
2400 | EOF | |
e08f13ee | 2401 | if { (eval echo configure:2402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
827ae6cf RO |
2402 | rm -rf conftest* |
2403 | ac_cv_header_stdbool_h=yes | |
2404 | else | |
2405 | echo "configure: failed program was:" >&5 | |
2406 | cat conftest.$ac_ext >&5 | |
2407 | rm -rf conftest* | |
2408 | ac_cv_header_stdbool_h=no | |
2409 | fi | |
2410 | rm -f conftest* | |
2411 | fi | |
2412 | ||
2413 | echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6 | |
2414 | if test $ac_cv_header_stdbool_h = yes; then | |
2415 | cat >> confdefs.h <<\EOF | |
2416 | #define HAVE_STDBOOL_H 1 | |
2417 | EOF | |
2418 | ||
2419 | fi | |
2420 | ||
0a4b6309 | 2421 | echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6 |
e08f13ee | 2422 | echo "configure:2423: checking whether string.h and strings.h may both be included" >&5 |
0a4b6309 RL |
2423 | if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then |
2424 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2425 | else | |
2426 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 2427 | #line 2428 "configure" |
0a4b6309 RL |
2428 | #include "confdefs.h" |
2429 | #include <string.h> | |
2430 | #include <strings.h> | |
2431 | int main() { | |
2432 | ||
2433 | ; return 0; } | |
2434 | EOF | |
e08f13ee | 2435 | if { (eval echo configure:2436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0a4b6309 RL |
2436 | rm -rf conftest* |
2437 | gcc_cv_header_string=yes | |
2438 | else | |
2439 | echo "configure: failed program was:" >&5 | |
2440 | cat conftest.$ac_ext >&5 | |
2441 | rm -rf conftest* | |
2442 | gcc_cv_header_string=no | |
2443 | fi | |
2444 | rm -f conftest* | |
2445 | fi | |
2446 | ||
2447 | echo "$ac_t""$gcc_cv_header_string" 1>&6 | |
2448 | if test $gcc_cv_header_string = yes; then | |
2449 | cat >> confdefs.h <<\EOF | |
2450 | #define STRING_WITH_STRINGS 1 | |
2451 | EOF | |
2452 | ||
2453 | fi | |
2454 | ||
e9831ca0 | 2455 | echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 |
e08f13ee | 2456 | echo "configure:2457: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
e9831ca0 KG |
2457 | if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then |
2458 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2459 | else | |
2460 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 2461 | #line 2462 "configure" |
e9831ca0 KG |
2462 | #include "confdefs.h" |
2463 | #include <sys/types.h> | |
2464 | #include <sys/wait.h> | |
2465 | #ifndef WEXITSTATUS | |
2466 | #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) | |
2467 | #endif | |
2468 | #ifndef WIFEXITED | |
2469 | #define WIFEXITED(stat_val) (((stat_val) & 255) == 0) | |
2470 | #endif | |
2471 | int main() { | |
2472 | int s; | |
2473 | wait (&s); | |
2474 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
2475 | ; return 0; } | |
2476 | EOF | |
e08f13ee | 2477 | if { (eval echo configure:2478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
e9831ca0 KG |
2478 | rm -rf conftest* |
2479 | ac_cv_header_sys_wait_h=yes | |
2480 | else | |
2481 | echo "configure: failed program was:" >&5 | |
2482 | cat conftest.$ac_ext >&5 | |
2483 | rm -rf conftest* | |
2484 | ac_cv_header_sys_wait_h=no | |
2485 | fi | |
2486 | rm -f conftest* | |
2487 | fi | |
2488 | ||
2489 | echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 | |
2490 | if test $ac_cv_header_sys_wait_h = yes; then | |
2491 | cat >> confdefs.h <<\EOF | |
2492 | #define HAVE_SYS_WAIT_H 1 | |
2493 | EOF | |
2494 | ||
2495 | fi | |
2496 | ||
03c41c05 | 2497 | for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \ |
7719ffbf | 2498 | fcntl.h unistd.h sys/file.h sys/time.h \ |
03c41c05 | 2499 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
f91abfce | 2500 | direct.h malloc.h langinfo.h |
861bb6c1 JL |
2501 | do |
2502 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2503 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
e08f13ee | 2504 | echo "configure:2505: checking for $ac_hdr" >&5 |
861bb6c1 JL |
2505 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2506 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2507 | else | |
2508 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 2509 | #line 2510 "configure" |
861bb6c1 JL |
2510 | #include "confdefs.h" |
2511 | #include <$ac_hdr> | |
2512 | EOF | |
956d6950 | 2513 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
e08f13ee | 2514 | { (eval echo configure:2515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 2515 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
956d6950 JL |
2516 | if test -z "$ac_err"; then |
2517 | rm -rf conftest* | |
2518 | eval "ac_cv_header_$ac_safe=yes" | |
2519 | else | |
2520 | echo "$ac_err" >&5 | |
2521 | echo "configure: failed program was:" >&5 | |
2522 | cat conftest.$ac_ext >&5 | |
2523 | rm -rf conftest* | |
2524 | eval "ac_cv_header_$ac_safe=no" | |
2525 | fi | |
2526 | rm -f conftest* | |
2527 | fi | |
2528 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2529 | echo "$ac_t""yes" 1>&6 | |
2530 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2531 | cat >> confdefs.h <<EOF | |
2532 | #define $ac_tr_hdr 1 | |
2533 | EOF | |
2534 | ||
2535 | else | |
2536 | echo "$ac_t""no" 1>&6 | |
2537 | fi | |
2538 | done | |
2539 | ||
2540 | ||
f24af81b TT |
2541 | # Check for thread headers. |
2542 | ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'` | |
2543 | echo $ac_n "checking for thread.h""... $ac_c" 1>&6 | |
e08f13ee | 2544 | echo "configure:2545: checking for thread.h" >&5 |
f24af81b TT |
2545 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2546 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2547 | else | |
2548 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 2549 | #line 2550 "configure" |
f24af81b TT |
2550 | #include "confdefs.h" |
2551 | #include <thread.h> | |
2552 | EOF | |
2553 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e08f13ee | 2554 | { (eval echo configure:2555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 2555 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
f24af81b TT |
2556 | if test -z "$ac_err"; then |
2557 | rm -rf conftest* | |
2558 | eval "ac_cv_header_$ac_safe=yes" | |
2559 | else | |
2560 | echo "$ac_err" >&5 | |
2561 | echo "configure: failed program was:" >&5 | |
2562 | cat conftest.$ac_ext >&5 | |
2563 | rm -rf conftest* | |
2564 | eval "ac_cv_header_$ac_safe=no" | |
2565 | fi | |
2566 | rm -f conftest* | |
2567 | fi | |
2568 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2569 | echo "$ac_t""yes" 1>&6 | |
2570 | have_thread_h=yes | |
2571 | else | |
2572 | echo "$ac_t""no" 1>&6 | |
2573 | have_thread_h= | |
2574 | fi | |
2575 | ||
2576 | ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'` | |
2577 | echo $ac_n "checking for pthread.h""... $ac_c" 1>&6 | |
e08f13ee | 2578 | echo "configure:2579: checking for pthread.h" >&5 |
f24af81b TT |
2579 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2580 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2581 | else | |
2582 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 2583 | #line 2584 "configure" |
f24af81b TT |
2584 | #include "confdefs.h" |
2585 | #include <pthread.h> | |
2586 | EOF | |
2587 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e08f13ee | 2588 | { (eval echo configure:2589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 2589 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
f24af81b TT |
2590 | if test -z "$ac_err"; then |
2591 | rm -rf conftest* | |
2592 | eval "ac_cv_header_$ac_safe=yes" | |
2593 | else | |
2594 | echo "$ac_err" >&5 | |
2595 | echo "configure: failed program was:" >&5 | |
2596 | cat conftest.$ac_ext >&5 | |
2597 | rm -rf conftest* | |
2598 | eval "ac_cv_header_$ac_safe=no" | |
2599 | fi | |
2600 | rm -f conftest* | |
2601 | fi | |
2602 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2603 | echo "$ac_t""yes" 1>&6 | |
2604 | have_pthread_h=yes | |
2605 | else | |
2606 | echo "$ac_t""no" 1>&6 | |
2607 | have_pthread_h= | |
2608 | fi | |
2609 | ||
2610 | ||
84c041a1 | 2611 | # These tests can't be done till we know if we have limits.h. |
75e93faa | 2612 | echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6 |
e08f13ee | 2613 | echo "configure:2614: checking for CHAR_BIT" >&5 |
75e93faa ZW |
2614 | if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then |
2615 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2616 | else | |
2617 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 2618 | #line 2619 "configure" |
75e93faa ZW |
2619 | #include "confdefs.h" |
2620 | #ifdef HAVE_LIMITS_H | |
2621 | #include <limits.h> | |
2622 | #endif | |
2623 | #ifdef CHAR_BIT | |
2624 | found | |
2625 | #endif | |
2626 | EOF | |
2627 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2628 | egrep "found" >/dev/null 2>&1; then | |
2629 | rm -rf conftest* | |
2630 | gcc_cv_decl_char_bit=yes | |
2631 | else | |
2632 | rm -rf conftest* | |
2633 | gcc_cv_decl_char_bit=no | |
2634 | fi | |
2635 | rm -f conftest* | |
2636 | ||
2637 | ||
2638 | fi | |
2639 | ||
2640 | echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6 | |
2641 | if test $gcc_cv_decl_char_bit = no; then | |
2642 | echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6 | |
e08f13ee | 2643 | echo "configure:2644: checking number of bits in a byte" >&5 |
75e93faa ZW |
2644 | if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then |
2645 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2646 | else | |
2647 | i=8 | |
2648 | gcc_cv_c_nbby= | |
2649 | while test $i -lt 65; do | |
2650 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 2651 | #line 2652 "configure" |
75e93faa ZW |
2652 | #include "confdefs.h" |
2653 | ||
2654 | int main() { | |
4e70264f ZW |
2655 | switch(0) { |
2656 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
2657 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
2658 | ; } | |
75e93faa ZW |
2659 | ; return 0; } |
2660 | EOF | |
e08f13ee | 2661 | if { (eval echo configure:2662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa | 2662 | rm -rf conftest* |
4e70264f | 2663 | gcc_cv_c_nbby=$i; break |
75e93faa ZW |
2664 | else |
2665 | echo "configure: failed program was:" >&5 | |
2666 | cat conftest.$ac_ext >&5 | |
2667 | fi | |
2668 | rm -f conftest* | |
2669 | i=`expr $i + 1` | |
2670 | done | |
2671 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
2672 | ||
2673 | fi | |
2674 | ||
2675 | echo "$ac_t""$gcc_cv_c_nbby" 1>&6 | |
2676 | if test $gcc_cv_c_nbby = failed; then | |
2677 | { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; } | |
2678 | else | |
2679 | cat >> confdefs.h <<EOF | |
2680 | #define CHAR_BIT $gcc_cv_c_nbby | |
2681 | EOF | |
2682 | ||
2683 | fi | |
2684 | fi | |
2d6eb5bf | 2685 | echo $ac_n "checking byte ordering""... $ac_c" 1>&6 |
e08f13ee | 2686 | echo "configure:2687: checking byte ordering" >&5 |
2d6eb5bf | 2687 | if eval "test \"`echo '$''{'ac_cv_c_compile_endian'+set}'`\" = set"; then |
84c041a1 ZW |
2688 | echo $ac_n "(cached) $ac_c" 1>&6 |
2689 | else | |
2d6eb5bf ZW |
2690 | ac_cv_c_compile_endian=unknown |
2691 | ||
2692 | ac_ext=c | |
2693 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2694 | ac_cpp='$CPP $CPPFLAGS' | |
2695 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2696 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2697 | cross_compiling=$ac_cv_prog_cc_cross | |
2698 | ||
2699 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 2700 | #line 2701 "configure" |
84c041a1 | 2701 | #include "confdefs.h" |
2d6eb5bf | 2702 | |
84c041a1 | 2703 | #ifdef HAVE_LIMITS_H |
2d6eb5bf | 2704 | # include <limits.h> |
84c041a1 ZW |
2705 | #endif |
2706 | /* This structure must have no internal padding. */ | |
2707 | struct { | |
2d6eb5bf | 2708 | char prefix[sizeof "\nendian:" - 1]; |
84c041a1 | 2709 | short word; |
2d6eb5bf | 2710 | char postfix[2]; |
84c041a1 | 2711 | } tester = { |
2d6eb5bf | 2712 | "\nendian:", |
84c041a1 ZW |
2713 | #if SIZEOF_SHORT == 4 |
2714 | ('A' << (CHAR_BIT * 3)) | ('B' << (CHAR_BIT * 2)) | | |
2715 | #endif | |
2d6eb5bf ZW |
2716 | ('A' << CHAR_BIT) | 'B', |
2717 | 'X', '\n' | |
84c041a1 ZW |
2718 | }; |
2719 | EOF | |
e08f13ee | 2720 | if { (eval echo configure:2721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
2d6eb5bf | 2721 | od -c conftest.o | |
e48cd290 | 2722 | sed 's/^[0-7]*[ ]*/ / |
2d6eb5bf ZW |
2723 | s/\*/./g |
2724 | s/ \\n/*/g | |
2725 | s/ [0-9][0-9][0-9]/./g | |
2726 | s/ \\[^ ]/./g' | | |
2727 | tr -d ' | |
2728 | ' | tr -s '*' ' | |
2729 | ' | fold | sed '$a\ | |
2730 | ' > conftest.dmp | |
2731 | if grep 'endian:AB' conftest.dmp >/dev/null 2>&1; then | |
2732 | ac_cv_c_compile_endian=big-endian | |
2733 | elif grep 'endian:BA' conftest.dmp >/dev/null 2>&1; then | |
2734 | ac_cv_c_compile_endian=little-endian | |
84c041a1 ZW |
2735 | fi |
2736 | fi | |
84c041a1 | 2737 | rm -rf conftest* |
2d6eb5bf ZW |
2738 | ac_ext=c |
2739 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2740 | ac_cpp='$CPP $CPPFLAGS' | |
2741 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2742 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2743 | cross_compiling=$ac_cv_prog_cc_cross | |
2744 | ||
2745 | ||
84c041a1 ZW |
2746 | fi |
2747 | ||
2d6eb5bf ZW |
2748 | echo "$ac_t""$ac_cv_c_compile_endian" 1>&6 |
2749 | if test $ac_cv_c_compile_endian = unknown; then | |
2750 | { echo "configure: error: *** unable to determine endianness" 1>&2; exit 1; } | |
2751 | elif test $ac_cv_c_compile_endian = big-endian; then | |
84c041a1 ZW |
2752 | cat >> confdefs.h <<\EOF |
2753 | #define HOST_WORDS_BIG_ENDIAN 1 | |
2754 | EOF | |
2755 | ||
2756 | fi | |
2757 | ||
2d6eb5bf | 2758 | echo $ac_n "checking floating point format""... $ac_c" 1>&6 |
e08f13ee | 2759 | echo "configure:2760: checking floating point format" >&5 |
2d6eb5bf ZW |
2760 | if eval "test \"`echo '$''{'ac_cv_c_float_format'+set}'`\" = set"; then |
2761 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2762 | else | |
2763 | ||
2764 | ac_ext=c | |
2765 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2766 | ac_cpp='$CPP $CPPFLAGS' | |
2767 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2768 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2769 | cross_compiling=$ac_cv_prog_cc_cross | |
2770 | ||
2771 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 2772 | #line 2773 "configure" |
2d6eb5bf ZW |
2773 | #include "confdefs.h" |
2774 | /* This will not work unless sizeof(double) == 8. */ | |
2775 | extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1]; | |
2776 | ||
2777 | /* This structure must have no internal padding. */ | |
2778 | struct possibility { | |
2779 | char prefix[8]; | |
2780 | double candidate; | |
2781 | char postfix[8]; | |
2782 | }; | |
2783 | ||
2784 | #define C(cand) { "\nformat:", cand, ":tamrof\n" } | |
2785 | struct possibility table [] = | |
2786 | { | |
2787 | C( 3.25724264705901305206e+01), /* @@IEEEFP - IEEE 754 */ | |
2788 | C( 3.53802595280598432000e+18), /* D__float - VAX */ | |
2789 | C( 5.32201830133125317057e-19), /* D.PDP-10 - PDP-10 - the dot is 0x13a */ | |
2790 | C( 1.77977764695171661377e+10), /* IBMHEXFP - s/390 format, ascii */ | |
2791 | C(-5.22995989424860458374e+10) /* IBMHEXFP - s/390 format, EBCDIC */ | |
2792 | }; | |
2793 | EOF | |
e08f13ee | 2794 | if { (eval echo configure:2795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
2d6eb5bf | 2795 | od -c conftest.o | |
e48cd290 | 2796 | sed 's/^[0-7]*[ ]*/ / |
2d6eb5bf ZW |
2797 | s/\*/./g |
2798 | s/ \\n/*/g | |
2799 | s/ [0-9][0-9][0-9]/./g | |
2800 | s/ \\[^ ]/./g' | | |
2801 | tr -d ' | |
2802 | ' | tr -s '*' ' | |
2803 | ' | fold | sed '$a\ | |
2804 | ' > conftest.dmp | |
2805 | if grep 'format:.@IEEEF.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2806 | ac_cv_c_float_format='IEEE (big-endian)' | |
2807 | elif grep 'format:.I@@PFE.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2808 | ac_cv_c_float_format='IEEE (big-endian)' | |
2809 | elif grep 'format:.FEEEI@.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2810 | ac_cv_c_float_format='IEEE (little-endian)' | |
2811 | elif grep 'format:.EFP@@I.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2812 | ac_cv_c_float_format='IEEE (little-endian)' | |
2813 | elif grep 'format:.__floa.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2814 | ac_cv_c_float_format='VAX D-float' | |
2815 | elif grep 'format:..PDP-1.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2816 | ac_cv_c_float_format='PDP-10' | |
2817 | elif grep 'format:.BMHEXF.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2818 | ac_cv_c_float_format='IBM 370 hex' | |
2819 | else | |
2820 | { echo "configure: error: Unknown floating point format" 1>&2; exit 1; } | |
2821 | fi | |
2822 | else | |
2823 | { echo "configure: error: compile failed" 1>&2; exit 1; } | |
2824 | fi | |
2825 | rm -rf conftest* | |
2826 | ac_ext=c | |
2827 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2828 | ac_cpp='$CPP $CPPFLAGS' | |
2829 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2830 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2831 | cross_compiling=$ac_cv_prog_cc_cross | |
2832 | ||
2833 | ||
2834 | fi | |
2835 | ||
2836 | echo "$ac_t""$ac_cv_c_float_format" 1>&6 | |
2837 | # IEEE is the default format. If the float endianness isn't the same | |
2838 | # as the integer endianness, we have to set FLOAT_WORDS_BIG_ENDIAN | |
2839 | # (which is a tristate: yes, no, default). This is only an issue with | |
2840 | # IEEE; the other formats are only supported by a few machines each, | |
2841 | # all with the same endianness. | |
2842 | format= | |
2843 | fbigend= | |
2844 | case $ac_cv_c_float_format in | |
2845 | 'IEEE (big-endian)' ) | |
2846 | if test $ac_cv_c_compile_endian = little-endian; then | |
2847 | fbigend=1 | |
2848 | fi | |
2849 | ;; | |
2850 | 'IEEE (little-endian)' ) | |
2851 | if test $ac_cv_c_compile_endian = big-endian; then | |
2852 | fbigend=0 | |
2853 | fi | |
2854 | ;; | |
2855 | 'VAX D-float' ) | |
2856 | format=VAX_FLOAT_FORMAT | |
2857 | ;; | |
2858 | 'PDP-10' ) | |
2859 | format=PDP10_FLOAT_FORMAT | |
2860 | ;; | |
2861 | 'IBM 370 hex' ) | |
2862 | format=IBM_FLOAT_FORMAT | |
2863 | ;; | |
2864 | esac | |
2865 | if test -n "$format"; then | |
2866 | cat >> confdefs.h <<EOF | |
2867 | #define HOST_FLOAT_FORMAT $format | |
2868 | EOF | |
2869 | ||
2870 | fi | |
2871 | if test -n "$fbigend"; then | |
2872 | cat >> confdefs.h <<EOF | |
2873 | #define HOST_FLOAT_WORDS_BIG_ENDIAN $fbigend | |
2874 | EOF | |
2875 | ||
2876 | fi | |
2877 | ||
75e93faa | 2878 | |
bcf12124 JL |
2879 | # See if GNAT has been installed |
2880 | # Extract the first word of "gnatbind", so it can be a program name with args. | |
2881 | set dummy gnatbind; ac_word=$2 | |
2882 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e08f13ee | 2883 | echo "configure:2884: checking for $ac_word" >&5 |
1ffc5c6e | 2884 | if eval "test \"`echo '$''{'ac_cv_prog_have_gnat'+set}'`\" = set"; then |
bcf12124 JL |
2885 | echo $ac_n "(cached) $ac_c" 1>&6 |
2886 | else | |
1ffc5c6e RK |
2887 | if test -n "$have_gnat"; then |
2888 | ac_cv_prog_have_gnat="$have_gnat" # Let the user override the test. | |
bcf12124 | 2889 | else |
cd9e5e7c | 2890 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
2891 | ac_dummy="$PATH" |
2892 | for ac_dir in $ac_dummy; do | |
bcf12124 JL |
2893 | test -z "$ac_dir" && ac_dir=. |
2894 | if test -f $ac_dir/$ac_word; then | |
1ffc5c6e | 2895 | ac_cv_prog_have_gnat="yes" |
bcf12124 JL |
2896 | break |
2897 | fi | |
2898 | done | |
2899 | IFS="$ac_save_ifs" | |
1ffc5c6e | 2900 | test -z "$ac_cv_prog_have_gnat" && ac_cv_prog_have_gnat="no" |
bcf12124 JL |
2901 | fi |
2902 | fi | |
1ffc5c6e RK |
2903 | have_gnat="$ac_cv_prog_have_gnat" |
2904 | if test -n "$have_gnat"; then | |
2905 | echo "$ac_t""$have_gnat" 1>&6 | |
bcf12124 JL |
2906 | else |
2907 | echo "$ac_t""no" 1>&6 | |
2908 | fi | |
2909 | ||
2910 | ||
955be633 JM |
2911 | # See if we have the mktemp command. |
2912 | # Extract the first word of "mktemp", so it can be a program name with args. | |
2913 | set dummy mktemp; ac_word=$2 | |
2914 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e08f13ee | 2915 | echo "configure:2916: checking for $ac_word" >&5 |
955be633 JM |
2916 | if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then |
2917 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2918 | else | |
2919 | if test -n "$have_mktemp_command"; then | |
2920 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
2921 | else | |
2922 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2923 | ac_dummy="$PATH" | |
2924 | for ac_dir in $ac_dummy; do | |
2925 | test -z "$ac_dir" && ac_dir=. | |
2926 | if test -f $ac_dir/$ac_word; then | |
2927 | ac_cv_prog_have_mktemp_command="yes" | |
2928 | break | |
2929 | fi | |
2930 | done | |
2931 | IFS="$ac_save_ifs" | |
2932 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" | |
2933 | fi | |
2934 | fi | |
2935 | have_mktemp_command="$ac_cv_prog_have_mktemp_command" | |
2936 | if test -n "$have_mktemp_command"; then | |
2937 | echo "$ac_t""$have_mktemp_command" 1>&6 | |
2938 | else | |
2939 | echo "$ac_t""no" 1>&6 | |
2940 | fi | |
2941 | ||
2942 | ||
09fa0705 ZW |
2943 | # Do we have a single-tree copy of texinfo? |
2944 | if test -f $srcdir/../texinfo/Makefile.in; then | |
2945 | MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo' | |
2946 | gcc_cv_prog_makeinfo_modern=yes | |
2947 | echo "$ac_t""Using makeinfo from the unified source tree." 1>&6 | |
2948 | else | |
2949 | # See if makeinfo has been installed and is modern enough | |
2950 | # that we can use it. | |
2951 | # Extract the first word of "makeinfo", so it can be a program name with args. | |
2952 | set dummy makeinfo; ac_word=$2 | |
2953 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e08f13ee | 2954 | echo "configure:2955: checking for $ac_word" >&5 |
09fa0705 ZW |
2955 | if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then |
2956 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2957 | else | |
2958 | if test -n "$MAKEINFO"; then | |
2959 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
2960 | else | |
2961 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2962 | ac_dummy="$PATH" | |
2963 | for ac_dir in $ac_dummy; do | |
2964 | test -z "$ac_dir" && ac_dir=. | |
2965 | if test -f $ac_dir/$ac_word; then | |
2966 | ac_cv_prog_MAKEINFO="makeinfo" | |
2967 | break | |
2968 | fi | |
2969 | done | |
2970 | IFS="$ac_save_ifs" | |
2971 | fi | |
2972 | fi | |
2973 | MAKEINFO="$ac_cv_prog_MAKEINFO" | |
2974 | if test -n "$MAKEINFO"; then | |
2975 | echo "$ac_t""$MAKEINFO" 1>&6 | |
2976 | else | |
2977 | echo "$ac_t""no" 1>&6 | |
2978 | fi | |
2979 | ||
2980 | if test -n "$MAKEINFO"; then | |
2981 | # Found it, now check the version. | |
2982 | echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6 | |
e08f13ee | 2983 | echo "configure:2984: checking for modern makeinfo" >&5 |
09fa0705 ZW |
2984 | if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then |
2985 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2986 | else | |
2987 | ac_prog_version=`$MAKEINFO --version 2>&1 | | |
2988 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
e08f13ee | 2989 | echo "configure:2990: version of makeinfo is $ac_prog_version" >&5 |
09fa0705 ZW |
2990 | case $ac_prog_version in |
2991 | '') gcc_cv_prog_makeinfo_modern=no;; | |
fd939e46 | 2992 | 4.*) |
09fa0705 ZW |
2993 | gcc_cv_prog_makeinfo_modern=yes;; |
2994 | *) gcc_cv_prog_makeinfo_modern=no;; | |
2995 | esac | |
2996 | ||
2997 | fi | |
2998 | ||
2999 | echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6 | |
3000 | else | |
3001 | gcc_cv_prog_makeinfo_modern=no | |
3002 | fi | |
3003 | ||
3004 | fi | |
3005 | ||
3006 | if test $gcc_cv_prog_makeinfo_modern = no; then | |
3007 | echo "configure: warning: | |
3008 | *** Makeinfo is missing or too old. | |
17db6582 | 3009 | *** Info documentation will not be built." 1>&2 |
d21445e7 | 3010 | BUILD_INFO= |
09fa0705 ZW |
3011 | else |
3012 | BUILD_INFO=info | |
09fa0705 ZW |
3013 | fi |
3014 | ||
3f896fc2 JM |
3015 | # Is pod2man recent enough to regenerate manpages? |
3016 | echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6 | |
e08f13ee | 3017 | echo "configure:3018: checking for recent Pod::Man" >&5 |
3f896fc2 | 3018 | if perl -e 'use 1.10 Pod::Man' >/dev/null 2>&1; then |
fd939e46 JM |
3019 | echo "$ac_t""yes" 1>&6 |
3020 | GENERATED_MANPAGES=generated-manpages | |
3021 | else | |
3022 | echo "$ac_t""no" 1>&6 | |
3023 | GENERATED_MANPAGES= | |
3024 | fi | |
3025 | ||
1e608388 ZW |
3026 | # How about lex? |
3027 | if test -f $srcdir/../flex/skel.c; then | |
3028 | FLEX='$(objdir)/../flex/flex' | |
3029 | else | |
3030 | # Extract the first word of "flex", so it can be a program name with args. | |
3031 | set dummy flex; ac_word=$2 | |
3032 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e08f13ee | 3033 | echo "configure:3034: checking for $ac_word" >&5 |
1e608388 ZW |
3034 | if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then |
3035 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3036 | else | |
3037 | if test -n "$FLEX"; then | |
3038 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
3039 | else | |
3040 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3041 | ac_dummy="$PATH" | |
3042 | for ac_dir in $ac_dummy; do | |
3043 | test -z "$ac_dir" && ac_dir=. | |
3044 | if test -f $ac_dir/$ac_word; then | |
3045 | ac_cv_prog_FLEX="flex" | |
3046 | break | |
3047 | fi | |
3048 | done | |
3049 | IFS="$ac_save_ifs" | |
3050 | test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="false" | |
3051 | fi | |
3052 | fi | |
3053 | FLEX="$ac_cv_prog_FLEX" | |
3054 | if test -n "$FLEX"; then | |
3055 | echo "$ac_t""$FLEX" 1>&6 | |
3056 | else | |
3057 | echo "$ac_t""no" 1>&6 | |
3058 | fi | |
3059 | ||
3060 | fi | |
3061 | ||
3062 | # Bison? | |
3063 | # The -L switch is so bison can find its skeleton file. | |
3064 | if test -f $srcdir/../bison/bison.simple; then | |
3065 | BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/' | |
3066 | else | |
3067 | # Extract the first word of "bison", so it can be a program name with args. | |
3068 | set dummy bison; ac_word=$2 | |
3069 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e08f13ee | 3070 | echo "configure:3071: checking for $ac_word" >&5 |
1e608388 ZW |
3071 | if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then |
3072 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3073 | else | |
3074 | if test -n "$BISON"; then | |
3075 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
3076 | else | |
3077 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3078 | ac_dummy="$PATH" | |
3079 | for ac_dir in $ac_dummy; do | |
3080 | test -z "$ac_dir" && ac_dir=. | |
3081 | if test -f $ac_dir/$ac_word; then | |
3082 | ac_cv_prog_BISON="bison" | |
3083 | break | |
3084 | fi | |
3085 | done | |
3086 | IFS="$ac_save_ifs" | |
3087 | test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="false" | |
3088 | fi | |
3089 | fi | |
3090 | BISON="$ac_cv_prog_BISON" | |
3091 | if test -n "$BISON"; then | |
3092 | echo "$ac_t""$BISON" 1>&6 | |
3093 | else | |
3094 | echo "$ac_t""no" 1>&6 | |
3095 | fi | |
3096 | ||
3097 | fi | |
3098 | ||
4e70264f ZW |
3099 | # These libraries may be used by collect2. |
3100 | # We may need a special search path to get them linked. | |
3101 | echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6 | |
e08f13ee | 3102 | echo "configure:3103: checking for collect2 libraries" >&5 |
4e70264f ZW |
3103 | if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then |
3104 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3105 | else | |
3106 | save_LIBS="$LIBS" | |
7f2749d4 | 3107 | for libs in '' -lld -lmld \ |
4e70264f ZW |
3108 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
3109 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
3110 | do | |
3111 | LIBS="$libs" | |
3112 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 3113 | #line 3114 "configure" |
4e70264f ZW |
3114 | #include "confdefs.h" |
3115 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3116 | /* We use char because int might match the return type of a gcc2 | |
3117 | builtin and then its argument prototype would still apply. */ | |
3118 | char ldopen(); | |
3119 | ||
3120 | int main() { | |
3121 | ldopen() | |
3122 | ; return 0; } | |
3123 | EOF | |
e08f13ee | 3124 | if { (eval echo configure:3125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4e70264f ZW |
3125 | rm -rf conftest* |
3126 | gcc_cv_collect2_libs="$libs"; break | |
3127 | else | |
3128 | echo "configure: failed program was:" >&5 | |
3129 | cat conftest.$ac_ext >&5 | |
3130 | fi | |
3131 | rm -f conftest* | |
3132 | done | |
3133 | LIBS="$save_LIBS" | |
3134 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
3135 | fi | |
3136 | ||
3137 | echo "$ac_t""$gcc_cv_collect2_libs" 1>&6 | |
3138 | case $gcc_cv_collect2_libs in | |
3139 | "none required") ;; | |
3140 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
3141 | esac | |
3142 | ||
3143 | ||
7f2749d4 RK |
3144 | # When building Ada code on Alpha, we need exc_resume which is usually in |
3145 | # -lexc. So test for it. | |
3146 | save_LIBS="$LIBS" | |
3147 | LIBS= | |
3148 | ||
3149 | echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6 | |
e08f13ee | 3150 | echo "configure:3151: checking for library containing exc_resume" >&5 |
7f2749d4 RK |
3151 | if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then |
3152 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3153 | else | |
3154 | ac_func_search_save_LIBS="$LIBS" | |
3155 | ac_cv_search_exc_resume="no" | |
3156 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 3157 | #line 3158 "configure" |
7f2749d4 RK |
3158 | #include "confdefs.h" |
3159 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3160 | /* We use char because int might match the return type of a gcc2 | |
3161 | builtin and then its argument prototype would still apply. */ | |
3162 | char exc_resume(); | |
3163 | ||
3164 | int main() { | |
3165 | exc_resume() | |
3166 | ; return 0; } | |
3167 | EOF | |
e08f13ee | 3168 | if { (eval echo configure:3169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7f2749d4 RK |
3169 | rm -rf conftest* |
3170 | ac_cv_search_exc_resume="none required" | |
3171 | else | |
3172 | echo "configure: failed program was:" >&5 | |
3173 | cat conftest.$ac_ext >&5 | |
3174 | fi | |
3175 | rm -f conftest* | |
3176 | test "$ac_cv_search_exc_resume" = "no" && for i in exc; do | |
3177 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3178 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 3179 | #line 3180 "configure" |
7f2749d4 RK |
3180 | #include "confdefs.h" |
3181 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3182 | /* We use char because int might match the return type of a gcc2 | |
3183 | builtin and then its argument prototype would still apply. */ | |
3184 | char exc_resume(); | |
3185 | ||
3186 | int main() { | |
3187 | exc_resume() | |
3188 | ; return 0; } | |
3189 | EOF | |
e08f13ee | 3190 | if { (eval echo configure:3191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7f2749d4 RK |
3191 | rm -rf conftest* |
3192 | ac_cv_search_exc_resume="-l$i" | |
3193 | break | |
3194 | else | |
3195 | echo "configure: failed program was:" >&5 | |
3196 | cat conftest.$ac_ext >&5 | |
3197 | fi | |
3198 | rm -f conftest* | |
3199 | done | |
3200 | LIBS="$ac_func_search_save_LIBS" | |
3201 | fi | |
3202 | ||
3203 | echo "$ac_t""$ac_cv_search_exc_resume" 1>&6 | |
3204 | if test "$ac_cv_search_exc_resume" != "no"; then | |
3205 | test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS" | |
3206 | ||
3207 | else : | |
3208 | ||
3209 | fi | |
3210 | GNAT_LIBEXC="$LIBS" | |
3211 | LIBS="$save_LIBS" | |
3212 | ||
3213 | ||
890ad3ea | 3214 | # See if the stage1 system preprocessor understands the ANSI C |
4bc5fbd4 | 3215 | # preprocessor stringification operator. (Used by symcat.h.) |
890ad3ea KG |
3216 | |
3217 | ||
3218 | echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6 | |
e08f13ee | 3219 | echo "configure:3220: checking for preprocessor stringizing operator" >&5 |
890ad3ea | 3220 | if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then |
76844337 RH |
3221 | echo $ac_n "(cached) $ac_c" 1>&6 |
3222 | else | |
3223 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 3224 | #line 3225 "configure" |
76844337 RH |
3225 | #include "confdefs.h" |
3226 | ||
890ad3ea KG |
3227 | #define x(y) #y |
3228 | ||
3229 | char *s = x(teststring); | |
3230 | ||
76844337 | 3231 | EOF |
890ad3ea KG |
3232 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
3233 | egrep "#teststring" >/dev/null 2>&1; then | |
76844337 | 3234 | rm -rf conftest* |
890ad3ea | 3235 | ac_cv_c_stringize=no |
76844337 | 3236 | else |
76844337 | 3237 | rm -rf conftest* |
890ad3ea | 3238 | ac_cv_c_stringize=yes |
76844337 RH |
3239 | fi |
3240 | rm -f conftest* | |
890ad3ea | 3241 | |
76844337 RH |
3242 | fi |
3243 | ||
890ad3ea KG |
3244 | if test "${ac_cv_c_stringize}" = yes |
3245 | then | |
3246 | cat >> confdefs.h <<\EOF | |
3247 | #define HAVE_STRINGIZE 1 | |
76844337 RH |
3248 | EOF |
3249 | ||
3250 | fi | |
890ad3ea KG |
3251 | echo "$ac_t""${ac_cv_c_stringize}" 1>&6 |
3252 | ||
76844337 | 3253 | |
956d6950 JL |
3254 | # Use <inttypes.h> only if it exists, |
3255 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
3256 | echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6 | |
e08f13ee | 3257 | echo "configure:3258: checking for inttypes.h" >&5 |
956d6950 JL |
3258 | if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then |
3259 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3260 | else | |
3261 | cat > conftest.$ac_ext <<EOF | |
e08f13ee | 3262 | #line 3263 "configure" |
956d6950 JL |
3263 | #include "confdefs.h" |
3264 | #include <sys/types.h> | |
3265 | #include <inttypes.h> | |
3266 | int main() { | |
3267 | intmax_t i = -1; | |
3268 | ; return 0; } | |
3269 | EOF | |
e08f13ee | 3270 | if { (eval echo configure:3271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
956d6950 | 3271 | rm -rf conftest* |
0056a9b5 | 3272 | gcc_cv_header_inttypes_h=yes |
956d6950 JL |
3273 | else |
3274 | echo "configure: failed program was:" >&5 | |
3275 | cat conftest.$ac_ext >&5 | |
3276 | rm -rf conftest* | |
3277 | gcc_cv_header_inttypes_h=no | |
3278 | fi | |
3279 | rm -f conftest* | |
3280 | fi | |
3281 | ||
3282 | echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6 | |
0056a9b5 KG |
3283 | if test $gcc_cv_header_inttypes_h = yes; then |
3284 | cat >> confdefs.h <<\EOF | |
3285 | #define HAVE_INTTYPES_H 1 | |
3286 | EOF | |
3287 | ||
3288 | fi | |
956d6950 | 3289 | |
c149cc37 | 3290 | |
c1800ec8 | 3291 | for ac_func in strtoul bsearch popen times clock \ |
2e09e75a | 3292 | strchr strrchr kill getrlimit setrlimit atoll atoq \ |
54953b66 | 3293 | sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \ |
3b681e9d ZW |
3294 | fputs_unlocked fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \ |
3295 | lstat | |
956d6950 JL |
3296 | do |
3297 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
3b681e9d | 3298 | echo "configure:3299: checking for $ac_func" >&5 |
956d6950 JL |
3299 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3300 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3301 | else | |
3302 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 3303 | #line 3304 "configure" |
956d6950 JL |
3304 | #include "confdefs.h" |
3305 | /* System header to define __stub macros and hopefully few prototypes, | |
3306 | which can conflict with char $ac_func(); below. */ | |
3307 | #include <assert.h> | |
3308 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3309 | /* We use char because int might match the return type of a gcc2 | |
3310 | builtin and then its argument prototype would still apply. */ | |
3311 | char $ac_func(); | |
3312 | ||
3313 | int main() { | |
3314 | ||
3315 | /* The GNU C library defines this for functions which it implements | |
3316 | to always fail with ENOSYS. Some functions are actually named | |
3317 | something starting with __ and the normal name is an alias. */ | |
3318 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3319 | choke me | |
3320 | #else | |
99b09ff3 | 3321 | $ac_func(); |
956d6950 JL |
3322 | #endif |
3323 | ||
3324 | ; return 0; } | |
3325 | EOF | |
3b681e9d | 3326 | if { (eval echo configure:3327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
956d6950 JL |
3327 | rm -rf conftest* |
3328 | eval "ac_cv_func_$ac_func=yes" | |
3329 | else | |
3330 | echo "configure: failed program was:" >&5 | |
3331 | cat conftest.$ac_ext >&5 | |
3332 | rm -rf conftest* | |
3333 | eval "ac_cv_func_$ac_func=no" | |
3334 | fi | |
3335 | rm -f conftest* | |
3336 | fi | |
3337 | ||
3338 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3339 | echo "$ac_t""yes" 1>&6 | |
3340 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3341 | cat >> confdefs.h <<EOF | |
3342 | #define $ac_tr_func 1 | |
3343 | EOF | |
3344 | ||
3345 | else | |
3346 | echo "$ac_t""no" 1>&6 | |
3347 | fi | |
3348 | done | |
3349 | ||
6885fc87 | 3350 | |
f12bc141 | 3351 | echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 |
3b681e9d | 3352 | echo "configure:3353: checking for ssize_t" >&5 |
f12bc141 ZW |
3353 | if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then |
3354 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3355 | else | |
3356 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 3357 | #line 3358 "configure" |
f12bc141 ZW |
3358 | #include "confdefs.h" |
3359 | #include <sys/types.h> | |
3360 | #if STDC_HEADERS | |
3361 | #include <stdlib.h> | |
3362 | #include <stddef.h> | |
3363 | #endif | |
3364 | EOF | |
3365 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3366 | egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
3367 | rm -rf conftest* | |
cb65112a | 3368 | ac_cv_type_ssize_t=yes |
f12bc141 ZW |
3369 | else |
3370 | rm -rf conftest* | |
cb65112a | 3371 | ac_cv_type_ssize_t=no |
f12bc141 ZW |
3372 | fi |
3373 | rm -f conftest* | |
3374 | ||
3375 | fi | |
cb65112a AO |
3376 | echo "$ac_t""$ac_cv_type_ssize_t" 1>&6 |
3377 | if test $ac_cv_type_ssize_t = no; then | |
3378 | cat >> confdefs.h <<\EOF | |
f12bc141 ZW |
3379 | #define ssize_t int |
3380 | EOF | |
3381 | ||
3382 | fi | |
3383 | ||
0b9d02c6 | 3384 | |
e256b8b6 DA |
3385 | # Try to determine the array type of the second argument of getgroups |
3386 | # for the target system (int or gid_t). | |
3387 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 | |
3b681e9d | 3388 | echo "configure:3389: checking for uid_t in sys/types.h" >&5 |
e256b8b6 DA |
3389 | if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then |
3390 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3391 | else | |
3392 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 3393 | #line 3394 "configure" |
e256b8b6 DA |
3394 | #include "confdefs.h" |
3395 | #include <sys/types.h> | |
3396 | EOF | |
3397 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3398 | egrep "uid_t" >/dev/null 2>&1; then | |
3399 | rm -rf conftest* | |
3400 | ac_cv_type_uid_t=yes | |
3401 | else | |
3402 | rm -rf conftest* | |
3403 | ac_cv_type_uid_t=no | |
3404 | fi | |
3405 | rm -f conftest* | |
3406 | ||
3407 | fi | |
3408 | ||
3409 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 | |
3410 | if test $ac_cv_type_uid_t = no; then | |
3411 | cat >> confdefs.h <<\EOF | |
3412 | #define uid_t int | |
3413 | EOF | |
3414 | ||
3415 | cat >> confdefs.h <<\EOF | |
3416 | #define gid_t int | |
3417 | EOF | |
3418 | ||
3419 | fi | |
3420 | ||
3421 | echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 | |
3b681e9d | 3422 | echo "configure:3423: checking type of array argument to getgroups" >&5 |
e256b8b6 DA |
3423 | if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then |
3424 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3425 | else | |
3426 | if test "$cross_compiling" = yes; then | |
3427 | ac_cv_type_getgroups=cross | |
3428 | else | |
3429 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 3430 | #line 3431 "configure" |
e256b8b6 DA |
3431 | #include "confdefs.h" |
3432 | ||
3433 | /* Thanks to Mike Rendell for this test. */ | |
3434 | #include <sys/types.h> | |
3435 | #define NGID 256 | |
3436 | #undef MAX | |
3437 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
3438 | main() | |
3439 | { | |
3440 | gid_t gidset[NGID]; | |
3441 | int i, n; | |
3442 | union { gid_t gval; long lval; } val; | |
3443 | ||
3444 | val.lval = -1; | |
3445 | for (i = 0; i < NGID; i++) | |
3446 | gidset[i] = val.gval; | |
3447 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
3448 | gidset); | |
3449 | /* Exit non-zero if getgroups seems to require an array of ints. This | |
3450 | happens when gid_t is short but getgroups modifies an array of ints. */ | |
3451 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
3452 | } | |
3453 | ||
3454 | EOF | |
3b681e9d | 3455 | if { (eval echo configure:3456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
e256b8b6 DA |
3456 | then |
3457 | ac_cv_type_getgroups=gid_t | |
3458 | else | |
3459 | echo "configure: failed program was:" >&5 | |
3460 | cat conftest.$ac_ext >&5 | |
3461 | rm -fr conftest* | |
3462 | ac_cv_type_getgroups=int | |
3463 | fi | |
3464 | rm -fr conftest* | |
3465 | fi | |
3466 | ||
3467 | if test $ac_cv_type_getgroups = cross; then | |
3468 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 3469 | #line 3470 "configure" |
e256b8b6 DA |
3470 | #include "confdefs.h" |
3471 | #include <unistd.h> | |
3472 | EOF | |
3473 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3474 | egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then | |
3475 | rm -rf conftest* | |
3476 | ac_cv_type_getgroups=gid_t | |
3477 | else | |
3478 | rm -rf conftest* | |
3479 | ac_cv_type_getgroups=int | |
3480 | fi | |
3481 | rm -f conftest* | |
3482 | ||
3483 | fi | |
3484 | fi | |
3485 | ||
3486 | echo "$ac_t""$ac_cv_type_getgroups" 1>&6 | |
3487 | cat >> confdefs.h <<EOF | |
3488 | #define GETGROUPS_T $ac_cv_type_getgroups | |
3489 | EOF | |
3490 | ||
3491 | ||
3492 | if test "${target}" = "${build}"; then | |
3493 | TARGET_GETGROUPS_T=$ac_cv_type_getgroups | |
3494 | else | |
3495 | case "${target}" in | |
3496 | # This condition may need some tweaking. It should include all | |
3497 | # targets where the array type of the second argument of getgroups | |
3498 | # is int and the type of gid_t is not equivalent to int. | |
3499 | *-*-sunos* | *-*-ultrix*) | |
3500 | TARGET_GETGROUPS_T=int | |
3501 | ;; | |
3502 | *) | |
3503 | TARGET_GETGROUPS_T=gid_t | |
3504 | ;; | |
3505 | esac | |
3506 | fi | |
3507 | ||
3508 | ||
0a4b6309 | 3509 | echo $ac_n "checking for vprintf""... $ac_c" 1>&6 |
3b681e9d | 3510 | echo "configure:3511: checking for vprintf" >&5 |
0a4b6309 RL |
3511 | if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then |
3512 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3513 | else | |
3514 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 3515 | #line 3516 "configure" |
0a4b6309 RL |
3516 | #include "confdefs.h" |
3517 | /* System header to define __stub macros and hopefully few prototypes, | |
3518 | which can conflict with char vprintf(); below. */ | |
3519 | #include <assert.h> | |
3520 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3521 | /* We use char because int might match the return type of a gcc2 | |
3522 | builtin and then its argument prototype would still apply. */ | |
3523 | char vprintf(); | |
3524 | ||
3525 | int main() { | |
3526 | ||
3527 | /* The GNU C library defines this for functions which it implements | |
3528 | to always fail with ENOSYS. Some functions are actually named | |
3529 | something starting with __ and the normal name is an alias. */ | |
3530 | #if defined (__stub_vprintf) || defined (__stub___vprintf) | |
3531 | choke me | |
3532 | #else | |
99b09ff3 | 3533 | vprintf(); |
0a4b6309 RL |
3534 | #endif |
3535 | ||
3536 | ; return 0; } | |
3537 | EOF | |
3b681e9d | 3538 | if { (eval echo configure:3539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
0a4b6309 RL |
3539 | rm -rf conftest* |
3540 | eval "ac_cv_func_vprintf=yes" | |
3541 | else | |
3542 | echo "configure: failed program was:" >&5 | |
3543 | cat conftest.$ac_ext >&5 | |
3544 | rm -rf conftest* | |
3545 | eval "ac_cv_func_vprintf=no" | |
3546 | fi | |
3547 | rm -f conftest* | |
3548 | fi | |
3549 | ||
3550 | if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then | |
3551 | echo "$ac_t""yes" 1>&6 | |
3552 | cat >> confdefs.h <<\EOF | |
3553 | #define HAVE_VPRINTF 1 | |
3554 | EOF | |
3555 | ||
3556 | else | |
3557 | echo "$ac_t""no" 1>&6 | |
3558 | fi | |
8fa1f09f | 3559 | |
0a4b6309 RL |
3560 | if test "$ac_cv_func_vprintf" != yes; then |
3561 | echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 | |
3b681e9d | 3562 | echo "configure:3563: checking for _doprnt" >&5 |
0a4b6309 RL |
3563 | if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then |
3564 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3565 | else | |
3566 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 3567 | #line 3568 "configure" |
0a4b6309 RL |
3568 | #include "confdefs.h" |
3569 | /* System header to define __stub macros and hopefully few prototypes, | |
3570 | which can conflict with char _doprnt(); below. */ | |
3571 | #include <assert.h> | |
3572 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3573 | /* We use char because int might match the return type of a gcc2 | |
3574 | builtin and then its argument prototype would still apply. */ | |
3575 | char _doprnt(); | |
3576 | ||
3577 | int main() { | |
3578 | ||
3579 | /* The GNU C library defines this for functions which it implements | |
3580 | to always fail with ENOSYS. Some functions are actually named | |
3581 | something starting with __ and the normal name is an alias. */ | |
3582 | #if defined (__stub__doprnt) || defined (__stub____doprnt) | |
3583 | choke me | |
3584 | #else | |
99b09ff3 | 3585 | _doprnt(); |
0a4b6309 RL |
3586 | #endif |
3587 | ||
3588 | ; return 0; } | |
3589 | EOF | |
3b681e9d | 3590 | if { (eval echo configure:3591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
0a4b6309 RL |
3591 | rm -rf conftest* |
3592 | eval "ac_cv_func__doprnt=yes" | |
3593 | else | |
3594 | echo "configure: failed program was:" >&5 | |
3595 | cat conftest.$ac_ext >&5 | |
3596 | rm -rf conftest* | |
3597 | eval "ac_cv_func__doprnt=no" | |
3598 | fi | |
3599 | rm -f conftest* | |
3600 | fi | |
3601 | ||
3602 | if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then | |
3603 | echo "$ac_t""yes" 1>&6 | |
3604 | cat >> confdefs.h <<\EOF | |
3605 | #define HAVE_DOPRNT 1 | |
3606 | EOF | |
3607 | ||
3608 | else | |
3609 | echo "$ac_t""no" 1>&6 | |
3610 | fi | |
3611 | ||
3612 | fi | |
3613 | ||
3614 | vfprintf= | |
3615 | doprint= | |
3616 | if test $ac_cv_func_vprintf != yes ; then | |
3617 | vfprintf=vfprintf.o | |
3618 | if test $ac_cv_func__doprnt != yes ; then | |
3619 | doprint=doprint.o | |
3620 | fi | |
3621 | fi | |
3622 | ||
3623 | ||
3624 | ||
b3e1e64f MS |
3625 | for ac_func in strstr |
3626 | do | |
3627 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
3b681e9d | 3628 | echo "configure:3629: checking for $ac_func" >&5 |
b3e1e64f MS |
3629 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3630 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3631 | else | |
3632 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 3633 | #line 3634 "configure" |
b3e1e64f MS |
3634 | #include "confdefs.h" |
3635 | /* System header to define __stub macros and hopefully few prototypes, | |
3636 | which can conflict with char $ac_func(); below. */ | |
3637 | #include <assert.h> | |
3638 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3639 | /* We use char because int might match the return type of a gcc2 | |
3640 | builtin and then its argument prototype would still apply. */ | |
3641 | char $ac_func(); | |
3642 | ||
3643 | int main() { | |
3644 | ||
3645 | /* The GNU C library defines this for functions which it implements | |
3646 | to always fail with ENOSYS. Some functions are actually named | |
3647 | something starting with __ and the normal name is an alias. */ | |
3648 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3649 | choke me | |
3650 | #else | |
3651 | $ac_func(); | |
3652 | #endif | |
3653 | ||
3654 | ; return 0; } | |
3655 | EOF | |
3b681e9d | 3656 | if { (eval echo configure:3657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
b3e1e64f MS |
3657 | rm -rf conftest* |
3658 | eval "ac_cv_func_$ac_func=yes" | |
3659 | else | |
3660 | echo "configure: failed program was:" >&5 | |
3661 | cat conftest.$ac_ext >&5 | |
3662 | rm -rf conftest* | |
3663 | eval "ac_cv_func_$ac_func=no" | |
3664 | fi | |
3665 | rm -f conftest* | |
3666 | fi | |
3667 | ||
3668 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3669 | echo "$ac_t""yes" 1>&6 | |
3670 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3671 | cat >> confdefs.h <<EOF | |
3672 | #define $ac_tr_func 1 | |
3673 | EOF | |
3674 | strstr= | |
3675 | else | |
3676 | echo "$ac_t""no" 1>&6 | |
3677 | strstr=strstr.o | |
3678 | fi | |
3679 | done | |
3680 | ||
3681 | ||
0a4b6309 | 3682 | echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6 |
3b681e9d | 3683 | echo "configure:3684: checking whether the printf functions support %p" >&5 |
0a4b6309 RL |
3684 | if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then |
3685 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3686 | else | |
3687 | if test "$cross_compiling" = yes; then | |
3688 | gcc_cv_func_printf_ptr=no | |
3689 | else | |
3690 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 3691 | #line 3692 "configure" |
0a4b6309 RL |
3692 | #include "confdefs.h" |
3693 | #include <stdio.h> | |
3694 | ||
86cf1cbd | 3695 | int main() |
0a4b6309 RL |
3696 | { |
3697 | char buf[64]; | |
3698 | char *p = buf, *q = NULL; | |
3699 | sprintf(buf, "%p", p); | |
3700 | sscanf(buf, "%p", &q); | |
86cf1cbd | 3701 | return (p != q); |
0a4b6309 RL |
3702 | } |
3703 | EOF | |
3b681e9d | 3704 | if { (eval echo configure:3705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
0a4b6309 RL |
3705 | then |
3706 | gcc_cv_func_printf_ptr=yes | |
3707 | else | |
3708 | echo "configure: failed program was:" >&5 | |
3709 | cat conftest.$ac_ext >&5 | |
3710 | rm -fr conftest* | |
3711 | gcc_cv_func_printf_ptr=no | |
3712 | fi | |
3713 | rm -fr conftest* | |
3714 | fi | |
3715 | ||
3716 | rm -f core core.* *.core | |
3717 | fi | |
3718 | ||
3719 | echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6 | |
3720 | if test $gcc_cv_func_printf_ptr = yes ; then | |
3721 | cat >> confdefs.h <<\EOF | |
3722 | #define HAVE_PRINTF_PTR 1 | |
3723 | EOF | |
3724 | ||
3725 | fi | |
3726 | ||
b27d2bd5 MK |
3727 | |
3728 | case "${host}" in | |
3729 | *-*-uwin*) | |
34fa3e7d MM |
3730 | { echo "configure: error: |
3731 | *** UWIN may not be used as a host platform because | |
3732 | *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; } | |
b27d2bd5 MK |
3733 | ;; |
3734 | esac | |
c375c43b | 3735 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
3b681e9d | 3736 | echo "configure:3737: checking for pid_t" >&5 |
c375c43b KG |
3737 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
3738 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3739 | else | |
3740 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 3741 | #line 3742 "configure" |
c375c43b KG |
3742 | #include "confdefs.h" |
3743 | #include <sys/types.h> | |
3744 | #if STDC_HEADERS | |
3745 | #include <stdlib.h> | |
3746 | #include <stddef.h> | |
3747 | #endif | |
3748 | EOF | |
3749 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
b27d2bd5 | 3750 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
c375c43b | 3751 | rm -rf conftest* |
cb65112a | 3752 | ac_cv_type_pid_t=yes |
c375c43b KG |
3753 | else |
3754 | rm -rf conftest* | |
cb65112a | 3755 | ac_cv_type_pid_t=no |
c375c43b KG |
3756 | fi |
3757 | rm -f conftest* | |
3758 | ||
3759 | fi | |
cb65112a AO |
3760 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
3761 | if test $ac_cv_type_pid_t = no; then | |
3762 | cat >> confdefs.h <<\EOF | |
c375c43b KG |
3763 | #define pid_t int |
3764 | EOF | |
3765 | ||
3766 | fi | |
3767 | ||
3768 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` | |
3769 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
3b681e9d | 3770 | echo "configure:3771: checking for vfork.h" >&5 |
c375c43b KG |
3771 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3772 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3773 | else | |
3774 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 3775 | #line 3776 "configure" |
c375c43b KG |
3776 | #include "confdefs.h" |
3777 | #include <vfork.h> | |
3778 | EOF | |
3779 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3b681e9d | 3780 | { (eval echo configure:3781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 3781 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
c375c43b KG |
3782 | if test -z "$ac_err"; then |
3783 | rm -rf conftest* | |
3784 | eval "ac_cv_header_$ac_safe=yes" | |
3785 | else | |
3786 | echo "$ac_err" >&5 | |
3787 | echo "configure: failed program was:" >&5 | |
3788 | cat conftest.$ac_ext >&5 | |
3789 | rm -rf conftest* | |
3790 | eval "ac_cv_header_$ac_safe=no" | |
3791 | fi | |
3792 | rm -f conftest* | |
3793 | fi | |
3794 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3795 | echo "$ac_t""yes" 1>&6 | |
3796 | cat >> confdefs.h <<\EOF | |
3797 | #define HAVE_VFORK_H 1 | |
3798 | EOF | |
3799 | ||
3800 | else | |
3801 | echo "$ac_t""no" 1>&6 | |
3802 | fi | |
3803 | ||
3804 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 | |
3b681e9d | 3805 | echo "configure:3806: checking for working vfork" >&5 |
c375c43b KG |
3806 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
3807 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3808 | else | |
3809 | if test "$cross_compiling" = yes; then | |
3810 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
3b681e9d | 3811 | echo "configure:3812: checking for vfork" >&5 |
c375c43b KG |
3812 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
3813 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3814 | else | |
3815 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 3816 | #line 3817 "configure" |
c375c43b KG |
3817 | #include "confdefs.h" |
3818 | /* System header to define __stub macros and hopefully few prototypes, | |
3819 | which can conflict with char vfork(); below. */ | |
3820 | #include <assert.h> | |
3821 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3822 | /* We use char because int might match the return type of a gcc2 | |
3823 | builtin and then its argument prototype would still apply. */ | |
3824 | char vfork(); | |
3825 | ||
3826 | int main() { | |
3827 | ||
3828 | /* The GNU C library defines this for functions which it implements | |
3829 | to always fail with ENOSYS. Some functions are actually named | |
3830 | something starting with __ and the normal name is an alias. */ | |
3831 | #if defined (__stub_vfork) || defined (__stub___vfork) | |
3832 | choke me | |
3833 | #else | |
99b09ff3 | 3834 | vfork(); |
c375c43b KG |
3835 | #endif |
3836 | ||
3837 | ; return 0; } | |
3838 | EOF | |
3b681e9d | 3839 | if { (eval echo configure:3840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c375c43b KG |
3840 | rm -rf conftest* |
3841 | eval "ac_cv_func_vfork=yes" | |
3842 | else | |
3843 | echo "configure: failed program was:" >&5 | |
3844 | cat conftest.$ac_ext >&5 | |
3845 | rm -rf conftest* | |
3846 | eval "ac_cv_func_vfork=no" | |
3847 | fi | |
3848 | rm -f conftest* | |
3849 | fi | |
3850 | ||
3851 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then | |
3852 | echo "$ac_t""yes" 1>&6 | |
3853 | : | |
3854 | else | |
3855 | echo "$ac_t""no" 1>&6 | |
3856 | fi | |
3857 | ||
3858 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
3859 | else | |
3860 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 3861 | #line 3862 "configure" |
c375c43b KG |
3862 | #include "confdefs.h" |
3863 | /* Thanks to Paul Eggert for this test. */ | |
3864 | #include <stdio.h> | |
3865 | #include <sys/types.h> | |
3866 | #include <sys/stat.h> | |
3867 | #ifdef HAVE_UNISTD_H | |
3868 | #include <unistd.h> | |
3869 | #endif | |
3870 | #ifdef HAVE_VFORK_H | |
3871 | #include <vfork.h> | |
3872 | #endif | |
3873 | /* On some sparc systems, changes by the child to local and incoming | |
3874 | argument registers are propagated back to the parent. | |
3875 | The compiler is told about this with #include <vfork.h>, | |
3876 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
3877 | Test for this by using a static variable whose address | |
3878 | is put into a register that is clobbered by the vfork. */ | |
3879 | static | |
3880 | #ifdef __cplusplus | |
3881 | sparc_address_test (int arg) | |
3882 | #else | |
3883 | sparc_address_test (arg) int arg; | |
3884 | #endif | |
3885 | { | |
3886 | static pid_t child; | |
3887 | if (!child) { | |
3888 | child = vfork (); | |
3889 | if (child < 0) { | |
3890 | perror ("vfork"); | |
3891 | _exit(2); | |
3892 | } | |
3893 | if (!child) { | |
3894 | arg = getpid(); | |
3895 | write(-1, "", 0); | |
3896 | _exit (arg); | |
3897 | } | |
3898 | } | |
3899 | } | |
3900 | main() { | |
3901 | pid_t parent = getpid (); | |
3902 | pid_t child; | |
3903 | ||
3904 | sparc_address_test (); | |
3905 | ||
3906 | child = vfork (); | |
3907 | ||
3908 | if (child == 0) { | |
3909 | /* Here is another test for sparc vfork register problems. | |
3910 | This test uses lots of local variables, at least | |
3911 | as many local variables as main has allocated so far | |
3912 | including compiler temporaries. 4 locals are enough for | |
3913 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
3914 | A buggy compiler should reuse the register of parent | |
3915 | for one of the local variables, since it will think that | |
3916 | parent can't possibly be used any more in this routine. | |
3917 | Assigning to the local variable will thus munge parent | |
3918 | in the parent process. */ | |
3919 | pid_t | |
3920 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
3921 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
3922 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
3923 | use the same hardware register for all 8 local variables. */ | |
3924 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
3925 | || p != p5 || p != p6 || p != p7) | |
3926 | _exit(1); | |
3927 | ||
3928 | /* On some systems (e.g. IRIX 3.3), | |
3929 | vfork doesn't separate parent from child file descriptors. | |
3930 | If the child closes a descriptor before it execs or exits, | |
3931 | this munges the parent's descriptor as well. | |
3932 | Test for this by closing stdout in the child. */ | |
3933 | _exit(close(fileno(stdout)) != 0); | |
3934 | } else { | |
3935 | int status; | |
3936 | struct stat st; | |
3937 | ||
3938 | while (wait(&status) != child) | |
3939 | ; | |
3940 | exit( | |
3941 | /* Was there some problem with vforking? */ | |
3942 | child < 0 | |
3943 | ||
3944 | /* Did the child fail? (This shouldn't happen.) */ | |
3945 | || status | |
3946 | ||
3947 | /* Did the vfork/compiler bug occur? */ | |
3948 | || parent != getpid() | |
3949 | ||
3950 | /* Did the file descriptor bug occur? */ | |
3951 | || fstat(fileno(stdout), &st) != 0 | |
3952 | ); | |
3953 | } | |
3954 | } | |
3955 | EOF | |
3b681e9d | 3956 | if { (eval echo configure:3957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c375c43b KG |
3957 | then |
3958 | ac_cv_func_vfork_works=yes | |
3959 | else | |
3960 | echo "configure: failed program was:" >&5 | |
3961 | cat conftest.$ac_ext >&5 | |
3962 | rm -fr conftest* | |
3963 | ac_cv_func_vfork_works=no | |
3964 | fi | |
3965 | rm -fr conftest* | |
3966 | fi | |
3967 | ||
3968 | fi | |
3969 | ||
3970 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 | |
3971 | if test $ac_cv_func_vfork_works = no; then | |
3972 | cat >> confdefs.h <<\EOF | |
3973 | #define vfork fork | |
3974 | EOF | |
3975 | ||
3976 | fi | |
3977 | ||
81bf3d9e | 3978 | for ac_func in getpagesize |
0a4b6309 | 3979 | do |
81bf3d9e | 3980 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
3b681e9d | 3981 | echo "configure:3982: checking for $ac_func" >&5 |
81bf3d9e | 3982 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
0a4b6309 RL |
3983 | echo $ac_n "(cached) $ac_c" 1>&6 |
3984 | else | |
3985 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 3986 | #line 3987 "configure" |
0a4b6309 | 3987 | #include "confdefs.h" |
81bf3d9e RH |
3988 | /* System header to define __stub macros and hopefully few prototypes, |
3989 | which can conflict with char $ac_func(); below. */ | |
3990 | #include <assert.h> | |
3991 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3992 | /* We use char because int might match the return type of a gcc2 | |
3993 | builtin and then its argument prototype would still apply. */ | |
3994 | char $ac_func(); | |
8fa1f09f | 3995 | |
81bf3d9e RH |
3996 | int main() { |
3997 | ||
3998 | /* The GNU C library defines this for functions which it implements | |
3999 | to always fail with ENOSYS. Some functions are actually named | |
4000 | something starting with __ and the normal name is an alias. */ | |
4001 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4002 | choke me | |
c5c76735 | 4003 | #else |
99b09ff3 | 4004 | $ac_func(); |
c5c76735 JL |
4005 | #endif |
4006 | ||
c5c76735 JL |
4007 | ; return 0; } |
4008 | EOF | |
3b681e9d | 4009 | if { (eval echo configure:4010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c5c76735 | 4010 | rm -rf conftest* |
81bf3d9e | 4011 | eval "ac_cv_func_$ac_func=yes" |
c5c76735 JL |
4012 | else |
4013 | echo "configure: failed program was:" >&5 | |
4014 | cat conftest.$ac_ext >&5 | |
4015 | rm -rf conftest* | |
81bf3d9e | 4016 | eval "ac_cv_func_$ac_func=no" |
c5c76735 JL |
4017 | fi |
4018 | rm -f conftest* | |
4019 | fi | |
4020 | ||
81bf3d9e | 4021 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
c5c76735 | 4022 | echo "$ac_t""yes" 1>&6 |
81bf3d9e | 4023 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
c5c76735 | 4024 | cat >> confdefs.h <<EOF |
81bf3d9e | 4025 | #define $ac_tr_func 1 |
c5c76735 | 4026 | EOF |
81bf3d9e | 4027 | |
c5c76735 JL |
4028 | else |
4029 | echo "$ac_t""no" 1>&6 | |
4030 | fi | |
c5c76735 JL |
4031 | done |
4032 | ||
825b6926 ZW |
4033 | # The test program for the next two tests is the same except for one |
4034 | # set of ifdefs. | |
4035 | cat >ct-mmap.inc <<'EOF' | |
d2cabf16 | 4036 | #include <sys/types.h> |
81bf3d9e | 4037 | #include <sys/mman.h> |
825b6926 ZW |
4038 | #include <fcntl.h> |
4039 | #include <signal.h> | |
4040 | #include <setjmp.h> | |
4041 | #include <stdio.h> | |
0a4b6309 | 4042 | |
4c1331d6 DA |
4043 | #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON) |
4044 | # define MAP_ANONYMOUS MAP_ANON | |
4045 | #endif | |
4046 | ||
81bf3d9e RH |
4047 | /* This mess was copied from the GNU getpagesize.h. */ |
4048 | #ifndef HAVE_GETPAGESIZE | |
4049 | # ifdef HAVE_UNISTD_H | |
4050 | # include <unistd.h> | |
4051 | # endif | |
0a4b6309 | 4052 | |
81bf3d9e RH |
4053 | /* Assume that all systems that can run configure have sys/param.h. */ |
4054 | # ifndef HAVE_SYS_PARAM_H | |
4055 | # define HAVE_SYS_PARAM_H 1 | |
4056 | # endif | |
0a4b6309 | 4057 | |
81bf3d9e RH |
4058 | # ifdef _SC_PAGESIZE |
4059 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
4060 | # else /* no _SC_PAGESIZE */ | |
4061 | # ifdef HAVE_SYS_PARAM_H | |
4062 | # include <sys/param.h> | |
4063 | # ifdef EXEC_PAGESIZE | |
4064 | # define getpagesize() EXEC_PAGESIZE | |
4065 | # else /* no EXEC_PAGESIZE */ | |
4066 | # ifdef NBPG | |
4067 | # define getpagesize() NBPG * CLSIZE | |
4068 | # ifndef CLSIZE | |
4069 | # define CLSIZE 1 | |
4070 | # endif /* no CLSIZE */ | |
4071 | # else /* no NBPG */ | |
4072 | # ifdef NBPC | |
4073 | # define getpagesize() NBPC | |
4074 | # else /* no NBPC */ | |
4075 | # ifdef PAGESIZE | |
4076 | # define getpagesize() PAGESIZE | |
4077 | # endif /* PAGESIZE */ | |
4078 | # endif /* no NBPC */ | |
4079 | # endif /* no NBPG */ | |
4080 | # endif /* no EXEC_PAGESIZE */ | |
4081 | # else /* no HAVE_SYS_PARAM_H */ | |
4082 | # define getpagesize() 8192 /* punt totally */ | |
4083 | # endif /* no HAVE_SYS_PARAM_H */ | |
4084 | # endif /* no _SC_PAGESIZE */ | |
0a4b6309 | 4085 | |
81bf3d9e | 4086 | #endif /* no HAVE_GETPAGESIZE */ |
0a4b6309 | 4087 | |
825b6926 ZW |
4088 | #ifndef MAP_FAILED |
4089 | # define MAP_FAILED -1 | |
4c1331d6 | 4090 | #endif |
81bf3d9e | 4091 | |
825b6926 ZW |
4092 | #undef perror_exit |
4093 | #define perror_exit(str, val) \ | |
4094 | do { perror(str); exit(val); } while (0) | |
4095 | ||
4096 | /* Some versions of cygwin mmap require that munmap is called with the | |
4097 | same parameters as mmap. GCC expects that this is not the case. | |
4098 | Test for various forms of this problem. Warning - icky signal games. */ | |
4099 | ||
4100 | static sigset_t unblock_sigsegv; | |
4101 | static jmp_buf r; | |
4102 | static size_t pg; | |
4103 | static int devzero; | |
4104 | ||
4105 | static char * | |
4106 | anonmap (size) | |
4107 | size_t size; | |
4108 | { | |
4109 | #ifdef USE_MAP_ANON | |
4110 | return (char *) mmap (0, size, PROT_READ|PROT_WRITE, | |
4111 | MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); | |
4c1331d6 | 4112 | #else |
825b6926 ZW |
4113 | return (char *) mmap (0, size, PROT_READ|PROT_WRITE, |
4114 | MAP_PRIVATE, devzero, 0); | |
4c1331d6 | 4115 | #endif |
825b6926 ZW |
4116 | } |
4117 | ||
4118 | static void | |
4119 | sigsegv (unused) | |
4120 | int unused; | |
4121 | { | |
4122 | sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0); | |
4123 | longjmp (r, 1); | |
4124 | } | |
4125 | ||
4126 | /* Basic functionality test. */ | |
4127 | void | |
4128 | test_0 () | |
4129 | { | |
4130 | char *x = anonmap (pg); | |
4131 | if (x == (char *) MAP_FAILED) | |
4132 | perror_exit("test 0 mmap", 2); | |
81bf3d9e | 4133 | |
4acab94b | 4134 | *(int *)x += 1; |
81bf3d9e | 4135 | |
4acab94b | 4136 | if (munmap(x, pg) < 0) |
825b6926 ZW |
4137 | perror_exit("test 0 munmap", 3); |
4138 | } | |
4139 | ||
4140 | /* 1. If we map a 2-page region and unmap its second page, the first page | |
4141 | must remain. */ | |
4142 | static void | |
4143 | test_1 () | |
4144 | { | |
4145 | char *x = anonmap (pg * 2); | |
4146 | if (x == (char *)MAP_FAILED) | |
4147 | perror_exit ("test 1 mmap", 4); | |
4148 | ||
4149 | signal (SIGSEGV, sigsegv); | |
4150 | if (setjmp (r)) | |
4151 | perror_exit ("test 1 fault", 5); | |
4152 | ||
4153 | x[0] = 1; | |
4154 | x[pg] = 1; | |
4155 | ||
4156 | if (munmap (x + pg, pg) < 0) | |
4157 | perror_exit ("test 1 munmap 1", 6); | |
4158 | x[0] = 2; | |
4159 | ||
4160 | if (setjmp (r) == 0) | |
4161 | { | |
4162 | x[pg] = 1; | |
4163 | perror_exit ("test 1 no fault", 7); | |
4164 | } | |
4165 | if (munmap (x, pg) < 0) | |
4166 | perror_exit ("test 1 munmap 2", 8); | |
4167 | } | |
4168 | ||
4169 | /* 2. If we map a 2-page region and unmap its first page, the second | |
4170 | page must remain. */ | |
4171 | static void | |
4172 | test_2 () | |
4173 | { | |
4174 | char *x = anonmap (pg * 2); | |
4175 | if (x == (char *)MAP_FAILED) | |
4176 | perror_exit ("test 2 mmap", 9); | |
4177 | ||
4178 | signal (SIGSEGV, sigsegv); | |
4179 | if (setjmp (r)) | |
4180 | perror_exit ("test 2 fault", 10); | |
4181 | ||
4182 | x[0] = 1; | |
4183 | x[pg] = 1; | |
4184 | ||
4185 | if (munmap (x, pg) < 0) | |
4186 | perror_exit ("test 2 munmap 1", 11); | |
4187 | ||
4188 | x[pg] = 2; | |
4189 | ||
4190 | if (setjmp (r) == 0) | |
4191 | { | |
4192 | x[0] = 1; | |
4193 | perror_exit ("test 2 no fault", 12); | |
4194 | } | |
4195 | ||
4196 | if (munmap (x+pg, pg) < 0) | |
4197 | perror_exit ("test 2 munmap 2", 13); | |
4198 | } | |
4199 | ||
4200 | /* 3. If we map two adjacent 1-page regions and unmap them both with | |
4201 | one munmap, both must go away. | |
4202 | ||
4203 | Getting two adjacent 1-page regions with two mmap calls is slightly | |
4204 | tricky. All OS's tested skip over already-allocated blocks; therefore | |
4205 | we have been careful to unmap all allocated regions in previous tests. | |
4206 | HP/UX allocates pages backward in memory. No OS has yet been observed | |
4207 | to be so perverse as to leave unmapped space between consecutive calls | |
4208 | to mmap. */ | |
4209 | ||
4210 | static void | |
4211 | test_3 () | |
4212 | { | |
4213 | char *x, *y, *z; | |
4214 | ||
4215 | x = anonmap (pg); | |
4216 | if (x == (char *)MAP_FAILED) | |
4217 | perror_exit ("test 3 mmap 1", 14); | |
4218 | y = anonmap (pg); | |
4219 | if (y == (char *)MAP_FAILED) | |
4220 | perror_exit ("test 3 mmap 2", 15); | |
4221 | ||
4222 | if (y != x + pg) | |
4223 | { | |
4224 | if (y == x - pg) | |
4225 | z = y, y = x, x = z; | |
4226 | else | |
4227 | { | |
4228 | fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n", | |
4229 | (unsigned long)x, (unsigned long)y); | |
4230 | exit (16); | |
4231 | } | |
4232 | } | |
4233 | ||
4234 | signal (SIGSEGV, sigsegv); | |
4235 | if (setjmp (r)) | |
4236 | perror_exit ("test 3 fault", 17); | |
4237 | ||
4238 | x[0] = 1; | |
4239 | y[0] = 1; | |
4240 | ||
4241 | if (munmap (x, pg*2) < 0) | |
4242 | perror_exit ("test 3 munmap", 18); | |
4243 | ||
4244 | if (setjmp (r) == 0) | |
4245 | { | |
4246 | x[0] = 1; | |
4247 | perror_exit ("test 3 no fault 1", 19); | |
4248 | } | |
4249 | ||
4250 | signal (SIGSEGV, sigsegv); | |
4251 | if (setjmp (r) == 0) | |
4252 | { | |
4253 | y[0] = 1; | |
4254 | perror_exit ("test 3 no fault 2", 20); | |
4255 | } | |
4256 | } | |
4257 | ||
4258 | int | |
4259 | main () | |
4260 | { | |
4261 | sigemptyset (&unblock_sigsegv); | |
4262 | sigaddset (&unblock_sigsegv, SIGSEGV); | |
4263 | pg = getpagesize (); | |
4264 | #ifndef USE_MAP_ANON | |
4265 | devzero = open ("/dev/zero", O_RDWR); | |
4266 | if (devzero < 0) | |
4267 | perror_exit ("open /dev/zero", 1); | |
4268 | #endif | |
4269 | ||
4270 | test_0(); | |
4271 | test_1(); | |
4272 | test_2(); | |
4273 | test_3(); | |
81bf3d9e | 4274 | |
4acab94b AO |
4275 | exit(0); |
4276 | } | |
81bf3d9e | 4277 | EOF |
825b6926 ZW |
4278 | |
4279 | echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6 | |
3b681e9d | 4280 | echo "configure:4281: checking for working mmap from /dev/zero" >&5 |
825b6926 ZW |
4281 | if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then |
4282 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4283 | else | |
4284 | if test "$cross_compiling" = yes; then | |
4285 | # If this is not cygwin, and /dev/zero is a character device, it's probably | |
4286 | # safe to assume it works. | |
4287 | case "$host_os" in | |
4288 | cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;; | |
4289 | * ) if test -c /dev/zero | |
4290 | then ac_cv_func_mmap_dev_zero=yes | |
4291 | else ac_cv_func_mmap_dev_zero=no | |
4292 | fi ;; | |
4293 | esac | |
4294 | else | |
4295 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 4296 | #line 4297 "configure" |
825b6926 ZW |
4297 | #include "confdefs.h" |
4298 | #include "ct-mmap.inc" | |
4299 | EOF | |
3b681e9d | 4300 | if { (eval echo configure:4301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
825b6926 ZW |
4301 | then |
4302 | ac_cv_func_mmap_dev_zero=yes | |
4303 | else | |
4304 | echo "configure: failed program was:" >&5 | |
4305 | cat conftest.$ac_ext >&5 | |
4306 | rm -fr conftest* | |
4307 | if test $? -lt 4 | |
4308 | then ac_cv_func_mmap_dev_zero=no | |
4309 | else ac_cv_func_mmap_dev_zero=buggy | |
4310 | fi | |
4311 | fi | |
4312 | rm -fr conftest* | |
4313 | fi | |
4314 | ||
4315 | ||
4316 | fi | |
4317 | ||
4318 | echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6 | |
4319 | if test $ac_cv_func_mmap_dev_zero = yes; then | |
4320 | cat >> confdefs.h <<\EOF | |
4321 | #define HAVE_MMAP_DEV_ZERO 1 | |
4322 | EOF | |
4323 | ||
4324 | fi | |
4325 | ||
4326 | echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6 | |
3b681e9d | 4327 | echo "configure:4328: checking for working mmap with MAP_ANON(YMOUS)" >&5 |
825b6926 ZW |
4328 | if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then |
4329 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4330 | else | |
4331 | if test "$cross_compiling" = yes; then | |
4332 | # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works | |
4333 | # just because it's there. Some SCO Un*xen define it but don't implement it. | |
4334 | ac_cv_func_mmap_anon=no | |
4335 | else | |
4336 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 4337 | #line 4338 "configure" |
825b6926 ZW |
4338 | #include "confdefs.h" |
4339 | #define USE_MAP_ANON | |
4340 | #include "ct-mmap.inc" | |
4341 | EOF | |
3b681e9d | 4342 | if { (eval echo configure:4343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
81bf3d9e | 4343 | then |
825b6926 | 4344 | ac_cv_func_mmap_anon=yes |
81bf3d9e RH |
4345 | else |
4346 | echo "configure: failed program was:" >&5 | |
4347 | cat conftest.$ac_ext >&5 | |
4348 | rm -fr conftest* | |
825b6926 ZW |
4349 | if test $? -lt 4 |
4350 | then ac_cv_func_mmap_anon=no | |
4351 | else ac_cv_func_mmap_anon=buggy | |
4352 | fi | |
81bf3d9e RH |
4353 | fi |
4354 | rm -fr conftest* | |
4355 | fi | |
4356 | ||
825b6926 | 4357 | |
81bf3d9e RH |
4358 | fi |
4359 | ||
825b6926 ZW |
4360 | echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6 |
4361 | if test $ac_cv_func_mmap_anon = yes; then | |
81bf3d9e | 4362 | cat >> confdefs.h <<\EOF |
825b6926 | 4363 | #define HAVE_MMAP_ANON 1 |
81bf3d9e RH |
4364 | EOF |
4365 | ||
4366 | fi | |
825b6926 | 4367 | rm -f ct-mmap.inc |
81bf3d9e | 4368 | |
56f02b88 | 4369 | echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6 |
3b681e9d | 4370 | echo "configure:4371: checking for working mmap of a file" >&5 |
56f02b88 ZW |
4371 | if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then |
4372 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4373 | else | |
4374 | # Create a file one thousand bytes long. | |
4375 | for i in 1 2 3 4 5 6 7 8 9 0 | |
4376 | do for j in 1 2 3 4 5 6 7 8 9 0 | |
4377 | do echo $i $j xxxxx | |
4378 | done | |
4379 | done > conftestdata$$ | |
4380 | ||
4381 | if test "$cross_compiling" = yes; then | |
4382 | ac_cv_func_mmap_file=no | |
4383 | else | |
4384 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 4385 | #line 4386 "configure" |
56f02b88 ZW |
4386 | #include "confdefs.h" |
4387 | ||
4388 | /* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by | |
4389 | Richard Henderson and Alexandre Oliva. | |
4390 | Check whether read-only mmap of a plain file works. */ | |
4391 | #include <sys/types.h> | |
4392 | #include <sys/stat.h> | |
4393 | #include <fcntl.h> | |
4394 | #include <sys/mman.h> | |
4395 | ||
4396 | int main() | |
4397 | { | |
4398 | char *x; | |
4399 | int fd; | |
4400 | struct stat st; | |
4401 | ||
4402 | fd = open("conftestdata$$", O_RDONLY); | |
4403 | if (fd < 0) | |
4404 | exit(1); | |
4405 | ||
4406 | if (fstat (fd, &st)) | |
4407 | exit(2); | |
4408 | ||
4409 | x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); | |
4410 | if (x == (char *) -1) | |
4411 | exit(3); | |
4412 | ||
4413 | if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ') | |
4414 | exit(4); | |
4415 | ||
4416 | if (munmap(x, st.st_size) < 0) | |
4417 | exit(5); | |
4418 | ||
4419 | exit(0); | |
4420 | } | |
4421 | EOF | |
3b681e9d | 4422 | if { (eval echo configure:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
56f02b88 ZW |
4423 | then |
4424 | ac_cv_func_mmap_file=yes | |
4425 | else | |
4426 | echo "configure: failed program was:" >&5 | |
4427 | cat conftest.$ac_ext >&5 | |
4428 | rm -fr conftest* | |
4429 | ac_cv_func_mmap_file=no | |
4430 | fi | |
4431 | rm -fr conftest* | |
4432 | fi | |
4433 | ||
4434 | fi | |
4435 | ||
4436 | echo "$ac_t""$ac_cv_func_mmap_file" 1>&6 | |
4437 | if test $ac_cv_func_mmap_file = yes; then | |
4438 | cat >> confdefs.h <<\EOF | |
4439 | #define HAVE_MMAP_FILE 1 | |
4440 | EOF | |
4441 | ||
4442 | fi | |
4443 | ||
81bf3d9e | 4444 | |
f91abfce TT |
4445 | |
4446 | ||
4447 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
4448 | if test "${with_libiconv_prefix+set}" = set; then | |
4449 | withval="$with_libiconv_prefix" | |
4450 | ||
4451 | for dir in `echo "$withval" | tr : ' '`; do | |
4452 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
4453 | if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi | |
4454 | done | |
4455 | ||
4456 | fi | |
4457 | ||
4458 | ||
4459 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 | |
3b681e9d | 4460 | echo "configure:4461: checking for iconv" >&5 |
f91abfce TT |
4461 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
4462 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4463 | else | |
4464 | ||
4465 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
4466 | am_cv_lib_iconv=no | |
4467 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 4468 | #line 4469 "configure" |
f91abfce TT |
4469 | #include "confdefs.h" |
4470 | #include <stdlib.h> | |
4471 | #include <iconv.h> | |
4472 | int main() { | |
4473 | iconv_t cd = iconv_open("",""); | |
4474 | iconv(cd,NULL,NULL,NULL,NULL); | |
4475 | iconv_close(cd); | |
4476 | ; return 0; } | |
4477 | EOF | |
3b681e9d | 4478 | if { (eval echo configure:4479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
f91abfce TT |
4479 | rm -rf conftest* |
4480 | am_cv_func_iconv=yes | |
4481 | else | |
4482 | echo "configure: failed program was:" >&5 | |
4483 | cat conftest.$ac_ext >&5 | |
4484 | fi | |
4485 | rm -f conftest* | |
4486 | if test "$am_cv_func_iconv" != yes; then | |
4487 | am_save_LIBS="$LIBS" | |
4488 | LIBS="$LIBS -liconv" | |
4489 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 4490 | #line 4491 "configure" |
f91abfce TT |
4491 | #include "confdefs.h" |
4492 | #include <stdlib.h> | |
4493 | #include <iconv.h> | |
4494 | int main() { | |
4495 | iconv_t cd = iconv_open("",""); | |
4496 | iconv(cd,NULL,NULL,NULL,NULL); | |
4497 | iconv_close(cd); | |
4498 | ; return 0; } | |
4499 | EOF | |
3b681e9d | 4500 | if { (eval echo configure:4501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
f91abfce TT |
4501 | rm -rf conftest* |
4502 | am_cv_lib_iconv=yes | |
4503 | am_cv_func_iconv=yes | |
4504 | else | |
4505 | echo "configure: failed program was:" >&5 | |
4506 | cat conftest.$ac_ext >&5 | |
4507 | fi | |
4508 | rm -f conftest* | |
4509 | LIBS="$am_save_LIBS" | |
4510 | fi | |
4511 | ||
4512 | fi | |
4513 | ||
4514 | echo "$ac_t""$am_cv_func_iconv" 1>&6 | |
4515 | if test "$am_cv_func_iconv" = yes; then | |
4516 | cat >> confdefs.h <<\EOF | |
4517 | #define HAVE_ICONV 1 | |
4518 | EOF | |
4519 | ||
4520 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 | |
3b681e9d | 4521 | echo "configure:4522: checking for iconv declaration" >&5 |
f91abfce TT |
4522 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
4523 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4524 | else | |
4525 | ||
4526 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 4527 | #line 4528 "configure" |
f91abfce TT |
4528 | #include "confdefs.h" |
4529 | ||
4530 | #include <stdlib.h> | |
4531 | #include <iconv.h> | |
4532 | extern | |
4533 | #ifdef __cplusplus | |
4534 | "C" | |
4535 | #endif | |
4536 | #if defined(__STDC__) || defined(__cplusplus) | |
4537 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
4538 | #else | |
4539 | size_t iconv(); | |
4540 | #endif | |
4541 | ||
4542 | int main() { | |
4543 | ||
4544 | ; return 0; } | |
4545 | EOF | |
3b681e9d | 4546 | if { (eval echo configure:4547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
f91abfce TT |
4547 | rm -rf conftest* |
4548 | am_cv_proto_iconv_arg1="" | |
4549 | else | |
4550 | echo "configure: failed program was:" >&5 | |
4551 | cat conftest.$ac_ext >&5 | |
4552 | rm -rf conftest* | |
4553 | am_cv_proto_iconv_arg1="const" | |
4554 | fi | |
4555 | rm -f conftest* | |
4556 | 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);" | |
4557 | fi | |
4558 | ||
4559 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
4560 | echo "$ac_t""${ac_t:- | |
4561 | }$am_cv_proto_iconv" 1>&6 | |
4562 | cat >> confdefs.h <<EOF | |
4563 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
4564 | EOF | |
4565 | ||
4566 | fi | |
4567 | LIBICONV= | |
4568 | if test "$am_cv_lib_iconv" = yes; then | |
4569 | LIBICONV="-liconv" | |
4570 | fi | |
4571 | ||
4572 | ||
4573 | ||
86cf1cbd KG |
4574 | # We will need to find libiberty.h and ansidecl.h |
4575 | saved_CFLAGS="$CFLAGS" | |
4576 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
8e944909 | 4577 | for ac_func in getenv atol sbrk abort atof getcwd getwd \ |
3b681e9d ZW |
4578 | strsignal putc_unlocked fputs_unlocked fwrite_unlocked \ |
4579 | fprintf_unlocked strstr environ errno \ | |
c1800ec8 | 4580 | malloc realloc calloc free basename getopt clock |
81bf3d9e | 4581 | do |
f31e826b KG |
4582 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
4583 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 | |
3b681e9d | 4584 | echo "configure:4585: checking whether $ac_func is declared" >&5 |
f31e826b | 4585 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
81bf3d9e RH |
4586 | echo $ac_n "(cached) $ac_c" 1>&6 |
4587 | else | |
4588 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 4589 | #line 4590 "configure" |
81bf3d9e | 4590 | #include "confdefs.h" |
7afe8c41 KG |
4591 | #undef $ac_tr_decl |
4592 | #define $ac_tr_decl 1 | |
4593 | ||
d02af173 | 4594 | #include "ansidecl.h" |
86cf1cbd | 4595 | #include "system.h" |
f31e826b | 4596 | |
81bf3d9e | 4597 | int main() { |
86cf1cbd KG |
4598 | #ifndef $ac_func |
4599 | char *(*pfn) = (char *(*)) $ac_func ; | |
4600 | #endif | |
81bf3d9e RH |
4601 | ; return 0; } |
4602 | EOF | |
3b681e9d | 4603 | if { (eval echo configure:4604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
81bf3d9e | 4604 | rm -rf conftest* |
f31e826b | 4605 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e RH |
4606 | else |
4607 | echo "configure: failed program was:" >&5 | |
4608 | cat conftest.$ac_ext >&5 | |
4609 | rm -rf conftest* | |
f31e826b | 4610 | eval "gcc_cv_have_decl_$ac_func=no" |
81bf3d9e RH |
4611 | fi |
4612 | rm -f conftest* | |
4613 | fi | |
4614 | ||
f31e826b KG |
4615 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
4616 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF | |
86cf1cbd | 4617 | #define $ac_tr_decl 1 |
81bf3d9e | 4618 | EOF |
86cf1cbd | 4619 | |
81bf3d9e | 4620 | else |
f31e826b KG |
4621 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
4622 | #define $ac_tr_decl 0 | |
4623 | EOF | |
4624 | ||
81bf3d9e RH |
4625 | fi |
4626 | ||
4627 | done | |
86cf1cbd | 4628 | if test x = y ; then |
05e12634 | 4629 | cat >> confdefs.h <<\EOF |
f31e826b | 4630 | #define HAVE_DECL_GETENV 1 |
86cf1cbd | 4631 | EOF |
05e12634 | 4632 | cat >> confdefs.h <<\EOF |
f31e826b | 4633 | #define HAVE_DECL_ATOL 1 |
86cf1cbd | 4634 | EOF |
05e12634 | 4635 | cat >> confdefs.h <<\EOF |
f31e826b | 4636 | #define HAVE_DECL_SBRK 1 |
86cf1cbd | 4637 | EOF |
05e12634 | 4638 | cat >> confdefs.h <<\EOF |
f31e826b | 4639 | #define HAVE_DECL_ABORT 1 |
86cf1cbd | 4640 | EOF |
05e12634 | 4641 | cat >> confdefs.h <<\EOF |
f31e826b | 4642 | #define HAVE_DECL_ATOF 1 |
86cf1cbd | 4643 | EOF |
05e12634 | 4644 | cat >> confdefs.h <<\EOF |
f31e826b | 4645 | #define HAVE_DECL_GETCWD 1 |
86cf1cbd | 4646 | EOF |
05e12634 | 4647 | cat >> confdefs.h <<\EOF |
f31e826b | 4648 | #define HAVE_DECL_GETWD 1 |
86cf1cbd KG |
4649 | EOF |
4650 | \ | |
05e12634 | 4651 | cat >> confdefs.h <<\EOF |
f31e826b | 4652 | #define HAVE_DECL_STRSIGNAL 1 |
86cf1cbd | 4653 | EOF |
05e12634 | 4654 | cat >> confdefs.h <<\EOF |
f31e826b | 4655 | #define HAVE_DECL_PUTC_UNLOCKED 1 |
86cf1cbd | 4656 | EOF |
05e12634 | 4657 | cat >> confdefs.h <<\EOF |
f31e826b | 4658 | #define HAVE_DECL_FPUTS_UNLOCKED 1 |
3b681e9d ZW |
4659 | EOF |
4660 | cat >> confdefs.h <<\EOF | |
4661 | #define HAVE_DECL_FWRITE_UNLOCKED 1 | |
4662 | EOF | |
4663 | \ | |
4664 | cat >> confdefs.h <<\EOF | |
4665 | #define HAVE_DECL_FPRINTF_UNLOCKED 1 | |
86cf1cbd | 4666 | EOF |
05e12634 | 4667 | cat >> confdefs.h <<\EOF |
f31e826b | 4668 | #define HAVE_DECL_STRSTR 1 |
86cf1cbd | 4669 | EOF |
05e12634 | 4670 | cat >> confdefs.h <<\EOF |
f31e826b | 4671 | #define HAVE_DECL_ENVIRON 1 |
6c889b67 | 4672 | EOF |
05e12634 | 4673 | cat >> confdefs.h <<\EOF |
6c889b67 | 4674 | #define HAVE_DECL_ERRNO 1 |
86cf1cbd KG |
4675 | EOF |
4676 | \ | |
05e12634 | 4677 | cat >> confdefs.h <<\EOF |
f31e826b KG |
4678 | #define HAVE_DECL_MALLOC 1 |
4679 | EOF | |
05e12634 | 4680 | cat >> confdefs.h <<\EOF |
f31e826b | 4681 | #define HAVE_DECL_REALLOC 1 |
86cf1cbd | 4682 | EOF |
05e12634 | 4683 | cat >> confdefs.h <<\EOF |
f31e826b | 4684 | #define HAVE_DECL_CALLOC 1 |
86cf1cbd | 4685 | EOF |
05e12634 | 4686 | cat >> confdefs.h <<\EOF |
f31e826b | 4687 | #define HAVE_DECL_FREE 1 |
86cf1cbd | 4688 | EOF |
05e12634 | 4689 | cat >> confdefs.h <<\EOF |
f31e826b KG |
4690 | #define HAVE_DECL_BASENAME 1 |
4691 | EOF | |
05e12634 | 4692 | cat >> confdefs.h <<\EOF |
f31e826b | 4693 | #define HAVE_DECL_GETOPT 1 |
c1800ec8 | 4694 | EOF |
05e12634 | 4695 | cat >> confdefs.h <<\EOF |
c1800ec8 | 4696 | #define HAVE_DECL_CLOCK 1 |
81bf3d9e | 4697 | EOF |
81bf3d9e RH |
4698 | fi |
4699 | ||
81bf3d9e RH |
4700 | |
4701 | for ac_func in getrlimit setrlimit getrusage | |
4702 | do | |
f31e826b KG |
4703 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
4704 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 | |
3b681e9d | 4705 | echo "configure:4706: checking whether $ac_func is declared" >&5 |
f31e826b | 4706 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
81bf3d9e RH |
4707 | echo $ac_n "(cached) $ac_c" 1>&6 |
4708 | else | |
4709 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 4710 | #line 4711 "configure" |
81bf3d9e | 4711 | #include "confdefs.h" |
7afe8c41 KG |
4712 | #undef $ac_tr_decl |
4713 | #define $ac_tr_decl 1 | |
4714 | ||
d02af173 | 4715 | #include "ansidecl.h" |
86cf1cbd | 4716 | #include "system.h" |
81bf3d9e RH |
4717 | #ifdef HAVE_SYS_RESOURCE_H |
4718 | #include <sys/resource.h> | |
4719 | #endif | |
4720 | ||
f31e826b | 4721 | |
81bf3d9e | 4722 | int main() { |
86cf1cbd KG |
4723 | #ifndef $ac_func |
4724 | char *(*pfn) = (char *(*)) $ac_func ; | |
4725 | #endif | |
81bf3d9e RH |
4726 | ; return 0; } |
4727 | EOF | |
3b681e9d | 4728 | if { (eval echo configure:4729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
81bf3d9e | 4729 | rm -rf conftest* |
f31e826b | 4730 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e RH |
4731 | else |
4732 | echo "configure: failed program was:" >&5 | |
4733 | cat conftest.$ac_ext >&5 | |
4734 | rm -rf conftest* | |
f31e826b | 4735 | eval "gcc_cv_have_decl_$ac_func=no" |
81bf3d9e RH |
4736 | fi |
4737 | rm -f conftest* | |
4738 | fi | |
4739 | ||
f31e826b KG |
4740 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
4741 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF | |
86cf1cbd | 4742 | #define $ac_tr_decl 1 |
81bf3d9e | 4743 | EOF |
86cf1cbd | 4744 | |
81bf3d9e | 4745 | else |
f31e826b KG |
4746 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
4747 | #define $ac_tr_decl 0 | |
4748 | EOF | |
4749 | ||
81bf3d9e RH |
4750 | fi |
4751 | ||
4752 | done | |
86cf1cbd | 4753 | if test x = y ; then |
05e12634 | 4754 | cat >> confdefs.h <<\EOF |
f31e826b | 4755 | #define HAVE_DECL_GETRLIMIT 1 |
86cf1cbd | 4756 | EOF |
05e12634 | 4757 | cat >> confdefs.h <<\EOF |
f31e826b | 4758 | #define HAVE_DECL_SETRLIMIT 1 |
86cf1cbd | 4759 | EOF |
05e12634 | 4760 | cat >> confdefs.h <<\EOF |
f31e826b | 4761 | #define HAVE_DECL_GETRUSAGE 1 |
86cf1cbd KG |
4762 | EOF |
4763 | fi | |
4764 | ||
81bf3d9e | 4765 | |
c1800ec8 ZW |
4766 | for ac_func in times |
4767 | do | |
4768 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4769 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 | |
3b681e9d | 4770 | echo "configure:4771: checking whether $ac_func is declared" >&5 |
c1800ec8 ZW |
4771 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4772 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4773 | else | |
4774 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 4775 | #line 4776 "configure" |
c1800ec8 ZW |
4776 | #include "confdefs.h" |
4777 | #undef $ac_tr_decl | |
4778 | #define $ac_tr_decl 1 | |
4779 | ||
4780 | #include "ansidecl.h" | |
4781 | #include "system.h" | |
4782 | #ifdef HAVE_SYS_TIMES_H | |
4783 | #include <sys/times.h> | |
4784 | #endif | |
4785 | ||
4786 | ||
4787 | int main() { | |
4788 | #ifndef $ac_func | |
4789 | char *(*pfn) = (char *(*)) $ac_func ; | |
4790 | #endif | |
4791 | ; return 0; } | |
4792 | EOF | |
3b681e9d | 4793 | if { (eval echo configure:4794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c1800ec8 ZW |
4794 | rm -rf conftest* |
4795 | eval "gcc_cv_have_decl_$ac_func=yes" | |
4796 | else | |
4797 | echo "configure: failed program was:" >&5 | |
4798 | cat conftest.$ac_ext >&5 | |
4799 | rm -rf conftest* | |
4800 | eval "gcc_cv_have_decl_$ac_func=no" | |
4801 | fi | |
4802 | rm -f conftest* | |
4803 | fi | |
4804 | ||
4805 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
4806 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF | |
4807 | #define $ac_tr_decl 1 | |
4808 | EOF | |
4809 | ||
4810 | else | |
4811 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF | |
4812 | #define $ac_tr_decl 0 | |
4813 | EOF | |
4814 | ||
4815 | fi | |
4816 | ||
4817 | done | |
4818 | if test x = y ; then | |
05e12634 | 4819 | cat >> confdefs.h <<\EOF |
c1800ec8 ZW |
4820 | #define HAVE_DECL_TIMES 1 |
4821 | EOF | |
4822 | fi | |
4823 | ||
4824 | ||
4825 | # More time-related stuff. | |
4826 | echo $ac_n "checking for struct tms""... $ac_c" 1>&6 | |
3b681e9d | 4827 | echo "configure:4828: checking for struct tms" >&5 |
c1800ec8 ZW |
4828 | if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then |
4829 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4830 | else | |
4831 | ||
4832 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 4833 | #line 4834 "configure" |
c1800ec8 ZW |
4834 | #include "confdefs.h" |
4835 | ||
4836 | #include "ansidecl.h" | |
4837 | #include "system.h" | |
4838 | #ifdef HAVE_SYS_TIMES_H | |
4839 | #include <sys/times.h> | |
4840 | #endif | |
4841 | ||
4842 | int main() { | |
4843 | struct tms tms; | |
4844 | ; return 0; } | |
4845 | EOF | |
3b681e9d | 4846 | if { (eval echo configure:4847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c1800ec8 ZW |
4847 | rm -rf conftest* |
4848 | ac_cv_struct_tms=yes | |
4849 | else | |
4850 | echo "configure: failed program was:" >&5 | |
4851 | cat conftest.$ac_ext >&5 | |
4852 | rm -rf conftest* | |
4853 | ac_cv_struct_tms=no | |
4854 | fi | |
4855 | rm -f conftest* | |
4856 | fi | |
4857 | ||
4858 | echo "$ac_t""$ac_cv_struct_tms" 1>&6 | |
4859 | if test $ac_cv_struct_tms = yes; then | |
4860 | cat >> confdefs.h <<\EOF | |
4861 | #define HAVE_STRUCT_TMS 1 | |
4862 | EOF | |
4863 | ||
4864 | fi | |
4865 | ||
4866 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
4867 | # revisit after autoconf 2.50. | |
4868 | echo $ac_n "checking for clock_t""... $ac_c" 1>&6 | |
3b681e9d | 4869 | echo "configure:4870: checking for clock_t" >&5 |
c1800ec8 ZW |
4870 | if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then |
4871 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4872 | else | |
4873 | ||
4874 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 4875 | #line 4876 "configure" |
c1800ec8 ZW |
4876 | #include "confdefs.h" |
4877 | ||
4878 | #include "ansidecl.h" | |
4879 | #include "system.h" | |
4880 | ||
4881 | int main() { | |
4882 | clock_t x; | |
4883 | ; return 0; } | |
4884 | EOF | |
3b681e9d | 4885 | if { (eval echo configure:4886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c1800ec8 ZW |
4886 | rm -rf conftest* |
4887 | gcc_cv_type_clock_t=yes | |
4888 | else | |
4889 | echo "configure: failed program was:" >&5 | |
4890 | cat conftest.$ac_ext >&5 | |
4891 | rm -rf conftest* | |
4892 | gcc_cv_type_clock_t=no | |
4893 | fi | |
4894 | rm -f conftest* | |
4895 | fi | |
4896 | ||
4897 | echo "$ac_t""$gcc_cv_type_clock_t" 1>&6 | |
4898 | if test $gcc_cv_type_clock_t = yes; then | |
4899 | cat >> confdefs.h <<\EOF | |
4900 | #define HAVE_CLOCK_T 1 | |
4901 | EOF | |
4902 | ||
4903 | fi | |
4904 | ||
86cf1cbd KG |
4905 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
4906 | CFLAGS="$saved_CFLAGS" | |
81bf3d9e | 4907 | |
75923b2f MK |
4908 | # mkdir takes a single argument on some systems. |
4909 | echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6 | |
3b681e9d | 4910 | echo "configure:4911: checking if mkdir takes one argument" >&5 |
75923b2f MK |
4911 | if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then |
4912 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4913 | else | |
4914 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 4915 | #line 4916 "configure" |
75923b2f MK |
4916 | #include "confdefs.h" |
4917 | ||
4918 | #include <sys/types.h> | |
4919 | #ifdef HAVE_SYS_STAT_H | |
4920 | # include <sys/stat.h> | |
4921 | #endif | |
4922 | #ifdef HAVE_UNISTD_H | |
4923 | # include <unistd.h> | |
4924 | #endif | |
4925 | #ifdef HAVE_DIRECT_H | |
4926 | # include <direct.h> | |
4927 | #endif | |
4928 | int main() { | |
4929 | mkdir ("foo", 0); | |
4930 | ; return 0; } | |
4931 | EOF | |
3b681e9d | 4932 | if { (eval echo configure:4933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75923b2f MK |
4933 | rm -rf conftest* |
4934 | gcc_cv_mkdir_takes_one_arg=no | |
4935 | else | |
4936 | echo "configure: failed program was:" >&5 | |
4937 | cat conftest.$ac_ext >&5 | |
4938 | rm -rf conftest* | |
4939 | gcc_cv_mkdir_takes_one_arg=yes | |
4940 | fi | |
4941 | rm -f conftest* | |
4942 | fi | |
4943 | ||
4944 | echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6 | |
4945 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then | |
4946 | cat >> confdefs.h <<\EOF | |
4947 | #define MKDIR_TAKES_ONE_ARG 1 | |
4948 | EOF | |
4949 | ||
4950 | fi | |
4951 | ||
4952 | ||
861bb6c1 JL |
4953 | # File extensions |
4954 | manext='.1' | |
4955 | objext='.o' | |
4956 | ||
4957 | ||
4958 | ||
4959 | build_xm_file= | |
f6cb0e63 | 4960 | build_xm_defines= |
861bb6c1 JL |
4961 | build_install_headers_dir=install-headers-tar |
4962 | build_exeext= | |
4963 | host_xm_file= | |
f6cb0e63 | 4964 | host_xm_defines= |
861bb6c1 JL |
4965 | host_xmake_file= |
4966 | host_truncate_target= | |
6e26218f | 4967 | host_exeext= |
861bb6c1 JL |
4968 | |
4969 | # Decode the host machine, then the target machine. | |
4970 | # For the host machine, we save the xm_file variable as host_xm_file; | |
4971 | # then we decode the target machine and forget everything else | |
4972 | # that came from the host machine. | |
4973 | for machine in $build $host $target; do | |
61ed06c3 | 4974 | . ${srcdir}/config.gcc |
861bb6c1 JL |
4975 | done |
4976 | ||
4977 | extra_objs="${host_extra_objs} ${extra_objs}" | |
4978 | ||
4979 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 4980 | if test x"$tm_file" = x |
861bb6c1 JL |
4981 | then tm_file=$cpu_type/$cpu_type.h; fi |
4982 | ||
6b2adea9 | 4983 | if test x"$extra_headers" = x |
861bb6c1 JL |
4984 | then extra_headers=; fi |
4985 | ||
75bffa71 | 4986 | if test x$md_file = x |
e98e406f | 4987 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 4988 | |
75bffa71 | 4989 | if test x$out_file = x |
861bb6c1 JL |
4990 | then out_file=$cpu_type/$cpu_type.c; fi |
4991 | ||
75bffa71 | 4992 | if test x"$tmake_file" = x |
861bb6c1 JL |
4993 | then tmake_file=$cpu_type/t-$cpu_type |
4994 | fi | |
4995 | ||
90e6a802 | 4996 | if test x"$dwarf2" = xyes |
756ee602 | 4997 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
4998 | fi |
4999 | ||
75bffa71 | 5000 | if test x$float_format = x |
861bb6c1 JL |
5001 | then float_format=i64 |
5002 | fi | |
5003 | ||
027ea2a7 JW |
5004 | if test $float_format = none |
5005 | then float_h_file=Makefile.in | |
5006 | else float_h_file=float-$float_format.h | |
5007 | fi | |
5008 | ||
9fc9b82a | 5009 | # Handle cpp installation. |
3ecc3258 | 5010 | if test x$enable_cpp != xno |
9fc9b82a L |
5011 | then |
5012 | tmake_file="$tmake_file t-install-cpp" | |
5013 | fi | |
5014 | ||
861bb6c1 | 5015 | # Say what files are being used for the output code and MD file. |
11642c3a | 5016 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
5017 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
5018 | ||
11642c3a | 5019 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
5020 | # about them and drop them. |
5021 | ||
11642c3a ZW |
5022 | bx= |
5023 | for x in $build_xm_file; do | |
5024 | if test -f $srcdir/config/$x | |
5025 | then bx="$bx $x" | |
11642c3a ZW |
5026 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
5027 | fi | |
5028 | done | |
5029 | build_xm_file="$bx" | |
5030 | ||
5031 | hx= | |
5032 | for x in $host_xm_file; do | |
5033 | if test -f $srcdir/config/$x | |
5034 | then hx="$hx $x" | |
11642c3a ZW |
5035 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
5036 | fi | |
5037 | done | |
5038 | host_xm_file="$hx" | |
5039 | ||
5040 | tx= | |
5041 | for x in $xm_file; do | |
5042 | if test -f $srcdir/config/$x | |
5043 | then tx="$tx $x" | |
11642c3a ZW |
5044 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
5045 | fi | |
5046 | done | |
5047 | xm_file="$tx" | |
5048 | ||
861bb6c1 JL |
5049 | count=a |
5050 | for f in $tm_file; do | |
5051 | count=${count}x | |
5052 | done | |
75bffa71 | 5053 | if test $count = ax; then |
861bb6c1 JL |
5054 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
5055 | else | |
5056 | echo "Using the following target machine macro files:" | |
5057 | for f in $tm_file; do | |
5058 | echo " $srcdir/config/$f" | |
5059 | done | |
5060 | fi | |
5061 | ||
5062 | count=a | |
5063 | for f in $host_xm_file; do | |
5064 | count=${count}x | |
5065 | done | |
11642c3a ZW |
5066 | if test $count = a; then |
5067 | : | |
5068 | elif test $count = ax; then | |
861bb6c1 JL |
5069 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
5070 | else | |
5071 | echo "Using the following host machine macro files:" | |
5072 | for f in $host_xm_file; do | |
5073 | echo " $srcdir/config/$f" | |
5074 | done | |
5075 | fi | |
5076 | ||
75bffa71 | 5077 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
5078 | count=a |
5079 | for f in $build_xm_file; do | |
5080 | count=${count}x | |
5081 | done | |
11642c3a ZW |
5082 | if test $count = a; then |
5083 | : | |
5084 | elif test $count = ax; then | |
861bb6c1 JL |
5085 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
5086 | else | |
5087 | echo "Using the following build machine macro files:" | |
5088 | for f in $build_xm_file; do | |
5089 | echo " $srcdir/config/$f" | |
5090 | done | |
5091 | fi | |
5092 | fi | |
5093 | ||
75bffa71 ILT |
5094 | if test x$thread_file = x; then |
5095 | if test x$target_thread_file != x; then | |
a851212a JW |
5096 | thread_file=$target_thread_file |
5097 | else | |
5098 | thread_file='single' | |
5099 | fi | |
861bb6c1 JL |
5100 | fi |
5101 | ||
b7cb92ad | 5102 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 5103 | # the first file included by config.h. |
b7cb92ad | 5104 | # If host=build, it is correct to have hconfig include auto-host.h |
db81d74a RH |
5105 | # as well. If host!=build, we are in error and need to do more |
5106 | # work to find out the build config parameters. | |
75bffa71 | 5107 | if test x$host = x$build |
db81d74a | 5108 | then |
eaf4e618 | 5109 | build_auto=auto-host.h |
b7cb92ad JL |
5110 | else |
5111 | # We create a subdir, then run autoconf in the subdir. | |
5112 | # To prevent recursion we set host and build for the new | |
5113 | # invocation of configure to the build for this invocation | |
5114 | # of configure. | |
5115 | tempdir=build.$$ | |
5116 | rm -rf $tempdir | |
5117 | mkdir $tempdir | |
5118 | cd $tempdir | |
5119 | case ${srcdir} in | |
255b8a49 | 5120 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
5121 | *) realsrcdir=../${srcdir};; |
5122 | esac | |
d920e825 L |
5123 | saved_CFLAGS="${CFLAGS}" |
5124 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
5125 | ${realsrcdir}/configure \ | |
b7cb92ad | 5126 | --target=$target --host=$build --build=$build |
d920e825 | 5127 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
5128 | |
5129 | # We just finished tests for the build machine, so rename | |
5130 | # the file auto-build.h in the gcc directory. | |
5131 | mv auto-host.h ../auto-build.h | |
5132 | cd .. | |
5133 | rm -rf $tempdir | |
eaf4e618 | 5134 | build_auto=auto-build.h |
db81d74a RH |
5135 | fi |
5136 | ||
eaf4e618 | 5137 | tm_file="${tm_file} defaults.h" |
d02af173 ZW |
5138 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file} ${tm_file}" |
5139 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file} ${tm_file}" | |
5140 | xm_file="ansidecl.h ${xm_file} ${tm_file}" | |
0056a9b5 | 5141 | |
861bb6c1 | 5142 | # Truncate the target if necessary |
75bffa71 | 5143 | if test x$host_truncate_target != x; then |
861bb6c1 JL |
5144 | target=`echo $target | sed -e 's/\(..............\).*/\1/'` |
5145 | fi | |
5146 | ||
f1943b77 | 5147 | # Get the version trigger filename from the toplevel |
75bffa71 | 5148 | if test "${with_gcc_version_trigger+set}" = set; then |
f1943b77 MH |
5149 | gcc_version_trigger=$with_gcc_version_trigger |
5150 | else | |
5151 | gcc_version_trigger=${srcdir}/version.c | |
5152 | fi | |
022dae81 | 5153 | gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'` |
8763704d | 5154 | gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` |
861bb6c1 | 5155 | |
cc1e60ea | 5156 | # Compile in configure arguments. |
8105825d | 5157 | if test -f configargs.h ; then |
cc1e60ea | 5158 | # Being re-configured. |
022dae81 | 5159 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
5160 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
5161 | else | |
5162 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
5163 | fi | |
5164 | cat > configargs.h <<EOF | |
5165 | /* Generated automatically. */ | |
5166 | static const char configuration_arguments[] = "$gcc_config_arguments"; | |
a6687d2b | 5167 | static const char thread_model[] = "$thread_file"; |
cc1e60ea JM |
5168 | EOF |
5169 | ||
ab87f8c8 JL |
5170 | # Internationalization |
5171 | PACKAGE=gcc | |
5172 | VERSION="$gcc_version" | |
5173 | cat >> confdefs.h <<EOF | |
5174 | #define PACKAGE "$PACKAGE" | |
5175 | EOF | |
861bb6c1 | 5176 | |
ab87f8c8 JL |
5177 | cat >> confdefs.h <<EOF |
5178 | #define VERSION "$VERSION" | |
5179 | EOF | |
861bb6c1 | 5180 | |
861bb6c1 | 5181 | |
ab87f8c8 JL |
5182 | |
5183 | ||
2be36552 | 5184 | ALL_LINGUAS="sv" |
ab87f8c8 | 5185 | |
dc6746e7 | 5186 | # Enable NLS support by default |
ab87f8c8 JL |
5187 | # Check whether --enable-nls or --disable-nls was given. |
5188 | if test "${enable_nls+set}" = set; then | |
5189 | enableval="$enable_nls" | |
5190 | : | |
861bb6c1 | 5191 | else |
dc6746e7 | 5192 | enable_nls=yes |
861bb6c1 | 5193 | fi |
861bb6c1 | 5194 | |
861bb6c1 | 5195 | |
dc6746e7 PT |
5196 | # if cross compiling, disable NLS support. |
5197 | # It's not worth the trouble, at least for now. | |
5198 | ||
063a4b85 | 5199 | if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then |
dc6746e7 PT |
5200 | echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2 |
5201 | enable_nls=no | |
5202 | fi | |
5203 | ||
4adee315 PT |
5204 | # if NLS is enabled, also enable check in po subdir |
5205 | if test $enable_nls = yes; then | |
5206 | CHECK_PO=check-po | |
5207 | else | |
5208 | CHECK_PO="" | |
5209 | fi | |
5210 | ||
5211 | ||
5212 | ||
861bb6c1 | 5213 | |
ab87f8c8 | 5214 | echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6 |
3b681e9d | 5215 | echo "configure:5216: checking for strerror in -lcposix" >&5 |
ab87f8c8 JL |
5216 | ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'` |
5217 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5218 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5219 | else | |
5220 | ac_save_LIBS="$LIBS" | |
5221 | LIBS="-lcposix $LIBS" | |
5222 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 5223 | #line 5224 "configure" |
ab87f8c8 JL |
5224 | #include "confdefs.h" |
5225 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5226 | /* We use char because int might match the return type of a gcc2 | |
5227 | builtin and then its argument prototype would still apply. */ | |
5228 | char strerror(); | |
861bb6c1 | 5229 | |
ab87f8c8 JL |
5230 | int main() { |
5231 | strerror() | |
5232 | ; return 0; } | |
5233 | EOF | |
3b681e9d | 5234 | if { (eval echo configure:5235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 JL |
5235 | rm -rf conftest* |
5236 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5237 | else | |
5238 | echo "configure: failed program was:" >&5 | |
5239 | cat conftest.$ac_ext >&5 | |
5240 | rm -rf conftest* | |
5241 | eval "ac_cv_lib_$ac_lib_var=no" | |
861bb6c1 | 5242 | fi |
ab87f8c8 JL |
5243 | rm -f conftest* |
5244 | LIBS="$ac_save_LIBS" | |
861bb6c1 | 5245 | |
861bb6c1 | 5246 | fi |
ab87f8c8 JL |
5247 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
5248 | echo "$ac_t""yes" 1>&6 | |
5249 | LIBS="$LIBS -lcposix" | |
861bb6c1 | 5250 | else |
ab87f8c8 | 5251 | echo "$ac_t""no" 1>&6 |
861bb6c1 JL |
5252 | fi |
5253 | ||
ab87f8c8 | 5254 | |
2ce3c6c6 | 5255 | |
ab87f8c8 | 5256 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
3b681e9d | 5257 | echo "configure:5258: checking for working const" >&5 |
ab87f8c8 JL |
5258 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
5259 | echo $ac_n "(cached) $ac_c" 1>&6 | |
861bb6c1 | 5260 | else |
ab87f8c8 | 5261 | cat > conftest.$ac_ext <<EOF |
3b681e9d | 5262 | #line 5263 "configure" |
ab87f8c8 | 5263 | #include "confdefs.h" |
861bb6c1 | 5264 | |
ab87f8c8 JL |
5265 | int main() { |
5266 | ||
5267 | /* Ultrix mips cc rejects this. */ | |
130fadbb | 5268 | typedef int charset[2]; const charset x; |
ab87f8c8 JL |
5269 | /* SunOS 4.1.1 cc rejects this. */ |
5270 | char const *const *ccp; | |
5271 | char **p; | |
5272 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
5273 | struct point {int x, y;}; | |
5274 | static struct point const zero = {0,0}; | |
5275 | /* AIX XL C 1.02.0.0 rejects this. | |
5276 | It does not let you subtract one const X* pointer from another in an arm | |
5277 | of an if-expression whose if-part is not a constant expression */ | |
5278 | const char *g = "string"; | |
5279 | ccp = &g + (g ? g-g : 0); | |
5280 | /* HPUX 7.0 cc rejects these. */ | |
5281 | ++ccp; | |
5282 | p = (char**) ccp; | |
5283 | ccp = (char const *const *) p; | |
5284 | { /* SCO 3.2v4 cc rejects this. */ | |
5285 | char *t; | |
5286 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5287 | ||
5288 | *t++ = 0; | |
5289 | } | |
5290 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
5291 | int x[] = {25, 17}; | |
5292 | const int *foo = &x[0]; | |
5293 | ++foo; | |
5294 | } | |
5295 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
5296 | typedef const int *iptr; | |
5297 | iptr p = 0; | |
5298 | ++p; | |
5299 | } | |
5300 | { /* AIX XL C 1.02.0.0 rejects this saying | |
5301 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
5302 | struct s { int j; const int *ap[3]; }; | |
5303 | struct s *b; b->j = 5; | |
5304 | } | |
5305 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
5306 | const int foo = 10; | |
5307 | } | |
5308 | ||
5309 | ; return 0; } | |
5310 | EOF | |
3b681e9d | 5311 | if { (eval echo configure:5312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
ab87f8c8 JL |
5312 | rm -rf conftest* |
5313 | ac_cv_c_const=yes | |
861bb6c1 | 5314 | else |
ab87f8c8 JL |
5315 | echo "configure: failed program was:" >&5 |
5316 | cat conftest.$ac_ext >&5 | |
5317 | rm -rf conftest* | |
5318 | ac_cv_c_const=no | |
5319 | fi | |
5320 | rm -f conftest* | |
861bb6c1 JL |
5321 | fi |
5322 | ||
ab87f8c8 JL |
5323 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
5324 | if test $ac_cv_c_const = no; then | |
5325 | cat >> confdefs.h <<\EOF | |
5326 | #define const | |
5327 | EOF | |
5328 | ||
861bb6c1 JL |
5329 | fi |
5330 | ||
ab87f8c8 | 5331 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
3b681e9d | 5332 | echo "configure:5333: checking for off_t" >&5 |
ab87f8c8 JL |
5333 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
5334 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5335 | else | |
5336 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 5337 | #line 5338 "configure" |
ab87f8c8 JL |
5338 | #include "confdefs.h" |
5339 | #include <sys/types.h> | |
5340 | #if STDC_HEADERS | |
5341 | #include <stdlib.h> | |
5342 | #include <stddef.h> | |
5343 | #endif | |
5344 | EOF | |
5345 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
b27d2bd5 | 5346 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
ab87f8c8 | 5347 | rm -rf conftest* |
cb65112a | 5348 | ac_cv_type_off_t=yes |
ab87f8c8 JL |
5349 | else |
5350 | rm -rf conftest* | |
cb65112a | 5351 | ac_cv_type_off_t=no |
ab87f8c8 JL |
5352 | fi |
5353 | rm -f conftest* | |
5354 | ||
5355 | fi | |
cb65112a AO |
5356 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 |
5357 | if test $ac_cv_type_off_t = no; then | |
5358 | cat >> confdefs.h <<\EOF | |
ab87f8c8 JL |
5359 | #define off_t long |
5360 | EOF | |
5361 | ||
5362 | fi | |
5363 | ||
5364 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
3b681e9d | 5365 | echo "configure:5366: checking for size_t" >&5 |
ab87f8c8 JL |
5366 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
5367 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5368 | else | |
5369 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 5370 | #line 5371 "configure" |
ab87f8c8 JL |
5371 | #include "confdefs.h" |
5372 | #include <sys/types.h> | |
5373 | #if STDC_HEADERS | |
5374 | #include <stdlib.h> | |
5375 | #include <stddef.h> | |
5376 | #endif | |
5377 | EOF | |
5378 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
b27d2bd5 | 5379 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
ab87f8c8 | 5380 | rm -rf conftest* |
cb65112a | 5381 | ac_cv_type_size_t=yes |
ab87f8c8 JL |
5382 | else |
5383 | rm -rf conftest* | |
cb65112a | 5384 | ac_cv_type_size_t=no |
ab87f8c8 JL |
5385 | fi |
5386 | rm -f conftest* | |
5387 | ||
5388 | fi | |
cb65112a AO |
5389 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 |
5390 | if test $ac_cv_type_size_t = no; then | |
5391 | cat >> confdefs.h <<\EOF | |
ab87f8c8 JL |
5392 | #define size_t unsigned |
5393 | EOF | |
5394 | ||
5395 | fi | |
5396 | ||
b548dffb | 5397 | |
ab87f8c8 JL |
5398 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ |
5399 | unistd.h sys/param.h | |
5400 | do | |
5401 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5402 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
3b681e9d | 5403 | echo "configure:5404: checking for $ac_hdr" >&5 |
ab87f8c8 JL |
5404 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5405 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5406 | else | |
5407 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 5408 | #line 5409 "configure" |
ab87f8c8 JL |
5409 | #include "confdefs.h" |
5410 | #include <$ac_hdr> | |
5411 | EOF | |
5412 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3b681e9d | 5413 | { (eval echo configure:5414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 5414 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
ab87f8c8 JL |
5415 | if test -z "$ac_err"; then |
5416 | rm -rf conftest* | |
5417 | eval "ac_cv_header_$ac_safe=yes" | |
5418 | else | |
5419 | echo "$ac_err" >&5 | |
5420 | echo "configure: failed program was:" >&5 | |
5421 | cat conftest.$ac_ext >&5 | |
5422 | rm -rf conftest* | |
5423 | eval "ac_cv_header_$ac_safe=no" | |
5424 | fi | |
5425 | rm -f conftest* | |
5426 | fi | |
5427 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5428 | echo "$ac_t""yes" 1>&6 | |
5429 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5430 | cat >> confdefs.h <<EOF | |
5431 | #define $ac_tr_hdr 1 | |
5432 | EOF | |
5433 | ||
5434 | else | |
5435 | echo "$ac_t""no" 1>&6 | |
5436 | fi | |
5437 | done | |
5438 | ||
5439 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
5440 | strdup __argz_count __argz_stringify __argz_next | |
5441 | do | |
5442 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
3b681e9d | 5443 | echo "configure:5444: checking for $ac_func" >&5 |
ab87f8c8 JL |
5444 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5445 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5446 | else | |
5447 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 5448 | #line 5449 "configure" |
ab87f8c8 JL |
5449 | #include "confdefs.h" |
5450 | /* System header to define __stub macros and hopefully few prototypes, | |
5451 | which can conflict with char $ac_func(); below. */ | |
5452 | #include <assert.h> | |
5453 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5454 | /* We use char because int might match the return type of a gcc2 | |
5455 | builtin and then its argument prototype would still apply. */ | |
5456 | char $ac_func(); | |
5457 | ||
5458 | int main() { | |
5459 | ||
5460 | /* The GNU C library defines this for functions which it implements | |
5461 | to always fail with ENOSYS. Some functions are actually named | |
5462 | something starting with __ and the normal name is an alias. */ | |
5463 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5464 | choke me | |
5465 | #else | |
99b09ff3 | 5466 | $ac_func(); |
ab87f8c8 JL |
5467 | #endif |
5468 | ||
5469 | ; return 0; } | |
5470 | EOF | |
3b681e9d | 5471 | if { (eval echo configure:5472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 JL |
5472 | rm -rf conftest* |
5473 | eval "ac_cv_func_$ac_func=yes" | |
5474 | else | |
5475 | echo "configure: failed program was:" >&5 | |
5476 | cat conftest.$ac_ext >&5 | |
5477 | rm -rf conftest* | |
5478 | eval "ac_cv_func_$ac_func=no" | |
5479 | fi | |
5480 | rm -f conftest* | |
5481 | fi | |
5482 | ||
5483 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5484 | echo "$ac_t""yes" 1>&6 | |
5485 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5486 | cat >> confdefs.h <<EOF | |
5487 | #define $ac_tr_func 1 | |
5488 | EOF | |
5489 | ||
5490 | else | |
5491 | echo "$ac_t""no" 1>&6 | |
5492 | fi | |
5493 | done | |
5494 | ||
5495 | ||
5496 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
5497 | for ac_func in stpcpy | |
5498 | do | |
5499 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
3b681e9d | 5500 | echo "configure:5501: checking for $ac_func" >&5 |
ab87f8c8 JL |
5501 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5502 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5503 | else | |
5504 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 5505 | #line 5506 "configure" |
ab87f8c8 JL |
5506 | #include "confdefs.h" |
5507 | /* System header to define __stub macros and hopefully few prototypes, | |
5508 | which can conflict with char $ac_func(); below. */ | |
5509 | #include <assert.h> | |
5510 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5511 | /* We use char because int might match the return type of a gcc2 | |
5512 | builtin and then its argument prototype would still apply. */ | |
5513 | char $ac_func(); | |
5514 | ||
5515 | int main() { | |
5516 | ||
5517 | /* The GNU C library defines this for functions which it implements | |
5518 | to always fail with ENOSYS. Some functions are actually named | |
5519 | something starting with __ and the normal name is an alias. */ | |
5520 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5521 | choke me | |
5522 | #else | |
99b09ff3 | 5523 | $ac_func(); |
ab87f8c8 JL |
5524 | #endif |
5525 | ||
5526 | ; return 0; } | |
5527 | EOF | |
3b681e9d | 5528 | if { (eval echo configure:5529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 JL |
5529 | rm -rf conftest* |
5530 | eval "ac_cv_func_$ac_func=yes" | |
5531 | else | |
5532 | echo "configure: failed program was:" >&5 | |
5533 | cat conftest.$ac_ext >&5 | |
5534 | rm -rf conftest* | |
5535 | eval "ac_cv_func_$ac_func=no" | |
5536 | fi | |
5537 | rm -f conftest* | |
5538 | fi | |
5539 | ||
5540 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5541 | echo "$ac_t""yes" 1>&6 | |
5542 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5543 | cat >> confdefs.h <<EOF | |
5544 | #define $ac_tr_func 1 | |
5545 | EOF | |
5546 | ||
5547 | else | |
5548 | echo "$ac_t""no" 1>&6 | |
5549 | fi | |
5550 | done | |
5551 | ||
5552 | fi | |
5553 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
5554 | cat >> confdefs.h <<\EOF | |
5555 | #define HAVE_STPCPY 1 | |
5556 | EOF | |
5557 | ||
5558 | fi | |
5559 | ||
5560 | if test $ac_cv_header_locale_h = yes; then | |
5561 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
3b681e9d | 5562 | echo "configure:5563: checking for LC_MESSAGES" >&5 |
ab87f8c8 JL |
5563 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
5564 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5565 | else | |
5566 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 5567 | #line 5568 "configure" |
ab87f8c8 JL |
5568 | #include "confdefs.h" |
5569 | #include <locale.h> | |
5570 | int main() { | |
5571 | return LC_MESSAGES | |
5572 | ; return 0; } | |
5573 | EOF | |
3b681e9d | 5574 | if { (eval echo configure:5575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 JL |
5575 | rm -rf conftest* |
5576 | am_cv_val_LC_MESSAGES=yes | |
5577 | else | |
5578 | echo "configure: failed program was:" >&5 | |
5579 | cat conftest.$ac_ext >&5 | |
5580 | rm -rf conftest* | |
5581 | am_cv_val_LC_MESSAGES=no | |
5582 | fi | |
5583 | rm -f conftest* | |
5584 | fi | |
5585 | ||
5586 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
5587 | if test $am_cv_val_LC_MESSAGES = yes; then | |
5588 | cat >> confdefs.h <<\EOF | |
5589 | #define HAVE_LC_MESSAGES 1 | |
5590 | EOF | |
5591 | ||
5592 | fi | |
5593 | fi | |
5594 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
3b681e9d | 5595 | echo "configure:5596: checking whether NLS is requested" >&5 |
ab87f8c8 JL |
5596 | # Check whether --enable-nls or --disable-nls was given. |
5597 | if test "${enable_nls+set}" = set; then | |
5598 | enableval="$enable_nls" | |
5599 | USE_NLS=$enableval | |
5600 | else | |
5601 | USE_NLS=yes | |
5602 | fi | |
5603 | ||
5604 | echo "$ac_t""$USE_NLS" 1>&6 | |
5605 | ||
5606 | ||
5607 | USE_INCLUDED_LIBINTL=no | |
5608 | ||
5609 | if test "$USE_NLS" = "yes"; then | |
5610 | cat >> confdefs.h <<\EOF | |
5611 | #define ENABLE_NLS 1 | |
5612 | EOF | |
5613 | ||
5614 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
3b681e9d | 5615 | echo "configure:5616: checking whether included gettext is requested" >&5 |
ab87f8c8 JL |
5616 | # Check whether --with-included-gettext or --without-included-gettext was given. |
5617 | if test "${with_included_gettext+set}" = set; then | |
5618 | withval="$with_included_gettext" | |
5619 | nls_cv_force_use_gnu_gettext=$withval | |
5620 | else | |
bfa29b63 | 5621 | nls_cv_force_use_gnu_gettext=no |
ab87f8c8 JL |
5622 | fi |
5623 | ||
5624 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
5625 | ||
5626 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
5627 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
5628 | nls_cv_header_intl= | |
5629 | nls_cv_header_libgt= | |
5630 | CATOBJEXT=NONE | |
5631 | ||
5632 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
5633 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
3b681e9d | 5634 | echo "configure:5635: checking for libintl.h" >&5 |
ab87f8c8 JL |
5635 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5636 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5637 | else | |
5638 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 5639 | #line 5640 "configure" |
ab87f8c8 JL |
5640 | #include "confdefs.h" |
5641 | #include <libintl.h> | |
5642 | EOF | |
5643 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3b681e9d | 5644 | { (eval echo configure:5645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 5645 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
ab87f8c8 JL |
5646 | if test -z "$ac_err"; then |
5647 | rm -rf conftest* | |
5648 | eval "ac_cv_header_$ac_safe=yes" | |
5649 | else | |
5650 | echo "$ac_err" >&5 | |
5651 | echo "configure: failed program was:" >&5 | |
5652 | cat conftest.$ac_ext >&5 | |
5653 | rm -rf conftest* | |
5654 | eval "ac_cv_header_$ac_safe=no" | |
5655 | fi | |
5656 | rm -f conftest* | |
5657 | fi | |
5658 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5659 | echo "$ac_t""yes" 1>&6 | |
5660 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
3b681e9d | 5661 | echo "configure:5662: checking for gettext in libc" >&5 |
ab87f8c8 JL |
5662 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
5663 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5664 | else | |
5665 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 5666 | #line 5667 "configure" |
ab87f8c8 JL |
5667 | #include "confdefs.h" |
5668 | #include <libintl.h> | |
5669 | int main() { | |
5670 | return (int) gettext ("") | |
5671 | ; return 0; } | |
5672 | EOF | |
3b681e9d | 5673 | if { (eval echo configure:5674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 JL |
5674 | rm -rf conftest* |
5675 | gt_cv_func_gettext_libc=yes | |
5676 | else | |
5677 | echo "configure: failed program was:" >&5 | |
5678 | cat conftest.$ac_ext >&5 | |
5679 | rm -rf conftest* | |
5680 | gt_cv_func_gettext_libc=no | |
5681 | fi | |
5682 | rm -f conftest* | |
5683 | fi | |
5684 | ||
5685 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
5686 | ||
5687 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
5688 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
3b681e9d | 5689 | echo "configure:5690: checking for bindtextdomain in -lintl" >&5 |
ab87f8c8 JL |
5690 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
5691 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5692 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5693 | else | |
5694 | ac_save_LIBS="$LIBS" | |
5695 | LIBS="-lintl $LIBS" | |
5696 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 5697 | #line 5698 "configure" |
ab87f8c8 JL |
5698 | #include "confdefs.h" |
5699 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5700 | /* We use char because int might match the return type of a gcc2 | |
5701 | builtin and then its argument prototype would still apply. */ | |
5702 | char bindtextdomain(); | |
5703 | ||
5704 | int main() { | |
5705 | bindtextdomain() | |
5706 | ; return 0; } | |
5707 | EOF | |
3b681e9d | 5708 | if { (eval echo configure:5709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 JL |
5709 | rm -rf conftest* |
5710 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5711 | else | |
5712 | echo "configure: failed program was:" >&5 | |
5713 | cat conftest.$ac_ext >&5 | |
5714 | rm -rf conftest* | |
5715 | eval "ac_cv_lib_$ac_lib_var=no" | |
5716 | fi | |
5717 | rm -f conftest* | |
5718 | LIBS="$ac_save_LIBS" | |
5719 | ||
5720 | fi | |
5721 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5722 | echo "$ac_t""yes" 1>&6 | |
5723 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
3b681e9d | 5724 | echo "configure:5725: checking for gettext in libintl" >&5 |
ab87f8c8 JL |
5725 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
5726 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5727 | else | |
5728 | echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6 | |
3b681e9d | 5729 | echo "configure:5730: checking for gettext in -lintl" >&5 |
ab87f8c8 JL |
5730 | ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'` |
5731 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5732 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5733 | else | |
5734 | ac_save_LIBS="$LIBS" | |
5735 | LIBS="-lintl $LIBS" | |
5736 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 5737 | #line 5738 "configure" |
ab87f8c8 JL |
5738 | #include "confdefs.h" |
5739 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5740 | /* We use char because int might match the return type of a gcc2 | |
5741 | builtin and then its argument prototype would still apply. */ | |
5742 | char gettext(); | |
5743 | ||
5744 | int main() { | |
5745 | gettext() | |
5746 | ; return 0; } | |
5747 | EOF | |
3b681e9d | 5748 | if { (eval echo configure:5749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 JL |
5749 | rm -rf conftest* |
5750 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5751 | else | |
5752 | echo "configure: failed program was:" >&5 | |
5753 | cat conftest.$ac_ext >&5 | |
5754 | rm -rf conftest* | |
5755 | eval "ac_cv_lib_$ac_lib_var=no" | |
5756 | fi | |
5757 | rm -f conftest* | |
5758 | LIBS="$ac_save_LIBS" | |
5759 | ||
5760 | fi | |
5761 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5762 | echo "$ac_t""yes" 1>&6 | |
5763 | gt_cv_func_gettext_libintl=yes | |
5764 | else | |
5765 | echo "$ac_t""no" 1>&6 | |
5766 | gt_cv_func_gettext_libintl=no | |
5767 | fi | |
5768 | ||
5769 | fi | |
5770 | ||
5771 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
5772 | else | |
5773 | echo "$ac_t""no" 1>&6 | |
5774 | fi | |
5775 | ||
5776 | fi | |
5777 | ||
380a627a PT |
5778 | if test "$gt_cv_func_gettext_libintl" = "yes"; then |
5779 | LIBS="-lintl $LIBS" | |
5780 | fi | |
5781 | ||
ab87f8c8 JL |
5782 | if test "$gt_cv_func_gettext_libc" = "yes" \ |
5783 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
5784 | cat >> confdefs.h <<\EOF | |
5785 | #define HAVE_GETTEXT 1 | |
5786 | EOF | |
5787 | ||
5788 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
5789 | set dummy msgfmt; ac_word=$2 | |
5790 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b681e9d | 5791 | echo "configure:5792: checking for $ac_word" >&5 |
00036f5c | 5792 | if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then |
ab87f8c8 JL |
5793 | echo $ac_n "(cached) $ac_c" 1>&6 |
5794 | else | |
5795 | case "$MSGFMT" in | |
5796 | /*) | |
00036f5c | 5797 | gcc_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
5798 | ;; |
5799 | *) | |
5800 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
5801 | for ac_dir in $PATH; do | |
5802 | test -z "$ac_dir" && ac_dir=. | |
5803 | if test -f $ac_dir/$ac_word; then | |
5804 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
00036f5c | 5805 | gcc_cv_path_MSGFMT="$ac_dir/$ac_word" |
ab87f8c8 JL |
5806 | break |
5807 | fi | |
5808 | fi | |
5809 | done | |
5810 | IFS="$ac_save_ifs" | |
00036f5c | 5811 | test -z "$gcc_cv_path_MSGFMT" && gcc_cv_path_MSGFMT="no" |
ab87f8c8 JL |
5812 | ;; |
5813 | esac | |
5814 | fi | |
00036f5c | 5815 | MSGFMT="$gcc_cv_path_MSGFMT" |
ab87f8c8 JL |
5816 | if test -n "$MSGFMT"; then |
5817 | echo "$ac_t""$MSGFMT" 1>&6 | |
5818 | else | |
5819 | echo "$ac_t""no" 1>&6 | |
5820 | fi | |
5821 | if test "$MSGFMT" != "no"; then | |
5822 | for ac_func in dcgettext | |
5823 | do | |
5824 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
3b681e9d | 5825 | echo "configure:5826: checking for $ac_func" >&5 |
ab87f8c8 JL |
5826 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5827 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5828 | else | |
5829 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 5830 | #line 5831 "configure" |
ab87f8c8 JL |
5831 | #include "confdefs.h" |
5832 | /* System header to define __stub macros and hopefully few prototypes, | |
5833 | which can conflict with char $ac_func(); below. */ | |
5834 | #include <assert.h> | |
5835 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5836 | /* We use char because int might match the return type of a gcc2 | |
5837 | builtin and then its argument prototype would still apply. */ | |
5838 | char $ac_func(); | |
5839 | ||
5840 | int main() { | |
5841 | ||
5842 | /* The GNU C library defines this for functions which it implements | |
5843 | to always fail with ENOSYS. Some functions are actually named | |
5844 | something starting with __ and the normal name is an alias. */ | |
5845 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5846 | choke me | |
5847 | #else | |
99b09ff3 | 5848 | $ac_func(); |
ab87f8c8 JL |
5849 | #endif |
5850 | ||
5851 | ; return 0; } | |
5852 | EOF | |
3b681e9d | 5853 | if { (eval echo configure:5854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 JL |
5854 | rm -rf conftest* |
5855 | eval "ac_cv_func_$ac_func=yes" | |
5856 | else | |
5857 | echo "configure: failed program was:" >&5 | |
5858 | cat conftest.$ac_ext >&5 | |
5859 | rm -rf conftest* | |
5860 | eval "ac_cv_func_$ac_func=no" | |
5861 | fi | |
5862 | rm -f conftest* | |
5863 | fi | |
5864 | ||
5865 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5866 | echo "$ac_t""yes" 1>&6 | |
5867 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5868 | cat >> confdefs.h <<EOF | |
5869 | #define $ac_tr_func 1 | |
5870 | EOF | |
5871 | ||
5872 | else | |
5873 | echo "$ac_t""no" 1>&6 | |
5874 | fi | |
5875 | done | |
5876 | ||
5877 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
5878 | set dummy gmsgfmt; ac_word=$2 | |
5879 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b681e9d | 5880 | echo "configure:5881: checking for $ac_word" >&5 |
00036f5c | 5881 | if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then |
ab87f8c8 JL |
5882 | echo $ac_n "(cached) $ac_c" 1>&6 |
5883 | else | |
5884 | case "$GMSGFMT" in | |
5885 | /*) | |
00036f5c | 5886 | gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
5887 | ;; |
5888 | ?:/*) | |
00036f5c | 5889 | gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. |
ab87f8c8 JL |
5890 | ;; |
5891 | *) | |
cd9e5e7c | 5892 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
5893 | ac_dummy="$PATH" |
5894 | for ac_dir in $ac_dummy; do | |
ab87f8c8 JL |
5895 | test -z "$ac_dir" && ac_dir=. |
5896 | if test -f $ac_dir/$ac_word; then | |
00036f5c | 5897 | gcc_cv_path_GMSGFMT="$ac_dir/$ac_word" |
ab87f8c8 JL |
5898 | break |
5899 | fi | |
5900 | done | |
5901 | IFS="$ac_save_ifs" | |
00036f5c | 5902 | test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="$MSGFMT" |
ab87f8c8 JL |
5903 | ;; |
5904 | esac | |
5905 | fi | |
00036f5c | 5906 | GMSGFMT="$gcc_cv_path_GMSGFMT" |
ab87f8c8 JL |
5907 | if test -n "$GMSGFMT"; then |
5908 | echo "$ac_t""$GMSGFMT" 1>&6 | |
5909 | else | |
5910 | echo "$ac_t""no" 1>&6 | |
5911 | fi | |
5912 | ||
5913 | # Extract the first word of "xgettext", so it can be a program name with args. | |
5914 | set dummy xgettext; ac_word=$2 | |
5915 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b681e9d | 5916 | echo "configure:5917: checking for $ac_word" >&5 |
00036f5c | 5917 | if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then |
ab87f8c8 JL |
5918 | echo $ac_n "(cached) $ac_c" 1>&6 |
5919 | else | |
5920 | case "$XGETTEXT" in | |
5921 | /*) | |
00036f5c | 5922 | gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. |
ab87f8c8 JL |
5923 | ;; |
5924 | *) | |
5925 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
5926 | for ac_dir in $PATH; do | |
5927 | test -z "$ac_dir" && ac_dir=. | |
5928 | if test -f $ac_dir/$ac_word; then | |
5929 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
00036f5c | 5930 | gcc_cv_path_XGETTEXT="$ac_dir/$ac_word" |
ab87f8c8 JL |
5931 | break |
5932 | fi | |
5933 | fi | |
5934 | done | |
5935 | IFS="$ac_save_ifs" | |
00036f5c | 5936 | test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":" |
ab87f8c8 JL |
5937 | ;; |
5938 | esac | |
5939 | fi | |
00036f5c | 5940 | XGETTEXT="$gcc_cv_path_XGETTEXT" |
ab87f8c8 JL |
5941 | if test -n "$XGETTEXT"; then |
5942 | echo "$ac_t""$XGETTEXT" 1>&6 | |
5943 | else | |
5944 | echo "$ac_t""no" 1>&6 | |
5945 | fi | |
5946 | ||
5947 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 5948 | #line 5949 "configure" |
ab87f8c8 JL |
5949 | #include "confdefs.h" |
5950 | ||
5951 | int main() { | |
5952 | extern int _nl_msg_cat_cntr; | |
5953 | return _nl_msg_cat_cntr | |
5954 | ; return 0; } | |
5955 | EOF | |
3b681e9d | 5956 | if { (eval echo configure:5957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 JL |
5957 | rm -rf conftest* |
5958 | CATOBJEXT=.gmo | |
5959 | DATADIRNAME=share | |
5960 | else | |
5961 | echo "configure: failed program was:" >&5 | |
5962 | cat conftest.$ac_ext >&5 | |
5963 | rm -rf conftest* | |
5964 | CATOBJEXT=.mo | |
5965 | DATADIRNAME=lib | |
5966 | fi | |
5967 | rm -f conftest* | |
5968 | INSTOBJEXT=.mo | |
9fdf713f PT |
5969 | else |
5970 | create_catalogs="no" | |
ab87f8c8 JL |
5971 | fi |
5972 | fi | |
5973 | ||
5974 | else | |
5975 | echo "$ac_t""no" 1>&6 | |
5976 | fi | |
5977 | ||
5978 | ||
5979 | if test "$CATOBJEXT" = "NONE"; then | |
5980 | echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6 | |
3b681e9d | 5981 | echo "configure:5982: checking whether catgets can be used" >&5 |
ab87f8c8 JL |
5982 | # Check whether --with-catgets or --without-catgets was given. |
5983 | if test "${with_catgets+set}" = set; then | |
5984 | withval="$with_catgets" | |
5985 | nls_cv_use_catgets=$withval | |
5986 | else | |
5987 | nls_cv_use_catgets=no | |
5988 | fi | |
5989 | ||
5990 | echo "$ac_t""$nls_cv_use_catgets" 1>&6 | |
5991 | ||
5992 | if test "$nls_cv_use_catgets" = "yes"; then | |
5993 | echo $ac_n "checking for main in -li""... $ac_c" 1>&6 | |
3b681e9d | 5994 | echo "configure:5995: checking for main in -li" >&5 |
ab87f8c8 JL |
5995 | ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'` |
5996 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5997 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5998 | else | |
5999 | ac_save_LIBS="$LIBS" | |
6000 | LIBS="-li $LIBS" | |
6001 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 6002 | #line 6003 "configure" |
ab87f8c8 JL |
6003 | #include "confdefs.h" |
6004 | ||
6005 | int main() { | |
6006 | main() | |
6007 | ; return 0; } | |
6008 | EOF | |
3b681e9d | 6009 | if { (eval echo configure:6010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 JL |
6010 | rm -rf conftest* |
6011 | eval "ac_cv_lib_$ac_lib_var=yes" | |
6012 | else | |
6013 | echo "configure: failed program was:" >&5 | |
6014 | cat conftest.$ac_ext >&5 | |
6015 | rm -rf conftest* | |
6016 | eval "ac_cv_lib_$ac_lib_var=no" | |
6017 | fi | |
6018 | rm -f conftest* | |
6019 | LIBS="$ac_save_LIBS" | |
6020 | ||
6021 | fi | |
6022 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6023 | echo "$ac_t""yes" 1>&6 | |
6024 | ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
6025 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
6026 | cat >> confdefs.h <<EOF | |
6027 | #define $ac_tr_lib 1 | |
6028 | EOF | |
6029 | ||
6030 | LIBS="-li $LIBS" | |
6031 | ||
6032 | else | |
6033 | echo "$ac_t""no" 1>&6 | |
6034 | fi | |
6035 | ||
6036 | echo $ac_n "checking for catgets""... $ac_c" 1>&6 | |
3b681e9d | 6037 | echo "configure:6038: checking for catgets" >&5 |
ab87f8c8 JL |
6038 | if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then |
6039 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6040 | else | |
6041 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 6042 | #line 6043 "configure" |
ab87f8c8 JL |
6043 | #include "confdefs.h" |
6044 | /* System header to define __stub macros and hopefully few prototypes, | |
6045 | which can conflict with char catgets(); below. */ | |
6046 | #include <assert.h> | |
6047 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6048 | /* We use char because int might match the return type of a gcc2 | |
6049 | builtin and then its argument prototype would still apply. */ | |
6050 | char catgets(); | |
6051 | ||
6052 | int main() { | |
6053 | ||
6054 | /* The GNU C library defines this for functions which it implements | |
6055 | to always fail with ENOSYS. Some functions are actually named | |
6056 | something starting with __ and the normal name is an alias. */ | |
6057 | #if defined (__stub_catgets) || defined (__stub___catgets) | |
6058 | choke me | |
6059 | #else | |
99b09ff3 | 6060 | catgets(); |
ab87f8c8 JL |
6061 | #endif |
6062 | ||
6063 | ; return 0; } | |
6064 | EOF | |
3b681e9d | 6065 | if { (eval echo configure:6066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 JL |
6066 | rm -rf conftest* |
6067 | eval "ac_cv_func_catgets=yes" | |
6068 | else | |
6069 | echo "configure: failed program was:" >&5 | |
6070 | cat conftest.$ac_ext >&5 | |
6071 | rm -rf conftest* | |
6072 | eval "ac_cv_func_catgets=no" | |
6073 | fi | |
6074 | rm -f conftest* | |
6075 | fi | |
6076 | ||
6077 | if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then | |
6078 | echo "$ac_t""yes" 1>&6 | |
6079 | cat >> confdefs.h <<\EOF | |
6080 | #define HAVE_CATGETS 1 | |
6081 | EOF | |
6082 | ||
6083 | INTLOBJS="\$(CATOBJS)" | |
6084 | # Extract the first word of "gencat", so it can be a program name with args. | |
6085 | set dummy gencat; ac_word=$2 | |
6086 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b681e9d | 6087 | echo "configure:6088: checking for $ac_word" >&5 |
00036f5c | 6088 | if eval "test \"`echo '$''{'gcc_cv_path_GENCAT'+set}'`\" = set"; then |
ab87f8c8 JL |
6089 | echo $ac_n "(cached) $ac_c" 1>&6 |
6090 | else | |
6091 | case "$GENCAT" in | |
6092 | /*) | |
00036f5c | 6093 | gcc_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path. |
ab87f8c8 JL |
6094 | ;; |
6095 | ?:/*) | |
00036f5c | 6096 | gcc_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path. |
ab87f8c8 JL |
6097 | ;; |
6098 | *) | |
cd9e5e7c | 6099 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
6100 | ac_dummy="$PATH" |
6101 | for ac_dir in $ac_dummy; do | |
ab87f8c8 JL |
6102 | test -z "$ac_dir" && ac_dir=. |
6103 | if test -f $ac_dir/$ac_word; then | |
00036f5c | 6104 | gcc_cv_path_GENCAT="$ac_dir/$ac_word" |
ab87f8c8 JL |
6105 | break |
6106 | fi | |
6107 | done | |
6108 | IFS="$ac_save_ifs" | |
00036f5c | 6109 | test -z "$gcc_cv_path_GENCAT" && gcc_cv_path_GENCAT="no" |
ab87f8c8 JL |
6110 | ;; |
6111 | esac | |
6112 | fi | |
00036f5c | 6113 | GENCAT="$gcc_cv_path_GENCAT" |
ab87f8c8 JL |
6114 | if test -n "$GENCAT"; then |
6115 | echo "$ac_t""$GENCAT" 1>&6 | |
6116 | else | |
6117 | echo "$ac_t""no" 1>&6 | |
6118 | fi | |
6119 | if test "$GENCAT" != "no"; then | |
6120 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
6121 | set dummy gmsgfmt; ac_word=$2 | |
6122 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b681e9d | 6123 | echo "configure:6124: checking for $ac_word" >&5 |
00036f5c | 6124 | if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then |
ab87f8c8 JL |
6125 | echo $ac_n "(cached) $ac_c" 1>&6 |
6126 | else | |
6127 | case "$GMSGFMT" in | |
6128 | /*) | |
00036f5c | 6129 | gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6130 | ;; |
6131 | ?:/*) | |
00036f5c | 6132 | gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. |
ab87f8c8 JL |
6133 | ;; |
6134 | *) | |
cd9e5e7c | 6135 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
6136 | ac_dummy="$PATH" |
6137 | for ac_dir in $ac_dummy; do | |
ab87f8c8 JL |
6138 | test -z "$ac_dir" && ac_dir=. |
6139 | if test -f $ac_dir/$ac_word; then | |
00036f5c | 6140 | gcc_cv_path_GMSGFMT="$ac_dir/$ac_word" |
ab87f8c8 JL |
6141 | break |
6142 | fi | |
6143 | done | |
6144 | IFS="$ac_save_ifs" | |
00036f5c | 6145 | test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="no" |
ab87f8c8 JL |
6146 | ;; |
6147 | esac | |
6148 | fi | |
00036f5c | 6149 | GMSGFMT="$gcc_cv_path_GMSGFMT" |
ab87f8c8 JL |
6150 | if test -n "$GMSGFMT"; then |
6151 | echo "$ac_t""$GMSGFMT" 1>&6 | |
6152 | else | |
6153 | echo "$ac_t""no" 1>&6 | |
6154 | fi | |
6155 | ||
6156 | if test "$GMSGFMT" = "no"; then | |
6157 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
6158 | set dummy msgfmt; ac_word=$2 | |
6159 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b681e9d | 6160 | echo "configure:6161: checking for $ac_word" >&5 |
00036f5c | 6161 | if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then |
ab87f8c8 JL |
6162 | echo $ac_n "(cached) $ac_c" 1>&6 |
6163 | else | |
6164 | case "$GMSGFMT" in | |
6165 | /*) | |
00036f5c | 6166 | gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6167 | ;; |
6168 | *) | |
6169 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6170 | for ac_dir in $PATH; do | |
6171 | test -z "$ac_dir" && ac_dir=. | |
6172 | if test -f $ac_dir/$ac_word; then | |
6173 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
00036f5c | 6174 | gcc_cv_path_GMSGFMT="$ac_dir/$ac_word" |
ab87f8c8 JL |
6175 | break |
6176 | fi | |
6177 | fi | |
6178 | done | |
6179 | IFS="$ac_save_ifs" | |
00036f5c | 6180 | test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="msgfmt" |
ab87f8c8 JL |
6181 | ;; |
6182 | esac | |
6183 | fi | |
00036f5c | 6184 | GMSGFMT="$gcc_cv_path_GMSGFMT" |
ab87f8c8 JL |
6185 | if test -n "$GMSGFMT"; then |
6186 | echo "$ac_t""$GMSGFMT" 1>&6 | |
6187 | else | |
6188 | echo "$ac_t""no" 1>&6 | |
6189 | fi | |
6190 | ||
cab10d56 | 6191 | if test "$GMSGFMT" = "msgfmt"; then |
17297c41 PT |
6192 | create_catalogs="no" |
6193 | fi | |
ab87f8c8 JL |
6194 | fi |
6195 | # Extract the first word of "xgettext", so it can be a program name with args. | |
6196 | set dummy xgettext; ac_word=$2 | |
6197 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b681e9d | 6198 | echo "configure:6199: checking for $ac_word" >&5 |
00036f5c | 6199 | if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then |
ab87f8c8 JL |
6200 | echo $ac_n "(cached) $ac_c" 1>&6 |
6201 | else | |
6202 | case "$XGETTEXT" in | |
6203 | /*) | |
00036f5c | 6204 | gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. |
ab87f8c8 JL |
6205 | ;; |
6206 | *) | |
6207 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6208 | for ac_dir in $PATH; do | |
6209 | test -z "$ac_dir" && ac_dir=. | |
6210 | if test -f $ac_dir/$ac_word; then | |
6211 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
00036f5c | 6212 | gcc_cv_path_XGETTEXT="$ac_dir/$ac_word" |
ab87f8c8 JL |
6213 | break |
6214 | fi | |
6215 | fi | |
6216 | done | |
6217 | IFS="$ac_save_ifs" | |
00036f5c | 6218 | test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":" |
ab87f8c8 JL |
6219 | ;; |
6220 | esac | |
6221 | fi | |
00036f5c | 6222 | XGETTEXT="$gcc_cv_path_XGETTEXT" |
ab87f8c8 JL |
6223 | if test -n "$XGETTEXT"; then |
6224 | echo "$ac_t""$XGETTEXT" 1>&6 | |
6225 | else | |
6226 | echo "$ac_t""no" 1>&6 | |
6227 | fi | |
6228 | ||
6229 | USE_INCLUDED_LIBINTL=yes | |
6230 | CATOBJEXT=.cat | |
6231 | INSTOBJEXT=.cat | |
6232 | DATADIRNAME=lib | |
6233 | INTLDEPS='$(top_builddir)/intl/libintl.a' | |
6234 | INTLLIBS=$INTLDEPS | |
6235 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
6236 | nls_cv_header_intl=intl/libintl.h | |
6237 | nls_cv_header_libgt=intl/libgettext.h | |
6238 | fi | |
6239 | else | |
6240 | echo "$ac_t""no" 1>&6 | |
6241 | fi | |
6242 | ||
6243 | fi | |
6244 | fi | |
6245 | ||
6246 | if test "$CATOBJEXT" = "NONE"; then | |
6247 | nls_cv_use_gnu_gettext=yes | |
6248 | fi | |
6249 | fi | |
6250 | ||
6251 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
6252 | INTLOBJS="\$(GETTOBJS)" | |
6253 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
6254 | set dummy msgfmt; ac_word=$2 | |
6255 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b681e9d | 6256 | echo "configure:6257: checking for $ac_word" >&5 |
00036f5c | 6257 | if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then |
ab87f8c8 JL |
6258 | echo $ac_n "(cached) $ac_c" 1>&6 |
6259 | else | |
6260 | case "$MSGFMT" in | |
6261 | /*) | |
00036f5c | 6262 | gcc_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6263 | ;; |
6264 | *) | |
6265 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6266 | for ac_dir in $PATH; do | |
6267 | test -z "$ac_dir" && ac_dir=. | |
6268 | if test -f $ac_dir/$ac_word; then | |
6269 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
00036f5c | 6270 | gcc_cv_path_MSGFMT="$ac_dir/$ac_word" |
ab87f8c8 JL |
6271 | break |
6272 | fi | |
6273 | fi | |
6274 | done | |
6275 | IFS="$ac_save_ifs" | |
00036f5c | 6276 | test -z "$gcc_cv_path_MSGFMT" && gcc_cv_path_MSGFMT="msgfmt" |
ab87f8c8 JL |
6277 | ;; |
6278 | esac | |
6279 | fi | |
00036f5c | 6280 | MSGFMT="$gcc_cv_path_MSGFMT" |
ab87f8c8 JL |
6281 | if test -n "$MSGFMT"; then |
6282 | echo "$ac_t""$MSGFMT" 1>&6 | |
6283 | else | |
6284 | echo "$ac_t""no" 1>&6 | |
6285 | fi | |
6286 | ||
6287 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
6288 | set dummy gmsgfmt; ac_word=$2 | |
6289 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b681e9d | 6290 | echo "configure:6291: checking for $ac_word" >&5 |
00036f5c | 6291 | if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then |
ab87f8c8 JL |
6292 | echo $ac_n "(cached) $ac_c" 1>&6 |
6293 | else | |
6294 | case "$GMSGFMT" in | |
6295 | /*) | |
00036f5c | 6296 | gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6297 | ;; |
6298 | ?:/*) | |
00036f5c | 6299 | gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. |
ab87f8c8 JL |
6300 | ;; |
6301 | *) | |
cd9e5e7c | 6302 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
6303 | ac_dummy="$PATH" |
6304 | for ac_dir in $ac_dummy; do | |
ab87f8c8 JL |
6305 | test -z "$ac_dir" && ac_dir=. |
6306 | if test -f $ac_dir/$ac_word; then | |
00036f5c | 6307 | gcc_cv_path_GMSGFMT="$ac_dir/$ac_word" |
ab87f8c8 JL |
6308 | break |
6309 | fi | |
6310 | done | |
6311 | IFS="$ac_save_ifs" | |
00036f5c | 6312 | test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="$MSGFMT" |
ab87f8c8 JL |
6313 | ;; |
6314 | esac | |
6315 | fi | |
00036f5c | 6316 | GMSGFMT="$gcc_cv_path_GMSGFMT" |
ab87f8c8 JL |
6317 | if test -n "$GMSGFMT"; then |
6318 | echo "$ac_t""$GMSGFMT" 1>&6 | |
6319 | else | |
6320 | echo "$ac_t""no" 1>&6 | |
6321 | fi | |
6322 | ||
cab10d56 | 6323 | if test "$MSGFMT" = "msgfmt" && test "$GMSGFMT" = "msgfmt"; then |
17297c41 | 6324 | create_catalogs="no" |
17297c41 | 6325 | fi |
ab87f8c8 JL |
6326 | # Extract the first word of "xgettext", so it can be a program name with args. |
6327 | set dummy xgettext; ac_word=$2 | |
6328 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3b681e9d | 6329 | echo "configure:6330: checking for $ac_word" >&5 |
00036f5c | 6330 | if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then |
ab87f8c8 JL |
6331 | echo $ac_n "(cached) $ac_c" 1>&6 |
6332 | else | |
6333 | case "$XGETTEXT" in | |
6334 | /*) | |
00036f5c | 6335 | gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. |
ab87f8c8 JL |
6336 | ;; |
6337 | *) | |
6338 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6339 | for ac_dir in $PATH; do | |
6340 | test -z "$ac_dir" && ac_dir=. | |
6341 | if test -f $ac_dir/$ac_word; then | |
6342 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
00036f5c | 6343 | gcc_cv_path_XGETTEXT="$ac_dir/$ac_word" |
ab87f8c8 JL |
6344 | break |
6345 | fi | |
6346 | fi | |
6347 | done | |
6348 | IFS="$ac_save_ifs" | |
00036f5c | 6349 | test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":" |
ab87f8c8 JL |
6350 | ;; |
6351 | esac | |
6352 | fi | |
00036f5c | 6353 | XGETTEXT="$gcc_cv_path_XGETTEXT" |
ab87f8c8 JL |
6354 | if test -n "$XGETTEXT"; then |
6355 | echo "$ac_t""$XGETTEXT" 1>&6 | |
6356 | else | |
6357 | echo "$ac_t""no" 1>&6 | |
6358 | fi | |
6359 | ||
6360 | ||
6361 | USE_INCLUDED_LIBINTL=yes | |
6362 | CATOBJEXT=.gmo | |
6363 | INSTOBJEXT=.mo | |
6364 | DATADIRNAME=share | |
6365 | INTLDEPS='$(top_builddir)/intl/libintl.a' | |
6366 | INTLLIBS=$INTLDEPS | |
6367 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
6368 | nls_cv_header_intl=intl/libintl.h | |
6369 | nls_cv_header_libgt=intl/libgettext.h | |
6370 | fi | |
6371 | ||
6372 | if test "$XGETTEXT" != ":"; then | |
6373 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
6374 | : ; | |
6375 | else | |
6376 | echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6 | |
6377 | XGETTEXT=":" | |
6378 | fi | |
6379 | fi | |
6380 | ||
17297c41 PT |
6381 | |
6382 | ||
ab87f8c8 JL |
6383 | # We need to process the po/ directory. |
6384 | POSUB=po | |
6385 | else | |
6386 | DATADIRNAME=share | |
6387 | nls_cv_header_intl=intl/libintl.h | |
6388 | nls_cv_header_libgt=intl/libgettext.h | |
6389 | fi | |
6390 | ||
6391 | ||
6392 | ||
6393 | ||
6394 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
6395 | # because some of the sources are only built for this goal. | |
6396 | if test "$PACKAGE" = gettext; then | |
6397 | USE_NLS=yes | |
6398 | USE_INCLUDED_LIBINTL=yes | |
6399 | fi | |
6400 | ||
6401 | for lang in $ALL_LINGUAS; do | |
6402 | GMOFILES="$GMOFILES $lang.gmo" | |
6403 | POFILES="$POFILES $lang.po" | |
6404 | done | |
6405 | ||
6406 | ||
6407 | ||
6408 | ||
6409 | ||
6410 | ||
6411 | ||
6412 | ||
6413 | ||
6414 | ||
6415 | ||
6416 | ||
6417 | ||
6418 | ||
4d0230e1 | 6419 | if test "x$create_catalogs" = "xno"; then |
9fdf713f PT |
6420 | echo "configure: warning: No program for building catalogs found -> building disabled" 1>&2 |
6421 | fi | |
6422 | ||
17297c41 | 6423 | if test "x$CATOBJEXT" != "x" && test "x$create_catalogs" != "xno" ; then |
ab87f8c8 JL |
6424 | if test "x$ALL_LINGUAS" = "x"; then |
6425 | LINGUAS= | |
6426 | else | |
6427 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
3b681e9d | 6428 | echo "configure:6429: checking for catalogs to be installed" >&5 |
47f01856 PT |
6429 | if test "x$LINGUAS" = "x"; then |
6430 | LINGUAS=$ALL_LINGUAS | |
6431 | else | |
6432 | NEW_LINGUAS= | |
6433 | for lang in $ALL_LINGUAS; do | |
6434 | case " $LINGUAS " in | |
6435 | *" $lang "*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
6436 | esac | |
6437 | done | |
6438 | LINGUAS=$NEW_LINGUAS | |
6439 | fi | |
ab87f8c8 JL |
6440 | echo "$ac_t""$LINGUAS" 1>&6 |
6441 | fi | |
6442 | ||
6443 | if test -n "$LINGUAS"; then | |
6444 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
6445 | fi | |
6446 | fi | |
6447 | ||
6448 | if test $ac_cv_header_locale_h = yes; then | |
6449 | INCLUDE_LOCALE_H="#include <locale.h>" | |
6450 | else | |
6451 | INCLUDE_LOCALE_H="\ | |
6452 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
6453 | fi | |
6454 | ||
6455 | ||
6456 | test -d intl || mkdir intl | |
6457 | if test "$CATOBJEXT" = ".cat"; then | |
6458 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
6459 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
3b681e9d | 6460 | echo "configure:6461: checking for linux/version.h" >&5 |
ab87f8c8 JL |
6461 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6462 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6463 | else | |
6464 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 6465 | #line 6466 "configure" |
ab87f8c8 JL |
6466 | #include "confdefs.h" |
6467 | #include <linux/version.h> | |
6468 | EOF | |
6469 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3b681e9d | 6470 | { (eval echo configure:6471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 6471 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
ab87f8c8 JL |
6472 | if test -z "$ac_err"; then |
6473 | rm -rf conftest* | |
6474 | eval "ac_cv_header_$ac_safe=yes" | |
6475 | else | |
6476 | echo "$ac_err" >&5 | |
6477 | echo "configure: failed program was:" >&5 | |
6478 | cat conftest.$ac_ext >&5 | |
6479 | rm -rf conftest* | |
6480 | eval "ac_cv_header_$ac_safe=no" | |
6481 | fi | |
6482 | rm -f conftest* | |
6483 | fi | |
6484 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
6485 | echo "$ac_t""yes" 1>&6 | |
6486 | msgformat=linux | |
6487 | else | |
6488 | echo "$ac_t""no" 1>&6 | |
6489 | msgformat=xopen | |
6490 | fi | |
6491 | ||
6492 | ||
6493 | sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed | |
6494 | fi | |
6495 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
6496 | $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed | |
6497 | ||
6498 | if test "$PACKAGE" = "gettext"; then | |
6499 | GT_NO="#NO#" | |
6500 | GT_YES= | |
6501 | else | |
6502 | GT_NO= | |
6503 | GT_YES="#YES#" | |
6504 | fi | |
6505 | ||
6506 | ||
6507 | ||
6508 | MKINSTALLDIRS= | |
6509 | if test -n "$ac_aux_dir"; then | |
6510 | MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" | |
6511 | fi | |
6512 | if test -z "$MKINSTALLDIRS"; then | |
6513 | MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" | |
6514 | fi | |
6515 | ||
6516 | ||
6517 | l= | |
6518 | ||
6519 | ||
6520 | test -d po || mkdir po | |
6521 | if test "x$srcdir" != "x."; then | |
6522 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
6523 | posrcprefix="$srcdir/" | |
6524 | else | |
6525 | posrcprefix="../$srcdir/" | |
6526 | fi | |
6527 | else | |
6528 | posrcprefix="../" | |
6529 | fi | |
6530 | rm -f po/POTFILES | |
6531 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
6532 | < $srcdir/po/POTFILES.in > po/POTFILES | |
6533 | ||
6534 | XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT" | |
6535 | ||
f4ab28e3 MK |
6536 | # Windows32 Registry support for specifying GCC installation paths. |
6537 | # Check whether --enable-win32-registry or --disable-win32-registry was given. | |
6538 | if test "${enable_win32_registry+set}" = set; then | |
6539 | enableval="$enable_win32_registry" | |
6540 | : | |
6541 | fi | |
6542 | ||
4e70264f ZW |
6543 | case $host_os in |
6544 | win32 | pe | cygwin* | mingw32* | uwin*) | |
f4ab28e3 | 6545 | echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6 |
3b681e9d | 6546 | echo "configure:6547: checking whether windows registry support is requested" >&5 |
9dd53f2c | 6547 | if test "x$enable_win32_registry" != xno; then |
f4ab28e3 MK |
6548 | cat >> confdefs.h <<\EOF |
6549 | #define ENABLE_WIN32_REGISTRY 1 | |
6550 | EOF | |
6551 | ||
6552 | echo "$ac_t""yes" 1>&6 | |
4e70264f ZW |
6553 | |
6554 | echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6 | |
3b681e9d | 6555 | echo "configure:6556: checking for library containing RegOpenKeyExA" >&5 |
4e70264f ZW |
6556 | if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then |
6557 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6558 | else | |
6559 | ac_func_search_save_LIBS="$LIBS" | |
6560 | ac_cv_search_RegOpenKeyExA="no" | |
6561 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 6562 | #line 6563 "configure" |
4e70264f ZW |
6563 | #include "confdefs.h" |
6564 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6565 | /* We use char because int might match the return type of a gcc2 | |
6566 | builtin and then its argument prototype would still apply. */ | |
6567 | char RegOpenKeyExA(); | |
6568 | ||
6569 | int main() { | |
6570 | RegOpenKeyExA() | |
6571 | ; return 0; } | |
6572 | EOF | |
3b681e9d | 6573 | if { (eval echo configure:6574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4e70264f ZW |
6574 | rm -rf conftest* |
6575 | ac_cv_search_RegOpenKeyExA="none required" | |
6576 | else | |
6577 | echo "configure: failed program was:" >&5 | |
6578 | cat conftest.$ac_ext >&5 | |
6579 | fi | |
6580 | rm -f conftest* | |
6581 | test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do | |
6582 | LIBS="-l$i $ac_func_search_save_LIBS" | |
6583 | cat > conftest.$ac_ext <<EOF | |
3b681e9d | 6584 | #line 6585 "configure" |
4e70264f ZW |
6585 | #include "confdefs.h" |
6586 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6587 | /* We use char because int might match the return type of a gcc2 | |
6588 | builtin and then its argument prototype would still apply. */ | |
6589 | char RegOpenKeyExA(); | |
6590 | ||
6591 | int main() { | |
6592 | RegOpenKeyExA() | |
6593 | ; return 0; } | |
6594 | EOF | |
3b681e9d | 6595 | if { (eval echo configure:6596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4e70264f ZW |
6596 | rm -rf conftest* |
6597 | ac_cv_search_RegOpenKeyExA="-l$i" | |
6598 | break | |
6599 | else | |
6600 | echo "configure: failed program was:" >&5 | |
6601 | cat conftest.$ac_ext >&5 | |
6602 | fi | |
6603 | rm -f conftest* | |
6604 | done | |
6605 | LIBS="$ac_func_search_save_LIBS" | |
6606 | fi | |
6607 | ||
6608 | echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6 | |
6609 | if test "$ac_cv_search_RegOpenKeyExA" != "no"; then | |
6610 | test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS" | |
6611 | ||
6612 | else : | |
6613 | ||
6614 | fi | |
f4ab28e3 MK |
6615 | else |
6616 | echo "$ac_t""no" 1>&6 | |
6617 | fi | |
6618 | ||
6619 | # Check if user specified a different registry key. | |
9dd53f2c | 6620 | case "x${enable_win32_registry}" in |
f4ab28e3 MK |
6621 | x | xyes) |
6622 | # default. | |
6623 | gcc_cv_win32_registry_key="$VERSION" | |
6624 | ;; | |
6625 | xno) | |
6626 | # no registry lookup. | |
6627 | gcc_cv_win32_registry_key='' | |
6628 | ;; | |
6629 | *) | |
6630 | # user-specified key. | |
6631 | gcc_cv_win32_registry_key="$enable_win32_registry" | |
6632 | ;; | |
6633 | esac | |
6634 | ||
9dd53f2c | 6635 | if test "x$enable_win32_registry" != xno; then |
f4ab28e3 | 6636 | echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6 |
3b681e9d | 6637 | echo "configure:6638: checking registry key on windows hosts" >&5 |
f4ab28e3 MK |
6638 | cat >> confdefs.h <<EOF |
6639 | #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key" | |
6640 | EOF | |
6641 | ||
6642 | echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6 | |
6643 | fi | |
4e70264f ZW |
6644 | ;; |
6645 | esac | |
f4ab28e3 | 6646 | |
ab87f8c8 JL |
6647 | # Get an absolute path to the GCC top-level source directory |
6648 | holddir=`pwd` | |
6649 | cd $srcdir | |
6650 | topdir=`pwd` | |
6651 | cd $holddir | |
6652 | ||
6653 | # Conditionalize the makefile for this host machine. | |
6654 | # Make-host contains the concatenation of all host makefile fragments | |
6655 | # [there can be more than one]. This file is built by configure.frag. | |
6656 | host_overrides=Make-host | |
6657 | dep_host_xmake_file= | |
6658 | for f in .. ${host_xmake_file} | |
6659 | do | |
6660 | if test -f ${srcdir}/config/$f | |
6661 | then | |
6662 | dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f" | |
6663 | fi | |
6664 | done | |
6665 | ||
6666 | # Conditionalize the makefile for this target machine. | |
6667 | # Make-target contains the concatenation of all host makefile fragments | |
6668 | # [there can be more than one]. This file is built by configure.frag. | |
6669 | target_overrides=Make-target | |
6670 | dep_tmake_file= | |
6671 | for f in .. ${tmake_file} | |
6672 | do | |
6673 | if test -f ${srcdir}/config/$f | |
6674 | then | |
6675 | dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f" | |
6676 | fi | |
6677 | done | |
6678 | ||
6679 | # If the host doesn't support symlinks, modify CC in | |
6680 | # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. | |
6681 | # Otherwise, we can use "CC=$(CC)". | |
6682 | rm -f symtest.tem | |
6683 | if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null | |
6684 | then | |
6685 | cc_set_by_configure="\$(CC)" | |
5aa82ace | 6686 | quoted_cc_set_by_configure="\$(CC)" |
ab87f8c8 JL |
6687 | stage_prefix_set_by_configure="\$(STAGE_PREFIX)" |
6688 | else | |
6689 | rm -f symtest.tem | |
6690 | if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null | |
6691 | then | |
6692 | symbolic_link="cp -p" | |
6693 | else | |
6694 | symbolic_link="cp" | |
6695 | fi | |
6696 | cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" | |
5aa82ace | 6697 | quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`" |
ab87f8c8 JL |
6698 | stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" |
6699 | fi | |
6700 | rm -f symtest.tem | |
6701 | ||
6702 | out_object_file=`basename $out_file .c`.o | |
6703 | ||
6704 | tm_file_list= | |
6705 | for f in $tm_file; do | |
64ccbc99 | 6706 | case $f in |
d02af173 ZW |
6707 | ansidecl.h ) |
6708 | tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
6709 | defaults.h ) | |
64ccbc99 KG |
6710 | tm_file_list="${tm_file_list} $f" ;; |
6711 | *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;; | |
6712 | esac | |
ab87f8c8 JL |
6713 | done |
6714 | ||
11642c3a ZW |
6715 | tm_p_file_list= |
6716 | for f in $tm_p_file; do | |
6717 | tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" | |
6718 | done | |
6719 | ||
ab87f8c8 JL |
6720 | host_xm_file_list= |
6721 | for f in $host_xm_file; do | |
64ccbc99 | 6722 | case $f in |
d02af173 ZW |
6723 | ansidecl.h ) |
6724 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
6725 | auto-host.h | defaults.h ) | |
64ccbc99 KG |
6726 | host_xm_file_list="${host_xm_file_list} $f" ;; |
6727 | *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;; | |
6728 | esac | |
ab87f8c8 JL |
6729 | done |
6730 | ||
6731 | build_xm_file_list= | |
6732 | for f in $build_xm_file; do | |
64ccbc99 | 6733 | case $f in |
d02af173 ZW |
6734 | ansidecl.h ) |
6735 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
6736 | auto-build.h | auto-host.h | defaults.h ) | |
64ccbc99 KG |
6737 | build_xm_file_list="${build_xm_file_list} $f" ;; |
6738 | *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;; | |
6739 | esac | |
ab87f8c8 JL |
6740 | done |
6741 | ||
6742 | # Define macro CROSS_COMPILE in compilation | |
6743 | # if this is a cross-compiler. | |
6744 | # Also use all.cross instead of all.internal | |
6745 | # and add cross-make to Makefile. | |
6746 | cross_overrides="/dev/null" | |
6747 | if test x$host != x$target | |
6748 | then | |
6749 | cross_defines="CROSS=-DCROSS_COMPILE" | |
6750 | cross_overrides="${topdir}/cross-make" | |
6751 | fi | |
6752 | ||
b39d221a EC |
6753 | # If this is a cross-compiler that does not |
6754 | # have its own set of headers then define | |
6755 | # inhibit_libc | |
6756 | ||
fecd6201 ZW |
6757 | # If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS. |
6758 | # This prevents libgcc2 from containing any code which requires libc | |
6759 | # support. | |
b39d221a EC |
6760 | inhibit_libc= |
6761 | if test x$host != x$target && test x$with_headers = x; then | |
6762 | inhibit_libc=-Dinhibit_libc | |
6763 | else | |
6764 | if test x$with_newlib = xyes; then | |
6765 | inhibit_libc=-Dinhibit_libc | |
6766 | fi | |
6767 | fi | |
6768 | ||
6769 | ||
ab87f8c8 JL |
6770 | # When building gcc with a cross-compiler, we need to fix a few things. |
6771 | # This must come after cross-make as we want all.build to override | |
6772 | # all.cross. | |
6773 | build_overrides="/dev/null" | |
6774 | if test x$build != x$host | |
6775 | then | |
6776 | build_overrides="${topdir}/build-make" | |
6777 | fi | |
6778 | ||
6779 | # Expand extra_headers to include complete path. | |
6780 | # This substitutes for lots of t-* files. | |
6781 | extra_headers_list= | |
6782 | if test "x$extra_headers" = x | |
6783 | then true | |
6784 | else | |
6785 | # Prepend ${srcdir}/ginclude/ to every entry in extra_headers. | |
6786 | for file in $extra_headers; | |
6787 | do | |
6788 | extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}" | |
6789 | done | |
6790 | fi | |
6791 | ||
6792 | if test x$use_collect2 = xno; then | |
6793 | use_collect2= | |
6794 | fi | |
6795 | ||
6796 | # Add a definition of USE_COLLECT2 if system wants one. | |
2cc07db4 | 6797 | if test x$use_collect2 != x |
ab87f8c8 | 6798 | then |
2cc07db4 RH |
6799 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
6800 | xm_defines="${xm_defines} USE_COLLECT2" | |
ab87f8c8 JL |
6801 | fi |
6802 | ||
ab87f8c8 JL |
6803 | # If we have gas in the build tree, make a link to it. |
6804 | if test -f ../gas/Makefile; then | |
6805 | rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null | |
6806 | fi | |
6807 | ||
6808 | # If we have nm in the build tree, make a link to it. | |
6809 | if test -f ../binutils/Makefile; then | |
6810 | rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null | |
6811 | fi | |
6812 | ||
6813 | # If we have ld in the build tree, make a link to it. | |
6814 | if test -f ../ld/Makefile; then | |
2cc07db4 | 6815 | rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null |
ab87f8c8 JL |
6816 | fi |
6817 | ||
981d4858 JM |
6818 | # Figure out what assembler we will be using. |
6819 | echo $ac_n "checking what assembler to use""... $ac_c" 1>&6 | |
3b681e9d | 6820 | echo "configure:6821: checking what assembler to use" >&5 |
ab87f8c8 | 6821 | gcc_cv_as= |
981d4858 JM |
6822 | gcc_cv_gas_major_version= |
6823 | gcc_cv_gas_minor_version= | |
ab87f8c8 JL |
6824 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas |
6825 | if test -x "$DEFAULT_ASSEMBLER"; then | |
6826 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
6827 | elif test -x "$AS"; then | |
6828 | gcc_cv_as="$AS" | |
6829 | elif test -x as$host_exeext; then | |
6830 | # Build using assembler in the current directory. | |
6831 | gcc_cv_as=./as$host_exeext | |
6832 | elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then | |
6833 | # Single tree build which includes gas. | |
6834 | for f in $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in | |
6835 | do | |
6836 | gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` | |
6837 | if test x$gcc_cv_gas_version != x; then | |
6838 | break | |
6839 | fi | |
6840 | done | |
6841 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
6842 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
981d4858 | 6843 | fi |
9e423e6d | 6844 | |
981d4858 | 6845 | if test "x$gcc_cv_as" = x -a x$host = x$target; then |
9e423e6d | 6846 | # Native build. |
779243f7 JL |
6847 | # Search the same directories that the installed compiler will |
6848 | # search. Else we may find the wrong assembler and lose. If we | |
6849 | # do not find a suitable assembler binary, then try the user's | |
6850 | # path. | |
6851 | # | |
6852 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
6853 | # user's path. Unfortunately, there is no good way to get at the | |
6854 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
6855 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
6856 | # to be fixed as part of the make/configure rewrite too. | |
6857 | ||
6858 | if test "x$exec_prefix" = xNONE; then | |
6859 | if test "x$prefix" = xNONE; then | |
6860 | test_prefix=/usr/local | |
6861 | else | |
6862 | test_prefix=$prefix | |
6863 | fi | |
6864 | else | |
6865 | test_prefix=$exec_prefix | |
6866 | fi | |
6867 | ||
6868 | # If the loop below does not find an assembler, then use whatever | |
6869 | # one we can find in the users's path. | |
6870 | # user's path. | |
16a0fe50 | 6871 | gcc_cv_as=as$host_exeext |
779243f7 JL |
6872 | |
6873 | test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \ | |
6874 | $test_prefix/lib/gcc-lib/$target \ | |
6875 | /usr/lib/gcc/$target/$gcc_version \ | |
6876 | /usr/lib/gcc/$target \ | |
6877 | $test_prefix/$target/bin/$target/$gcc_version \ | |
6878 | $test_prefix/$target/bin \ | |
6879 | /usr/libexec \ | |
6880 | /usr/ccs/gcc \ | |
6881 | /usr/ccs/bin \ | |
6882 | /udk/usr/ccs/bin \ | |
6883 | /bsd43/usr/lib/cmplrs/cc \ | |
6884 | /usr/cross64/usr/bin \ | |
6885 | /usr/lib/cmplrs/cc \ | |
6886 | /sysv/usr/lib/cmplrs/cc \ | |
6887 | /svr4/usr/lib/cmplrs/cc \ | |
6888 | /usr/bin" | |
6889 | ||
6890 | for dir in $test_dirs; do | |
6891 | if test -f $dir/as$host_exeext; then | |
6892 | gcc_cv_as=$dir/as$host_exeext | |
6893 | break; | |
6894 | fi | |
6895 | done | |
9e423e6d | 6896 | fi |
981d4858 JM |
6897 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
6898 | echo "$ac_t"""newly built gas"" 1>&6 | |
6899 | else | |
6900 | echo "$ac_t""$gcc_cv_as" 1>&6 | |
6901 | fi | |
6902 | ||
6903 | # Figure out what nm we will be using. | |
6904 | echo $ac_n "checking what nm to use""... $ac_c" 1>&6 | |
3b681e9d | 6905 | echo "configure:6906: checking what nm to use" >&5 |
981d4858 JM |
6906 | if test -x nm$host_exeext; then |
6907 | gcc_cv_nm=./nm$host_exeext | |
6908 | elif test x$host = x$target; then | |
6909 | # Native build. | |
6910 | gcc_cv_nm=nm$host_exeext | |
6911 | fi | |
6912 | echo "$ac_t""$gcc_cv_nm" 1>&6 | |
6913 | ||
6914 | # Figure out what assembler alignment features are present. | |
6915 | echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6 | |
3b681e9d | 6916 | echo "configure:6917: checking assembler alignment features" >&5 |
9d147085 | 6917 | gcc_cv_as_alignment_features=none |
981d4858 JM |
6918 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
6919 | # Gas version 2.6 and later support for .balign and .p2align. | |
6920 | # bytes to skip when using .p2align. | |
6921 | 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 | |
6922 | gcc_cv_as_alignment_features=".balign and .p2align" | |
6923 | cat >> confdefs.h <<\EOF | |
6924 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 | |
6925 | EOF | |
6926 | ||
6927 | fi | |
6928 | # Gas version 2.8 and later support specifying the maximum | |
6929 | # bytes to skip when using .p2align. | |
6930 | 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 | |
6931 | gcc_cv_as_alignment_features=".p2align including maximum skip" | |
6932 | cat >> confdefs.h <<\EOF | |
6933 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 | |
6934 | EOF | |
6935 | ||
6936 | fi | |
6937 | elif test x$gcc_cv_as != x; then | |
00ccc16d JL |
6938 | # Check if we have .balign and .p2align |
6939 | echo ".balign 4" > conftest.s | |
6940 | echo ".p2align 2" >> conftest.s | |
6941 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
6942 | gcc_cv_as_alignment_features=".balign and .p2align" | |
6943 | cat >> confdefs.h <<\EOF | |
6944 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 | |
6945 | EOF | |
6946 | ||
6947 | fi | |
6948 | rm -f conftest.s conftest.o | |
9e423e6d JW |
6949 | # Check if specifying the maximum bytes to skip when |
6950 | # using .p2align is supported. | |
6951 | echo ".p2align 4,,7" > conftest.s | |
6952 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
6953 | gcc_cv_as_alignment_features=".p2align including maximum skip" | |
6954 | cat >> confdefs.h <<\EOF | |
6955 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 | |
6956 | EOF | |
6957 | ||
6958 | fi | |
6959 | rm -f conftest.s conftest.o | |
6960 | fi | |
6961 | echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6 | |
6962 | ||
d1accaa3 | 6963 | echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6 |
3b681e9d | 6964 | echo "configure:6965: checking assembler subsection support" >&5 |
9d147085 | 6965 | gcc_cv_as_subsections=no |
981d4858 JM |
6966 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
6967 | 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 | |
6968 | gcc_cv_as_subsections="working .subsection -1" | |
6969 | fi | |
6970 | elif test x$gcc_cv_as != x; then | |
d1accaa3 JJ |
6971 | # Check if we have .subsection |
6972 | echo ".subsection 1" > conftest.s | |
6973 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
6974 | gcc_cv_as_subsections=".subsection" | |
d1accaa3 JJ |
6975 | if test x$gcc_cv_nm != x; then |
6976 | cat > conftest.s <<EOF | |
6977 | conftest_label1: .word 0 | |
6978 | .subsection -1 | |
6979 | conftest_label2: .word 0 | |
6980 | .previous | |
6981 | EOF | |
6982 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
6983 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
6984 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
1b015bec AO |
6985 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then |
6986 | : | |
6987 | else | |
d1accaa3 | 6988 | gcc_cv_as_subsections="working .subsection -1" |
d1accaa3 JJ |
6989 | fi |
6990 | fi | |
6991 | fi | |
6992 | fi | |
6993 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
981d4858 JM |
6994 | fi |
6995 | if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then | |
6996 | cat >> confdefs.h <<\EOF | |
6997 | #define HAVE_GAS_SUBSECTION_ORDERING 1 | |
6998 | EOF | |
6999 | ||
d1accaa3 JJ |
7000 | fi |
7001 | echo "$ac_t""$gcc_cv_as_subsections" 1>&6 | |
7002 | ||
12822146 | 7003 | echo $ac_n "checking assembler weak support""... $ac_c" 1>&6 |
3b681e9d | 7004 | echo "configure:7005: checking assembler weak support" >&5 |
9d147085 | 7005 | gcc_cv_as_weak=no |
981d4858 JM |
7006 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
7007 | 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 | |
7008 | gcc_cv_as_weak="yes" | |
7009 | fi | |
7010 | elif test x$gcc_cv_as != x; then | |
12822146 JL |
7011 | # Check if we have .weak |
7012 | echo " .weak foobar" > conftest.s | |
7013 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
12822146 JL |
7014 | gcc_cv_as_weak="yes" |
7015 | fi | |
7016 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
981d4858 JM |
7017 | fi |
7018 | if test x"$gcc_cv_as_weak" = xyes; then | |
7019 | cat >> confdefs.h <<\EOF | |
7020 | #define HAVE_GAS_WEAK 1 | |
7021 | EOF | |
7022 | ||
12822146 JL |
7023 | fi |
7024 | echo "$ac_t""$gcc_cv_as_weak" 1>&6 | |
7025 | ||
6a9c5260 | 7026 | echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6 |
3b681e9d | 7027 | echo "configure:7028: checking assembler hidden support" >&5 |
9d147085 | 7028 | gcc_cv_as_hidden=no |
981d4858 JM |
7029 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
7030 | if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 10 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
7031 | gcc_cv_as_hidden="yes" | |
7032 | fi | |
7033 | elif test x$gcc_cv_as != x; then | |
6a9c5260 UD |
7034 | # Check if we have .hidden |
7035 | echo " .hidden foobar" > conftest.s | |
7036 | echo "foobar:" >> conftest.s | |
7037 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
6a9c5260 UD |
7038 | gcc_cv_as_hidden="yes" |
7039 | fi | |
7040 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
981d4858 JM |
7041 | fi |
7042 | if test x"$gcc_cv_as_hidden" = xyes; then | |
7043 | cat >> confdefs.h <<\EOF | |
7044 | #define HAVE_GAS_HIDDEN 1 | |
7045 | EOF | |
7046 | ||
6a9c5260 UD |
7047 | fi |
7048 | echo "$ac_t""$gcc_cv_as_hidden" 1>&6 | |
7049 | ||
b7460f24 | 7050 | echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6 |
3b681e9d | 7051 | echo "configure:7052: checking assembler leb128 support" >&5 |
fbe42b1b | 7052 | gcc_cv_as_leb128=no |
b7460f24 | 7053 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
fbe42b1b | 7054 | 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 |
7055 | gcc_cv_as_leb128="yes" |
7056 | fi | |
7057 | elif test x$gcc_cv_as != x; then | |
7058 | # Check if we have .[us]leb128, and support symbol arithmetic with it. | |
7059 | cat > conftest.s <<EOF | |
7060 | .data | |
7061 | .uleb128 L2 - L1 | |
7062 | L1: | |
7063 | .uleb128 1280 | |
7064 | .sleb128 -1010 | |
7065 | L2: | |
7066 | EOF | |
7067 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
78e766a0 RH |
7068 | gcc_cv_as_leb128="yes" |
7069 | ||
7070 | # GAS versions before 2.11 do not support uleb128, | |
7071 | # despite appearing to. | |
7072 | # ??? There exists an elf-specific test that will crash | |
7073 | # the assembler. Perhaps it's better to figure out whether | |
7074 | # arbitrary sections are supported and try the test. | |
7075 | as_ver=`$gcc_cv_as --version 2>/dev/null | head -1` | |
7076 | if echo "$as_ver" | grep GNU > /dev/null; then | |
7077 | as_ver=`echo $as_ver | sed -e 's/.* //'` | |
7078 | as_major=`echo $as_ver | sed 's/\..*//'` | |
3d399d67 | 7079 | as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` |
78e766a0 RH |
7080 | if test $as_major -eq 2 -a $as_minor -lt 11; then |
7081 | gcc_cv_as_leb128="no" | |
7082 | fi | |
fbe42b1b | 7083 | fi |
b7460f24 RH |
7084 | fi |
7085 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
7086 | fi | |
7087 | if test x"$gcc_cv_as_leb128" = xyes; then | |
7088 | cat >> confdefs.h <<\EOF | |
7089 | #define HAVE_AS_LEB128 1 | |
7090 | EOF | |
7091 | ||
7092 | fi | |
7093 | echo "$ac_t""$gcc_cv_as_leb128" 1>&6 | |
7094 | ||
c64688ae | 7095 | echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6 |
3b681e9d | 7096 | echo "configure:7097: checking assembler eh_frame optimization" >&5 |
c64688ae RH |
7097 | gcc_cv_as_eh_frame=no |
7098 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then | |
7099 | 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 | |
7100 | gcc_cv_as_eh_frame="yes" | |
7101 | fi | |
7102 | elif test x$gcc_cv_as != x; then | |
7103 | # Check if this is GAS. | |
41948db5 SS |
7104 | as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1` |
7105 | rm -f a.out 2> /dev/null | |
c64688ae RH |
7106 | if echo "$as_ver" | grep GNU > /dev/null; then |
7107 | # Versions up to and including 2.11.0 may mis-optimize | |
7108 | # .eh_frame data. Try something. | |
7109 | cat > conftest.s <<EOF | |
7110 | .text | |
7111 | .LFB1: | |
7112 | .4byte 0 | |
7113 | .L1: | |
7114 | .4byte 0 | |
7115 | .LFE1: | |
7116 | .section .eh_frame,"aw",@progbits | |
7117 | __FRAME_BEGIN__: | |
7118 | .4byte .LECIE1-.LSCIE1 | |
7119 | .LSCIE1: | |
7120 | .4byte 0x0 | |
7121 | .byte 0x1 | |
7122 | .ascii "z\0" | |
7123 | .byte 0x1 | |
7124 | .byte 0x78 | |
7125 | .byte 0x1a | |
7126 | .byte 0x0 | |
7127 | .byte 0x4 | |
7128 | .4byte 1 | |
7129 | .p2align 1 | |
7130 | .LECIE1: | |
7131 | .LSFDE1: | |
7132 | .4byte .LEFDE1-.LASFDE1 | |
7133 | .LASFDE1: | |
7134 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
7135 | .4byte .LFB1 | |
7136 | .4byte .LFE1-.LFB1 | |
7137 | .byte 0x4 | |
7138 | .4byte .LFE1-.LFB1 | |
7139 | .byte 0x4 | |
7140 | .4byte .L1-.LFB1 | |
7141 | .LEFDE1: | |
7142 | EOF | |
01efb963 | 7143 | cat > conftest.lit <<EOF |
c64688ae RH |
7144 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
7145 | 0010 01000000 12000000 18000000 00000000 ................ | |
7146 | 0020 08000000 04080000 0044 .........D | |
01efb963 AS |
7147 | EOF |
7148 | cat > conftest.big <<EOF | |
7149 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... | |
7150 | 0010 00000001 00000012 00000018 00000000 ................ | |
7151 | 0020 00000008 04000000 0844 .........D | |
c64688ae RH |
7152 | EOF |
7153 | # If the assembler didn't choke, and we can objdump, | |
7154 | # and we got the correct data, then succeed. | |
7155 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ | |
7156 | && objdump -s -j .eh_frame conftest.o 2>/dev/null \ | |
7157 | | tail -3 > conftest.got \ | |
01efb963 AS |
7158 | && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ |
7159 | || cmp conftest.big conftest.got > /dev/null 2>&1; } | |
c64688ae RH |
7160 | then |
7161 | gcc_cv_as_eh_frame="yes" | |
7162 | else | |
7163 | gcc_cv_as_eh_frame="bad" | |
7164 | if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then | |
7165 | cat >> confdefs.h <<\EOF | |
7166 | #define USE_AS_TRADITIONAL_FORMAT 1 | |
7167 | EOF | |
7168 | ||
7169 | fi | |
7170 | fi | |
7171 | fi | |
7172 | rm -f conftest.* | |
7173 | fi | |
7174 | echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6 | |
7175 | ||
201556f0 | 7176 | echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6 |
3b681e9d | 7177 | echo "configure:7178: checking assembler section merging support" >&5 |
201556f0 JJ |
7178 | gcc_cv_as_shf_merge=no |
7179 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then | |
7180 | 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 | 7181 | gcc_cv_as_shf_merge=yes |
201556f0 JJ |
7182 | fi |
7183 | elif test x$gcc_cv_as != x; then | |
7184 | # Check if we support SHF_MERGE sections | |
7185 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s | |
a8b7afb9 | 7186 | if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then |
201556f0 JJ |
7187 | gcc_cv_as_shf_merge=yes |
7188 | fi | |
7189 | rm -f conftest.s conftest.o | |
7190 | fi | |
7191 | if test x"$gcc_cv_as_shf_merge" = xyes; then | |
7192 | cat >> confdefs.h <<\EOF | |
7193 | #define HAVE_GAS_SHF_MERGE 1 | |
7194 | EOF | |
7195 | ||
7196 | fi | |
7197 | echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6 | |
7198 | ||
1cb36a98 RH |
7199 | case "$target" in |
7200 | sparc*-*-*) | |
7201 | echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6 | |
3b681e9d | 7202 | echo "configure:7203: checking assembler .register pseudo-op support" >&5 |
5b68c389 AO |
7203 | if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then |
7204 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7205 | else | |
7206 | ||
7207 | gcc_cv_as_register_pseudo_op=unknown | |
7208 | if test x$gcc_cv_as != x; then | |
7209 | # Check if we have .register | |
7210 | echo ".register %g2, #scratch" > conftest.s | |
7211 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
1cb36a98 | 7212 | gcc_cv_as_register_pseudo_op=yes |
5b68c389 AO |
7213 | else |
7214 | gcc_cv_as_register_pseudo_op=no | |
7215 | fi | |
7216 | rm -f conftest.s conftest.o | |
7217 | fi | |
7218 | ||
7219 | fi | |
7220 | ||
7221 | echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6 | |
7222 | if test "x$gcc_cv_as_register_pseudo_op" = xyes; then | |
7223 | cat >> confdefs.h <<\EOF | |
1cb36a98 RH |
7224 | #define HAVE_AS_REGISTER_PSEUDO_OP 1 |
7225 | EOF | |
7226 | ||
1cb36a98 | 7227 | fi |
1cb36a98 | 7228 | |
e95b1e6a | 7229 | echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6 |
3b681e9d | 7230 | echo "configure:7231: checking assembler supports -relax" >&5 |
e95b1e6a JJ |
7231 | if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then |
7232 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7233 | else | |
7234 | ||
7235 | gcc_cv_as_relax_opt=unknown | |
7236 | if test x$gcc_cv_as != x; then | |
7237 | # Check if gas supports -relax | |
7238 | echo ".text" > conftest.s | |
7239 | if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then | |
7240 | gcc_cv_as_relax_opt=yes | |
7241 | else | |
7242 | gcc_cv_as_relax_opt=no | |
7243 | fi | |
7244 | rm -f conftest.s conftest.o | |
7245 | fi | |
7246 | ||
7247 | fi | |
7248 | ||
7249 | echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6 | |
7250 | if test "x$gcc_cv_as_relax_opt" = xyes; then | |
7251 | cat >> confdefs.h <<\EOF | |
7252 | #define HAVE_AS_RELAX_OPTION 1 | |
7253 | EOF | |
7254 | ||
7255 | fi | |
7256 | ||
5b68c389 AO |
7257 | case "$tm_file" in |
7258 | *64*) | |
7259 | echo $ac_n "checking for 64 bit support in assembler ($gcc_cv_as)""... $ac_c" 1>&6 | |
3b681e9d | 7260 | echo "configure:7261: checking for 64 bit support in assembler ($gcc_cv_as)" >&5 |
5b68c389 AO |
7261 | if eval "test \"`echo '$''{'gcc_cv_as_flags64'+set}'`\" = set"; then |
7262 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7263 | else | |
7264 | ||
7265 | if test -n "$gcc_cv_as"; then | |
7266 | echo ".xword foo" > conftest.s | |
7267 | gcc_cv_as_flags64=no | |
8a90b95d | 7268 | for flag in "-xarch=v9" "-64 -Av9"; do |
5b68c389 AO |
7269 | if $gcc_cv_as $flag -o conftest.o conftest.s \ |
7270 | > /dev/null 2>&1; then | |
7271 | gcc_cv_as_flags64=$flag | |
7272 | break | |
7273 | fi | |
7274 | done | |
7275 | rm -f conftest.s conftest.o | |
7276 | else | |
7277 | if test "$gas" = yes; then | |
7278 | gcc_cv_as_flags64="-64 -Av9" | |
7279 | else | |
7280 | gcc_cv_as_flags64="-xarch=v9" | |
7281 | fi | |
1cb36a98 | 7282 | fi |
5b68c389 AO |
7283 | |
7284 | fi | |
7285 | ||
7286 | echo "$ac_t""$gcc_cv_as_flags64" 1>&6 | |
7287 | if test "x$gcc_cv_as_flags64" = xno; then | |
7288 | ||
7289 | tmake_file=`echo " $tmake_file " | sed -e 's, sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'` | |
7290 | dep_tmake_file=`echo " $dep_tmake_file " | sed -e 's, [^ ]*/config/sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'` | |
7291 | ||
7292 | else | |
7293 | cat >> confdefs.h <<EOF | |
7294 | #define AS_SPARC64_FLAG "$gcc_cv_as_flags64" | |
7295 | EOF | |
7296 | ||
1cb36a98 | 7297 | fi |
5b68c389 AO |
7298 | ;; |
7299 | *) gcc_cv_as_flags64=${gcc_cv_as_flags64-no} | |
7300 | ;; | |
7301 | esac | |
7302 | ||
7303 | if test "x$gcc_cv_as_flags64" != xno; then | |
7304 | echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6 | |
3b681e9d | 7305 | echo "configure:7306: checking for assembler offsetable %lo() support" >&5 |
5b68c389 AO |
7306 | if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then |
7307 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7308 | else | |
7309 | ||
7310 | gcc_cv_as_offsetable_lo10=unknown | |
7311 | if test "x$gcc_cv_as" != x; then | |
7312 | # Check if assembler has offsetable %lo() | |
7313 | echo "or %g1, %lo(ab) + 12, %g1" > conftest.s | |
7314 | echo "or %g1, %lo(ab + 12), %g1" > conftest1.s | |
7315 | if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \ | |
7316 | > /dev/null 2>&1 && | |
7317 | $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \ | |
7318 | > /dev/null 2>&1; then | |
7319 | if cmp conftest.o conftest1.o > /dev/null 2>&1; then | |
7320 | gcc_cv_as_offsetable_lo10=no | |
7321 | else | |
7322 | gcc_cv_as_offsetable_lo10=yes | |
7323 | fi | |
7324 | else | |
7325 | gcc_cv_as_offsetable_lo10=no | |
7326 | fi | |
7327 | rm -f conftest.s conftest.o conftest1.s conftest1.o | |
7328 | fi | |
7329 | ||
7330 | fi | |
7331 | ||
7332 | echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6 | |
7333 | if test "x$gcc_cv_as_offsetable_lo10" = xyes; then | |
7334 | cat >> confdefs.h <<\EOF | |
1cb36a98 RH |
7335 | #define HAVE_AS_OFFSETABLE_LO10 1 |
7336 | EOF | |
7337 | ||
1cb36a98 | 7338 | fi |
1cb36a98 | 7339 | fi |
43160d01 | 7340 | |
1cb36a98 RH |
7341 | ;; |
7342 | ||
7343 | i[34567]86-*-*) | |
7344 | echo $ac_n "checking assembler instructions""... $ac_c" 1>&6 | |
3b681e9d | 7345 | echo "configure:7346: checking assembler instructions" >&5 |
1cb36a98 | 7346 | gcc_cv_as_instructions= |
981d4858 JM |
7347 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
7348 | 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 | |
7349 | gcc_cv_as_instructions="filds fists" | |
7350 | fi | |
7351 | elif test x$gcc_cv_as != x; then | |
53b5ce19 JW |
7352 | set "filds fists" "filds mem; fists mem" |
7353 | while test $# -gt 0 | |
7354 | do | |
7355 | echo "$2" > conftest.s | |
7356 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7357 | gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" " | |
53b5ce19 JW |
7358 | fi |
7359 | shift 2 | |
7360 | done | |
7361 | rm -f conftest.s conftest.o | |
1cb36a98 | 7362 | fi |
981d4858 JM |
7363 | if test x"$gcc_cv_as_instructions" != x; then |
7364 | cat >> confdefs.h <<EOF | |
ee7692d2 | 7365 | #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1 |
981d4858 JM |
7366 | EOF |
7367 | ||
7368 | fi | |
1cb36a98 RH |
7369 | echo "$ac_t""$gcc_cv_as_instructions" 1>&6 |
7370 | ;; | |
7371 | esac | |
53b5ce19 | 7372 | |
9d147085 | 7373 | echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6 |
3b681e9d | 7374 | echo "configure:7375: checking assembler dwarf2 debug_line support" >&5 |
9d147085 RH |
7375 | gcc_cv_as_dwarf2_debug_line=no |
7376 | # ??? Not all targets support dwarf2 debug_line, even within a version | |
7377 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
7378 | # info to the output file. So, as supported targets are added to gas 2.11, | |
7379 | # add some instruction here to (also) show we expect this might work. | |
7380 | # ??? Once 2.11 is released, probably need to add first known working | |
7381 | # version to the per-target configury. | |
7382 | case "$target" in | |
bfabbc3c | 7383 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-*) |
9d147085 RH |
7384 | insn="nop" |
7385 | ;; | |
7386 | ia64*-*-*) | |
7387 | insn="nop 0" | |
7388 | ;; | |
7389 | esac | |
7390 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; | |
7391 | then | |
7392 | if test "$gcc_cv_gas_major_version" -eq 2 \ | |
7393 | -a "$gcc_cv_gas_minor_version" -ge 11 \ | |
7394 | -o "$gcc_cv_gas_major_version" -gt 2 \ | |
7395 | && grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
7396 | && test x"$insn" != x ; then | |
7397 | gcc_cv_as_dwarf2_debug_line="yes" | |
7398 | fi | |
7399 | elif test x$gcc_cv_as != x -a x"$insn" != x ; then | |
acc187f5 RH |
7400 | echo ' .file 1 "conftest.s"' > conftest.s |
7401 | echo ' .loc 1 3 0' >> conftest.s | |
9d147085 | 7402 | echo " $insn" >> conftest.s |
981975b6 | 7403 | # ??? This fails with non-gnu grep. |
9d147085 RH |
7404 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ |
7405 | && grep debug_line conftest.o > /dev/null 2>&1 ; then | |
981975b6 RH |
7406 | # The .debug_line file table must be in the exact order that |
7407 | # we specified the files, since these indicies are also used | |
7408 | # by DW_AT_decl_file. Approximate this test by testing if | |
7409 | # the assembler bitches if the same index is assigned twice. | |
7410 | echo ' .file 1 "foo.s"' > conftest.s | |
7411 | echo ' .file 1 "bar.s"' >> conftest.s | |
7412 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 | |
7413 | then | |
7414 | gcc_cv_as_dwarf2_debug_line="no" | |
7415 | else | |
7416 | gcc_cv_as_dwarf2_debug_line="yes" | |
7417 | fi | |
9d147085 RH |
7418 | fi |
7419 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
7420 | fi | |
7421 | if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then | |
7422 | cat >> confdefs.h <<\EOF | |
7423 | #define HAVE_AS_DWARF2_DEBUG_LINE 1 | |
7424 | EOF | |
7425 | ||
7426 | fi | |
7427 | echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6 | |
7428 | ||
861bb6c1 | 7429 | # Figure out what language subdirectories are present. |
71205e0b MH |
7430 | # Look if the user specified --enable-languages="..."; if not, use |
7431 | # the environment variable $LANGUAGES if defined. $LANGUAGES might | |
7432 | # go away some day. | |
7433 | if test x"${enable_languages+set}" != xset; then | |
7434 | if test x"${LANGUAGES+set}" = xset; then | |
7435 | enable_languages="`echo ${LANGUAGES} | tr ' ' ','`" | |
7436 | else | |
7437 | enable_languages=all | |
7438 | fi | |
d6c6b553 PE |
7439 | else |
7440 | if test x"${enable_languages}" = x; then | |
7441 | { echo "configure: error: --enable-languages needs at least one argument" 1>&2; exit 1; } | |
7442 | fi | |
71205e0b | 7443 | fi |
75382c6d TT |
7444 | |
7445 | # First scan to see if an enabled language requires some other language. | |
7446 | # We assume that a given config-lang.in will list all the language | |
7447 | # front ends it requires, even if some are required indirectly. | |
7448 | for lang in ${srcdir}/*/config-lang.in .. | |
7449 | do | |
7450 | case $lang in | |
7451 | ..) | |
7452 | ;; | |
7453 | # The odd quoting in the next line works around | |
7454 | # an apparent bug in bash 1.12 on linux. | |
7455 | ${srcdir}/[*]/config-lang.in) | |
7456 | ;; | |
7457 | *) | |
7458 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
7459 | this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang` | |
7460 | for other in $this_lang_requires | |
7461 | do | |
7462 | case ,${enable_languages}, in | |
7463 | *,$other,*) | |
7464 | ;; | |
7465 | *,all,*) | |
7466 | ;; | |
1bf17cc4 | 7467 | *,$lang_alias,*) |
75382c6d TT |
7468 | enable_languages="$enable_languages,$other" |
7469 | ;; | |
7470 | esac | |
7471 | done | |
7472 | ;; | |
7473 | esac | |
7474 | done | |
7475 | ||
861bb6c1 JL |
7476 | subdirs= |
7477 | for lang in ${srcdir}/*/config-lang.in .. | |
7478 | do | |
7479 | case $lang in | |
7480 | ..) ;; | |
7481 | # The odd quoting in the next line works around | |
7482 | # an apparent bug in bash 1.12 on linux. | |
7483 | ${srcdir}/[*]/config-lang.in) ;; | |
71205e0b MH |
7484 | *) |
7485 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
2b60b2cb AO |
7486 | this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang` |
7487 | build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang` | |
71205e0b MH |
7488 | if test "x$lang_alias" = x |
7489 | then | |
7490 | echo "$lang doesn't set \$language." 1>&2 | |
7491 | exit 1 | |
7492 | fi | |
2b60b2cb AO |
7493 | case ${build_by_default},${enable_languages}, in |
7494 | *,$lang_alias,*) add_this_lang=yes ;; | |
7495 | no,*) add_this_lang=no ;; | |
7496 | *,all,*) add_this_lang=yes ;; | |
7497 | *) add_this_lang=no ;; | |
7498 | esac | |
71205e0b MH |
7499 | if test x"${add_this_lang}" = xyes; then |
7500 | case $lang in | |
7501 | ${srcdir}/ada/config-lang.in) | |
1ffc5c6e | 7502 | if test x$have_gnat = xyes ; then |
71205e0b MH |
7503 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" |
7504 | fi | |
7505 | ;; | |
7506 | *) | |
7507 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" | |
7508 | ;; | |
7509 | esac | |
7510 | fi | |
7511 | ;; | |
861bb6c1 JL |
7512 | esac |
7513 | done | |
7514 | ||
f24af81b TT |
7515 | # Make gthr-default.h if we have a thread file. |
7516 | gthread_flags= | |
75bffa71 | 7517 | if test $thread_file != single; then |
f24af81b | 7518 | rm -f gthr-default.h |
db0d1ed9 | 7519 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h |
f24af81b TT |
7520 | gthread_flags=-DHAVE_GTHR_DEFAULT |
7521 | fi | |
7522 | ||
7523 | ||
81bf3d9e RH |
7524 | # Find out what GC implementation we want, or may, use. |
7525 | # Check whether --with-gc or --without-gc was given. | |
7526 | if test "${with_gc+set}" = set; then | |
7527 | withval="$with_gc" | |
7528 | case "$withval" in | |
7529 | simple | page) | |
7530 | GGC=ggc-$withval | |
7531 | ;; | |
7532 | *) | |
7533 | { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; } | |
7534 | ;; | |
7535 | esac | |
7536 | else | |
005537df | 7537 | GGC=ggc-page |
81bf3d9e RH |
7538 | fi |
7539 | ||
7540 | ||
7541 | echo "Using $GGC for garbage collection." | |
7542 | ||
3c809ba4 | 7543 | # Use the system's zlib library. |
b8dad04b ZW |
7544 | zlibdir=-L../zlib |
7545 | zlibinc="-I\$(srcdir)/../zlib" | |
3c809ba4 AG |
7546 | # Check whether --with-system-zlib or --without-system-zlib was given. |
7547 | if test "${with_system_zlib+set}" = set; then | |
7548 | withval="$with_system_zlib" | |
7549 | zlibdir= | |
7550 | zlibinc= | |
7551 | ||
7552 | fi | |
7553 | ||
7554 | ||
7555 | ||
7556 | ||
dc6746e7 PT |
7557 | |
7558 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 | |
3b681e9d | 7559 | echo "configure:7560: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
dc6746e7 PT |
7560 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
7561 | if test "${enable_maintainer_mode+set}" = set; then | |
7562 | enableval="$enable_maintainer_mode" | |
7563 | maintainer_mode=$enableval | |
7564 | else | |
7565 | maintainer_mode=no | |
7566 | fi | |
7567 | ||
7568 | ||
7569 | echo "$ac_t""$maintainer_mode" 1>&6 | |
7570 | ||
7571 | if test "$maintainer_mode" = "yes"; then | |
7572 | MAINT='' | |
7573 | else | |
7574 | MAINT='#' | |
7575 | fi | |
7576 | ||
531073e7 RH |
7577 | # With Setjmp/Longjmp based exception handling. |
7578 | # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. | |
7579 | if test "${enable_sjlj_exceptions+set}" = set; then | |
7580 | enableval="$enable_sjlj_exceptions" | |
7581 | sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` | |
7582 | cat >> confdefs.h <<EOF | |
7583 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj | |
7584 | EOF | |
7585 | ||
7586 | fi | |
7587 | ||
7588 | ||
861bb6c1 JL |
7589 | # Make empty files to contain the specs and options for each language. |
7590 | # Then add #include lines to for a compiler that has specs and/or options. | |
7591 | ||
7592 | lang_specs_files= | |
7593 | lang_options_files= | |
3103b7db ML |
7594 | lang_tree_files= |
7595 | rm -f specs.h options.h gencheck.h | |
7596 | touch specs.h options.h gencheck.h | |
861bb6c1 JL |
7597 | for subdir in . $subdirs |
7598 | do | |
75bffa71 | 7599 | if test -f $srcdir/$subdir/lang-specs.h; then |
861bb6c1 JL |
7600 | echo "#include \"$subdir/lang-specs.h\"" >>specs.h |
7601 | lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" | |
7602 | fi | |
75bffa71 | 7603 | if test -f $srcdir/$subdir/lang-options.h; then |
861bb6c1 JL |
7604 | echo "#include \"$subdir/lang-options.h\"" >>options.h |
7605 | lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h" | |
7606 | fi | |
3103b7db ML |
7607 | if test -f $srcdir/$subdir/$subdir-tree.def; then |
7608 | echo "#include \"$subdir/$subdir-tree.def\"" >>gencheck.h | |
7609 | lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" | |
7610 | fi | |
861bb6c1 JL |
7611 | done |
7612 | ||
7613 | # These (without "all_") are set in each config-lang.in. | |
7614 | # `language' must be a single word so is spelled singularly. | |
7615 | all_languages= | |
7616 | all_boot_languages= | |
7617 | all_compilers= | |
7618 | all_stagestuff= | |
7619 | all_diff_excludes= | |
3ec83fc2 | 7620 | all_outputs='Makefile intl/Makefile po/Makefile.in fixinc/Makefile gccbug mklibgcc' |
861bb6c1 JL |
7621 | # List of language makefile fragments. |
7622 | all_lang_makefiles= | |
7623 | all_headers= | |
7624 | all_lib2funcs= | |
7625 | ||
7626 | # Add the language fragments. | |
7627 | # Languages are added via two mechanisms. Some information must be | |
7628 | # recorded in makefile variables, these are defined in config-lang.in. | |
7629 | # We accumulate them and plug them into the main Makefile. | |
7630 | # The other mechanism is a set of hooks for each of the main targets | |
7631 | # like `clean', `install', etc. | |
7632 | ||
7633 | language_fragments="Make-lang" | |
7634 | language_hooks="Make-hooks" | |
861bb6c1 JL |
7635 | |
7636 | for s in .. $subdirs | |
7637 | do | |
75bffa71 | 7638 | if test $s != ".." |
861bb6c1 JL |
7639 | then |
7640 | language= | |
7641 | boot_language= | |
7642 | compilers= | |
7643 | stagestuff= | |
7644 | diff_excludes= | |
7645 | headers= | |
7646 | outputs= | |
7647 | lib2funcs= | |
7648 | . ${srcdir}/$s/config-lang.in | |
75bffa71 | 7649 | if test "x$language" = x |
861bb6c1 JL |
7650 | then |
7651 | echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2 | |
7652 | exit 1 | |
7653 | fi | |
72aaffbd ZW |
7654 | all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in" |
7655 | if test -f ${srcdir}/$s/Makefile.in | |
7656 | then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in" | |
7657 | fi | |
861bb6c1 | 7658 | all_languages="$all_languages $language" |
75bffa71 | 7659 | if test "x$boot_language" = xyes |
861bb6c1 JL |
7660 | then |
7661 | all_boot_languages="$all_boot_languages $language" | |
7662 | fi | |
7663 | all_compilers="$all_compilers $compilers" | |
7664 | all_stagestuff="$all_stagestuff $stagestuff" | |
7665 | all_diff_excludes="$all_diff_excludes $diff_excludes" | |
7666 | all_headers="$all_headers $headers" | |
7667 | all_outputs="$all_outputs $outputs" | |
861bb6c1 JL |
7668 | all_lib2funcs="$all_lib2funcs $lib2funcs" |
7669 | fi | |
7670 | done | |
7671 | ||
cbc59f01 DD |
7672 | check_languages= |
7673 | for language in .. $all_languages | |
7674 | do | |
7675 | if test $language != ".." | |
7676 | then | |
7677 | check_languages="$check_languages check-$language" | |
7678 | fi | |
7679 | done | |
7680 | ||
861bb6c1 JL |
7681 | # Since we can't use `::' targets, we link each language in |
7682 | # with a set of hooks, reached indirectly via lang.${target}. | |
7683 | ||
7684 | rm -f Make-hooks | |
7685 | touch Make-hooks | |
7686 | target_list="all.build all.cross start.encap rest.encap \ | |
7687 | info dvi \ | |
7688 | install-normal install-common install-info install-man \ | |
436a88a6 | 7689 | uninstall \ |
861bb6c1 JL |
7690 | mostlyclean clean distclean extraclean maintainer-clean \ |
7691 | stage1 stage2 stage3 stage4" | |
7692 | for t in $target_list | |
7693 | do | |
7694 | x= | |
ab87f8c8 | 7695 | for lang in .. $all_languages |
861bb6c1 | 7696 | do |
ab87f8c8 JL |
7697 | if test $lang != ".."; then |
7698 | x="$x $lang.$t" | |
861bb6c1 JL |
7699 | fi |
7700 | done | |
7701 | echo "lang.$t: $x" >> Make-hooks | |
7702 | done | |
7703 | ||
cc06d68c | 7704 | # Create .gdbinit. |
861bb6c1 | 7705 | |
cc06d68c GP |
7706 | echo "dir ." > .gdbinit |
7707 | echo "dir ${srcdir}" >> .gdbinit | |
7708 | if test x$gdb_needs_out_file_path = xyes | |
7709 | then | |
7710 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
7711 | fi | |
7712 | if test "x$subdirs" != x; then | |
7713 | for s in $subdirs | |
7714 | do | |
7715 | echo "dir ${srcdir}/$s" >> .gdbinit | |
7716 | done | |
861bb6c1 | 7717 | fi |
cc06d68c | 7718 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 7719 | |
88111b26 JL |
7720 | # Define variables host_canonical and build_canonical |
7721 | # because some Cygnus local changes in the Makefile depend on them. | |
7722 | build_canonical=${build} | |
7723 | host_canonical=${host} | |
7724 | target_subdir= | |
75bffa71 | 7725 | if test "${host}" != "${target}" ; then |
924c96eb | 7726 | target_subdir=${target_alias}/ |
88111b26 JL |
7727 | fi |
7728 | ||
7729 | ||
7730 | ||
7731 | ||
8f8d3278 NC |
7732 | # If $(exec_prefix) exists and is not the same as $(prefix), then compute an |
7733 | # absolute path for gcc_tooldir based on inserting the number of up-directory | |
7734 | # movements required to get from $(exec_prefix) to $(prefix) into the basic | |
7735 | # $(libsubdir)/@(unlibsubdir) based path. | |
82cbf8f7 JL |
7736 | # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel |
7737 | # make and thus we'd get different behavior depending on where we built the | |
7738 | # sources. | |
5949a9fc | 7739 | if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then |
d062c304 JL |
7740 | gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)' |
7741 | else | |
8f8d3278 NC |
7742 | # An explanation of the sed strings: |
7743 | # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix' | |
7744 | # -e 's|/$||' match a trailing forward slash and eliminates it | |
7745 | # -e 's|^[^/]|/|' forces the string to start with a forward slash (*) | |
7746 | # -e 's|/[^/]*|../|g' replaces each occurance of /<directory> with ../ | |
7747 | # | |
7748 | # (*) Note this pattern overwrites the first character of the string | |
7749 | # with a forward slash if one is not already present. This is not a | |
7750 | # problem because the exact names of the sub-directories concerned is | |
7751 | # unimportant, just the number of them matters. | |
7752 | # | |
7753 | # The practical upshot of these patterns is like this: | |
7754 | # | |
7755 | # prefix exec_prefix result | |
7756 | # ------ ----------- ------ | |
7757 | # /foo /foo/bar ../ | |
7758 | # /foo/ /foo/bar ../ | |
7759 | # /foo /foo/bar/ ../ | |
7760 | # /foo/ /foo/bar/ ../ | |
7761 | # /foo /foo/bar/ugg ../../ | |
7762 | # | |
4c112cda NC |
7763 | dollar='$$' |
7764 | gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)" | |
d062c304 JL |
7765 | fi |
7766 | ||
7767 | ||
2ce3c6c6 | 7768 | |
2bbea3a6 RH |
7769 | # Find a directory in which to install a shared libgcc. |
7770 | ||
7771 | # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. | |
7772 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
7773 | enableval="$enable_version_specific_runtime_libs" | |
7774 | : | |
7775 | fi | |
7776 | ||
7777 | ||
5b15f277 RH |
7778 | # Check whether --with-slibdir or --without-slibdir was given. |
7779 | if test "${with_slibdir+set}" = set; then | |
7780 | withval="$with_slibdir" | |
7781 | slibdir="$with_slibdir" | |
7782 | else | |
7783 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 7784 | slibdir='$(libsubdir)' |
5b15f277 | 7785 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
7786 | slibdir='$(build_tooldir)/lib' |
7787 | else | |
5b15f277 | 7788 | slibdir='$(libdir)' |
2bbea3a6 | 7789 | fi |
5b15f277 RH |
7790 | fi |
7791 | ||
2bbea3a6 RH |
7792 | |
7793 | ||
7e717196 JL |
7794 | # Nothing to do for FLOAT_H, float_format already handled. |
7795 | objdir=`pwd` | |
7796 | ||
7797 | ||
861bb6c1 JL |
7798 | # Process the language and host/target makefile fragments. |
7799 | ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file" | |
7800 | ||
7801 | # Substitute configuration variables | |
7802 | ||
7803 | ||
7804 | ||
7805 | ||
7806 | ||
7807 | ||
7808 | ||
7809 | ||
7810 | ||
7811 | ||
7812 | ||
7813 | ||
7814 | ||
7815 | ||
7816 | ||
7817 | ||
7818 | ||
7819 | ||
7820 | ||
7821 | ||
7822 | ||
7823 | ||
7824 | ||
7825 | ||
7826 | ||
7827 | ||
7828 | ||
7829 | ||
7830 | ||
7831 | ||
7832 | ||
7833 | ||
7834 | ||
7835 | ||
7836 | ||
7837 | ||
7838 | ||
7839 | ||
7840 | ||
7841 | ||
7842 | ||
7843 | ||
7844 | ||
7845 | ||
7846 | ||
7847 | ||
9b16d2c4 | 7848 | |
e9a25f70 | 7849 | |
6e26218f | 7850 | |
c8724862 | 7851 | |
e061d1ce | 7852 | |
d8bb17c8 | 7853 | |
11642c3a ZW |
7854 | |
7855 | ||
7856 | ||
7857 | ||
7858 | ||
7859 | ||
7860 | ||
7861 | ||
9fc9b82a | 7862 | |
8763704d | 7863 | |
aac69a49 NC |
7864 | |
7865 | ||
cc1e60ea | 7866 | |
3d9d2476 | 7867 | |
861bb6c1 JL |
7868 | |
7869 | ||
7870 | # Echo that links are built | |
75bffa71 | 7871 | if test x$host = x$target |
861bb6c1 JL |
7872 | then |
7873 | str1="native " | |
7874 | else | |
7875 | str1="cross-" | |
7876 | str2=" from $host" | |
7877 | fi | |
7878 | ||
75bffa71 | 7879 | if test x$host != x$build |
861bb6c1 JL |
7880 | then |
7881 | str3=" on a $build system" | |
7882 | fi | |
7883 | ||
75bffa71 | 7884 | if test "x$str2" != x || test "x$str3" != x |
861bb6c1 JL |
7885 | then |
7886 | str4= | |
7887 | fi | |
7888 | ||
7889 | echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2 | |
7890 | ||
75bffa71 | 7891 | if test "x$str2" != x || test "x$str3" != x |
861bb6c1 JL |
7892 | then |
7893 | echo " ${str2}${str3}." 1>&2 | |
7894 | fi | |
7895 | ||
f6cb0e63 | 7896 | # Truncate the target if necessary |
75bffa71 | 7897 | if test x$host_truncate_target != x; then |
f6cb0e63 JL |
7898 | target=`echo $target | sed -e 's/\(..............\).*/\1/'` |
7899 | fi | |
7900 | ||
861bb6c1 JL |
7901 | # Configure the subdirectories |
7902 | # AC_CONFIG_SUBDIRS($subdirs) | |
7903 | ||
7904 | # Create the Makefile | |
7905 | # and configure language subdirectories | |
7906 | trap '' 1 2 15 | |
7907 | cat > confcache <<\EOF | |
7908 | # This file is a shell script that caches the results of configure | |
7909 | # tests run on this system so they can be shared between configure | |
7910 | # scripts and configure runs. It is not useful on other systems. | |
7911 | # If it contains results you don't want to keep, you may remove or edit it. | |
7912 | # | |
7913 | # By default, configure uses ./config.cache as the cache file, | |
7914 | # creating it if it does not exist already. You can give configure | |
7915 | # the --cache-file=FILE option to use a different cache file; that is | |
7916 | # what configure does when it calls configure scripts in | |
7917 | # subdirectories, so they share the cache. | |
7918 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
7919 | # config.status only pays attention to the cache file if you give it the | |
7920 | # --recheck option to rerun configure. | |
7921 | # | |
7922 | EOF | |
7923 | # The following way of writing the cache mishandles newlines in values, | |
7924 | # but we know of no workaround that is simple, portable, and efficient. | |
7925 | # So, don't put newlines in cache variables' values. | |
7926 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
7927 | # and sets the high bit in the cache file unless we assign to the vars. | |
7928 | (set) 2>&1 | | |
b27d2bd5 | 7929 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
861bb6c1 JL |
7930 | *ac_space=\ *) |
7931 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
7932 | # turns \\\\ into \\, and sed turns \\ into \). | |
7933 | sed -n \ | |
7934 | -e "s/'/'\\\\''/g" \ | |
7935 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
7936 | ;; | |
7937 | *) | |
7938 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
7939 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
7940 | ;; | |
7941 | esac >> confcache | |
7942 | if cmp -s $cache_file confcache; then | |
7943 | : | |
7944 | else | |
7945 | if test -w $cache_file; then | |
7946 | echo "updating cache $cache_file" | |
7947 | cat confcache > $cache_file | |
7948 | else | |
7949 | echo "not updating unwritable cache $cache_file" | |
7950 | fi | |
7951 | fi | |
7952 | rm -f confcache | |
7953 | ||
7954 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
7955 | ||
7956 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
7957 | # Let make expand exec_prefix. | |
7958 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7959 | ||
7960 | # Any assignment to VPATH causes Sun make to only execute | |
7961 | # the first set of double-colon rules, so remove it if not needed. | |
7962 | # If there is a colon in the path, we need to keep it. | |
7963 | if test "x$srcdir" = x.; then | |
7964 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
7965 | fi | |
7966 | ||
7967 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
7968 | ||
7969 | DEFS=-DHAVE_CONFIG_H | |
7970 | ||
7971 | # Without the "./", some shells look in PATH for config.status. | |
7972 | : ${CONFIG_STATUS=./config.status} | |
7973 | ||
7974 | echo creating $CONFIG_STATUS | |
7975 | rm -f $CONFIG_STATUS | |
7976 | cat > $CONFIG_STATUS <<EOF | |
7977 | #! /bin/sh | |
7978 | # Generated automatically by configure. | |
7979 | # Run this file to recreate the current configuration. | |
7980 | # This directory was configured as follows, | |
7981 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
7982 | # | |
7983 | # $0 $ac_configure_args | |
7984 | # | |
7985 | # Compiler output produced by configure, useful for debugging | |
7986 | # configure, is in ./config.log if it exists. | |
7987 | ||
7988 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
7989 | for ac_option | |
7990 | do | |
7991 | case "\$ac_option" in | |
7992 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
7993 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
7994 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
7995 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
b27d2bd5 | 7996 | echo "$CONFIG_STATUS generated by autoconf version 2.13" |
861bb6c1 JL |
7997 | exit 0 ;; |
7998 | -help | --help | --hel | --he | --h) | |
7999 | echo "\$ac_cs_usage"; exit 0 ;; | |
8000 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
8001 | esac | |
8002 | done | |
8003 | ||
8004 | ac_given_srcdir=$srcdir | |
861bb6c1 | 8005 | |
b7cb92ad | 8006 | trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
861bb6c1 JL |
8007 | EOF |
8008 | cat >> $CONFIG_STATUS <<EOF | |
8009 | ||
8010 | # Protect against being on the right side of a sed subst in config.status. | |
8011 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
8012 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
8013 | $ac_vpsub | |
8014 | $extrasub | |
6f144c9c | 8015 | s%@SHELL@%$SHELL%g |
861bb6c1 JL |
8016 | s%@CFLAGS@%$CFLAGS%g |
8017 | s%@CPPFLAGS@%$CPPFLAGS%g | |
8018 | s%@CXXFLAGS@%$CXXFLAGS%g | |
b27d2bd5 | 8019 | s%@FFLAGS@%$FFLAGS%g |
861bb6c1 JL |
8020 | s%@DEFS@%$DEFS%g |
8021 | s%@LDFLAGS@%$LDFLAGS%g | |
8022 | s%@LIBS@%$LIBS%g | |
8023 | s%@exec_prefix@%$exec_prefix%g | |
8024 | s%@prefix@%$prefix%g | |
8025 | s%@program_transform_name@%$program_transform_name%g | |
8026 | s%@bindir@%$bindir%g | |
8027 | s%@sbindir@%$sbindir%g | |
8028 | s%@libexecdir@%$libexecdir%g | |
8029 | s%@datadir@%$datadir%g | |
8030 | s%@sysconfdir@%$sysconfdir%g | |
8031 | s%@sharedstatedir@%$sharedstatedir%g | |
8032 | s%@localstatedir@%$localstatedir%g | |
8033 | s%@libdir@%$libdir%g | |
8034 | s%@includedir@%$includedir%g | |
8035 | s%@oldincludedir@%$oldincludedir%g | |
8036 | s%@infodir@%$infodir%g | |
8037 | s%@mandir@%$mandir%g | |
39d6f2e8 | 8038 | s%@enable_multilib@%$enable_multilib%g |
50503ac8 | 8039 | s%@enable_shared@%$enable_shared%g |
861bb6c1 JL |
8040 | s%@host@%$host%g |
8041 | s%@host_alias@%$host_alias%g | |
8042 | s%@host_cpu@%$host_cpu%g | |
8043 | s%@host_vendor@%$host_vendor%g | |
8044 | s%@host_os@%$host_os%g | |
8045 | s%@target@%$target%g | |
8046 | s%@target_alias@%$target_alias%g | |
8047 | s%@target_cpu@%$target_cpu%g | |
8048 | s%@target_vendor@%$target_vendor%g | |
8049 | s%@target_os@%$target_os%g | |
8050 | s%@build@%$build%g | |
8051 | s%@build_alias@%$build_alias%g | |
8052 | s%@build_cpu@%$build_cpu%g | |
8053 | s%@build_vendor@%$build_vendor%g | |
8054 | s%@build_os@%$build_os%g | |
e9a25f70 | 8055 | s%@CC@%$CC%g |
3ec83fc2 | 8056 | s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g |
b8dad04b ZW |
8057 | s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g |
8058 | s%@strict1_warn@%$strict1_warn%g | |
84c041a1 | 8059 | s%@CPP@%$CPP%g |
b8dad04b ZW |
8060 | s%@warn_cflags@%$warn_cflags%g |
8061 | s%@stage1_cflags@%$stage1_cflags%g | |
e9a25f70 | 8062 | s%@SET_MAKE@%$SET_MAKE%g |
861bb6c1 | 8063 | s%@AWK@%$AWK%g |
0a4b6309 RL |
8064 | s%@LN@%$LN%g |
8065 | s%@LN_S@%$LN_S%g | |
861bb6c1 | 8066 | s%@RANLIB@%$RANLIB%g |
0a4b6309 RL |
8067 | s%@INSTALL@%$INSTALL%g |
8068 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g | |
8069 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
1ffc5c6e | 8070 | s%@have_gnat@%$have_gnat%g |
955be633 | 8071 | s%@have_mktemp_command@%$have_mktemp_command%g |
09fa0705 ZW |
8072 | s%@MAKEINFO@%$MAKEINFO%g |
8073 | s%@BUILD_INFO@%$BUILD_INFO%g | |
fd939e46 | 8074 | s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g |
1e608388 ZW |
8075 | s%@FLEX@%$FLEX%g |
8076 | s%@BISON@%$BISON%g | |
4e70264f | 8077 | s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g |
7f2749d4 | 8078 | s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g |
e256b8b6 | 8079 | s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g |
0a4b6309 RL |
8080 | s%@vfprintf@%$vfprintf%g |
8081 | s%@doprint@%$doprint%g | |
b3e1e64f | 8082 | s%@strstr@%$strstr%g |
f91abfce | 8083 | s%@LIBICONV@%$LIBICONV%g |
861bb6c1 | 8084 | s%@manext@%$manext%g |
992d1248 | 8085 | s%@objext@%$objext%g |
ab87f8c8 JL |
8086 | s%@PACKAGE@%$PACKAGE%g |
8087 | s%@VERSION@%$VERSION%g | |
4adee315 | 8088 | s%@CHECK_PO@%$CHECK_PO%g |
ab87f8c8 JL |
8089 | s%@USE_NLS@%$USE_NLS%g |
8090 | s%@MSGFMT@%$MSGFMT%g | |
8091 | s%@GMSGFMT@%$GMSGFMT%g | |
8092 | s%@XGETTEXT@%$XGETTEXT%g | |
8093 | s%@GENCAT@%$GENCAT%g | |
8094 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
8095 | s%@CATALOGS@%$CATALOGS%g | |
8096 | s%@CATOBJEXT@%$CATOBJEXT%g | |
8097 | s%@DATADIRNAME@%$DATADIRNAME%g | |
8098 | s%@GMOFILES@%$GMOFILES%g | |
8099 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
8100 | s%@INTLDEPS@%$INTLDEPS%g | |
8101 | s%@INTLLIBS@%$INTLLIBS%g | |
8102 | s%@INTLOBJS@%$INTLOBJS%g | |
8103 | s%@POFILES@%$POFILES%g | |
8104 | s%@POSUB@%$POSUB%g | |
8105 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
8106 | s%@GT_NO@%$GT_NO%g | |
8107 | s%@GT_YES@%$GT_YES%g | |
8108 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
8109 | s%@l@%$l%g | |
b39d221a | 8110 | s%@inhibit_libc@%$inhibit_libc%g |
f24af81b | 8111 | s%@gthread_flags@%$gthread_flags%g |
81bf3d9e | 8112 | s%@GGC@%$GGC%g |
3c809ba4 AG |
8113 | s%@zlibdir@%$zlibdir%g |
8114 | s%@zlibinc@%$zlibinc%g | |
dc6746e7 | 8115 | s%@MAINT@%$MAINT%g |
88111b26 JL |
8116 | s%@build_canonical@%$build_canonical%g |
8117 | s%@host_canonical@%$host_canonical%g | |
8118 | s%@target_subdir@%$target_subdir%g | |
d062c304 | 8119 | s%@gcc_tooldir@%$gcc_tooldir%g |
4c112cda | 8120 | s%@dollar@%$dollar%g |
2bbea3a6 | 8121 | s%@slibdir@%$slibdir%g |
7e717196 | 8122 | s%@objdir@%$objdir%g |
861bb6c1 | 8123 | s%@subdirs@%$subdirs%g |
861bb6c1 JL |
8124 | s%@all_boot_languages@%$all_boot_languages%g |
8125 | s%@all_compilers@%$all_compilers%g | |
861bb6c1 | 8126 | s%@all_diff_excludes@%$all_diff_excludes%g |
861bb6c1 | 8127 | s%@all_headers@%$all_headers%g |
4f3ae93c BK |
8128 | s%@all_lang_makefiles@%$all_lang_makefiles%g |
8129 | s%@all_languages@%$all_languages%g | |
8130 | s%@all_lib2funcs@%$all_lib2funcs%g | |
8131 | s%@all_stagestuff@%$all_stagestuff%g | |
8132 | s%@build_exeext@%$build_exeext%g | |
8133 | s%@build_install_headers_dir@%$build_install_headers_dir%g | |
8134 | s%@build_xm_file_list@%$build_xm_file_list%g | |
11642c3a ZW |
8135 | s%@build_xm_file@%$build_xm_file%g |
8136 | s%@build_xm_defines@%$build_xm_defines%g | |
cbc59f01 | 8137 | s%@check_languages@%$check_languages%g |
4f3ae93c | 8138 | s%@cc_set_by_configure@%$cc_set_by_configure%g |
5aa82ace | 8139 | s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g |
4f3ae93c | 8140 | s%@cpp_install_dir@%$cpp_install_dir%g |
4f3ae93c BK |
8141 | s%@dep_host_xmake_file@%$dep_host_xmake_file%g |
8142 | s%@dep_tmake_file@%$dep_tmake_file%g | |
8143 | s%@extra_c_flags@%$extra_c_flags%g | |
4f3ae93c | 8144 | s%@extra_headers_list@%$extra_headers_list%g |
861bb6c1 | 8145 | s%@extra_objs@%$extra_objs%g |
4f3ae93c BK |
8146 | s%@extra_parts@%$extra_parts%g |
8147 | s%@extra_passes@%$extra_passes%g | |
8148 | s%@extra_programs@%$extra_programs%g | |
4f3ae93c | 8149 | s%@float_h_file@%$float_h_file%g |
cc1e60ea | 8150 | s%@gcc_config_arguments@%$gcc_config_arguments%g |
4f3ae93c | 8151 | s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g |
e2187d3b | 8152 | s%@libstdcxx_incdir@%$libstdcxx_incdir%g |
4f3ae93c | 8153 | s%@gcc_version@%$gcc_version%g |
8763704d | 8154 | s%@gcc_version_full@%$gcc_version_full%g |
4f3ae93c BK |
8155 | s%@gcc_version_trigger@%$gcc_version_trigger%g |
8156 | s%@host_exeext@%$host_exeext%g | |
861bb6c1 | 8157 | s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g |
861bb6c1 | 8158 | s%@host_xm_file_list@%$host_xm_file_list%g |
11642c3a ZW |
8159 | s%@host_xm_file@%$host_xm_file%g |
8160 | s%@host_xm_defines@%$host_xm_defines%g | |
4f3ae93c | 8161 | s%@install@%$install%g |
861bb6c1 | 8162 | s%@lang_options_files@%$lang_options_files%g |
4f3ae93c | 8163 | s%@lang_specs_files@%$lang_specs_files%g |
3103b7db | 8164 | s%@lang_tree_files@%$lang_tree_files%g |
861bb6c1 | 8165 | s%@local_prefix@%$local_prefix%g |
4f3ae93c BK |
8166 | s%@md_file@%$md_file%g |
8167 | s%@objc_boehm_gc@%$objc_boehm_gc%g | |
8168 | s%@out_file@%$out_file%g | |
8169 | s%@out_object_file@%$out_object_file%g | |
861bb6c1 | 8170 | s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g |
e9a25f70 | 8171 | s%@symbolic_link@%$symbolic_link%g |
4f3ae93c BK |
8172 | s%@thread_file@%$thread_file%g |
8173 | s%@tm_file_list@%$tm_file_list%g | |
11642c3a ZW |
8174 | s%@tm_file@%$tm_file%g |
8175 | s%@tm_p_file_list@%$tm_p_file_list%g | |
8176 | s%@tm_p_file@%$tm_p_file%g | |
8177 | s%@xm_file@%$xm_file%g | |
3d9d2476 | 8178 | s%@xm_defines@%$xm_defines%g |
aac69a49 NC |
8179 | s%@c_target_objs@%$c_target_objs%g |
8180 | s%@cxx_target_objs@%$cxx_target_objs%g | |
11642c3a | 8181 | s%@target_cpu_default@%$target_cpu_default%g |
861bb6c1 JL |
8182 | /@target_overrides@/r $target_overrides |
8183 | s%@target_overrides@%%g | |
8184 | /@host_overrides@/r $host_overrides | |
8185 | s%@host_overrides@%%g | |
8186 | s%@cross_defines@%$cross_defines%g | |
8187 | /@cross_overrides@/r $cross_overrides | |
8188 | s%@cross_overrides@%%g | |
8189 | /@build_overrides@/r $build_overrides | |
8190 | s%@build_overrides@%%g | |
8191 | /@language_fragments@/r $language_fragments | |
8192 | s%@language_fragments@%%g | |
8193 | /@language_hooks@/r $language_hooks | |
8194 | s%@language_hooks@%%g | |
8195 | ||
8196 | CEOF | |
8197 | EOF | |
8198 | ||
8199 | cat >> $CONFIG_STATUS <<\EOF | |
8200 | ||
8201 | # Split the substitutions into bite-sized pieces for seds with | |
8202 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
8203 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
8204 | ac_file=1 # Number of current file. | |
8205 | ac_beg=1 # First line for current file. | |
8206 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
8207 | ac_more_lines=: | |
8208 | ac_sed_cmds="" | |
8209 | while $ac_more_lines; do | |
8210 | if test $ac_beg -gt 1; then | |
8211 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
8212 | else | |
8213 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
8214 | fi | |
8215 | if test ! -s conftest.s$ac_file; then | |
8216 | ac_more_lines=false | |
8217 | rm -f conftest.s$ac_file | |
8218 | else | |
8219 | if test -z "$ac_sed_cmds"; then | |
8220 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
8221 | else | |
8222 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
8223 | fi | |
8224 | ac_file=`expr $ac_file + 1` | |
8225 | ac_beg=$ac_end | |
8226 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
8227 | fi | |
8228 | done | |
8229 | if test -z "$ac_sed_cmds"; then | |
8230 | ac_sed_cmds=cat | |
8231 | fi | |
8232 | EOF | |
8233 | ||
8234 | cat >> $CONFIG_STATUS <<EOF | |
8235 | ||
8236 | CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"} | |
8237 | EOF | |
8238 | cat >> $CONFIG_STATUS <<\EOF | |
8239 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
8240 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
8241 | case "$ac_file" in | |
8242 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
8243 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
8244 | *) ac_file_in="${ac_file}.in" ;; | |
8245 | esac | |
8246 | ||
8247 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
8248 | ||
8249 | # Remove last slash and all that follows it. Not all systems have dirname. | |
8250 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
8251 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
8252 | # The file is in a subdirectory. | |
8253 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
8254 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
8255 | # A "../" for each directory in $ac_dir_suffix. | |
8256 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
8257 | else | |
8258 | ac_dir_suffix= ac_dots= | |
8259 | fi | |
8260 | ||
8261 | case "$ac_given_srcdir" in | |
8262 | .) srcdir=. | |
8263 | if test -z "$ac_dots"; then top_srcdir=. | |
8264 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
8265 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
8266 | *) # Relative path. | |
8267 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
8268 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
8269 | esac | |
8270 | ||
861bb6c1 JL |
8271 | |
8272 | echo creating "$ac_file" | |
8273 | rm -f "$ac_file" | |
8274 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
8275 | case "$ac_file" in | |
8276 | *Makefile*) ac_comsub="1i\\ | |
8277 | # $configure_input" ;; | |
8278 | *) ac_comsub= ;; | |
8279 | esac | |
8280 | ||
8281 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
8282 | sed -e "$ac_comsub | |
8283 | s%@configure_input@%$configure_input%g | |
8284 | s%@srcdir@%$srcdir%g | |
8285 | s%@top_srcdir@%$top_srcdir%g | |
861bb6c1 JL |
8286 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
8287 | fi; done | |
8288 | rm -f conftest.s* | |
8289 | ||
8290 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
8291 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
8292 | # | |
8293 | # ac_d sets the value in "#define NAME VALUE" lines. | |
8294 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
8295 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
8296 | ac_dC='\3' | |
8297 | ac_dD='%g' | |
8298 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
8299 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
8300 | ac_uB='\([ ]\)%\1#\2define\3' | |
8301 | ac_uC=' ' | |
8302 | ac_uD='\4%g' | |
8303 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
8304 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
8305 | ac_eB='$%\1#\2define\3' | |
8306 | ac_eC=' ' | |
8307 | ac_eD='%g' | |
8308 | ||
8309 | if test "${CONFIG_HEADERS+set}" != set; then | |
8310 | EOF | |
8311 | cat >> $CONFIG_STATUS <<EOF | |
b7cb92ad | 8312 | CONFIG_HEADERS="auto-host.h:config.in" |
861bb6c1 JL |
8313 | EOF |
8314 | cat >> $CONFIG_STATUS <<\EOF | |
8315 | fi | |
8316 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
8317 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
8318 | case "$ac_file" in | |
8319 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
8320 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
8321 | *) ac_file_in="${ac_file}.in" ;; | |
8322 | esac | |
8323 | ||
8324 | echo creating $ac_file | |
8325 | ||
8326 | rm -f conftest.frag conftest.in conftest.out | |
8327 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
8328 | cat $ac_file_inputs > conftest.in | |
8329 | ||
8330 | EOF | |
8331 | ||
8332 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
8333 | # the proper values into config.h.in to produce config.h. And first: | |
8334 | # Protect against being on the right side of a sed subst in config.status. | |
8335 | # Protect against being in an unquoted here document in config.status. | |
8336 | rm -f conftest.vals | |
8337 | cat > conftest.hdr <<\EOF | |
8338 | s/[\\&%]/\\&/g | |
8339 | s%[\\$`]%\\&%g | |
8340 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
8341 | s%ac_d%ac_u%gp | |
8342 | s%ac_u%ac_e%gp | |
8343 | EOF | |
8344 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
8345 | rm -f conftest.hdr | |
8346 | ||
8347 | # This sed command replaces #undef with comments. This is necessary, for | |
8348 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
8349 | # on some systems where configure will not decide to define it. | |
8350 | cat >> conftest.vals <<\EOF | |
8351 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
8352 | EOF | |
8353 | ||
8354 | # Break up conftest.vals because some shells have a limit on | |
8355 | # the size of here documents, and old seds have small limits too. | |
8356 | ||
8357 | rm -f conftest.tail | |
8358 | while : | |
8359 | do | |
8360 | ac_lines=`grep -c . conftest.vals` | |
8361 | # grep -c gives empty output for an empty file on some AIX systems. | |
8362 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
8363 | # Write a limited-size here document to conftest.frag. | |
8364 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
8365 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
8366 | echo 'CEOF | |
8367 | sed -f conftest.frag conftest.in > conftest.out | |
8368 | rm -f conftest.in | |
8369 | mv conftest.out conftest.in | |
8370 | ' >> $CONFIG_STATUS | |
8371 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
8372 | rm -f conftest.vals | |
8373 | mv conftest.tail conftest.vals | |
8374 | done | |
8375 | rm -f conftest.vals | |
8376 | ||
8377 | cat >> $CONFIG_STATUS <<\EOF | |
8378 | rm -f conftest.frag conftest.h | |
8379 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
8380 | cat conftest.in >> conftest.h | |
8381 | rm -f conftest.in | |
8382 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
8383 | echo "$ac_file is unchanged" | |
8384 | rm -f conftest.h | |
8385 | else | |
8386 | # Remove last slash and all that follows it. Not all systems have dirname. | |
8387 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
8388 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
8389 | # The file is in a subdirectory. | |
8390 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
8391 | fi | |
8392 | rm -f $ac_file | |
8393 | mv conftest.h $ac_file | |
8394 | fi | |
8395 | fi; done | |
8396 | ||
ab87f8c8 JL |
8397 | EOF |
8398 | ||
8399 | cat >> $CONFIG_STATUS <<EOF | |
8400 | ac_sources="$nls_cv_header_libgt" | |
8401 | ac_dests="$nls_cv_header_intl" | |
8402 | EOF | |
8403 | ||
8404 | cat >> $CONFIG_STATUS <<\EOF | |
8405 | srcdir=$ac_given_srcdir | |
8406 | while test -n "$ac_sources"; do | |
8407 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
8408 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
8409 | ||
8410 | echo "linking $srcdir/$ac_source to $ac_dest" | |
8411 | ||
8412 | if test ! -r $srcdir/$ac_source; then | |
8413 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
8414 | fi | |
8415 | rm -f $ac_dest | |
8416 | ||
8417 | # Make relative symlinks. | |
8418 | # Remove last slash and all that follows it. Not all systems have dirname. | |
8419 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
8420 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
8421 | # The dest file is in a subdirectory. | |
8422 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
8423 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
8424 | # A "../" for each directory in $ac_dest_dir_suffix. | |
8425 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
8426 | else | |
8427 | ac_dest_dir_suffix= ac_dots= | |
8428 | fi | |
8429 | ||
8430 | case "$srcdir" in | |
8431 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
8432 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
8433 | esac | |
8434 | ||
8435 | # Make a symlink if possible; otherwise try a hard link. | |
8436 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
8437 | ln $srcdir/$ac_source $ac_dest; then : | |
8438 | else | |
8439 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
8440 | fi | |
8441 | done | |
861bb6c1 JL |
8442 | EOF |
8443 | cat >> $CONFIG_STATUS <<EOF | |
8444 | ||
ab87f8c8 | 8445 | |
861bb6c1 JL |
8446 | host='${host}' |
8447 | build='${build}' | |
8448 | target='${target}' | |
8449 | target_alias='${target_alias}' | |
8450 | srcdir='${srcdir}' | |
8451 | subdirs='${subdirs}' | |
861bb6c1 JL |
8452 | symbolic_link='${symbolic_link}' |
8453 | program_transform_set='${program_transform_set}' | |
8454 | program_transform_name='${program_transform_name}' | |
8455 | dep_host_xmake_file='${dep_host_xmake_file}' | |
8456 | host_xmake_file='${host_xmake_file}' | |
8457 | dep_tmake_file='${dep_tmake_file}' | |
8458 | tmake_file='${tmake_file}' | |
8459 | thread_file='${thread_file}' | |
cc1e60ea | 8460 | gcc_config_arguments='${gcc_config_arguments}' |
f1943b77 | 8461 | gcc_version='${gcc_version}' |
8763704d | 8462 | gcc_version_full='${gcc_version_full}' |
f1943b77 | 8463 | gcc_version_trigger='${gcc_version_trigger}' |
861bb6c1 JL |
8464 | local_prefix='${local_prefix}' |
8465 | build_install_headers_dir='${build_install_headers_dir}' | |
8466 | build_exeext='${build_exeext}' | |
6e26218f | 8467 | host_exeext='${host_exeext}' |
7ed46111 | 8468 | out_file='${out_file}' |
861bb6c1 JL |
8469 | gdb_needs_out_file_path='${gdb_needs_out_file_path}' |
8470 | SET_MAKE='${SET_MAKE}' | |
861bb6c1 JL |
8471 | target_list='${target_list}' |
8472 | target_overrides='${target_overrides}' | |
8473 | host_overrides='${host_overrides}' | |
8474 | cross_defines='${cross_defines}' | |
8475 | cross_overrides='${cross_overrides}' | |
8476 | build_overrides='${build_overrides}' | |
9fc9b82a | 8477 | cpp_install_dir='${cpp_install_dir}' |
861bb6c1 JL |
8478 | |
8479 | EOF | |
8480 | cat >> $CONFIG_STATUS <<\EOF | |
ab87f8c8 JL |
8481 | case "$CONFIG_FILES" in *po/Makefile.in*) |
8482 | sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile | |
8483 | esac | |
861bb6c1 | 8484 | |
861bb6c1 | 8485 | case x$CONFIG_HEADERS in |
b7cb92ad | 8486 | xauto-host.h:config.in) |
861bb6c1 JL |
8487 | echo > cstamp-h ;; |
8488 | esac | |
93cf819d BK |
8489 | # If the host supports symlinks, point stage[1234] at ../stage[1234] so |
8490 | # bootstrapping and the installation procedure can still use | |
8491 | # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks, | |
8492 | # FLAGS_TO_PASS has been modified to solve the problem there. | |
8493 | # This is virtually a duplicate of what happens in configure.lang; we do | |
8494 | # an extra check to make sure this only happens if ln -s can be used. | |
75bffa71 | 8495 | if test "$symbolic_link" = "ln -s"; then |
93cf819d | 8496 | for d in .. ${subdirs} ; do |
75bffa71 | 8497 | if test $d != ..; then |
4e8a434e BK |
8498 | STARTDIR=`pwd` |
8499 | cd $d | |
8500 | for t in stage1 stage2 stage3 stage4 include | |
8501 | do | |
8502 | rm -f $t | |
8503 | $symbolic_link ../$t $t 2>/dev/null | |
8504 | done | |
8505 | cd $STARTDIR | |
93cf819d BK |
8506 | fi |
8507 | done | |
8508 | else true ; fi | |
ab87f8c8 JL |
8509 | # Avoid having to add intl to our include paths. |
8510 | if test -f intl/libintl.h; then | |
8511 | echo creating libintl.h | |
8512 | echo '#include "intl/libintl.h"' >libintl.h | |
8513 | fi | |
861bb6c1 JL |
8514 | |
8515 | exit 0 | |
8516 | EOF | |
8517 | chmod +x $CONFIG_STATUS | |
8518 | rm -fr confdefs* $ac_clean_files | |
8519 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
8520 |