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