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