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