]>
Commit | Line | Data |
---|---|---|
005537df | 1 | #! /bin/sh |
861bb6c1 JL |
2 | |
3 | # Guess values for system-dependent variables and create Makefiles. | |
b27d2bd5 | 4 | # Generated automatically using autoconf version 2.13 |
861bb6c1 JL |
5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
6 | # | |
7 | # This configure script is free software; the Free Software Foundation | |
8 | # gives unlimited permission to copy, distribute and modify it. | |
9 | ||
10 | # Defaults: | |
11 | ac_help= | |
12 | ac_default_prefix=/usr/local | |
13 | # Any additions from configure.in: | |
14 | ac_help="$ac_help | |
15 | --with-gnu-ld arrange to work with GNU ld." | |
ab339d62 | 16 | ac_help="$ac_help |
e8bec136 | 17 | --with-ld arrange to use the specified ld (full pathname)" |
861bb6c1 | 18 | ac_help="$ac_help |
e8bec136 | 19 | --with-gnu-as arrange to work with GNU as" |
ab339d62 | 20 | ac_help="$ac_help |
e8bec136 | 21 | --with-as arrange to use the specified as (full pathname)" |
861bb6c1 | 22 | ac_help="$ac_help |
e8bec136 | 23 | --with-stabs arrange to use stabs instead of host debug format" |
861bb6c1 | 24 | ac_help="$ac_help |
e8bec136 | 25 | --with-elf arrange to use ELF instead of host debug format" |
861bb6c1 | 26 | ac_help="$ac_help |
e8bec136 | 27 | --with-local-prefix=DIR specifies directory to put local include" |
861bb6c1 JL |
28 | ac_help="$ac_help |
29 | --with-gxx-include-dir=DIR | |
e8bec136 | 30 | specifies directory to put g++ header files" |
39d6f2e8 | 31 | ac_help="$ac_help |
e8bec136 | 32 | --enable-multilib enable library support for multiple ABIs" |
a494747c | 33 | ac_help="$ac_help |
f4524c9e ZW |
34 | --enable-checking[=LIST] |
35 | enable expensive run-time checks. With LIST, | |
36 | enable only specific categories of checks. | |
37 | Categories are: misc,tree,rtl,gc,gcac; default | |
59f406b7 | 38 | is misc,tree,gc" |
3ecc3258 | 39 | ac_help="$ac_help |
e8bec136 | 40 | --disable-cpp don't provide a user-visible C preprocessor" |
3ecc3258 ZW |
41 | ac_help="$ac_help |
42 | --with-cpp-install-dir=DIR | |
43 | install the user visible C preprocessor in DIR | |
e8bec136 | 44 | (relative to PREFIX) as well as PREFIX/bin" |
c5c76735 | 45 | ac_help="$ac_help |
e8bec136 | 46 | --enable-c-mbchar enable multibyte characters for C and C++" |
861bb6c1 | 47 | ac_help="$ac_help |
e8bec136 RO |
48 | --enable-threads enable thread usage for target GCC |
49 | --enable-threads=LIB use LIB thread package for target GCC" | |
d8bb17c8 OP |
50 | ac_help="$ac_help |
51 | --enable-objc-gc enable the use of Boehm's garbage collector with | |
e8bec136 | 52 | the GNU Objective-C runtime" |
90e6a802 | 53 | ac_help="$ac_help |
e8bec136 | 54 | --with-dwarf2 force the default debug format to be DWARF 2" |
50503ac8 | 55 | ac_help="$ac_help |
e8bec136 | 56 | --disable-shared don't provide a shared libgcc" |
ab87f8c8 | 57 | ac_help="$ac_help |
dc6746e7 | 58 | --enable-nls use Native Language Support (default)" |
ab87f8c8 JL |
59 | ac_help="$ac_help |
60 | --disable-nls do not use Native Language Support" | |
61 | ac_help="$ac_help | |
62 | --with-included-gettext use the GNU gettext library included here" | |
63 | ac_help="$ac_help | |
64 | --with-catgets use catgets functions if available" | |
f4ab28e3 MK |
65 | ac_help="$ac_help |
66 | --disable-win32-registry | |
e8bec136 RO |
67 | disable lookup of installation paths in the |
68 | Registry on Windows hosts | |
69 | --enable-win32-registry enable registry lookup (default) | |
f4ab28e3 | 70 | --enable-win32-registry=KEY |
e8bec136 RO |
71 | use KEY instead of GCC version as the last portion |
72 | of the registry key" | |
81bf3d9e | 73 | ac_help="$ac_help |
e8bec136 RO |
74 | --with-gc={simple,page} choose the garbage collection mechanism to use |
75 | with the compiler" | |
3c809ba4 AG |
76 | ac_help="$ac_help |
77 | --with-system-zlib use installed libz" | |
dc6746e7 | 78 | ac_help="$ac_help |
e8bec136 RO |
79 | --enable-maintainer-mode |
80 | enable make rules and dependencies not useful | |
dc6746e7 | 81 | (and sometimes confusing) to the casual installer" |
531073e7 | 82 | ac_help="$ac_help |
e8bec136 RO |
83 | --enable-sjlj-exceptions |
84 | arrange to use setjmp/longjmp exception handling" | |
2bbea3a6 | 85 | ac_help="$ac_help |
e8bec136 RO |
86 | --enable-version-specific-runtime-libs |
87 | specify that runtime libraries should be | |
88 | installed in a compiler-specific directory" | |
5b15f277 RH |
89 | ac_help="$ac_help |
90 | --with-slibdir=DIR shared libraries in DIR [LIBDIR]" | |
861bb6c1 JL |
91 | |
92 | # Initialize some variables set by options. | |
93 | # The variables have the same names as the options, with | |
94 | # dashes changed to underlines. | |
95 | build=NONE | |
96 | cache_file=./config.cache | |
97 | exec_prefix=NONE | |
98 | host=NONE | |
99 | no_create= | |
100 | nonopt=NONE | |
101 | no_recursion= | |
102 | prefix=NONE | |
103 | program_prefix=NONE | |
104 | program_suffix=NONE | |
105 | program_transform_name=s,x,x, | |
106 | silent= | |
107 | site= | |
108 | srcdir= | |
109 | target=NONE | |
110 | verbose= | |
111 | x_includes=NONE | |
112 | x_libraries=NONE | |
113 | bindir='${exec_prefix}/bin' | |
114 | sbindir='${exec_prefix}/sbin' | |
115 | libexecdir='${exec_prefix}/libexec' | |
116 | datadir='${prefix}/share' | |
117 | sysconfdir='${prefix}/etc' | |
118 | sharedstatedir='${prefix}/com' | |
119 | localstatedir='${prefix}/var' | |
120 | libdir='${exec_prefix}/lib' | |
121 | includedir='${prefix}/include' | |
122 | oldincludedir='/usr/include' | |
123 | infodir='${prefix}/info' | |
124 | mandir='${prefix}/man' | |
125 | ||
126 | # Initialize some other variables. | |
127 | subdirs= | |
128 | MFLAGS= MAKEFLAGS= | |
6f144c9c | 129 | SHELL=${CONFIG_SHELL-/bin/sh} |
861bb6c1 JL |
130 | # Maximum number of lines to put in a shell here document. |
131 | ac_max_here_lines=12 | |
132 | ||
133 | ac_prev= | |
134 | for ac_option | |
135 | do | |
136 | ||
137 | # If the previous option needs an argument, assign it. | |
138 | if test -n "$ac_prev"; then | |
139 | eval "$ac_prev=\$ac_option" | |
140 | ac_prev= | |
141 | continue | |
142 | fi | |
143 | ||
144 | case "$ac_option" in | |
145 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
146 | *) ac_optarg= ;; | |
147 | esac | |
148 | ||
149 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
150 | ||
151 | case "$ac_option" in | |
152 | ||
153 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
154 | ac_prev=bindir ;; | |
155 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
156 | bindir="$ac_optarg" ;; | |
157 | ||
158 | -build | --build | --buil | --bui | --bu) | |
159 | ac_prev=build ;; | |
160 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
161 | build="$ac_optarg" ;; | |
162 | ||
163 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
164 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
165 | ac_prev=cache_file ;; | |
166 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
167 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
168 | cache_file="$ac_optarg" ;; | |
169 | ||
170 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
171 | ac_prev=datadir ;; | |
172 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
173 | | --da=*) | |
174 | datadir="$ac_optarg" ;; | |
175 | ||
176 | -disable-* | --disable-*) | |
177 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
178 | # Reject names that are not valid shell variable names. | |
179 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
180 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
181 | fi | |
182 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
183 | eval "enable_${ac_feature}=no" ;; | |
184 | ||
185 | -enable-* | --enable-*) | |
186 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
187 | # Reject names that are not valid shell variable names. | |
188 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
189 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
190 | fi | |
191 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
192 | case "$ac_option" in | |
193 | *=*) ;; | |
194 | *) ac_optarg=yes ;; | |
195 | esac | |
196 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
197 | ||
198 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
199 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
200 | | --exec | --exe | --ex) | |
201 | ac_prev=exec_prefix ;; | |
202 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
203 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
204 | | --exec=* | --exe=* | --ex=*) | |
205 | exec_prefix="$ac_optarg" ;; | |
206 | ||
207 | -gas | --gas | --ga | --g) | |
208 | # Obsolete; use --with-gas. | |
209 | with_gas=yes ;; | |
210 | ||
211 | -help | --help | --hel | --he) | |
212 | # Omit some internal or obsolete options to make the list less imposing. | |
213 | # This message is too long to be a string in the A/UX 3.1 sh. | |
214 | cat << EOF | |
215 | Usage: configure [options] [host] | |
216 | Options: [defaults in brackets after descriptions] | |
217 | Configuration: | |
218 | --cache-file=FILE cache test results in FILE | |
219 | --help print this message | |
220 | --no-create do not create output files | |
221 | --quiet, --silent do not print \`checking...' messages | |
222 | --version print the version of autoconf that created configure | |
223 | Directory and file names: | |
224 | --prefix=PREFIX install architecture-independent files in PREFIX | |
225 | [$ac_default_prefix] | |
226 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
227 | [same as prefix] | |
228 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
229 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
230 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
231 | --datadir=DIR read-only architecture-independent data in DIR | |
232 | [PREFIX/share] | |
233 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
234 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
235 | [PREFIX/com] | |
236 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
237 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
238 | --includedir=DIR C header files in DIR [PREFIX/include] | |
239 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
240 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
241 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
242 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
243 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
244 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
245 | --program-transform-name=PROGRAM | |
246 | run sed PROGRAM on installed program names | |
247 | EOF | |
248 | cat << EOF | |
249 | Host type: | |
250 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
251 | --host=HOST configure for HOST [guessed] | |
252 | --target=TARGET configure for TARGET [TARGET=HOST] | |
253 | Features and packages: | |
254 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
255 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
256 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
257 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
258 | --x-includes=DIR X include files are in DIR | |
259 | --x-libraries=DIR X library files are in DIR | |
260 | EOF | |
261 | if test -n "$ac_help"; then | |
262 | echo "--enable and --with options recognized:$ac_help" | |
263 | fi | |
264 | exit 0 ;; | |
265 | ||
266 | -host | --host | --hos | --ho) | |
267 | ac_prev=host ;; | |
268 | -host=* | --host=* | --hos=* | --ho=*) | |
269 | host="$ac_optarg" ;; | |
270 | ||
271 | -includedir | --includedir | --includedi | --included | --include \ | |
272 | | --includ | --inclu | --incl | --inc) | |
273 | ac_prev=includedir ;; | |
274 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
275 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
276 | includedir="$ac_optarg" ;; | |
277 | ||
278 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
279 | ac_prev=infodir ;; | |
280 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
281 | infodir="$ac_optarg" ;; | |
282 | ||
283 | -libdir | --libdir | --libdi | --libd) | |
284 | ac_prev=libdir ;; | |
285 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
286 | libdir="$ac_optarg" ;; | |
287 | ||
288 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
289 | | --libexe | --libex | --libe) | |
290 | ac_prev=libexecdir ;; | |
291 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
292 | | --libexe=* | --libex=* | --libe=*) | |
293 | libexecdir="$ac_optarg" ;; | |
294 | ||
295 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
296 | | --localstate | --localstat | --localsta | --localst \ | |
297 | | --locals | --local | --loca | --loc | --lo) | |
298 | ac_prev=localstatedir ;; | |
299 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
300 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
301 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
302 | localstatedir="$ac_optarg" ;; | |
303 | ||
304 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
305 | ac_prev=mandir ;; | |
306 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
307 | mandir="$ac_optarg" ;; | |
308 | ||
309 | -nfp | --nfp | --nf) | |
310 | # Obsolete; use --without-fp. | |
311 | with_fp=no ;; | |
312 | ||
313 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
314 | | --no-cr | --no-c) | |
315 | no_create=yes ;; | |
316 | ||
317 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
318 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
319 | no_recursion=yes ;; | |
320 | ||
321 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
322 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
323 | | --oldin | --oldi | --old | --ol | --o) | |
324 | ac_prev=oldincludedir ;; | |
325 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
326 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
327 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
328 | oldincludedir="$ac_optarg" ;; | |
329 | ||
330 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
331 | ac_prev=prefix ;; | |
332 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
333 | prefix="$ac_optarg" ;; | |
334 | ||
335 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
336 | | --program-pre | --program-pr | --program-p) | |
337 | ac_prev=program_prefix ;; | |
338 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
339 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
340 | program_prefix="$ac_optarg" ;; | |
341 | ||
342 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
343 | | --program-suf | --program-su | --program-s) | |
344 | ac_prev=program_suffix ;; | |
345 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
346 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
347 | program_suffix="$ac_optarg" ;; | |
348 | ||
349 | -program-transform-name | --program-transform-name \ | |
350 | | --program-transform-nam | --program-transform-na \ | |
351 | | --program-transform-n | --program-transform- \ | |
352 | | --program-transform | --program-transfor \ | |
353 | | --program-transfo | --program-transf \ | |
354 | | --program-trans | --program-tran \ | |
355 | | --progr-tra | --program-tr | --program-t) | |
356 | ac_prev=program_transform_name ;; | |
357 | -program-transform-name=* | --program-transform-name=* \ | |
358 | | --program-transform-nam=* | --program-transform-na=* \ | |
359 | | --program-transform-n=* | --program-transform-=* \ | |
360 | | --program-transform=* | --program-transfor=* \ | |
361 | | --program-transfo=* | --program-transf=* \ | |
362 | | --program-trans=* | --program-tran=* \ | |
363 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
364 | program_transform_name="$ac_optarg" ;; | |
365 | ||
366 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
367 | | -silent | --silent | --silen | --sile | --sil) | |
368 | silent=yes ;; | |
369 | ||
370 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
371 | ac_prev=sbindir ;; | |
372 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
373 | | --sbi=* | --sb=*) | |
374 | sbindir="$ac_optarg" ;; | |
375 | ||
376 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
377 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
378 | | --sharedst | --shareds | --shared | --share | --shar \ | |
379 | | --sha | --sh) | |
380 | ac_prev=sharedstatedir ;; | |
381 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
382 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
383 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
384 | | --sha=* | --sh=*) | |
385 | sharedstatedir="$ac_optarg" ;; | |
386 | ||
387 | -site | --site | --sit) | |
388 | ac_prev=site ;; | |
389 | -site=* | --site=* | --sit=*) | |
390 | site="$ac_optarg" ;; | |
391 | ||
392 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
393 | ac_prev=srcdir ;; | |
394 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
395 | srcdir="$ac_optarg" ;; | |
396 | ||
397 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
398 | | --syscon | --sysco | --sysc | --sys | --sy) | |
399 | ac_prev=sysconfdir ;; | |
400 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
401 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
402 | sysconfdir="$ac_optarg" ;; | |
403 | ||
404 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
405 | ac_prev=target ;; | |
406 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
407 | target="$ac_optarg" ;; | |
408 | ||
409 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
410 | verbose=yes ;; | |
411 | ||
412 | -version | --version | --versio | --versi | --vers) | |
b27d2bd5 | 413 | echo "configure generated by autoconf version 2.13" |
861bb6c1 JL |
414 | exit 0 ;; |
415 | ||
416 | -with-* | --with-*) | |
417 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
418 | # Reject names that are not valid shell variable names. | |
419 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
420 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
421 | fi | |
422 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
423 | case "$ac_option" in | |
424 | *=*) ;; | |
425 | *) ac_optarg=yes ;; | |
426 | esac | |
427 | eval "with_${ac_package}='$ac_optarg'" ;; | |
428 | ||
429 | -without-* | --without-*) | |
430 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
431 | # Reject names that are not valid shell variable names. | |
432 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
433 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
434 | fi | |
435 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
436 | eval "with_${ac_package}=no" ;; | |
437 | ||
438 | --x) | |
439 | # Obsolete; use --with-x. | |
440 | with_x=yes ;; | |
441 | ||
442 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
443 | | --x-incl | --x-inc | --x-in | --x-i) | |
444 | ac_prev=x_includes ;; | |
445 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
446 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
447 | x_includes="$ac_optarg" ;; | |
448 | ||
449 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
450 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
451 | ac_prev=x_libraries ;; | |
452 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
453 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
454 | x_libraries="$ac_optarg" ;; | |
455 | ||
456 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
457 | ;; | |
458 | ||
459 | *) | |
460 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
461 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
462 | fi | |
463 | if test "x$nonopt" != xNONE; then | |
464 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
465 | fi | |
466 | nonopt="$ac_option" | |
467 | ;; | |
468 | ||
469 | esac | |
470 | done | |
471 | ||
472 | if test -n "$ac_prev"; then | |
473 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
474 | fi | |
475 | ||
476 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
477 | ||
478 | # File descriptor usage: | |
479 | # 0 standard input | |
480 | # 1 file creation | |
481 | # 2 errors and warnings | |
482 | # 3 some systems may open it to /dev/tty | |
483 | # 4 used on the Kubota Titan | |
484 | # 6 checking for... messages and results | |
485 | # 5 compiler messages saved in config.log | |
486 | if test "$silent" = yes; then | |
487 | exec 6>/dev/null | |
488 | else | |
489 | exec 6>&1 | |
490 | fi | |
491 | exec 5>./config.log | |
492 | ||
493 | echo "\ | |
494 | This file contains any messages produced by compilers while | |
495 | running configure, to aid debugging if configure makes a mistake. | |
496 | " 1>&5 | |
497 | ||
498 | # Strip out --no-create and --no-recursion so they do not pile up. | |
499 | # Also quote any args containing shell metacharacters. | |
500 | ac_configure_args= | |
501 | for ac_arg | |
502 | do | |
503 | case "$ac_arg" in | |
504 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
505 | | --no-cr | --no-c) ;; | |
506 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
507 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
508 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
509 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
510 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
511 | esac | |
512 | done | |
513 | ||
514 | # NLS nuisances. | |
515 | # Only set these to C if already set. These must not be set unconditionally | |
516 | # because not all systems understand e.g. LANG=C (notably SCO). | |
517 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
518 | # Non-C LC_CTYPE values break the ctype check. | |
519 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
520 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
521 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
522 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
523 | ||
524 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
525 | rm -rf conftest* confdefs.h | |
526 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
527 | echo > confdefs.h | |
528 | ||
529 | # A filename unique to this package, relative to the directory that | |
530 | # configure is in, which we can look for to find out if srcdir is correct. | |
531 | ac_unique_file=tree.c | |
532 | ||
533 | # Find the source files, if location was not specified. | |
534 | if test -z "$srcdir"; then | |
535 | ac_srcdir_defaulted=yes | |
536 | # Try the directory containing this script, then its parent. | |
537 | ac_prog=$0 | |
538 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
539 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
540 | srcdir=$ac_confdir | |
541 | if test ! -r $srcdir/$ac_unique_file; then | |
542 | srcdir=.. | |
543 | fi | |
544 | else | |
545 | ac_srcdir_defaulted=no | |
546 | fi | |
547 | if test ! -r $srcdir/$ac_unique_file; then | |
548 | if test "$ac_srcdir_defaulted" = yes; then | |
549 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
550 | else | |
551 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
552 | fi | |
553 | fi | |
554 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
555 | ||
556 | # Prefer explicitly selected file to automatically selected ones. | |
7719ffbf ZW |
557 | if test -z "$CONFIG_SITE"; then |
558 | if test "x$prefix" != xNONE; then | |
559 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
560 | else | |
561 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
861bb6c1 JL |
562 | fi |
563 | fi | |
564 | for ac_site_file in $CONFIG_SITE; do | |
565 | if test -r "$ac_site_file"; then | |
566 | echo "loading site script $ac_site_file" | |
567 | . "$ac_site_file" | |
568 | fi | |
569 | done | |
570 | ||
571 | if test -r "$cache_file"; then | |
572 | echo "loading cache $cache_file" | |
573 | . $cache_file | |
574 | else | |
575 | echo "creating cache $cache_file" | |
576 | > $cache_file | |
577 | fi | |
578 | ||
579 | ac_ext=c | |
580 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
581 | ac_cpp='$CPP $CPPFLAGS' | |
582 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
cd9e5e7c | 583 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
861bb6c1 JL |
584 | cross_compiling=$ac_cv_prog_cc_cross |
585 | ||
cd9e5e7c MK |
586 | ac_exeext= |
587 | ac_objext=o | |
861bb6c1 JL |
588 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then |
589 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
590 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
591 | ac_n= ac_c=' | |
592 | ' ac_t=' ' | |
593 | else | |
594 | ac_n=-n ac_c= ac_t= | |
595 | fi | |
596 | else | |
597 | ac_n= ac_c='\c' ac_t= | |
598 | fi | |
599 | ||
600 | ||
601 | ||
602 | ||
861bb6c1 JL |
603 | remove=rm |
604 | hard_link=ln | |
605 | symbolic_link='ln -s' | |
606 | copy=cp | |
607 | ||
75a39864 JL |
608 | # Check for bogus environment variables. |
609 | # Test if LIBRARY_PATH contains the notation for the current directory | |
610 | # since this would lead to problems installing/building glibc. | |
611 | # LIBRARY_PATH contains the current directory if one of the following | |
612 | # is true: | |
613 | # - one of the terminals (":" and ";") is the first or last sign | |
614 | # - two terminals occur directly after each other | |
615 | # - the path contains an element with a dot in it | |
616 | echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6 | |
e8bec136 | 617 | echo "configure:618: checking LIBRARY_PATH variable" >&5 |
75a39864 JL |
618 | case ${LIBRARY_PATH} in |
619 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
620 | library_path_setting="contains current directory" | |
621 | ;; | |
622 | *) | |
623 | library_path_setting="ok" | |
624 | ;; | |
625 | esac | |
626 | echo "$ac_t""$library_path_setting" 1>&6 | |
627 | if test "$library_path_setting" != "ok"; then | |
628 | { echo "configure: error: | |
629 | *** LIBRARY_PATH shouldn't contain the current directory when | |
079bd08e | 630 | *** building gcc. Please change the environment variable |
75a39864 JL |
631 | *** and run configure again." 1>&2; exit 1; } |
632 | fi | |
633 | ||
634 | # Test if GCC_EXEC_PREFIX contains the notation for the current directory | |
635 | # since this would lead to problems installing/building glibc. | |
636 | # GCC_EXEC_PREFIX contains the current directory if one of the following | |
637 | # is true: | |
638 | # - one of the terminals (":" and ";") is the first or last sign | |
639 | # - two terminals occur directly after each other | |
640 | # - the path contains an element with a dot in it | |
641 | echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6 | |
e8bec136 | 642 | echo "configure:643: checking GCC_EXEC_PREFIX variable" >&5 |
75a39864 JL |
643 | case ${GCC_EXEC_PREFIX} in |
644 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
645 | gcc_exec_prefix_setting="contains current directory" | |
646 | ;; | |
647 | *) | |
648 | gcc_exec_prefix_setting="ok" | |
649 | ;; | |
650 | esac | |
651 | echo "$ac_t""$gcc_exec_prefix_setting" 1>&6 | |
652 | if test "$gcc_exec_prefix_setting" != "ok"; then | |
653 | { echo "configure: error: | |
654 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when | |
079bd08e | 655 | *** building gcc. Please change the environment variable |
75a39864 JL |
656 | *** and run configure again." 1>&2; exit 1; } |
657 | fi | |
658 | ||
861bb6c1 JL |
659 | # Check for additional parameters |
660 | ||
661 | # With GNU ld | |
662 | # Check whether --with-gnu-ld or --without-gnu-ld was given. | |
663 | if test "${with_gnu_ld+set}" = set; then | |
664 | withval="$with_gnu_ld" | |
df6faf79 | 665 | gnu_ld_flag="$with_gnu_ld" |
861bb6c1 | 666 | else |
df6faf79 | 667 | gnu_ld_flag=no |
861bb6c1 JL |
668 | fi |
669 | ||
670 | ||
ab339d62 AO |
671 | # With pre-defined ld |
672 | # Check whether --with-ld or --without-ld was given. | |
673 | if test "${with_ld+set}" = set; then | |
674 | withval="$with_ld" | |
3ccc3a56 | 675 | DEFAULT_LINKER="$with_ld" |
ab339d62 AO |
676 | fi |
677 | ||
3ccc3a56 AO |
678 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
679 | if test ! -x "$DEFAULT_LINKER"; then | |
680 | echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2 | |
e154a394 | 681 | elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
ab339d62 AO |
682 | gnu_ld_flag=yes |
683 | fi | |
684 | cat >> confdefs.h <<EOF | |
3ccc3a56 | 685 | #define DEFAULT_LINKER "$DEFAULT_LINKER" |
ab339d62 AO |
686 | EOF |
687 | ||
688 | fi | |
689 | ||
861bb6c1 JL |
690 | # With GNU as |
691 | # Check whether --with-gnu-as or --without-gnu-as was given. | |
692 | if test "${with_gnu_as+set}" = set; then | |
693 | withval="$with_gnu_as" | |
df6faf79 | 694 | gas_flag="$with_gnu_as" |
861bb6c1 | 695 | else |
df6faf79 | 696 | gas_flag=no |
861bb6c1 JL |
697 | fi |
698 | ||
699 | ||
ab339d62 AO |
700 | # Check whether --with-as or --without-as was given. |
701 | if test "${with_as+set}" = set; then | |
702 | withval="$with_as" | |
3ccc3a56 | 703 | DEFAULT_ASSEMBLER="$with_as" |
ab339d62 AO |
704 | fi |
705 | ||
3ccc3a56 AO |
706 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
707 | if test ! -x "$DEFAULT_ASSEMBLER"; then | |
708 | echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2 | |
e154a394 | 709 | elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
ab339d62 AO |
710 | gas_flag=yes |
711 | fi | |
712 | cat >> confdefs.h <<EOF | |
3ccc3a56 | 713 | #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER" |
ab339d62 AO |
714 | EOF |
715 | ||
3ccc3a56 | 716 | fi |
ab339d62 | 717 | |
861bb6c1 JL |
718 | # With stabs |
719 | # Check whether --with-stabs or --without-stabs was given. | |
720 | if test "${with_stabs+set}" = set; then | |
721 | withval="$with_stabs" | |
535b86ce | 722 | stabs="$with_stabs" |
861bb6c1 JL |
723 | else |
724 | stabs=no | |
725 | fi | |
726 | ||
727 | ||
728 | # With ELF | |
729 | # Check whether --with-elf or --without-elf was given. | |
730 | if test "${with_elf+set}" = set; then | |
731 | withval="$with_elf" | |
535b86ce | 732 | elf="$with_elf" |
861bb6c1 JL |
733 | else |
734 | elf=no | |
735 | fi | |
736 | ||
737 | ||
738 | # Specify the local prefix | |
4e88d51b | 739 | local_prefix= |
861bb6c1 JL |
740 | # Check whether --with-local-prefix or --without-local-prefix was given. |
741 | if test "${with_local_prefix+set}" = set; then | |
742 | withval="$with_local_prefix" | |
4e88d51b JM |
743 | case "${withval}" in |
744 | yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;; | |
745 | no) ;; | |
746 | *) local_prefix=$with_local_prefix ;; | |
747 | esac | |
861bb6c1 JL |
748 | fi |
749 | ||
750 | ||
751 | # Default local prefix if it is empty | |
75bffa71 | 752 | if test x$local_prefix = x; then |
861bb6c1 JL |
753 | local_prefix=/usr/local |
754 | fi | |
755 | ||
8f8d3278 NC |
756 | # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only |
757 | # passed in by the toplevel make and thus we'd get different behavior | |
758 | # depending on where we built the sources. | |
759 | gcc_gxx_include_dir= | |
861bb6c1 JL |
760 | # Specify the g++ header file directory |
761 | # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. | |
762 | if test "${with_gxx_include_dir+set}" = set; then | |
763 | withval="$with_gxx_include_dir" | |
4e88d51b JM |
764 | case "${withval}" in |
765 | yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;; | |
766 | no) ;; | |
8f8d3278 | 767 | *) gcc_gxx_include_dir=$with_gxx_include_dir ;; |
4e88d51b | 768 | esac |
861bb6c1 JL |
769 | fi |
770 | ||
771 | ||
8f8d3278 | 772 | if test x${gcc_gxx_include_dir} = x; then |
4e88d51b | 773 | if test x${enable_version_specific_runtime_libs} = xyes; then |
8f8d3278 | 774 | gcc_gxx_include_dir='${libsubdir}/include/g++' |
4e88d51b | 775 | else |
a270b446 | 776 | topsrcdir=${srcdir}/.. . ${srcdir}/../config.if |
e2187d3b | 777 | gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir} |
4e88d51b JM |
778 | fi |
779 | fi | |
780 | ||
39d6f2e8 MM |
781 | # Determine whether or not multilibs are enabled. |
782 | # Check whether --enable-multilib or --disable-multilib was given. | |
783 | if test "${enable_multilib+set}" = set; then | |
784 | enableval="$enable_multilib" | |
785 | : | |
786 | else | |
787 | enable_multilib=yes | |
788 | fi | |
789 | ||
790 | ||
791 | ||
a494747c MM |
792 | # Enable expensive internal checks |
793 | # Check whether --enable-checking or --disable-checking was given. | |
794 | if test "${enable_checking+set}" = set; then | |
795 | enableval="$enable_checking" | |
119d24d1 KG |
796 | ac_checking= |
797 | ac_tree_checking= | |
798 | ac_rtl_checking= | |
799 | ac_gc_checking= | |
800 | ac_gc_always_collect= | |
801 | case "${enableval}" in | |
51d0e20c | 802 | yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;; |
4e88d51b | 803 | no) ;; |
59f406b7 | 804 | *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," |
f4524c9e ZW |
805 | set fnord $enableval; shift |
806 | IFS="$ac_save_IFS" | |
c62e45ad KG |
807 | for check |
808 | do | |
f4524c9e | 809 | case $check in |
119d24d1 KG |
810 | misc) ac_checking=1 ;; |
811 | tree) ac_tree_checking=1 ;; | |
812 | rtl) ac_rtl_checking=1 ;; | |
813 | gc) ac_gc_checking=1 ;; | |
814 | gcac) ac_gc_always_collect=1 ;; | |
815 | *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;; | |
816 | esac | |
817 | done | |
818 | ;; | |
819 | esac | |
51d0e20c AJ |
820 | |
821 | else | |
822 | # Enable some checks by default for development versions of GCC | |
823 | ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; | |
824 | fi | |
825 | ||
119d24d1 KG |
826 | if test x$ac_checking != x ; then |
827 | cat >> confdefs.h <<\EOF | |
f4524c9e ZW |
828 | #define ENABLE_CHECKING 1 |
829 | EOF | |
119d24d1 KG |
830 | |
831 | fi | |
832 | if test x$ac_tree_checking != x ; then | |
833 | cat >> confdefs.h <<\EOF | |
f4524c9e ZW |
834 | #define ENABLE_TREE_CHECKING 1 |
835 | EOF | |
119d24d1 KG |
836 | |
837 | fi | |
838 | if test x$ac_rtl_checking != x ; then | |
839 | cat >> confdefs.h <<\EOF | |
f4524c9e ZW |
840 | #define ENABLE_RTL_CHECKING 1 |
841 | EOF | |
119d24d1 KG |
842 | |
843 | fi | |
844 | if test x$ac_gc_checking != x ; then | |
845 | cat >> confdefs.h <<\EOF | |
f4524c9e ZW |
846 | #define ENABLE_GC_CHECKING 1 |
847 | EOF | |
119d24d1 KG |
848 | |
849 | fi | |
850 | if test x$ac_gc_always_collect != x ; then | |
851 | cat >> confdefs.h <<\EOF | |
f4524c9e ZW |
852 | #define ENABLE_GC_ALWAYS_COLLECT 1 |
853 | EOF | |
119d24d1 KG |
854 | |
855 | fi | |
856 | ||
a494747c | 857 | |
3ecc3258 ZW |
858 | # Check whether --enable-cpp or --disable-cpp was given. |
859 | if test "${enable_cpp+set}" = set; then | |
860 | enableval="$enable_cpp" | |
861 | : | |
862 | else | |
863 | enable_cpp=yes | |
864 | fi | |
865 | ||
866 | ||
867 | # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. | |
868 | if test "${with_cpp_install_dir+set}" = set; then | |
869 | withval="$with_cpp_install_dir" | |
870 | if test x$withval = xyes; then | |
871 | { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; } | |
872 | elif test x$withval != xno; then | |
873 | cpp_install_dir=$withval | |
874 | fi | |
875 | fi | |
876 | ||
877 | ||
c5c76735 JL |
878 | # Enable Multibyte Characters for C/C++ |
879 | # Check whether --enable-c-mbchar or --disable-c-mbchar was given. | |
880 | if test "${enable_c_mbchar+set}" = set; then | |
881 | enableval="$enable_c_mbchar" | |
2618c083 | 882 | if test x$enable_c_mbchar != xno; then |
9ec7291f ZW |
883 | cat >> confdefs.h <<\EOF |
884 | #define MULTIBYTE_CHARS 1 | |
885 | EOF | |
886 | ||
c5c76735 JL |
887 | fi |
888 | fi | |
889 | ||
890 | ||
861bb6c1 JL |
891 | # Enable threads |
892 | # Pass with no value to take the default | |
893 | # Pass with a value to specify a thread package | |
894 | # Check whether --enable-threads or --disable-threads was given. | |
895 | if test "${enable_threads+set}" = set; then | |
896 | enableval="$enable_threads" | |
981d4858 | 897 | : |
861bb6c1 JL |
898 | else |
899 | enable_threads='' | |
900 | fi | |
901 | ||
902 | ||
e445171e | 903 | enable_threads_flag=$enable_threads |
861bb6c1 | 904 | # Check if a valid thread package |
e445171e | 905 | case x${enable_threads_flag} in |
861bb6c1 JL |
906 | x | xno) |
907 | # No threads | |
a851212a | 908 | target_thread_file='single' |
861bb6c1 JL |
909 | ;; |
910 | xyes) | |
911 | # default | |
a851212a | 912 | target_thread_file='' |
861bb6c1 JL |
913 | ;; |
914 | xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \ | |
a473fe45 | 915 | xsolaris | xwin32 | xdce | xvxworks | xaix) |
e445171e | 916 | target_thread_file=$enable_threads_flag |
861bb6c1 JL |
917 | ;; |
918 | *) | |
919 | echo "$enable_threads is an unknown thread package" 1>&2 | |
920 | exit 1 | |
921 | ;; | |
922 | esac | |
923 | ||
d8bb17c8 OP |
924 | # Check whether --enable-objc-gc or --disable-objc-gc was given. |
925 | if test "${enable_objc_gc+set}" = set; then | |
926 | enableval="$enable_objc_gc" | |
2618c083 | 927 | if test x$enable_objc_gc = xno; then |
d8bb17c8 OP |
928 | objc_boehm_gc='' |
929 | else | |
930 | objc_boehm_gc=1 | |
931 | fi | |
932 | else | |
933 | objc_boehm_gc='' | |
934 | fi | |
935 | ||
936 | ||
90e6a802 RL |
937 | # Check whether --with-dwarf2 or --without-dwarf2 was given. |
938 | if test "${with_dwarf2+set}" = set; then | |
939 | withval="$with_dwarf2" | |
940 | dwarf2="$with_dwarf2" | |
941 | else | |
942 | dwarf2=no | |
943 | fi | |
944 | ||
945 | ||
50503ac8 RH |
946 | # Check whether --enable-shared or --disable-shared was given. |
947 | if test "${enable_shared+set}" = set; then | |
948 | enableval="$enable_shared" | |
c785e0fa AO |
949 | |
950 | case $enable_shared in | |
951 | yes | no) ;; | |
952 | *) | |
953 | enable_shared=no | |
954 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
955 | for pkg in $enableval; do | |
956 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
957 | enable_shared=yes | |
958 | fi | |
959 | done | |
960 | IFS="$ac_save_ifs" | |
961 | ;; | |
962 | esac | |
963 | ||
50503ac8 RH |
964 | else |
965 | enable_shared=yes | |
966 | fi | |
967 | ||
968 | ||
969 | ||
861bb6c1 JL |
970 | # Determine the host, build, and target systems |
971 | ac_aux_dir= | |
972 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do | |
973 | if test -f $ac_dir/install-sh; then | |
974 | ac_aux_dir=$ac_dir | |
975 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
976 | break | |
977 | elif test -f $ac_dir/install.sh; then | |
978 | ac_aux_dir=$ac_dir | |
979 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
980 | break | |
981 | fi | |
982 | done | |
983 | if test -z "$ac_aux_dir"; then | |
984 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } | |
985 | fi | |
986 | ac_config_guess=$ac_aux_dir/config.guess | |
987 | ac_config_sub=$ac_aux_dir/config.sub | |
988 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
989 | ||
990 | ||
991 | # Do some error checking and defaulting for the host and target type. | |
992 | # The inputs are: | |
993 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
994 | # | |
995 | # The rules are: | |
996 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
997 | # same time. | |
998 | # 2. Host defaults to nonopt. | |
999 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1000 | # as determined by config.guess. | |
1001 | # 4. Target and build default to nonopt. | |
1002 | # 5. If nonopt is not specified, then target and build default to host. | |
1003 | ||
1004 | # The aliases save the names the user supplied, while $host etc. | |
1005 | # will get canonicalized. | |
1006 | case $host---$target---$nonopt in | |
1007 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1008 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1009 | esac | |
1010 | ||
1011 | ||
1012 | # Make sure we can run config.sub. | |
6f144c9c | 1013 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : |
861bb6c1 JL |
1014 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } |
1015 | fi | |
1016 | ||
1017 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
e8bec136 | 1018 | echo "configure:1019: checking host system type" >&5 |
861bb6c1 JL |
1019 | |
1020 | host_alias=$host | |
1021 | case "$host_alias" in | |
1022 | NONE) | |
1023 | case $nonopt in | |
1024 | NONE) | |
6f144c9c | 1025 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : |
861bb6c1 JL |
1026 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } |
1027 | fi ;; | |
1028 | *) host_alias=$nonopt ;; | |
1029 | esac ;; | |
1030 | esac | |
1031 | ||
6f144c9c | 1032 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` |
861bb6c1 JL |
1033 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
1034 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1035 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1036 | echo "$ac_t""$host" 1>&6 | |
1037 | ||
1038 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
e8bec136 | 1039 | echo "configure:1040: checking target system type" >&5 |
861bb6c1 JL |
1040 | |
1041 | target_alias=$target | |
1042 | case "$target_alias" in | |
1043 | NONE) | |
1044 | case $nonopt in | |
1045 | NONE) target_alias=$host_alias ;; | |
1046 | *) target_alias=$nonopt ;; | |
1047 | esac ;; | |
1048 | esac | |
1049 | ||
6f144c9c | 1050 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` |
861bb6c1 JL |
1051 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
1052 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1053 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1054 | echo "$ac_t""$target" 1>&6 | |
1055 | ||
1056 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
e8bec136 | 1057 | echo "configure:1058: checking build system type" >&5 |
861bb6c1 JL |
1058 | |
1059 | build_alias=$build | |
1060 | case "$build_alias" in | |
1061 | NONE) | |
1062 | case $nonopt in | |
1063 | NONE) build_alias=$host_alias ;; | |
1064 | *) build_alias=$nonopt ;; | |
1065 | esac ;; | |
1066 | esac | |
1067 | ||
6f144c9c | 1068 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` |
861bb6c1 JL |
1069 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
1070 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1071 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1072 | echo "$ac_t""$build" 1>&6 | |
1073 | ||
1074 | test "$host_alias" != "$target_alias" && | |
1075 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1076 | NONENONEs,x,x, && | |
1077 | program_prefix=${target_alias}- | |
1078 | ||
1079 | ||
e9a25f70 JL |
1080 | # Find the native compiler |
1081 | # Extract the first word of "gcc", so it can be a program name with args. | |
1082 | set dummy gcc; ac_word=$2 | |
1083 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e8bec136 | 1084 | echo "configure:1085: checking for $ac_word" >&5 |
e9a25f70 JL |
1085 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1086 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1087 | else | |
1088 | if test -n "$CC"; then | |
1089 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1090 | else | |
cd9e5e7c | 1091 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
1092 | ac_dummy="$PATH" |
1093 | for ac_dir in $ac_dummy; do | |
e9a25f70 JL |
1094 | test -z "$ac_dir" && ac_dir=. |
1095 | if test -f $ac_dir/$ac_word; then | |
1096 | ac_cv_prog_CC="gcc" | |
1097 | break | |
1098 | fi | |
1099 | done | |
1100 | IFS="$ac_save_ifs" | |
1101 | fi | |
1102 | fi | |
1103 | CC="$ac_cv_prog_CC" | |
1104 | if test -n "$CC"; then | |
1105 | echo "$ac_t""$CC" 1>&6 | |
1106 | else | |
1107 | echo "$ac_t""no" 1>&6 | |
1108 | fi | |
1109 | ||
1110 | if test -z "$CC"; then | |
1111 | # Extract the first word of "cc", so it can be a program name with args. | |
1112 | set dummy cc; ac_word=$2 | |
1113 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e8bec136 | 1114 | echo "configure:1115: checking for $ac_word" >&5 |
e9a25f70 JL |
1115 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1116 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1117 | else | |
1118 | if test -n "$CC"; then | |
1119 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1120 | else | |
cd9e5e7c | 1121 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
e9a25f70 | 1122 | ac_prog_rejected=no |
b27d2bd5 MK |
1123 | ac_dummy="$PATH" |
1124 | for ac_dir in $ac_dummy; do | |
e9a25f70 JL |
1125 | test -z "$ac_dir" && ac_dir=. |
1126 | if test -f $ac_dir/$ac_word; then | |
1127 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
1128 | ac_prog_rejected=yes | |
1129 | continue | |
1130 | fi | |
1131 | ac_cv_prog_CC="cc" | |
1132 | break | |
1133 | fi | |
1134 | done | |
1135 | IFS="$ac_save_ifs" | |
1136 | if test $ac_prog_rejected = yes; then | |
1137 | # We found a bogon in the path, so make sure we never use it. | |
1138 | set dummy $ac_cv_prog_CC | |
1139 | shift | |
1140 | if test $# -gt 0; then | |
1141 | # We chose a different compiler from the bogus one. | |
1142 | # However, it has the same basename, so the bogon will be chosen | |
1143 | # first if we set CC to just the basename; use the full file name. | |
1144 | shift | |
1145 | set dummy "$ac_dir/$ac_word" "$@" | |
1146 | shift | |
1147 | ac_cv_prog_CC="$@" | |
1148 | fi | |
1149 | fi | |
1150 | fi | |
1151 | fi | |
1152 | CC="$ac_cv_prog_CC" | |
1153 | if test -n "$CC"; then | |
1154 | echo "$ac_t""$CC" 1>&6 | |
1155 | else | |
1156 | echo "$ac_t""no" 1>&6 | |
1157 | fi | |
1158 | ||
cd9e5e7c MK |
1159 | if test -z "$CC"; then |
1160 | case "`uname -s`" in | |
1161 | *win32* | *WIN32*) | |
1162 | # Extract the first word of "cl", so it can be a program name with args. | |
1163 | set dummy cl; ac_word=$2 | |
1164 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e8bec136 | 1165 | echo "configure:1166: checking for $ac_word" >&5 |
cd9e5e7c MK |
1166 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1167 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1168 | else | |
1169 | if test -n "$CC"; then | |
1170 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1171 | else | |
1172 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
b27d2bd5 MK |
1173 | ac_dummy="$PATH" |
1174 | for ac_dir in $ac_dummy; do | |
cd9e5e7c MK |
1175 | test -z "$ac_dir" && ac_dir=. |
1176 | if test -f $ac_dir/$ac_word; then | |
1177 | ac_cv_prog_CC="cl" | |
1178 | break | |
1179 | fi | |
1180 | done | |
1181 | IFS="$ac_save_ifs" | |
1182 | fi | |
1183 | fi | |
1184 | CC="$ac_cv_prog_CC" | |
1185 | if test -n "$CC"; then | |
1186 | echo "$ac_t""$CC" 1>&6 | |
1187 | else | |
1188 | echo "$ac_t""no" 1>&6 | |
1189 | fi | |
1190 | ;; | |
1191 | esac | |
1192 | fi | |
e9a25f70 JL |
1193 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
1194 | fi | |
1195 | ||
1196 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
e8bec136 | 1197 | echo "configure:1198: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
e9a25f70 JL |
1198 | |
1199 | ac_ext=c | |
1200 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1201 | ac_cpp='$CPP $CPPFLAGS' | |
1202 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
cd9e5e7c | 1203 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
e9a25f70 JL |
1204 | cross_compiling=$ac_cv_prog_cc_cross |
1205 | ||
b27d2bd5 MK |
1206 | cat > conftest.$ac_ext << EOF |
1207 | ||
e8bec136 | 1208 | #line 1209 "configure" |
e9a25f70 | 1209 | #include "confdefs.h" |
b27d2bd5 | 1210 | |
e9a25f70 JL |
1211 | main(){return(0);} |
1212 | EOF | |
e8bec136 | 1213 | if { (eval echo configure:1214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
e9a25f70 JL |
1214 | ac_cv_prog_cc_works=yes |
1215 | # If we can't run a trivial program, we are probably using a cross compiler. | |
1216 | if (./conftest; exit) 2>/dev/null; then | |
1217 | ac_cv_prog_cc_cross=no | |
1218 | else | |
1219 | ac_cv_prog_cc_cross=yes | |
1220 | fi | |
1221 | else | |
1222 | echo "configure: failed program was:" >&5 | |
1223 | cat conftest.$ac_ext >&5 | |
1224 | ac_cv_prog_cc_works=no | |
1225 | fi | |
1226 | rm -fr conftest* | |
b27d2bd5 MK |
1227 | ac_ext=c |
1228 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1229 | ac_cpp='$CPP $CPPFLAGS' | |
1230 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1231 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1232 | cross_compiling=$ac_cv_prog_cc_cross | |
e9a25f70 JL |
1233 | |
1234 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
1235 | if test $ac_cv_prog_cc_works = no; then | |
1236 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
1237 | fi | |
1238 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
e8bec136 | 1239 | echo "configure:1240: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
e9a25f70 JL |
1240 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
1241 | cross_compiling=$ac_cv_prog_cc_cross | |
1242 | ||
1243 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
e8bec136 | 1244 | echo "configure:1245: checking whether we are using GNU C" >&5 |
e9a25f70 JL |
1245 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
1246 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1247 | else | |
1248 | cat > conftest.c <<EOF | |
1249 | #ifdef __GNUC__ | |
1250 | yes; | |
1251 | #endif | |
1252 | EOF | |
e8bec136 | 1253 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
e9a25f70 JL |
1254 | ac_cv_prog_gcc=yes |
1255 | else | |
1256 | ac_cv_prog_gcc=no | |
1257 | fi | |
1258 | fi | |
1259 | ||
1260 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
1261 | ||
1262 | if test $ac_cv_prog_gcc = yes; then | |
1263 | GCC=yes | |
cd9e5e7c MK |
1264 | else |
1265 | GCC= | |
1266 | fi | |
1267 | ||
1268 | ac_test_CFLAGS="${CFLAGS+set}" | |
1269 | ac_save_CFLAGS="$CFLAGS" | |
1270 | CFLAGS= | |
1271 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
e8bec136 | 1272 | echo "configure:1273: checking whether ${CC-cc} accepts -g" >&5 |
e9a25f70 JL |
1273 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
1274 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1275 | else | |
1276 | echo 'void f(){}' > conftest.c | |
1277 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
1278 | ac_cv_prog_cc_g=yes | |
1279 | else | |
1280 | ac_cv_prog_cc_g=no | |
1281 | fi | |
1282 | rm -f conftest* | |
1283 | ||
1284 | fi | |
1285 | ||
1286 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
cd9e5e7c MK |
1287 | if test "$ac_test_CFLAGS" = set; then |
1288 | CFLAGS="$ac_save_CFLAGS" | |
1289 | elif test $ac_cv_prog_cc_g = yes; then | |
1290 | if test "$GCC" = yes; then | |
e9a25f70 JL |
1291 | CFLAGS="-g -O2" |
1292 | else | |
cd9e5e7c | 1293 | CFLAGS="-g" |
81814e35 | 1294 | fi |
3723cad9 | 1295 | else |
cd9e5e7c MK |
1296 | if test "$GCC" = yes; then |
1297 | CFLAGS="-O2" | |
1298 | else | |
1299 | CFLAGS= | |
1300 | fi | |
e9a25f70 JL |
1301 | fi |
1302 | ||
3ec83fc2 RH |
1303 | if test "x$CC" != xcc; then |
1304 | echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 | |
e8bec136 | 1305 | echo "configure:1306: checking whether $CC and cc understand -c and -o together" >&5 |
3ec83fc2 RH |
1306 | else |
1307 | echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 | |
e8bec136 | 1308 | echo "configure:1309: checking whether cc understands -c and -o together" >&5 |
3ec83fc2 RH |
1309 | fi |
1310 | set dummy $CC; ac_cc="`echo $2 | | |
1311 | sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" | |
1312 | if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then | |
1313 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1314 | else | |
1315 | echo 'foo(){}' > conftest.c | |
1316 | # Make sure it works both with $CC and with simple cc. | |
1317 | # We do the test twice because some compilers refuse to overwrite an | |
1318 | # existing .o file with -o, though they will create one. | |
1319 | ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' | |
e8bec136 RO |
1320 | if { (eval echo configure:1321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && |
1321 | test -f conftest.o && { (eval echo configure:1322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; | |
3ec83fc2 RH |
1322 | then |
1323 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
1324 | if test "x$CC" != xcc; then | |
1325 | # Test first that cc exists at all. | |
e8bec136 | 1326 | if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then |
3ec83fc2 | 1327 | ac_try='cc -c conftest.c -o conftest.o 1>&5' |
e8bec136 RO |
1328 | if { (eval echo configure:1329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && |
1329 | test -f conftest.o && { (eval echo configure:1330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; | |
3ec83fc2 RH |
1330 | then |
1331 | # cc works too. | |
1332 | : | |
1333 | else | |
1334 | # cc exists but doesn't like -o. | |
1335 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
1336 | fi | |
1337 | fi | |
1338 | fi | |
1339 | else | |
1340 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
1341 | fi | |
1342 | rm -f conftest* | |
1343 | ||
1344 | fi | |
1345 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then | |
1346 | echo "$ac_t""yes" 1>&6 | |
1347 | else | |
1348 | echo "$ac_t""no" 1>&6 | |
1349 | cat >> confdefs.h <<\EOF | |
1350 | #define NO_MINUS_C_MINUS_O 1 | |
1351 | EOF | |
1352 | ||
1353 | fi | |
1354 | ||
b8dad04b | 1355 | # autoconf is lame and doesn't give us any substitution variable for this. |
e38df833 | 1356 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then |
b4c7e567 | 1357 | NO_MINUS_C_MINUS_O=yes |
b8dad04b ZW |
1358 | else |
1359 | OUTPUT_OPTION='-o $@' | |
b4c7e567 | 1360 | fi |
3ec83fc2 RH |
1361 | |
1362 | ||
b8dad04b | 1363 | |
75e93faa | 1364 | echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6 |
e8bec136 | 1365 | echo "configure:1366: checking whether ${CC-cc} accepts -Wno-long-long" >&5 |
75e93faa ZW |
1366 | if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then |
1367 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1368 | else | |
1369 | save_CFLAGS="$CFLAGS" | |
1370 | CFLAGS="-Wno-long-long" | |
1371 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 1372 | #line 1373 "configure" |
75e93faa ZW |
1373 | #include "confdefs.h" |
1374 | ||
1375 | int main() { | |
1376 | ||
1377 | ; return 0; } | |
1378 | EOF | |
e8bec136 | 1379 | if { (eval echo configure:1380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1380 | rm -rf conftest* |
1381 | ac_cv_prog_cc_no_long_long=yes | |
1382 | else | |
1383 | echo "configure: failed program was:" >&5 | |
1384 | cat conftest.$ac_ext >&5 | |
1385 | rm -rf conftest* | |
1386 | ac_cv_prog_cc_no_long_long=no | |
1387 | fi | |
1388 | rm -f conftest* | |
1389 | CFLAGS="$save_CFLAGS" | |
1390 | fi | |
1391 | ||
1392 | echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6 | |
1393 | strict1_warn= | |
1394 | if test $ac_cv_prog_cc_no_long_long = yes; then | |
1395 | strict1_warn="-pedantic -Wno-long-long" | |
1396 | fi | |
1397 | ||
1398 | ||
84c041a1 | 1399 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
e8bec136 | 1400 | echo "configure:1401: checking how to run the C preprocessor" >&5 |
84c041a1 ZW |
1401 | # On Suns, sometimes $CPP names a directory. |
1402 | if test -n "$CPP" && test -d "$CPP"; then | |
1403 | CPP= | |
1404 | fi | |
1405 | if test -z "$CPP"; then | |
1406 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
1407 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1408 | else | |
1409 | # This must be in double quotes, not single quotes, because CPP may get | |
1410 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
1411 | CPP="${CC-cc} -E" | |
1412 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
1413 | # not just through cpp. | |
1414 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 1415 | #line 1416 "configure" |
84c041a1 ZW |
1416 | #include "confdefs.h" |
1417 | #include <assert.h> | |
1418 | Syntax Error | |
1419 | EOF | |
1420 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e8bec136 | 1421 | { (eval echo configure:1422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
84c041a1 ZW |
1422 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1423 | if test -z "$ac_err"; then | |
1424 | : | |
1425 | else | |
1426 | echo "$ac_err" >&5 | |
1427 | echo "configure: failed program was:" >&5 | |
1428 | cat conftest.$ac_ext >&5 | |
1429 | rm -rf conftest* | |
1430 | CPP="${CC-cc} -E -traditional-cpp" | |
1431 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 1432 | #line 1433 "configure" |
84c041a1 ZW |
1433 | #include "confdefs.h" |
1434 | #include <assert.h> | |
1435 | Syntax Error | |
1436 | EOF | |
1437 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e8bec136 | 1438 | { (eval echo configure:1439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
84c041a1 ZW |
1439 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1440 | if test -z "$ac_err"; then | |
1441 | : | |
1442 | else | |
1443 | echo "$ac_err" >&5 | |
1444 | echo "configure: failed program was:" >&5 | |
1445 | cat conftest.$ac_ext >&5 | |
1446 | rm -rf conftest* | |
1447 | CPP="${CC-cc} -nologo -E" | |
1448 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 1449 | #line 1450 "configure" |
84c041a1 ZW |
1450 | #include "confdefs.h" |
1451 | #include <assert.h> | |
1452 | Syntax Error | |
1453 | EOF | |
1454 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e8bec136 | 1455 | { (eval echo configure:1456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
84c041a1 ZW |
1456 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1457 | if test -z "$ac_err"; then | |
1458 | : | |
1459 | else | |
1460 | echo "$ac_err" >&5 | |
1461 | echo "configure: failed program was:" >&5 | |
1462 | cat conftest.$ac_ext >&5 | |
1463 | rm -rf conftest* | |
1464 | CPP=/lib/cpp | |
1465 | fi | |
1466 | rm -f conftest* | |
1467 | fi | |
1468 | rm -f conftest* | |
1469 | fi | |
1470 | rm -f conftest* | |
1471 | ac_cv_prog_CPP="$CPP" | |
1472 | fi | |
1473 | CPP="$ac_cv_prog_CPP" | |
1474 | else | |
1475 | ac_cv_prog_CPP="$CPP" | |
1476 | fi | |
1477 | echo "$ac_t""$CPP" 1>&6 | |
1478 | ||
75e93faa | 1479 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
e8bec136 | 1480 | echo "configure:1481: checking for inline" >&5 |
75e93faa ZW |
1481 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1482 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1483 | else | |
1484 | ac_cv_c_inline=no | |
1485 | for ac_kw in inline __inline__ __inline; do | |
1486 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 1487 | #line 1488 "configure" |
75e93faa ZW |
1488 | #include "confdefs.h" |
1489 | ||
1490 | int main() { | |
1491 | } $ac_kw foo() { | |
1492 | ; return 0; } | |
1493 | EOF | |
e8bec136 | 1494 | if { (eval echo configure:1495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1495 | rm -rf conftest* |
1496 | ac_cv_c_inline=$ac_kw; break | |
1497 | else | |
1498 | echo "configure: failed program was:" >&5 | |
1499 | cat conftest.$ac_ext >&5 | |
1500 | fi | |
1501 | rm -f conftest* | |
1502 | done | |
1503 | ||
1504 | fi | |
1505 | ||
1506 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1507 | case "$ac_cv_c_inline" in | |
1508 | inline | yes) ;; | |
1509 | no) cat >> confdefs.h <<\EOF | |
1510 | #define inline | |
1511 | EOF | |
1512 | ;; | |
1513 | *) cat >> confdefs.h <<EOF | |
1514 | #define inline $ac_cv_c_inline | |
1515 | EOF | |
1516 | ;; | |
1517 | esac | |
1518 | ||
1519 | echo $ac_n "checking for volatile""... $ac_c" 1>&6 | |
e8bec136 | 1520 | echo "configure:1521: checking for volatile" >&5 |
75e93faa ZW |
1521 | if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then |
1522 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1523 | else | |
1524 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 1525 | #line 1526 "configure" |
75e93faa ZW |
1526 | #include "confdefs.h" |
1527 | ||
1528 | int main() { | |
1529 | volatile int foo; | |
1530 | ; return 0; } | |
1531 | EOF | |
e8bec136 | 1532 | if { (eval echo configure:1533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1533 | rm -rf conftest* |
1534 | gcc_cv_c_volatile=yes | |
1535 | else | |
1536 | echo "configure: failed program was:" >&5 | |
1537 | cat conftest.$ac_ext >&5 | |
1538 | rm -rf conftest* | |
1539 | gcc_cv_c_volatile=no | |
1540 | fi | |
1541 | rm -f conftest* | |
1542 | fi | |
1543 | ||
1544 | echo "$ac_t""$gcc_cv_c_volatile" 1>&6 | |
1545 | if test $gcc_cv_c_volatile = yes ; then | |
1546 | cat >> confdefs.h <<\EOF | |
1547 | #define HAVE_VOLATILE 1 | |
1548 | EOF | |
1549 | ||
1550 | fi | |
1551 | ||
1552 | ||
04cabffc | 1553 | echo $ac_n "checking for long double""... $ac_c" 1>&6 |
e8bec136 | 1554 | echo "configure:1555: checking for long double" >&5 |
04cabffc KG |
1555 | if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then |
1556 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1557 | else | |
1558 | if test "$GCC" = yes; then | |
1559 | gcc_cv_c_long_double=yes | |
1560 | else | |
1561 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 1562 | #line 1563 "configure" |
04cabffc KG |
1563 | #include "confdefs.h" |
1564 | ||
1565 | int main() { | |
1566 | /* The Stardent Vistra knows sizeof(long double), but does not support it. */ | |
1567 | long double foo = 0.0; | |
1568 | /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ | |
1569 | switch (0) case 0: case (sizeof(long double) >= sizeof(double)):; | |
1570 | ; return 0; } | |
1571 | EOF | |
e8bec136 | 1572 | if { (eval echo configure:1573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
04cabffc KG |
1573 | rm -rf conftest* |
1574 | gcc_cv_c_long_double=yes | |
1575 | else | |
1576 | echo "configure: failed program was:" >&5 | |
1577 | cat conftest.$ac_ext >&5 | |
1578 | rm -rf conftest* | |
1579 | gcc_cv_c_long_double=no | |
1580 | fi | |
1581 | rm -f conftest* | |
1582 | fi | |
1583 | fi | |
1584 | ||
1585 | echo "$ac_t""$gcc_cv_c_long_double" 1>&6 | |
1586 | if test $gcc_cv_c_long_double = yes; then | |
1587 | cat >> confdefs.h <<\EOF | |
1588 | #define HAVE_LONG_DOUBLE 1 | |
1589 | EOF | |
1590 | ||
1591 | fi | |
1592 | ||
75e93faa | 1593 | echo $ac_n "checking for long long int""... $ac_c" 1>&6 |
e8bec136 | 1594 | echo "configure:1595: checking for long long int" >&5 |
75e93faa ZW |
1595 | if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then |
1596 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1597 | else | |
1598 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 1599 | #line 1600 "configure" |
75e93faa | 1600 | #include "confdefs.h" |
61842080 | 1601 | |
75e93faa ZW |
1602 | int main() { |
1603 | long long int i; | |
1604 | ; return 0; } | |
1605 | EOF | |
e8bec136 | 1606 | if { (eval echo configure:1607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1607 | rm -rf conftest* |
1608 | ac_cv_c_long_long=yes | |
1609 | else | |
1610 | echo "configure: failed program was:" >&5 | |
1611 | cat conftest.$ac_ext >&5 | |
1612 | rm -rf conftest* | |
1613 | ac_cv_c_long_long=no | |
1614 | fi | |
1615 | rm -f conftest* | |
1616 | fi | |
1617 | ||
1618 | echo "$ac_t""$ac_cv_c_long_long" 1>&6 | |
1619 | if test $ac_cv_c_long_long = yes; then | |
1620 | cat >> confdefs.h <<\EOF | |
1621 | #define HAVE_LONG_LONG 1 | |
1622 | EOF | |
1623 | ||
1624 | fi | |
1625 | echo $ac_n "checking for __int64""... $ac_c" 1>&6 | |
e8bec136 | 1626 | echo "configure:1627: checking for __int64" >&5 |
75e93faa | 1627 | if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then |
5c3bc9fb GK |
1628 | echo $ac_n "(cached) $ac_c" 1>&6 |
1629 | else | |
75e93faa | 1630 | cat > conftest.$ac_ext <<EOF |
e8bec136 | 1631 | #line 1632 "configure" |
5c3bc9fb GK |
1632 | #include "confdefs.h" |
1633 | ||
1634 | int main() { | |
75e93faa ZW |
1635 | __int64 i; |
1636 | ; return 0; } | |
1637 | EOF | |
e8bec136 | 1638 | if { (eval echo configure:1639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1639 | rm -rf conftest* |
1640 | ac_cv_c___int64=yes | |
1641 | else | |
1642 | echo "configure: failed program was:" >&5 | |
1643 | cat conftest.$ac_ext >&5 | |
1644 | rm -rf conftest* | |
1645 | ac_cv_c___int64=no | |
1646 | fi | |
1647 | rm -f conftest* | |
1648 | fi | |
5c3bc9fb | 1649 | |
75e93faa ZW |
1650 | echo "$ac_t""$ac_cv_c___int64" 1>&6 |
1651 | if test $ac_cv_c___int64 = yes; then | |
1652 | cat >> confdefs.h <<\EOF | |
1653 | #define HAVE___INT64 1 | |
1654 | EOF | |
1655 | ||
1656 | fi | |
1657 | ||
827ae6cf | 1658 | echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6 |
e8bec136 | 1659 | echo "configure:1660: checking for built-in _Bool" >&5 |
827ae6cf RO |
1660 | if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then |
1661 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1662 | else | |
1663 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 1664 | #line 1665 "configure" |
827ae6cf RO |
1665 | #include "confdefs.h" |
1666 | ||
1667 | int main() { | |
1668 | _Bool foo; | |
1669 | ; return 0; } | |
1670 | EOF | |
e8bec136 | 1671 | if { (eval echo configure:1672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
827ae6cf RO |
1672 | rm -rf conftest* |
1673 | gcc_cv_c__bool=yes | |
1674 | else | |
1675 | echo "configure: failed program was:" >&5 | |
1676 | cat conftest.$ac_ext >&5 | |
1677 | rm -rf conftest* | |
1678 | gcc_cv_c__bool=no | |
1679 | fi | |
1680 | rm -f conftest* | |
1681 | ||
1682 | fi | |
1683 | ||
1684 | echo "$ac_t""$gcc_cv_c__bool" 1>&6 | |
1685 | if test $gcc_cv_c__bool = yes; then | |
1686 | cat >> confdefs.h <<\EOF | |
1687 | #define HAVE__BOOL 1 | |
1688 | EOF | |
1689 | ||
1690 | fi | |
1691 | ||
75e93faa ZW |
1692 | |
1693 | # sizeof(char) is 1 by definition. | |
1694 | echo $ac_n "checking size of short""... $ac_c" 1>&6 | |
e8bec136 | 1695 | echo "configure:1696: checking size of short" >&5 |
75e93faa ZW |
1696 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
1697 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1698 | else | |
1699 | for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. | |
1700 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 1701 | #line 1702 "configure" |
75e93faa ZW |
1702 | #include "confdefs.h" |
1703 | #include "confdefs.h" | |
1704 | #include <sys/types.h> | |
1705 | ||
1706 | ||
1707 | int main() { | |
1708 | switch (0) case 0: case (sizeof (short) == $ac_size):; | |
5c3bc9fb GK |
1709 | ; return 0; } |
1710 | EOF | |
e8bec136 | 1711 | if { (eval echo configure:1712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5c3bc9fb | 1712 | rm -rf conftest* |
75e93faa | 1713 | ac_cv_sizeof_short=$ac_size |
ff5def20 | 1714 | else |
5c3bc9fb GK |
1715 | echo "configure: failed program was:" >&5 |
1716 | cat conftest.$ac_ext >&5 | |
75e93faa ZW |
1717 | fi |
1718 | rm -f conftest* | |
1719 | if test x$ac_cv_sizeof_short != x ; then break; fi | |
1720 | done | |
1721 | ||
1722 | fi | |
1723 | ||
1724 | if test x$ac_cv_sizeof_short = x ; then | |
1725 | { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } | |
1726 | fi | |
1727 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 | |
1728 | cat >> confdefs.h <<EOF | |
1729 | #define SIZEOF_SHORT $ac_cv_sizeof_short | |
1730 | EOF | |
1731 | ||
1732 | ||
1733 | echo $ac_n "checking size of int""... $ac_c" 1>&6 | |
e8bec136 | 1734 | echo "configure:1735: checking size of int" >&5 |
75e93faa ZW |
1735 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
1736 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1737 | else | |
1738 | for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. | |
1739 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 1740 | #line 1741 "configure" |
75e93faa ZW |
1741 | #include "confdefs.h" |
1742 | #include "confdefs.h" | |
1743 | #include <sys/types.h> | |
1744 | ||
1745 | ||
1746 | int main() { | |
1747 | switch (0) case 0: case (sizeof (int) == $ac_size):; | |
1748 | ; return 0; } | |
1749 | EOF | |
e8bec136 | 1750 | if { (eval echo configure:1751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5c3bc9fb | 1751 | rm -rf conftest* |
75e93faa ZW |
1752 | ac_cv_sizeof_int=$ac_size |
1753 | else | |
1754 | echo "configure: failed program was:" >&5 | |
1755 | cat conftest.$ac_ext >&5 | |
ff5def20 DA |
1756 | fi |
1757 | rm -f conftest* | |
75e93faa ZW |
1758 | if test x$ac_cv_sizeof_int != x ; then break; fi |
1759 | done | |
1760 | ||
5c3bc9fb GK |
1761 | fi |
1762 | ||
75e93faa ZW |
1763 | if test x$ac_cv_sizeof_int = x ; then |
1764 | { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } | |
1765 | fi | |
1766 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 | |
1767 | cat >> confdefs.h <<EOF | |
1768 | #define SIZEOF_INT $ac_cv_sizeof_int | |
1769 | EOF | |
1770 | ||
1771 | ||
1772 | echo $ac_n "checking size of long""... $ac_c" 1>&6 | |
e8bec136 | 1773 | echo "configure:1774: checking size of long" >&5 |
75e93faa ZW |
1774 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
1775 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1776 | else | |
1777 | for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. | |
1778 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 1779 | #line 1780 "configure" |
75e93faa ZW |
1780 | #include "confdefs.h" |
1781 | #include "confdefs.h" | |
1782 | #include <sys/types.h> | |
1783 | ||
1784 | ||
1785 | int main() { | |
1786 | switch (0) case 0: case (sizeof (long) == $ac_size):; | |
1787 | ; return 0; } | |
1788 | EOF | |
e8bec136 | 1789 | if { (eval echo configure:1790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1790 | rm -rf conftest* |
1791 | ac_cv_sizeof_long=$ac_size | |
1792 | else | |
1793 | echo "configure: failed program was:" >&5 | |
1794 | cat conftest.$ac_ext >&5 | |
1795 | fi | |
1796 | rm -f conftest* | |
1797 | if test x$ac_cv_sizeof_long != x ; then break; fi | |
1798 | done | |
1799 | ||
1800 | fi | |
1801 | ||
1802 | if test x$ac_cv_sizeof_long = x ; then | |
1803 | { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } | |
1804 | fi | |
1805 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 | |
1806 | cat >> confdefs.h <<EOF | |
1807 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
1808 | EOF | |
1809 | ||
1810 | ||
1811 | if test $ac_cv_c_long_long = yes; then | |
1812 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 | |
e8bec136 | 1813 | echo "configure:1814: checking size of long long" >&5 |
75e93faa ZW |
1814 | if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then |
1815 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1816 | else | |
1817 | for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. | |
1818 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 1819 | #line 1820 "configure" |
75e93faa ZW |
1820 | #include "confdefs.h" |
1821 | #include "confdefs.h" | |
1822 | #include <sys/types.h> | |
1823 | ||
1824 | ||
1825 | int main() { | |
1826 | switch (0) case 0: case (sizeof (long long) == $ac_size):; | |
1827 | ; return 0; } | |
1828 | EOF | |
e8bec136 | 1829 | if { (eval echo configure:1830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1830 | rm -rf conftest* |
1831 | ac_cv_sizeof_long_long=$ac_size | |
1832 | else | |
1833 | echo "configure: failed program was:" >&5 | |
1834 | cat conftest.$ac_ext >&5 | |
1835 | fi | |
1836 | rm -f conftest* | |
1837 | if test x$ac_cv_sizeof_long_long != x ; then break; fi | |
1838 | done | |
1839 | ||
1840 | fi | |
1841 | ||
1842 | if test x$ac_cv_sizeof_long_long = x ; then | |
1843 | { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; } | |
1844 | fi | |
1845 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 | |
1846 | cat >> confdefs.h <<EOF | |
1847 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
1848 | EOF | |
1849 | ||
1850 | ||
b8dad04b | 1851 | fi |
75e93faa ZW |
1852 | if test $ac_cv_c___int64 = yes; then |
1853 | echo $ac_n "checking size of __int64""... $ac_c" 1>&6 | |
e8bec136 | 1854 | echo "configure:1855: checking size of __int64" >&5 |
75e93faa ZW |
1855 | if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then |
1856 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1857 | else | |
1858 | for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. | |
1859 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 1860 | #line 1861 "configure" |
75e93faa ZW |
1861 | #include "confdefs.h" |
1862 | #include "confdefs.h" | |
1863 | #include <sys/types.h> | |
b8dad04b | 1864 | |
ff5def20 | 1865 | |
75e93faa ZW |
1866 | int main() { |
1867 | switch (0) case 0: case (sizeof (__int64) == $ac_size):; | |
1868 | ; return 0; } | |
1869 | EOF | |
e8bec136 | 1870 | if { (eval echo configure:1871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa ZW |
1871 | rm -rf conftest* |
1872 | ac_cv_sizeof___int64=$ac_size | |
1873 | else | |
1874 | echo "configure: failed program was:" >&5 | |
1875 | cat conftest.$ac_ext >&5 | |
1876 | fi | |
1877 | rm -f conftest* | |
1878 | if test x$ac_cv_sizeof___int64 != x ; then break; fi | |
1879 | done | |
1880 | ||
1881 | fi | |
1882 | ||
1883 | if test x$ac_cv_sizeof___int64 = x ; then | |
1884 | { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; } | |
1885 | fi | |
1886 | echo "$ac_t""$ac_cv_sizeof___int64" 1>&6 | |
1887 | cat >> confdefs.h <<EOF | |
1888 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 | |
1889 | EOF | |
1890 | ||
1891 | ||
1892 | fi | |
1893 | ||
84c041a1 | 1894 | echo $ac_n "checking execution character set""... $ac_c" 1>&6 |
e8bec136 | 1895 | echo "configure:1896: checking execution character set" >&5 |
84c041a1 ZW |
1896 | if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then |
1897 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1898 | else | |
1899 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 1900 | #line 1901 "configure" |
84c041a1 ZW |
1901 | #include "confdefs.h" |
1902 | #if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \ | |
1903 | && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21 | |
1904 | ASCII | |
1905 | #endif | |
1906 | EOF | |
1907 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1908 | egrep "ASCII" >/dev/null 2>&1; then | |
1909 | rm -rf conftest* | |
1910 | ac_cv_c_charset=ASCII | |
1911 | fi | |
1912 | rm -f conftest* | |
1913 | ||
1914 | if test x${ac_cv_c_charset+set} != xset; then | |
1915 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 1916 | #line 1917 "configure" |
84c041a1 ZW |
1917 | #include "confdefs.h" |
1918 | #if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \ | |
1919 | && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A | |
1920 | EBCDIC | |
1921 | #endif | |
1922 | EOF | |
1923 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1924 | egrep "EBCDIC" >/dev/null 2>&1; then | |
1925 | rm -rf conftest* | |
1926 | ac_cv_c_charset=EBCDIC | |
1927 | fi | |
1928 | rm -f conftest* | |
1929 | ||
1930 | fi | |
1931 | if test x${ac_cv_c_charset+set} != xset; then | |
1932 | ac_cv_c_charset=unknown | |
1933 | fi | |
1934 | fi | |
1935 | ||
1936 | echo "$ac_t""$ac_cv_c_charset" 1>&6 | |
1937 | if test $ac_cv_c_charset = unknown; then | |
1938 | { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; } | |
1939 | elif test $ac_cv_c_charset = EBCDIC; then | |
1940 | cat >> confdefs.h <<\EOF | |
1941 | #define HOST_EBCDIC 1 | |
1942 | EOF | |
1943 | ||
1944 | fi | |
84c041a1 | 1945 | |
61842080 MM |
1946 | # If the native compiler is GCC, we can enable warnings even in stage1. |
1947 | # That's useful for people building cross-compilers, or just running a | |
1948 | # quick `make'. | |
b8dad04b ZW |
1949 | warn_cflags= |
1950 | if test "x$GCC" = "xyes"; then | |
1951 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
61842080 MM |
1952 | fi |
1953 | ||
b8dad04b | 1954 | |
5b67ad6f | 1955 | # Stage specific cflags for build. |
b8dad04b | 1956 | stage1_cflags= |
5b67ad6f DA |
1957 | case $build in |
1958 | vax-*-*) | |
1959 | if test x$GCC = xyes | |
1960 | then | |
b8dad04b | 1961 | stage1_cflags="-Wa,-J" |
5b67ad6f | 1962 | else |
b8dad04b | 1963 | stage1_cflags="-J" |
5b67ad6f DA |
1964 | fi |
1965 | ;; | |
1966 | esac | |
1967 | ||
1968 | ||
e9a25f70 | 1969 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 |
e8bec136 | 1970 | echo "configure:1971: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
e9a25f70 JL |
1971 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1972 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1973 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1974 | else | |
1975 | cat > conftestmake <<\EOF | |
1976 | all: | |
1977 | @echo 'ac_maketemp="${MAKE}"' | |
1978 | EOF | |
1979 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1980 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1981 | if test -n "$ac_maketemp"; then | |
1982 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1983 | else | |
1984 | eval ac_cv_prog_make_${ac_make}_set=no | |
1985 | fi | |
1986 | rm -f conftestmake | |
1987 | fi | |
1988 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1989 | echo "$ac_t""yes" 1>&6 | |
1990 | SET_MAKE= | |
1991 | else | |
1992 | echo "$ac_t""no" 1>&6 | |
1993 | SET_MAKE="MAKE=${MAKE-make}" | |
1994 | fi | |
1995 | ||
1996 | ||
ab339d62 | 1997 | echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6 |
e8bec136 | 1998 | echo "configure:1999: checking whether a default assembler was specified" >&5 |
3ccc3a56 | 1999 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
e154a394 | 2000 | if test x"$gas_flag" = x"no"; then |
3ccc3a56 | 2001 | echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6 |
ab339d62 | 2002 | else |
3ccc3a56 | 2003 | echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6 |
ab339d62 AO |
2004 | fi |
2005 | else | |
2006 | echo "$ac_t""no" 1>&6 | |
2007 | fi | |
2008 | ||
2009 | echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6 | |
e8bec136 | 2010 | echo "configure:2011: checking whether a default linker was specified" >&5 |
3ccc3a56 | 2011 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
e154a394 | 2012 | if test x"$gnu_ld_flag" = x"no"; then |
3ccc3a56 | 2013 | echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6 |
ab339d62 | 2014 | else |
3ccc3a56 | 2015 | echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6 |
ab339d62 AO |
2016 | fi |
2017 | else | |
2018 | echo "$ac_t""no" 1>&6 | |
2019 | fi | |
2020 | ||
4070d885 | 2021 | echo $ac_n "checking for GNU C library""... $ac_c" 1>&6 |
e8bec136 | 2022 | echo "configure:2023: checking for GNU C library" >&5 |
4070d885 AJ |
2023 | if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then |
2024 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2025 | else | |
2026 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 2027 | #line 2028 "configure" |
4070d885 AJ |
2028 | #include "confdefs.h" |
2029 | #include <features.h> | |
2030 | int main() { | |
2031 | ||
2032 | #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
2033 | #error Not a GNU C library system | |
2034 | #endif | |
2035 | ; return 0; } | |
2036 | EOF | |
e8bec136 | 2037 | if { (eval echo configure:2038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
4070d885 AJ |
2038 | rm -rf conftest* |
2039 | gcc_cv_glibc=yes | |
2040 | else | |
2041 | echo "configure: failed program was:" >&5 | |
2042 | cat conftest.$ac_ext >&5 | |
2043 | rm -rf conftest* | |
2044 | gcc_cv_glibc=no | |
2045 | fi | |
2046 | rm -f conftest* | |
2047 | fi | |
2048 | ||
2049 | echo "$ac_t""$gcc_cv_glibc" 1>&6 | |
c2f7d403 | 2050 | if test $gcc_cv_glibc = yes; then |
4070d885 AJ |
2051 | cat >> confdefs.h <<\EOF |
2052 | #define _GNU_SOURCE 1 | |
2053 | EOF | |
2054 | ||
2055 | fi | |
2056 | ||
861bb6c1 | 2057 | # Find some useful tools |
e8bec136 | 2058 | for ac_prog in mawk gawk nawk awk |
861bb6c1 JL |
2059 | do |
2060 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2061 | set dummy $ac_prog; ac_word=$2 | |
2062 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e8bec136 | 2063 | echo "configure:2064: checking for $ac_word" >&5 |
861bb6c1 JL |
2064 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
2065 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2066 | else | |
2067 | if test -n "$AWK"; then | |
2068 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
2069 | else | |
cd9e5e7c | 2070 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
2071 | ac_dummy="$PATH" |
2072 | for ac_dir in $ac_dummy; do | |
861bb6c1 JL |
2073 | test -z "$ac_dir" && ac_dir=. |
2074 | if test -f $ac_dir/$ac_word; then | |
2075 | ac_cv_prog_AWK="$ac_prog" | |
2076 | break | |
2077 | fi | |
2078 | done | |
2079 | IFS="$ac_save_ifs" | |
2080 | fi | |
2081 | fi | |
2082 | AWK="$ac_cv_prog_AWK" | |
2083 | if test -n "$AWK"; then | |
2084 | echo "$ac_t""$AWK" 1>&6 | |
2085 | else | |
2086 | echo "$ac_t""no" 1>&6 | |
2087 | fi | |
2088 | ||
2089 | test -n "$AWK" && break | |
2090 | done | |
2091 | ||
0a4b6309 | 2092 | echo $ac_n "checking whether ln works""... $ac_c" 1>&6 |
e8bec136 | 2093 | echo "configure:2094: checking whether ln works" >&5 |
0a4b6309 RL |
2094 | if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then |
2095 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2096 | else | |
2097 | rm -f conftestdata_t | |
2098 | echo >conftestdata_f | |
2099 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
2100 | then | |
2101 | gcc_cv_prog_LN="ln" | |
2102 | else | |
2103 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
2104 | then | |
2105 | gcc_cv_prog_LN="ln -s" | |
2106 | else | |
2107 | gcc_cv_prog_LN=cp | |
2108 | fi | |
2109 | fi | |
2110 | rm -f conftestdata_f conftestdata_t | |
2111 | ||
2112 | fi | |
2113 | LN="$gcc_cv_prog_LN" | |
2114 | if test "$gcc_cv_prog_LN" = "ln"; then | |
2115 | echo "$ac_t""yes" 1>&6 | |
2116 | else | |
2117 | if test "$gcc_cv_prog_LN" = "ln -s"; then | |
2118 | echo "$ac_t""no, using ln -s" 1>&6 | |
2119 | else | |
2120 | echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6 | |
2121 | fi | |
2122 | fi | |
2123 | ||
2124 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 | |
e8bec136 | 2125 | echo "configure:2126: checking whether ln -s works" >&5 |
0a4b6309 RL |
2126 | if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then |
2127 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2128 | else | |
2129 | rm -f conftestdata_t | |
2130 | echo >conftestdata_f | |
2131 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
2132 | then | |
2133 | gcc_cv_prog_LN_S="ln -s" | |
2134 | else | |
2135 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
2136 | then | |
2137 | gcc_cv_prog_LN_S=ln | |
2138 | else | |
2139 | gcc_cv_prog_LN_S=cp | |
2140 | fi | |
2141 | fi | |
2142 | rm -f conftestdata_f conftestdata_t | |
2143 | ||
2144 | fi | |
2145 | LN_S="$gcc_cv_prog_LN_S" | |
2146 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
2147 | echo "$ac_t""yes" 1>&6 | |
2148 | else | |
2149 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
2150 | echo "$ac_t""no, using ln" 1>&6 | |
2151 | else | |
2152 | echo "$ac_t""no, and neither does ln, so using cp" 1>&6 | |
2153 | fi | |
2154 | fi | |
2155 | ||
861bb6c1 JL |
2156 | # Extract the first word of "ranlib", so it can be a program name with args. |
2157 | set dummy ranlib; ac_word=$2 | |
2158 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e8bec136 | 2159 | echo "configure:2160: checking for $ac_word" >&5 |
861bb6c1 JL |
2160 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
2161 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2162 | else | |
2163 | if test -n "$RANLIB"; then | |
2164 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2165 | else | |
cd9e5e7c | 2166 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
2167 | ac_dummy="$PATH" |
2168 | for ac_dir in $ac_dummy; do | |
861bb6c1 JL |
2169 | test -z "$ac_dir" && ac_dir=. |
2170 | if test -f $ac_dir/$ac_word; then | |
2171 | ac_cv_prog_RANLIB="ranlib" | |
2172 | break | |
2173 | fi | |
2174 | done | |
2175 | IFS="$ac_save_ifs" | |
2176 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
2177 | fi | |
2178 | fi | |
2179 | RANLIB="$ac_cv_prog_RANLIB" | |
2180 | if test -n "$RANLIB"; then | |
2181 | echo "$ac_t""$RANLIB" 1>&6 | |
2182 | else | |
2183 | echo "$ac_t""no" 1>&6 | |
2184 | fi | |
2185 | ||
0a4b6309 RL |
2186 | # Find a good install program. We prefer a C program (faster), |
2187 | # so one script is as good as another. But avoid the broken or | |
2188 | # incompatible versions: | |
2189 | # SysV /etc/install, /usr/sbin/install | |
2190 | # SunOS /usr/etc/install | |
2191 | # IRIX /sbin/install | |
2192 | # AIX /bin/install | |
2193 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2194 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2195 | # ./install, which can be erroneously created by make from ./install.sh. | |
2196 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
e8bec136 | 2197 | echo "configure:2198: checking for a BSD compatible install" >&5 |
0a4b6309 RL |
2198 | if test -z "$INSTALL"; then |
2199 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
2200 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2201 | else | |
2202 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
2203 | for ac_dir in $PATH; do | |
2204 | # Account for people who put trailing slashes in PATH elements. | |
2205 | case "$ac_dir/" in | |
2206 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
2207 | *) | |
2208 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2209 | for ac_prog in ginstall scoinst install; do | |
2210 | if test -f $ac_dir/$ac_prog; then | |
2211 | if test $ac_prog = install && | |
2212 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
2213 | # AIX install. It has an incompatible calling convention. | |
2214 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
2215 | : | |
2216 | else | |
2217 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
2218 | break 2 | |
2219 | fi | |
2220 | fi | |
2221 | done | |
2222 | ;; | |
2223 | esac | |
2224 | done | |
2225 | IFS="$ac_save_IFS" | |
2226 | ||
2227 | fi | |
2228 | if test "${ac_cv_path_install+set}" = set; then | |
2229 | INSTALL="$ac_cv_path_install" | |
2230 | else | |
2231 | # As a last resort, use the slow shell script. We don't cache a | |
2232 | # path for INSTALL within a source directory, because that will | |
2233 | # break other packages using the cache if that directory is | |
2234 | # removed, or if the path is relative. | |
2235 | INSTALL="$ac_install_sh" | |
2236 | fi | |
2237 | fi | |
2238 | echo "$ac_t""$INSTALL" 1>&6 | |
2239 | ||
2240 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
2241 | # It thinks the first close brace ends the variable substitution. | |
2242 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
2243 | ||
2244 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
2245 | ||
861bb6c1 | 2246 | |
956d6950 | 2247 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
e8bec136 | 2248 | echo "configure:2249: checking for ANSI C header files" >&5 |
956d6950 JL |
2249 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
2250 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2251 | else | |
2252 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 2253 | #line 2254 "configure" |
956d6950 JL |
2254 | #include "confdefs.h" |
2255 | #include <stdlib.h> | |
2256 | #include <stdarg.h> | |
2257 | #include <string.h> | |
2258 | #include <float.h> | |
2259 | EOF | |
2260 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e8bec136 | 2261 | { (eval echo configure:2262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 2262 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
956d6950 JL |
2263 | if test -z "$ac_err"; then |
2264 | rm -rf conftest* | |
2265 | ac_cv_header_stdc=yes | |
2266 | else | |
2267 | echo "$ac_err" >&5 | |
2268 | echo "configure: failed program was:" >&5 | |
2269 | cat conftest.$ac_ext >&5 | |
2270 | rm -rf conftest* | |
2271 | ac_cv_header_stdc=no | |
2272 | fi | |
2273 | rm -f conftest* | |
2274 | ||
2275 | if test $ac_cv_header_stdc = yes; then | |
2276 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
2277 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 2278 | #line 2279 "configure" |
956d6950 JL |
2279 | #include "confdefs.h" |
2280 | #include <string.h> | |
2281 | EOF | |
2282 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2283 | egrep "memchr" >/dev/null 2>&1; then | |
2284 | : | |
2285 | else | |
2286 | rm -rf conftest* | |
2287 | ac_cv_header_stdc=no | |
2288 | fi | |
2289 | rm -f conftest* | |
2290 | ||
2291 | fi | |
2292 | ||
2293 | if test $ac_cv_header_stdc = yes; then | |
2294 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
2295 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 2296 | #line 2297 "configure" |
956d6950 JL |
2297 | #include "confdefs.h" |
2298 | #include <stdlib.h> | |
2299 | EOF | |
2300 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2301 | egrep "free" >/dev/null 2>&1; then | |
2302 | : | |
2303 | else | |
2304 | rm -rf conftest* | |
2305 | ac_cv_header_stdc=no | |
2306 | fi | |
2307 | rm -f conftest* | |
2308 | ||
2309 | fi | |
2310 | ||
2311 | if test $ac_cv_header_stdc = yes; then | |
2312 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
2313 | if test "$cross_compiling" = yes; then | |
2314 | : | |
2315 | else | |
2316 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 2317 | #line 2318 "configure" |
956d6950 JL |
2318 | #include "confdefs.h" |
2319 | #include <ctype.h> | |
2320 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
2321 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
2322 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
2323 | int main () { int i; for (i = 0; i < 256; i++) | |
2324 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
2325 | exit (0); } | |
2326 | ||
2327 | EOF | |
e8bec136 | 2328 | if { (eval echo configure:2329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
956d6950 JL |
2329 | then |
2330 | : | |
2331 | else | |
2332 | echo "configure: failed program was:" >&5 | |
2333 | cat conftest.$ac_ext >&5 | |
2334 | rm -fr conftest* | |
2335 | ac_cv_header_stdc=no | |
2336 | fi | |
2337 | rm -fr conftest* | |
2338 | fi | |
2339 | ||
2340 | fi | |
2341 | fi | |
2342 | ||
2343 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
2344 | if test $ac_cv_header_stdc = yes; then | |
2345 | cat >> confdefs.h <<\EOF | |
2346 | #define STDC_HEADERS 1 | |
2347 | EOF | |
2348 | ||
2349 | fi | |
2350 | ||
2351 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 | |
e8bec136 | 2352 | echo "configure:2353: checking whether time.h and sys/time.h may both be included" >&5 |
956d6950 JL |
2353 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
2354 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2355 | else | |
2356 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 2357 | #line 2358 "configure" |
956d6950 JL |
2358 | #include "confdefs.h" |
2359 | #include <sys/types.h> | |
2360 | #include <sys/time.h> | |
2361 | #include <time.h> | |
2362 | int main() { | |
2363 | struct tm *tp; | |
2364 | ; return 0; } | |
2365 | EOF | |
e8bec136 | 2366 | if { (eval echo configure:2367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
956d6950 JL |
2367 | rm -rf conftest* |
2368 | ac_cv_header_time=yes | |
2369 | else | |
2370 | echo "configure: failed program was:" >&5 | |
2371 | cat conftest.$ac_ext >&5 | |
2372 | rm -rf conftest* | |
2373 | ac_cv_header_time=no | |
2374 | fi | |
2375 | rm -f conftest* | |
2376 | fi | |
2377 | ||
2378 | echo "$ac_t""$ac_cv_header_time" 1>&6 | |
2379 | if test $ac_cv_header_time = yes; then | |
2380 | cat >> confdefs.h <<\EOF | |
2381 | #define TIME_WITH_SYS_TIME 1 | |
2382 | EOF | |
2383 | ||
2384 | fi | |
2385 | ||
827ae6cf | 2386 | echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6 |
e8bec136 | 2387 | echo "configure:2388: checking for working stdbool.h" >&5 |
827ae6cf RO |
2388 | if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then |
2389 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2390 | else | |
2391 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 2392 | #line 2393 "configure" |
827ae6cf RO |
2393 | #include "confdefs.h" |
2394 | #include <stdbool.h> | |
2395 | int main() { | |
2396 | bool foo = false; | |
2397 | ; return 0; } | |
2398 | EOF | |
e8bec136 | 2399 | if { (eval echo configure:2400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
827ae6cf RO |
2400 | rm -rf conftest* |
2401 | ac_cv_header_stdbool_h=yes | |
2402 | else | |
2403 | echo "configure: failed program was:" >&5 | |
2404 | cat conftest.$ac_ext >&5 | |
2405 | rm -rf conftest* | |
2406 | ac_cv_header_stdbool_h=no | |
2407 | fi | |
2408 | rm -f conftest* | |
2409 | fi | |
2410 | ||
2411 | echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6 | |
2412 | if test $ac_cv_header_stdbool_h = yes; then | |
2413 | cat >> confdefs.h <<\EOF | |
2414 | #define HAVE_STDBOOL_H 1 | |
2415 | EOF | |
2416 | ||
2417 | fi | |
2418 | ||
0a4b6309 | 2419 | echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6 |
e8bec136 | 2420 | echo "configure:2421: checking whether string.h and strings.h may both be included" >&5 |
0a4b6309 RL |
2421 | if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then |
2422 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2423 | else | |
2424 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 2425 | #line 2426 "configure" |
0a4b6309 RL |
2426 | #include "confdefs.h" |
2427 | #include <string.h> | |
2428 | #include <strings.h> | |
2429 | int main() { | |
2430 | ||
2431 | ; return 0; } | |
2432 | EOF | |
e8bec136 | 2433 | if { (eval echo configure:2434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0a4b6309 RL |
2434 | rm -rf conftest* |
2435 | gcc_cv_header_string=yes | |
2436 | else | |
2437 | echo "configure: failed program was:" >&5 | |
2438 | cat conftest.$ac_ext >&5 | |
2439 | rm -rf conftest* | |
2440 | gcc_cv_header_string=no | |
2441 | fi | |
2442 | rm -f conftest* | |
2443 | fi | |
2444 | ||
2445 | echo "$ac_t""$gcc_cv_header_string" 1>&6 | |
2446 | if test $gcc_cv_header_string = yes; then | |
2447 | cat >> confdefs.h <<\EOF | |
2448 | #define STRING_WITH_STRINGS 1 | |
2449 | EOF | |
2450 | ||
2451 | fi | |
2452 | ||
e9831ca0 | 2453 | echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 |
e8bec136 | 2454 | echo "configure:2455: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
e9831ca0 KG |
2455 | if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then |
2456 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2457 | else | |
2458 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 2459 | #line 2460 "configure" |
e9831ca0 KG |
2460 | #include "confdefs.h" |
2461 | #include <sys/types.h> | |
2462 | #include <sys/wait.h> | |
2463 | #ifndef WEXITSTATUS | |
2464 | #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) | |
2465 | #endif | |
2466 | #ifndef WIFEXITED | |
2467 | #define WIFEXITED(stat_val) (((stat_val) & 255) == 0) | |
2468 | #endif | |
2469 | int main() { | |
2470 | int s; | |
2471 | wait (&s); | |
2472 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
2473 | ; return 0; } | |
2474 | EOF | |
e8bec136 | 2475 | if { (eval echo configure:2476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
e9831ca0 KG |
2476 | rm -rf conftest* |
2477 | ac_cv_header_sys_wait_h=yes | |
2478 | else | |
2479 | echo "configure: failed program was:" >&5 | |
2480 | cat conftest.$ac_ext >&5 | |
2481 | rm -rf conftest* | |
2482 | ac_cv_header_sys_wait_h=no | |
2483 | fi | |
2484 | rm -f conftest* | |
2485 | fi | |
2486 | ||
2487 | echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 | |
2488 | if test $ac_cv_header_sys_wait_h = yes; then | |
2489 | cat >> confdefs.h <<\EOF | |
2490 | #define HAVE_SYS_WAIT_H 1 | |
2491 | EOF | |
2492 | ||
2493 | fi | |
2494 | ||
03c41c05 | 2495 | for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \ |
7719ffbf | 2496 | fcntl.h unistd.h sys/file.h sys/time.h \ |
03c41c05 | 2497 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
827ae6cf | 2498 | direct.h malloc.h langinfo.h iconv.h |
861bb6c1 JL |
2499 | do |
2500 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2501 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
e8bec136 | 2502 | echo "configure:2503: checking for $ac_hdr" >&5 |
861bb6c1 JL |
2503 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2504 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2505 | else | |
2506 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 2507 | #line 2508 "configure" |
861bb6c1 JL |
2508 | #include "confdefs.h" |
2509 | #include <$ac_hdr> | |
2510 | EOF | |
956d6950 | 2511 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
e8bec136 | 2512 | { (eval echo configure:2513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 2513 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
956d6950 JL |
2514 | if test -z "$ac_err"; then |
2515 | rm -rf conftest* | |
2516 | eval "ac_cv_header_$ac_safe=yes" | |
2517 | else | |
2518 | echo "$ac_err" >&5 | |
2519 | echo "configure: failed program was:" >&5 | |
2520 | cat conftest.$ac_ext >&5 | |
2521 | rm -rf conftest* | |
2522 | eval "ac_cv_header_$ac_safe=no" | |
2523 | fi | |
2524 | rm -f conftest* | |
2525 | fi | |
2526 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2527 | echo "$ac_t""yes" 1>&6 | |
2528 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2529 | cat >> confdefs.h <<EOF | |
2530 | #define $ac_tr_hdr 1 | |
2531 | EOF | |
2532 | ||
2533 | else | |
2534 | echo "$ac_t""no" 1>&6 | |
2535 | fi | |
2536 | done | |
2537 | ||
2538 | ||
f24af81b TT |
2539 | # Check for thread headers. |
2540 | ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'` | |
2541 | echo $ac_n "checking for thread.h""... $ac_c" 1>&6 | |
e8bec136 | 2542 | echo "configure:2543: checking for thread.h" >&5 |
f24af81b TT |
2543 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2544 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2545 | else | |
2546 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 2547 | #line 2548 "configure" |
f24af81b TT |
2548 | #include "confdefs.h" |
2549 | #include <thread.h> | |
2550 | EOF | |
2551 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e8bec136 | 2552 | { (eval echo configure:2553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 2553 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
f24af81b TT |
2554 | if test -z "$ac_err"; then |
2555 | rm -rf conftest* | |
2556 | eval "ac_cv_header_$ac_safe=yes" | |
2557 | else | |
2558 | echo "$ac_err" >&5 | |
2559 | echo "configure: failed program was:" >&5 | |
2560 | cat conftest.$ac_ext >&5 | |
2561 | rm -rf conftest* | |
2562 | eval "ac_cv_header_$ac_safe=no" | |
2563 | fi | |
2564 | rm -f conftest* | |
2565 | fi | |
2566 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2567 | echo "$ac_t""yes" 1>&6 | |
2568 | have_thread_h=yes | |
2569 | else | |
2570 | echo "$ac_t""no" 1>&6 | |
2571 | have_thread_h= | |
2572 | fi | |
2573 | ||
2574 | ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'` | |
2575 | echo $ac_n "checking for pthread.h""... $ac_c" 1>&6 | |
e8bec136 | 2576 | echo "configure:2577: checking for pthread.h" >&5 |
f24af81b TT |
2577 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2578 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2579 | else | |
2580 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 2581 | #line 2582 "configure" |
f24af81b TT |
2582 | #include "confdefs.h" |
2583 | #include <pthread.h> | |
2584 | EOF | |
2585 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e8bec136 | 2586 | { (eval echo configure:2587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 2587 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
f24af81b TT |
2588 | if test -z "$ac_err"; then |
2589 | rm -rf conftest* | |
2590 | eval "ac_cv_header_$ac_safe=yes" | |
2591 | else | |
2592 | echo "$ac_err" >&5 | |
2593 | echo "configure: failed program was:" >&5 | |
2594 | cat conftest.$ac_ext >&5 | |
2595 | rm -rf conftest* | |
2596 | eval "ac_cv_header_$ac_safe=no" | |
2597 | fi | |
2598 | rm -f conftest* | |
2599 | fi | |
2600 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2601 | echo "$ac_t""yes" 1>&6 | |
2602 | have_pthread_h=yes | |
2603 | else | |
2604 | echo "$ac_t""no" 1>&6 | |
2605 | have_pthread_h= | |
2606 | fi | |
2607 | ||
2608 | ||
84c041a1 | 2609 | # These tests can't be done till we know if we have limits.h. |
75e93faa | 2610 | echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6 |
e8bec136 | 2611 | echo "configure:2612: checking for CHAR_BIT" >&5 |
75e93faa ZW |
2612 | if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then |
2613 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2614 | else | |
2615 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 2616 | #line 2617 "configure" |
75e93faa ZW |
2617 | #include "confdefs.h" |
2618 | #ifdef HAVE_LIMITS_H | |
2619 | #include <limits.h> | |
2620 | #endif | |
2621 | #ifdef CHAR_BIT | |
2622 | found | |
2623 | #endif | |
2624 | EOF | |
2625 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2626 | egrep "found" >/dev/null 2>&1; then | |
2627 | rm -rf conftest* | |
2628 | gcc_cv_decl_char_bit=yes | |
2629 | else | |
2630 | rm -rf conftest* | |
2631 | gcc_cv_decl_char_bit=no | |
2632 | fi | |
2633 | rm -f conftest* | |
2634 | ||
2635 | ||
2636 | fi | |
2637 | ||
2638 | echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6 | |
2639 | if test $gcc_cv_decl_char_bit = no; then | |
2640 | echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6 | |
e8bec136 | 2641 | echo "configure:2642: checking number of bits in a byte" >&5 |
75e93faa ZW |
2642 | if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then |
2643 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2644 | else | |
2645 | i=8 | |
2646 | gcc_cv_c_nbby= | |
2647 | while test $i -lt 65; do | |
2648 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 2649 | #line 2650 "configure" |
75e93faa ZW |
2650 | #include "confdefs.h" |
2651 | ||
2652 | int main() { | |
4e70264f ZW |
2653 | switch(0) { |
2654 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
2655 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
2656 | ; } | |
75e93faa ZW |
2657 | ; return 0; } |
2658 | EOF | |
e8bec136 | 2659 | if { (eval echo configure:2660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75e93faa | 2660 | rm -rf conftest* |
4e70264f | 2661 | gcc_cv_c_nbby=$i; break |
75e93faa ZW |
2662 | else |
2663 | echo "configure: failed program was:" >&5 | |
2664 | cat conftest.$ac_ext >&5 | |
2665 | fi | |
2666 | rm -f conftest* | |
2667 | i=`expr $i + 1` | |
2668 | done | |
2669 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
2670 | ||
2671 | fi | |
2672 | ||
2673 | echo "$ac_t""$gcc_cv_c_nbby" 1>&6 | |
2674 | if test $gcc_cv_c_nbby = failed; then | |
2675 | { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; } | |
2676 | else | |
2677 | cat >> confdefs.h <<EOF | |
2678 | #define CHAR_BIT $gcc_cv_c_nbby | |
2679 | EOF | |
2680 | ||
2681 | fi | |
2682 | fi | |
2d6eb5bf | 2683 | echo $ac_n "checking byte ordering""... $ac_c" 1>&6 |
e8bec136 | 2684 | echo "configure:2685: checking byte ordering" >&5 |
2d6eb5bf | 2685 | if eval "test \"`echo '$''{'ac_cv_c_compile_endian'+set}'`\" = set"; then |
84c041a1 ZW |
2686 | echo $ac_n "(cached) $ac_c" 1>&6 |
2687 | else | |
2d6eb5bf ZW |
2688 | ac_cv_c_compile_endian=unknown |
2689 | ||
2690 | ac_ext=c | |
2691 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2692 | ac_cpp='$CPP $CPPFLAGS' | |
2693 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2694 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2695 | cross_compiling=$ac_cv_prog_cc_cross | |
2696 | ||
2697 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 2698 | #line 2699 "configure" |
84c041a1 | 2699 | #include "confdefs.h" |
2d6eb5bf | 2700 | |
84c041a1 | 2701 | #ifdef HAVE_LIMITS_H |
2d6eb5bf | 2702 | # include <limits.h> |
84c041a1 ZW |
2703 | #endif |
2704 | /* This structure must have no internal padding. */ | |
2705 | struct { | |
2d6eb5bf | 2706 | char prefix[sizeof "\nendian:" - 1]; |
84c041a1 | 2707 | short word; |
2d6eb5bf | 2708 | char postfix[2]; |
84c041a1 | 2709 | } tester = { |
2d6eb5bf | 2710 | "\nendian:", |
84c041a1 ZW |
2711 | #if SIZEOF_SHORT == 4 |
2712 | ('A' << (CHAR_BIT * 3)) | ('B' << (CHAR_BIT * 2)) | | |
2713 | #endif | |
2d6eb5bf ZW |
2714 | ('A' << CHAR_BIT) | 'B', |
2715 | 'X', '\n' | |
84c041a1 ZW |
2716 | }; |
2717 | EOF | |
e8bec136 | 2718 | if { (eval echo configure:2719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
2d6eb5bf | 2719 | od -c conftest.o | |
e48cd290 | 2720 | sed 's/^[0-7]*[ ]*/ / |
2d6eb5bf ZW |
2721 | s/\*/./g |
2722 | s/ \\n/*/g | |
2723 | s/ [0-9][0-9][0-9]/./g | |
2724 | s/ \\[^ ]/./g' | | |
2725 | tr -d ' | |
2726 | ' | tr -s '*' ' | |
2727 | ' | fold | sed '$a\ | |
2728 | ' > conftest.dmp | |
2729 | if grep 'endian:AB' conftest.dmp >/dev/null 2>&1; then | |
2730 | ac_cv_c_compile_endian=big-endian | |
2731 | elif grep 'endian:BA' conftest.dmp >/dev/null 2>&1; then | |
2732 | ac_cv_c_compile_endian=little-endian | |
84c041a1 ZW |
2733 | fi |
2734 | fi | |
84c041a1 | 2735 | rm -rf conftest* |
2d6eb5bf ZW |
2736 | ac_ext=c |
2737 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2738 | ac_cpp='$CPP $CPPFLAGS' | |
2739 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2740 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2741 | cross_compiling=$ac_cv_prog_cc_cross | |
2742 | ||
2743 | ||
84c041a1 ZW |
2744 | fi |
2745 | ||
2d6eb5bf ZW |
2746 | echo "$ac_t""$ac_cv_c_compile_endian" 1>&6 |
2747 | if test $ac_cv_c_compile_endian = unknown; then | |
2748 | { echo "configure: error: *** unable to determine endianness" 1>&2; exit 1; } | |
2749 | elif test $ac_cv_c_compile_endian = big-endian; then | |
84c041a1 ZW |
2750 | cat >> confdefs.h <<\EOF |
2751 | #define HOST_WORDS_BIG_ENDIAN 1 | |
2752 | EOF | |
2753 | ||
2754 | fi | |
2755 | ||
2d6eb5bf | 2756 | echo $ac_n "checking floating point format""... $ac_c" 1>&6 |
e8bec136 | 2757 | echo "configure:2758: checking floating point format" >&5 |
2d6eb5bf ZW |
2758 | if eval "test \"`echo '$''{'ac_cv_c_float_format'+set}'`\" = set"; then |
2759 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2760 | else | |
2761 | ||
2762 | ac_ext=c | |
2763 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2764 | ac_cpp='$CPP $CPPFLAGS' | |
2765 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2766 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2767 | cross_compiling=$ac_cv_prog_cc_cross | |
2768 | ||
2769 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 2770 | #line 2771 "configure" |
2d6eb5bf ZW |
2771 | #include "confdefs.h" |
2772 | /* This will not work unless sizeof(double) == 8. */ | |
2773 | extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1]; | |
2774 | ||
2775 | /* This structure must have no internal padding. */ | |
2776 | struct possibility { | |
2777 | char prefix[8]; | |
2778 | double candidate; | |
2779 | char postfix[8]; | |
2780 | }; | |
2781 | ||
2782 | #define C(cand) { "\nformat:", cand, ":tamrof\n" } | |
2783 | struct possibility table [] = | |
2784 | { | |
2785 | C( 3.25724264705901305206e+01), /* @@IEEEFP - IEEE 754 */ | |
2786 | C( 3.53802595280598432000e+18), /* D__float - VAX */ | |
2787 | C( 5.32201830133125317057e-19), /* D.PDP-10 - PDP-10 - the dot is 0x13a */ | |
2788 | C( 1.77977764695171661377e+10), /* IBMHEXFP - s/390 format, ascii */ | |
2789 | C(-5.22995989424860458374e+10) /* IBMHEXFP - s/390 format, EBCDIC */ | |
2790 | }; | |
2791 | EOF | |
e8bec136 | 2792 | if { (eval echo configure:2793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
2d6eb5bf | 2793 | od -c conftest.o | |
e48cd290 | 2794 | sed 's/^[0-7]*[ ]*/ / |
2d6eb5bf ZW |
2795 | s/\*/./g |
2796 | s/ \\n/*/g | |
2797 | s/ [0-9][0-9][0-9]/./g | |
2798 | s/ \\[^ ]/./g' | | |
2799 | tr -d ' | |
2800 | ' | tr -s '*' ' | |
2801 | ' | fold | sed '$a\ | |
2802 | ' > conftest.dmp | |
2803 | if grep 'format:.@IEEEF.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2804 | ac_cv_c_float_format='IEEE (big-endian)' | |
2805 | elif grep 'format:.I@@PFE.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2806 | ac_cv_c_float_format='IEEE (big-endian)' | |
2807 | elif grep 'format:.FEEEI@.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2808 | ac_cv_c_float_format='IEEE (little-endian)' | |
2809 | elif grep 'format:.EFP@@I.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2810 | ac_cv_c_float_format='IEEE (little-endian)' | |
2811 | elif grep 'format:.__floa.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2812 | ac_cv_c_float_format='VAX D-float' | |
2813 | elif grep 'format:..PDP-1.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2814 | ac_cv_c_float_format='PDP-10' | |
2815 | elif grep 'format:.BMHEXF.:tamrof' conftest.dmp >/dev/null 2>&1; then | |
2816 | ac_cv_c_float_format='IBM 370 hex' | |
2817 | else | |
2818 | { echo "configure: error: Unknown floating point format" 1>&2; exit 1; } | |
2819 | fi | |
2820 | else | |
2821 | { echo "configure: error: compile failed" 1>&2; exit 1; } | |
2822 | fi | |
2823 | rm -rf conftest* | |
2824 | ac_ext=c | |
2825 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2826 | ac_cpp='$CPP $CPPFLAGS' | |
2827 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2828 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2829 | cross_compiling=$ac_cv_prog_cc_cross | |
2830 | ||
2831 | ||
2832 | fi | |
2833 | ||
2834 | echo "$ac_t""$ac_cv_c_float_format" 1>&6 | |
2835 | # IEEE is the default format. If the float endianness isn't the same | |
2836 | # as the integer endianness, we have to set FLOAT_WORDS_BIG_ENDIAN | |
2837 | # (which is a tristate: yes, no, default). This is only an issue with | |
2838 | # IEEE; the other formats are only supported by a few machines each, | |
2839 | # all with the same endianness. | |
2840 | format= | |
2841 | fbigend= | |
2842 | case $ac_cv_c_float_format in | |
2843 | 'IEEE (big-endian)' ) | |
2844 | if test $ac_cv_c_compile_endian = little-endian; then | |
2845 | fbigend=1 | |
2846 | fi | |
2847 | ;; | |
2848 | 'IEEE (little-endian)' ) | |
2849 | if test $ac_cv_c_compile_endian = big-endian; then | |
2850 | fbigend=0 | |
2851 | fi | |
2852 | ;; | |
2853 | 'VAX D-float' ) | |
2854 | format=VAX_FLOAT_FORMAT | |
2855 | ;; | |
2856 | 'PDP-10' ) | |
2857 | format=PDP10_FLOAT_FORMAT | |
2858 | ;; | |
2859 | 'IBM 370 hex' ) | |
2860 | format=IBM_FLOAT_FORMAT | |
2861 | ;; | |
2862 | esac | |
2863 | if test -n "$format"; then | |
2864 | cat >> confdefs.h <<EOF | |
2865 | #define HOST_FLOAT_FORMAT $format | |
2866 | EOF | |
2867 | ||
2868 | fi | |
2869 | if test -n "$fbigend"; then | |
2870 | cat >> confdefs.h <<EOF | |
2871 | #define HOST_FLOAT_WORDS_BIG_ENDIAN $fbigend | |
2872 | EOF | |
2873 | ||
2874 | fi | |
2875 | ||
75e93faa | 2876 | |
bcf12124 JL |
2877 | # See if GNAT has been installed |
2878 | # Extract the first word of "gnatbind", so it can be a program name with args. | |
2879 | set dummy gnatbind; ac_word=$2 | |
2880 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e8bec136 | 2881 | echo "configure:2882: checking for $ac_word" >&5 |
1ffc5c6e | 2882 | if eval "test \"`echo '$''{'ac_cv_prog_have_gnat'+set}'`\" = set"; then |
bcf12124 JL |
2883 | echo $ac_n "(cached) $ac_c" 1>&6 |
2884 | else | |
1ffc5c6e RK |
2885 | if test -n "$have_gnat"; then |
2886 | ac_cv_prog_have_gnat="$have_gnat" # Let the user override the test. | |
bcf12124 | 2887 | else |
cd9e5e7c | 2888 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
2889 | ac_dummy="$PATH" |
2890 | for ac_dir in $ac_dummy; do | |
bcf12124 JL |
2891 | test -z "$ac_dir" && ac_dir=. |
2892 | if test -f $ac_dir/$ac_word; then | |
1ffc5c6e | 2893 | ac_cv_prog_have_gnat="yes" |
bcf12124 JL |
2894 | break |
2895 | fi | |
2896 | done | |
2897 | IFS="$ac_save_ifs" | |
1ffc5c6e | 2898 | test -z "$ac_cv_prog_have_gnat" && ac_cv_prog_have_gnat="no" |
bcf12124 JL |
2899 | fi |
2900 | fi | |
1ffc5c6e RK |
2901 | have_gnat="$ac_cv_prog_have_gnat" |
2902 | if test -n "$have_gnat"; then | |
2903 | echo "$ac_t""$have_gnat" 1>&6 | |
bcf12124 JL |
2904 | else |
2905 | echo "$ac_t""no" 1>&6 | |
2906 | fi | |
2907 | ||
2908 | ||
955be633 JM |
2909 | # See if we have the mktemp command. |
2910 | # Extract the first word of "mktemp", so it can be a program name with args. | |
2911 | set dummy mktemp; ac_word=$2 | |
2912 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e8bec136 | 2913 | echo "configure:2914: checking for $ac_word" >&5 |
955be633 JM |
2914 | if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then |
2915 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2916 | else | |
2917 | if test -n "$have_mktemp_command"; then | |
2918 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
2919 | else | |
2920 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2921 | ac_dummy="$PATH" | |
2922 | for ac_dir in $ac_dummy; do | |
2923 | test -z "$ac_dir" && ac_dir=. | |
2924 | if test -f $ac_dir/$ac_word; then | |
2925 | ac_cv_prog_have_mktemp_command="yes" | |
2926 | break | |
2927 | fi | |
2928 | done | |
2929 | IFS="$ac_save_ifs" | |
2930 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" | |
2931 | fi | |
2932 | fi | |
2933 | have_mktemp_command="$ac_cv_prog_have_mktemp_command" | |
2934 | if test -n "$have_mktemp_command"; then | |
2935 | echo "$ac_t""$have_mktemp_command" 1>&6 | |
2936 | else | |
2937 | echo "$ac_t""no" 1>&6 | |
2938 | fi | |
2939 | ||
2940 | ||
09fa0705 ZW |
2941 | # Do we have a single-tree copy of texinfo? |
2942 | if test -f $srcdir/../texinfo/Makefile.in; then | |
2943 | MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo' | |
2944 | gcc_cv_prog_makeinfo_modern=yes | |
2945 | echo "$ac_t""Using makeinfo from the unified source tree." 1>&6 | |
2946 | else | |
2947 | # See if makeinfo has been installed and is modern enough | |
2948 | # that we can use it. | |
2949 | # Extract the first word of "makeinfo", so it can be a program name with args. | |
2950 | set dummy makeinfo; ac_word=$2 | |
2951 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e8bec136 | 2952 | echo "configure:2953: checking for $ac_word" >&5 |
09fa0705 ZW |
2953 | if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then |
2954 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2955 | else | |
2956 | if test -n "$MAKEINFO"; then | |
2957 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
2958 | else | |
2959 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2960 | ac_dummy="$PATH" | |
2961 | for ac_dir in $ac_dummy; do | |
2962 | test -z "$ac_dir" && ac_dir=. | |
2963 | if test -f $ac_dir/$ac_word; then | |
2964 | ac_cv_prog_MAKEINFO="makeinfo" | |
2965 | break | |
2966 | fi | |
2967 | done | |
2968 | IFS="$ac_save_ifs" | |
2969 | fi | |
2970 | fi | |
2971 | MAKEINFO="$ac_cv_prog_MAKEINFO" | |
2972 | if test -n "$MAKEINFO"; then | |
2973 | echo "$ac_t""$MAKEINFO" 1>&6 | |
2974 | else | |
2975 | echo "$ac_t""no" 1>&6 | |
2976 | fi | |
2977 | ||
2978 | if test -n "$MAKEINFO"; then | |
2979 | # Found it, now check the version. | |
2980 | echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6 | |
e8bec136 | 2981 | echo "configure:2982: checking for modern makeinfo" >&5 |
09fa0705 ZW |
2982 | if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then |
2983 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2984 | else | |
2985 | ac_prog_version=`$MAKEINFO --version 2>&1 | | |
2986 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
e8bec136 | 2987 | echo "configure:2988: version of makeinfo is $ac_prog_version" >&5 |
09fa0705 ZW |
2988 | case $ac_prog_version in |
2989 | '') gcc_cv_prog_makeinfo_modern=no;; | |
fd939e46 | 2990 | 4.*) |
09fa0705 ZW |
2991 | gcc_cv_prog_makeinfo_modern=yes;; |
2992 | *) gcc_cv_prog_makeinfo_modern=no;; | |
2993 | esac | |
2994 | ||
2995 | fi | |
2996 | ||
2997 | echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6 | |
2998 | else | |
2999 | gcc_cv_prog_makeinfo_modern=no | |
3000 | fi | |
3001 | ||
3002 | fi | |
3003 | ||
3004 | if test $gcc_cv_prog_makeinfo_modern = no; then | |
3005 | echo "configure: warning: | |
3006 | *** Makeinfo is missing or too old. | |
17db6582 | 3007 | *** Info documentation will not be built." 1>&2 |
d21445e7 | 3008 | BUILD_INFO= |
09fa0705 ZW |
3009 | else |
3010 | BUILD_INFO=info | |
09fa0705 ZW |
3011 | fi |
3012 | ||
3f896fc2 JM |
3013 | # Is pod2man recent enough to regenerate manpages? |
3014 | echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6 | |
e8bec136 | 3015 | echo "configure:3016: checking for recent Pod::Man" >&5 |
3f896fc2 | 3016 | if perl -e 'use 1.10 Pod::Man' >/dev/null 2>&1; then |
fd939e46 JM |
3017 | echo "$ac_t""yes" 1>&6 |
3018 | GENERATED_MANPAGES=generated-manpages | |
3019 | else | |
3020 | echo "$ac_t""no" 1>&6 | |
3021 | GENERATED_MANPAGES= | |
3022 | fi | |
3023 | ||
1e608388 ZW |
3024 | # How about lex? |
3025 | if test -f $srcdir/../flex/skel.c; then | |
3026 | FLEX='$(objdir)/../flex/flex' | |
3027 | else | |
3028 | # Extract the first word of "flex", so it can be a program name with args. | |
3029 | set dummy flex; ac_word=$2 | |
3030 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e8bec136 | 3031 | echo "configure:3032: checking for $ac_word" >&5 |
1e608388 ZW |
3032 | if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then |
3033 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3034 | else | |
3035 | if test -n "$FLEX"; then | |
3036 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
3037 | else | |
3038 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3039 | ac_dummy="$PATH" | |
3040 | for ac_dir in $ac_dummy; do | |
3041 | test -z "$ac_dir" && ac_dir=. | |
3042 | if test -f $ac_dir/$ac_word; then | |
3043 | ac_cv_prog_FLEX="flex" | |
3044 | break | |
3045 | fi | |
3046 | done | |
3047 | IFS="$ac_save_ifs" | |
3048 | test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="false" | |
3049 | fi | |
3050 | fi | |
3051 | FLEX="$ac_cv_prog_FLEX" | |
3052 | if test -n "$FLEX"; then | |
3053 | echo "$ac_t""$FLEX" 1>&6 | |
3054 | else | |
3055 | echo "$ac_t""no" 1>&6 | |
3056 | fi | |
3057 | ||
3058 | fi | |
3059 | ||
3060 | # Bison? | |
3061 | # The -L switch is so bison can find its skeleton file. | |
3062 | if test -f $srcdir/../bison/bison.simple; then | |
3063 | BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/' | |
3064 | else | |
3065 | # Extract the first word of "bison", so it can be a program name with args. | |
3066 | set dummy bison; ac_word=$2 | |
3067 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e8bec136 | 3068 | echo "configure:3069: checking for $ac_word" >&5 |
1e608388 ZW |
3069 | if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then |
3070 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3071 | else | |
3072 | if test -n "$BISON"; then | |
3073 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
3074 | else | |
3075 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3076 | ac_dummy="$PATH" | |
3077 | for ac_dir in $ac_dummy; do | |
3078 | test -z "$ac_dir" && ac_dir=. | |
3079 | if test -f $ac_dir/$ac_word; then | |
3080 | ac_cv_prog_BISON="bison" | |
3081 | break | |
3082 | fi | |
3083 | done | |
3084 | IFS="$ac_save_ifs" | |
3085 | test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="false" | |
3086 | fi | |
3087 | fi | |
3088 | BISON="$ac_cv_prog_BISON" | |
3089 | if test -n "$BISON"; then | |
3090 | echo "$ac_t""$BISON" 1>&6 | |
3091 | else | |
3092 | echo "$ac_t""no" 1>&6 | |
3093 | fi | |
3094 | ||
3095 | fi | |
3096 | ||
4e70264f ZW |
3097 | # These libraries may be used by collect2. |
3098 | # We may need a special search path to get them linked. | |
3099 | echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6 | |
e8bec136 | 3100 | echo "configure:3101: checking for collect2 libraries" >&5 |
4e70264f ZW |
3101 | if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then |
3102 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3103 | else | |
3104 | save_LIBS="$LIBS" | |
7f2749d4 | 3105 | for libs in '' -lld -lmld \ |
4e70264f ZW |
3106 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
3107 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
3108 | do | |
3109 | LIBS="$libs" | |
3110 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 3111 | #line 3112 "configure" |
4e70264f ZW |
3112 | #include "confdefs.h" |
3113 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3114 | /* We use char because int might match the return type of a gcc2 | |
3115 | builtin and then its argument prototype would still apply. */ | |
3116 | char ldopen(); | |
3117 | ||
3118 | int main() { | |
3119 | ldopen() | |
3120 | ; return 0; } | |
3121 | EOF | |
e8bec136 | 3122 | if { (eval echo configure:3123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4e70264f ZW |
3123 | rm -rf conftest* |
3124 | gcc_cv_collect2_libs="$libs"; break | |
3125 | else | |
3126 | echo "configure: failed program was:" >&5 | |
3127 | cat conftest.$ac_ext >&5 | |
3128 | fi | |
3129 | rm -f conftest* | |
3130 | done | |
3131 | LIBS="$save_LIBS" | |
3132 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
3133 | fi | |
3134 | ||
3135 | echo "$ac_t""$gcc_cv_collect2_libs" 1>&6 | |
3136 | case $gcc_cv_collect2_libs in | |
3137 | "none required") ;; | |
3138 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
3139 | esac | |
3140 | ||
3141 | ||
7f2749d4 RK |
3142 | # When building Ada code on Alpha, we need exc_resume which is usually in |
3143 | # -lexc. So test for it. | |
3144 | save_LIBS="$LIBS" | |
3145 | LIBS= | |
3146 | ||
3147 | echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6 | |
e8bec136 | 3148 | echo "configure:3149: checking for library containing exc_resume" >&5 |
7f2749d4 RK |
3149 | if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then |
3150 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3151 | else | |
3152 | ac_func_search_save_LIBS="$LIBS" | |
3153 | ac_cv_search_exc_resume="no" | |
3154 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 3155 | #line 3156 "configure" |
7f2749d4 RK |
3156 | #include "confdefs.h" |
3157 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3158 | /* We use char because int might match the return type of a gcc2 | |
3159 | builtin and then its argument prototype would still apply. */ | |
3160 | char exc_resume(); | |
3161 | ||
3162 | int main() { | |
3163 | exc_resume() | |
3164 | ; return 0; } | |
3165 | EOF | |
e8bec136 | 3166 | if { (eval echo configure:3167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7f2749d4 RK |
3167 | rm -rf conftest* |
3168 | ac_cv_search_exc_resume="none required" | |
3169 | else | |
3170 | echo "configure: failed program was:" >&5 | |
3171 | cat conftest.$ac_ext >&5 | |
3172 | fi | |
3173 | rm -f conftest* | |
3174 | test "$ac_cv_search_exc_resume" = "no" && for i in exc; do | |
3175 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3176 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 3177 | #line 3178 "configure" |
7f2749d4 RK |
3178 | #include "confdefs.h" |
3179 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3180 | /* We use char because int might match the return type of a gcc2 | |
3181 | builtin and then its argument prototype would still apply. */ | |
3182 | char exc_resume(); | |
3183 | ||
3184 | int main() { | |
3185 | exc_resume() | |
3186 | ; return 0; } | |
3187 | EOF | |
e8bec136 | 3188 | if { (eval echo configure:3189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7f2749d4 RK |
3189 | rm -rf conftest* |
3190 | ac_cv_search_exc_resume="-l$i" | |
3191 | break | |
3192 | else | |
3193 | echo "configure: failed program was:" >&5 | |
3194 | cat conftest.$ac_ext >&5 | |
3195 | fi | |
3196 | rm -f conftest* | |
3197 | done | |
3198 | LIBS="$ac_func_search_save_LIBS" | |
3199 | fi | |
3200 | ||
3201 | echo "$ac_t""$ac_cv_search_exc_resume" 1>&6 | |
3202 | if test "$ac_cv_search_exc_resume" != "no"; then | |
3203 | test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS" | |
3204 | ||
3205 | else : | |
3206 | ||
3207 | fi | |
3208 | GNAT_LIBEXC="$LIBS" | |
3209 | LIBS="$save_LIBS" | |
3210 | ||
3211 | ||
890ad3ea | 3212 | # See if the stage1 system preprocessor understands the ANSI C |
4bc5fbd4 | 3213 | # preprocessor stringification operator. (Used by symcat.h.) |
890ad3ea KG |
3214 | |
3215 | ||
3216 | echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6 | |
e8bec136 | 3217 | echo "configure:3218: checking for preprocessor stringizing operator" >&5 |
890ad3ea | 3218 | if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then |
76844337 RH |
3219 | echo $ac_n "(cached) $ac_c" 1>&6 |
3220 | else | |
3221 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 3222 | #line 3223 "configure" |
76844337 RH |
3223 | #include "confdefs.h" |
3224 | ||
890ad3ea KG |
3225 | #define x(y) #y |
3226 | ||
3227 | char *s = x(teststring); | |
3228 | ||
76844337 | 3229 | EOF |
890ad3ea KG |
3230 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
3231 | egrep "#teststring" >/dev/null 2>&1; then | |
76844337 | 3232 | rm -rf conftest* |
890ad3ea | 3233 | ac_cv_c_stringize=no |
76844337 | 3234 | else |
76844337 | 3235 | rm -rf conftest* |
890ad3ea | 3236 | ac_cv_c_stringize=yes |
76844337 RH |
3237 | fi |
3238 | rm -f conftest* | |
890ad3ea | 3239 | |
76844337 RH |
3240 | fi |
3241 | ||
890ad3ea KG |
3242 | if test "${ac_cv_c_stringize}" = yes |
3243 | then | |
3244 | cat >> confdefs.h <<\EOF | |
3245 | #define HAVE_STRINGIZE 1 | |
76844337 RH |
3246 | EOF |
3247 | ||
3248 | fi | |
890ad3ea KG |
3249 | echo "$ac_t""${ac_cv_c_stringize}" 1>&6 |
3250 | ||
76844337 | 3251 | |
956d6950 JL |
3252 | # Use <inttypes.h> only if it exists, |
3253 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
3254 | echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6 | |
e8bec136 | 3255 | echo "configure:3256: checking for inttypes.h" >&5 |
956d6950 JL |
3256 | if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then |
3257 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3258 | else | |
3259 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 3260 | #line 3261 "configure" |
956d6950 JL |
3261 | #include "confdefs.h" |
3262 | #include <sys/types.h> | |
3263 | #include <inttypes.h> | |
3264 | int main() { | |
3265 | intmax_t i = -1; | |
3266 | ; return 0; } | |
3267 | EOF | |
e8bec136 | 3268 | if { (eval echo configure:3269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
956d6950 | 3269 | rm -rf conftest* |
0056a9b5 | 3270 | gcc_cv_header_inttypes_h=yes |
956d6950 JL |
3271 | else |
3272 | echo "configure: failed program was:" >&5 | |
3273 | cat conftest.$ac_ext >&5 | |
3274 | rm -rf conftest* | |
3275 | gcc_cv_header_inttypes_h=no | |
3276 | fi | |
3277 | rm -f conftest* | |
3278 | fi | |
3279 | ||
3280 | echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6 | |
0056a9b5 KG |
3281 | if test $gcc_cv_header_inttypes_h = yes; then |
3282 | cat >> confdefs.h <<\EOF | |
3283 | #define HAVE_INTTYPES_H 1 | |
3284 | EOF | |
3285 | ||
3286 | fi | |
956d6950 | 3287 | |
c149cc37 | 3288 | |
c1800ec8 | 3289 | for ac_func in strtoul bsearch popen times clock \ |
2e09e75a | 3290 | strchr strrchr kill getrlimit setrlimit atoll atoq \ |
54953b66 | 3291 | sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \ |
f9200da2 | 3292 | fputs_unlocked getrusage iconv nl_langinfo lstat |
956d6950 JL |
3293 | do |
3294 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
e8bec136 | 3295 | echo "configure:3296: checking for $ac_func" >&5 |
956d6950 JL |
3296 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3297 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3298 | else | |
3299 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 3300 | #line 3301 "configure" |
956d6950 JL |
3301 | #include "confdefs.h" |
3302 | /* System header to define __stub macros and hopefully few prototypes, | |
3303 | which can conflict with char $ac_func(); below. */ | |
3304 | #include <assert.h> | |
3305 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3306 | /* We use char because int might match the return type of a gcc2 | |
3307 | builtin and then its argument prototype would still apply. */ | |
3308 | char $ac_func(); | |
3309 | ||
3310 | int main() { | |
3311 | ||
3312 | /* The GNU C library defines this for functions which it implements | |
3313 | to always fail with ENOSYS. Some functions are actually named | |
3314 | something starting with __ and the normal name is an alias. */ | |
3315 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3316 | choke me | |
3317 | #else | |
99b09ff3 | 3318 | $ac_func(); |
956d6950 JL |
3319 | #endif |
3320 | ||
3321 | ; return 0; } | |
3322 | EOF | |
e8bec136 | 3323 | if { (eval echo configure:3324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
956d6950 JL |
3324 | rm -rf conftest* |
3325 | eval "ac_cv_func_$ac_func=yes" | |
3326 | else | |
3327 | echo "configure: failed program was:" >&5 | |
3328 | cat conftest.$ac_ext >&5 | |
3329 | rm -rf conftest* | |
3330 | eval "ac_cv_func_$ac_func=no" | |
3331 | fi | |
3332 | rm -f conftest* | |
3333 | fi | |
3334 | ||
3335 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3336 | echo "$ac_t""yes" 1>&6 | |
3337 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3338 | cat >> confdefs.h <<EOF | |
3339 | #define $ac_tr_func 1 | |
3340 | EOF | |
3341 | ||
3342 | else | |
3343 | echo "$ac_t""no" 1>&6 | |
3344 | fi | |
3345 | done | |
3346 | ||
6885fc87 | 3347 | |
f12bc141 | 3348 | echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 |
e8bec136 | 3349 | echo "configure:3350: checking for ssize_t" >&5 |
f12bc141 ZW |
3350 | if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then |
3351 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3352 | else | |
3353 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 3354 | #line 3355 "configure" |
f12bc141 ZW |
3355 | #include "confdefs.h" |
3356 | #include <sys/types.h> | |
3357 | #if STDC_HEADERS | |
3358 | #include <stdlib.h> | |
3359 | #include <stddef.h> | |
3360 | #endif | |
3361 | EOF | |
3362 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3363 | egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
3364 | rm -rf conftest* | |
e8bec136 | 3365 | eval "ac_cv_type_ssize_t=yes" |
f12bc141 ZW |
3366 | else |
3367 | rm -rf conftest* | |
e8bec136 | 3368 | eval "ac_cv_type_ssize_t=no" |
f12bc141 ZW |
3369 | fi |
3370 | rm -f conftest* | |
3371 | ||
3372 | fi | |
e8bec136 RO |
3373 | if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then |
3374 | echo "$ac_t""yes" 1>&6 | |
3375 | else | |
3376 | echo "$ac_t""no" 1>&6 | |
3377 | cat >> confdefs.h <<EOF | |
f12bc141 ZW |
3378 | #define ssize_t int |
3379 | EOF | |
3380 | ||
3381 | fi | |
3382 | ||
0b9d02c6 | 3383 | |
e256b8b6 DA |
3384 | # Try to determine the array type of the second argument of getgroups |
3385 | # for the target system (int or gid_t). | |
3386 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 | |
e8bec136 | 3387 | echo "configure:3388: checking for uid_t in sys/types.h" >&5 |
e256b8b6 DA |
3388 | if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then |
3389 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3390 | else | |
3391 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 3392 | #line 3393 "configure" |
e256b8b6 DA |
3393 | #include "confdefs.h" |
3394 | #include <sys/types.h> | |
3395 | EOF | |
3396 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3397 | egrep "uid_t" >/dev/null 2>&1; then | |
3398 | rm -rf conftest* | |
3399 | ac_cv_type_uid_t=yes | |
3400 | else | |
3401 | rm -rf conftest* | |
3402 | ac_cv_type_uid_t=no | |
3403 | fi | |
3404 | rm -f conftest* | |
3405 | ||
3406 | fi | |
3407 | ||
3408 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 | |
3409 | if test $ac_cv_type_uid_t = no; then | |
3410 | cat >> confdefs.h <<\EOF | |
3411 | #define uid_t int | |
3412 | EOF | |
3413 | ||
3414 | cat >> confdefs.h <<\EOF | |
3415 | #define gid_t int | |
3416 | EOF | |
3417 | ||
3418 | fi | |
3419 | ||
3420 | echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 | |
e8bec136 | 3421 | echo "configure:3422: checking type of array argument to getgroups" >&5 |
e256b8b6 DA |
3422 | if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then |
3423 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3424 | else | |
3425 | if test "$cross_compiling" = yes; then | |
3426 | ac_cv_type_getgroups=cross | |
3427 | else | |
3428 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 3429 | #line 3430 "configure" |
e256b8b6 DA |
3430 | #include "confdefs.h" |
3431 | ||
3432 | /* Thanks to Mike Rendell for this test. */ | |
3433 | #include <sys/types.h> | |
3434 | #define NGID 256 | |
3435 | #undef MAX | |
3436 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
3437 | main() | |
3438 | { | |
3439 | gid_t gidset[NGID]; | |
3440 | int i, n; | |
3441 | union { gid_t gval; long lval; } val; | |
3442 | ||
3443 | val.lval = -1; | |
3444 | for (i = 0; i < NGID; i++) | |
3445 | gidset[i] = val.gval; | |
3446 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
3447 | gidset); | |
3448 | /* Exit non-zero if getgroups seems to require an array of ints. This | |
3449 | happens when gid_t is short but getgroups modifies an array of ints. */ | |
3450 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
3451 | } | |
3452 | ||
3453 | EOF | |
e8bec136 | 3454 | if { (eval echo configure:3455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
e256b8b6 DA |
3455 | then |
3456 | ac_cv_type_getgroups=gid_t | |
3457 | else | |
3458 | echo "configure: failed program was:" >&5 | |
3459 | cat conftest.$ac_ext >&5 | |
3460 | rm -fr conftest* | |
3461 | ac_cv_type_getgroups=int | |
3462 | fi | |
3463 | rm -fr conftest* | |
3464 | fi | |
3465 | ||
3466 | if test $ac_cv_type_getgroups = cross; then | |
3467 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 3468 | #line 3469 "configure" |
e256b8b6 DA |
3469 | #include "confdefs.h" |
3470 | #include <unistd.h> | |
3471 | EOF | |
3472 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3473 | egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then | |
3474 | rm -rf conftest* | |
3475 | ac_cv_type_getgroups=gid_t | |
3476 | else | |
3477 | rm -rf conftest* | |
3478 | ac_cv_type_getgroups=int | |
3479 | fi | |
3480 | rm -f conftest* | |
3481 | ||
3482 | fi | |
3483 | fi | |
3484 | ||
3485 | echo "$ac_t""$ac_cv_type_getgroups" 1>&6 | |
3486 | cat >> confdefs.h <<EOF | |
3487 | #define GETGROUPS_T $ac_cv_type_getgroups | |
3488 | EOF | |
3489 | ||
3490 | ||
3491 | if test "${target}" = "${build}"; then | |
3492 | TARGET_GETGROUPS_T=$ac_cv_type_getgroups | |
3493 | else | |
3494 | case "${target}" in | |
3495 | # This condition may need some tweaking. It should include all | |
3496 | # targets where the array type of the second argument of getgroups | |
3497 | # is int and the type of gid_t is not equivalent to int. | |
3498 | *-*-sunos* | *-*-ultrix*) | |
3499 | TARGET_GETGROUPS_T=int | |
3500 | ;; | |
3501 | *) | |
3502 | TARGET_GETGROUPS_T=gid_t | |
3503 | ;; | |
3504 | esac | |
3505 | fi | |
3506 | ||
3507 | ||
0a4b6309 | 3508 | echo $ac_n "checking for vprintf""... $ac_c" 1>&6 |
e8bec136 | 3509 | echo "configure:3510: checking for vprintf" >&5 |
0a4b6309 RL |
3510 | if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then |
3511 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3512 | else | |
3513 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 3514 | #line 3515 "configure" |
0a4b6309 RL |
3515 | #include "confdefs.h" |
3516 | /* System header to define __stub macros and hopefully few prototypes, | |
3517 | which can conflict with char vprintf(); below. */ | |
3518 | #include <assert.h> | |
3519 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3520 | /* We use char because int might match the return type of a gcc2 | |
3521 | builtin and then its argument prototype would still apply. */ | |
3522 | char vprintf(); | |
3523 | ||
3524 | int main() { | |
3525 | ||
3526 | /* The GNU C library defines this for functions which it implements | |
3527 | to always fail with ENOSYS. Some functions are actually named | |
3528 | something starting with __ and the normal name is an alias. */ | |
3529 | #if defined (__stub_vprintf) || defined (__stub___vprintf) | |
3530 | choke me | |
3531 | #else | |
99b09ff3 | 3532 | vprintf(); |
0a4b6309 RL |
3533 | #endif |
3534 | ||
3535 | ; return 0; } | |
3536 | EOF | |
e8bec136 | 3537 | if { (eval echo configure:3538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
0a4b6309 RL |
3538 | rm -rf conftest* |
3539 | eval "ac_cv_func_vprintf=yes" | |
3540 | else | |
3541 | echo "configure: failed program was:" >&5 | |
3542 | cat conftest.$ac_ext >&5 | |
3543 | rm -rf conftest* | |
3544 | eval "ac_cv_func_vprintf=no" | |
3545 | fi | |
3546 | rm -f conftest* | |
3547 | fi | |
3548 | ||
3549 | if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then | |
3550 | echo "$ac_t""yes" 1>&6 | |
3551 | cat >> confdefs.h <<\EOF | |
3552 | #define HAVE_VPRINTF 1 | |
3553 | EOF | |
3554 | ||
3555 | else | |
3556 | echo "$ac_t""no" 1>&6 | |
3557 | fi | |
8fa1f09f | 3558 | |
0a4b6309 RL |
3559 | if test "$ac_cv_func_vprintf" != yes; then |
3560 | echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 | |
e8bec136 | 3561 | echo "configure:3562: checking for _doprnt" >&5 |
0a4b6309 RL |
3562 | if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then |
3563 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3564 | else | |
3565 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 3566 | #line 3567 "configure" |
0a4b6309 RL |
3567 | #include "confdefs.h" |
3568 | /* System header to define __stub macros and hopefully few prototypes, | |
3569 | which can conflict with char _doprnt(); below. */ | |
3570 | #include <assert.h> | |
3571 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3572 | /* We use char because int might match the return type of a gcc2 | |
3573 | builtin and then its argument prototype would still apply. */ | |
3574 | char _doprnt(); | |
3575 | ||
3576 | int main() { | |
3577 | ||
3578 | /* The GNU C library defines this for functions which it implements | |
3579 | to always fail with ENOSYS. Some functions are actually named | |
3580 | something starting with __ and the normal name is an alias. */ | |
3581 | #if defined (__stub__doprnt) || defined (__stub____doprnt) | |
3582 | choke me | |
3583 | #else | |
99b09ff3 | 3584 | _doprnt(); |
0a4b6309 RL |
3585 | #endif |
3586 | ||
3587 | ; return 0; } | |
3588 | EOF | |
e8bec136 | 3589 | if { (eval echo configure:3590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
0a4b6309 RL |
3590 | rm -rf conftest* |
3591 | eval "ac_cv_func__doprnt=yes" | |
3592 | else | |
3593 | echo "configure: failed program was:" >&5 | |
3594 | cat conftest.$ac_ext >&5 | |
3595 | rm -rf conftest* | |
3596 | eval "ac_cv_func__doprnt=no" | |
3597 | fi | |
3598 | rm -f conftest* | |
3599 | fi | |
3600 | ||
3601 | if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then | |
3602 | echo "$ac_t""yes" 1>&6 | |
3603 | cat >> confdefs.h <<\EOF | |
3604 | #define HAVE_DOPRNT 1 | |
3605 | EOF | |
3606 | ||
3607 | else | |
3608 | echo "$ac_t""no" 1>&6 | |
3609 | fi | |
3610 | ||
3611 | fi | |
3612 | ||
3613 | vfprintf= | |
3614 | doprint= | |
3615 | if test $ac_cv_func_vprintf != yes ; then | |
3616 | vfprintf=vfprintf.o | |
3617 | if test $ac_cv_func__doprnt != yes ; then | |
3618 | doprint=doprint.o | |
3619 | fi | |
3620 | fi | |
3621 | ||
3622 | ||
3623 | ||
b3e1e64f MS |
3624 | for ac_func in strstr |
3625 | do | |
3626 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
e8bec136 | 3627 | echo "configure:3628: checking for $ac_func" >&5 |
b3e1e64f MS |
3628 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3629 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3630 | else | |
3631 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 3632 | #line 3633 "configure" |
b3e1e64f MS |
3633 | #include "confdefs.h" |
3634 | /* System header to define __stub macros and hopefully few prototypes, | |
3635 | which can conflict with char $ac_func(); below. */ | |
3636 | #include <assert.h> | |
3637 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3638 | /* We use char because int might match the return type of a gcc2 | |
3639 | builtin and then its argument prototype would still apply. */ | |
3640 | char $ac_func(); | |
3641 | ||
3642 | int main() { | |
3643 | ||
3644 | /* The GNU C library defines this for functions which it implements | |
3645 | to always fail with ENOSYS. Some functions are actually named | |
3646 | something starting with __ and the normal name is an alias. */ | |
3647 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3648 | choke me | |
3649 | #else | |
3650 | $ac_func(); | |
3651 | #endif | |
3652 | ||
3653 | ; return 0; } | |
3654 | EOF | |
e8bec136 | 3655 | if { (eval echo configure:3656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
b3e1e64f MS |
3656 | rm -rf conftest* |
3657 | eval "ac_cv_func_$ac_func=yes" | |
3658 | else | |
3659 | echo "configure: failed program was:" >&5 | |
3660 | cat conftest.$ac_ext >&5 | |
3661 | rm -rf conftest* | |
3662 | eval "ac_cv_func_$ac_func=no" | |
3663 | fi | |
3664 | rm -f conftest* | |
3665 | fi | |
3666 | ||
3667 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3668 | echo "$ac_t""yes" 1>&6 | |
3669 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3670 | cat >> confdefs.h <<EOF | |
3671 | #define $ac_tr_func 1 | |
3672 | EOF | |
3673 | strstr= | |
3674 | else | |
3675 | echo "$ac_t""no" 1>&6 | |
3676 | strstr=strstr.o | |
3677 | fi | |
3678 | done | |
3679 | ||
3680 | ||
0a4b6309 | 3681 | echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6 |
e8bec136 | 3682 | echo "configure:3683: checking whether the printf functions support %p" >&5 |
0a4b6309 RL |
3683 | if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then |
3684 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3685 | else | |
3686 | if test "$cross_compiling" = yes; then | |
3687 | gcc_cv_func_printf_ptr=no | |
3688 | else | |
3689 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 3690 | #line 3691 "configure" |
0a4b6309 RL |
3691 | #include "confdefs.h" |
3692 | #include <stdio.h> | |
3693 | ||
86cf1cbd | 3694 | int main() |
0a4b6309 RL |
3695 | { |
3696 | char buf[64]; | |
3697 | char *p = buf, *q = NULL; | |
3698 | sprintf(buf, "%p", p); | |
3699 | sscanf(buf, "%p", &q); | |
86cf1cbd | 3700 | return (p != q); |
0a4b6309 RL |
3701 | } |
3702 | EOF | |
e8bec136 | 3703 | if { (eval echo configure:3704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
0a4b6309 RL |
3704 | then |
3705 | gcc_cv_func_printf_ptr=yes | |
3706 | else | |
3707 | echo "configure: failed program was:" >&5 | |
3708 | cat conftest.$ac_ext >&5 | |
3709 | rm -fr conftest* | |
3710 | gcc_cv_func_printf_ptr=no | |
3711 | fi | |
3712 | rm -fr conftest* | |
3713 | fi | |
3714 | ||
3715 | rm -f core core.* *.core | |
3716 | fi | |
3717 | ||
3718 | echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6 | |
3719 | if test $gcc_cv_func_printf_ptr = yes ; then | |
3720 | cat >> confdefs.h <<\EOF | |
3721 | #define HAVE_PRINTF_PTR 1 | |
3722 | EOF | |
3723 | ||
3724 | fi | |
3725 | ||
b27d2bd5 MK |
3726 | |
3727 | case "${host}" in | |
3728 | *-*-uwin*) | |
34fa3e7d MM |
3729 | { echo "configure: error: |
3730 | *** UWIN may not be used as a host platform because | |
3731 | *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; } | |
b27d2bd5 MK |
3732 | ;; |
3733 | esac | |
c375c43b | 3734 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
e8bec136 | 3735 | echo "configure:3736: checking for pid_t" >&5 |
c375c43b KG |
3736 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
3737 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3738 | else | |
3739 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 3740 | #line 3741 "configure" |
c375c43b KG |
3741 | #include "confdefs.h" |
3742 | #include <sys/types.h> | |
3743 | #if STDC_HEADERS | |
3744 | #include <stdlib.h> | |
3745 | #include <stddef.h> | |
3746 | #endif | |
3747 | EOF | |
3748 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
b27d2bd5 | 3749 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
c375c43b | 3750 | rm -rf conftest* |
e8bec136 | 3751 | eval "ac_cv_type_pid_t=yes" |
c375c43b KG |
3752 | else |
3753 | rm -rf conftest* | |
e8bec136 | 3754 | eval "ac_cv_type_pid_t=no" |
c375c43b KG |
3755 | fi |
3756 | rm -f conftest* | |
3757 | ||
3758 | fi | |
e8bec136 RO |
3759 | if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then |
3760 | echo "$ac_t""yes" 1>&6 | |
3761 | else | |
3762 | echo "$ac_t""no" 1>&6 | |
3763 | cat >> confdefs.h <<EOF | |
c375c43b KG |
3764 | #define pid_t int |
3765 | EOF | |
3766 | ||
3767 | fi | |
3768 | ||
3769 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` | |
3770 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
e8bec136 | 3771 | echo "configure:3772: checking for vfork.h" >&5 |
c375c43b KG |
3772 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3773 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3774 | else | |
3775 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 3776 | #line 3777 "configure" |
c375c43b KG |
3777 | #include "confdefs.h" |
3778 | #include <vfork.h> | |
3779 | EOF | |
3780 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e8bec136 | 3781 | { (eval echo configure:3782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 3782 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
c375c43b KG |
3783 | if test -z "$ac_err"; then |
3784 | rm -rf conftest* | |
3785 | eval "ac_cv_header_$ac_safe=yes" | |
3786 | else | |
3787 | echo "$ac_err" >&5 | |
3788 | echo "configure: failed program was:" >&5 | |
3789 | cat conftest.$ac_ext >&5 | |
3790 | rm -rf conftest* | |
3791 | eval "ac_cv_header_$ac_safe=no" | |
3792 | fi | |
3793 | rm -f conftest* | |
3794 | fi | |
3795 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3796 | echo "$ac_t""yes" 1>&6 | |
3797 | cat >> confdefs.h <<\EOF | |
3798 | #define HAVE_VFORK_H 1 | |
3799 | EOF | |
3800 | ||
3801 | else | |
3802 | echo "$ac_t""no" 1>&6 | |
3803 | fi | |
3804 | ||
3805 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 | |
e8bec136 | 3806 | echo "configure:3807: checking for working vfork" >&5 |
c375c43b KG |
3807 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
3808 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3809 | else | |
3810 | if test "$cross_compiling" = yes; then | |
3811 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
e8bec136 | 3812 | echo "configure:3813: checking for vfork" >&5 |
c375c43b KG |
3813 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
3814 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3815 | else | |
3816 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 3817 | #line 3818 "configure" |
c375c43b KG |
3818 | #include "confdefs.h" |
3819 | /* System header to define __stub macros and hopefully few prototypes, | |
3820 | which can conflict with char vfork(); below. */ | |
3821 | #include <assert.h> | |
3822 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3823 | /* We use char because int might match the return type of a gcc2 | |
3824 | builtin and then its argument prototype would still apply. */ | |
3825 | char vfork(); | |
3826 | ||
3827 | int main() { | |
3828 | ||
3829 | /* The GNU C library defines this for functions which it implements | |
3830 | to always fail with ENOSYS. Some functions are actually named | |
3831 | something starting with __ and the normal name is an alias. */ | |
3832 | #if defined (__stub_vfork) || defined (__stub___vfork) | |
3833 | choke me | |
3834 | #else | |
99b09ff3 | 3835 | vfork(); |
c375c43b KG |
3836 | #endif |
3837 | ||
3838 | ; return 0; } | |
3839 | EOF | |
e8bec136 | 3840 | if { (eval echo configure:3841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c375c43b KG |
3841 | rm -rf conftest* |
3842 | eval "ac_cv_func_vfork=yes" | |
3843 | else | |
3844 | echo "configure: failed program was:" >&5 | |
3845 | cat conftest.$ac_ext >&5 | |
3846 | rm -rf conftest* | |
3847 | eval "ac_cv_func_vfork=no" | |
3848 | fi | |
3849 | rm -f conftest* | |
3850 | fi | |
3851 | ||
3852 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then | |
3853 | echo "$ac_t""yes" 1>&6 | |
3854 | : | |
3855 | else | |
3856 | echo "$ac_t""no" 1>&6 | |
3857 | fi | |
3858 | ||
3859 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
3860 | else | |
3861 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 3862 | #line 3863 "configure" |
c375c43b KG |
3863 | #include "confdefs.h" |
3864 | /* Thanks to Paul Eggert for this test. */ | |
3865 | #include <stdio.h> | |
3866 | #include <sys/types.h> | |
3867 | #include <sys/stat.h> | |
3868 | #ifdef HAVE_UNISTD_H | |
3869 | #include <unistd.h> | |
3870 | #endif | |
3871 | #ifdef HAVE_VFORK_H | |
3872 | #include <vfork.h> | |
3873 | #endif | |
3874 | /* On some sparc systems, changes by the child to local and incoming | |
3875 | argument registers are propagated back to the parent. | |
3876 | The compiler is told about this with #include <vfork.h>, | |
3877 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
3878 | Test for this by using a static variable whose address | |
3879 | is put into a register that is clobbered by the vfork. */ | |
3880 | static | |
3881 | #ifdef __cplusplus | |
3882 | sparc_address_test (int arg) | |
3883 | #else | |
3884 | sparc_address_test (arg) int arg; | |
3885 | #endif | |
3886 | { | |
3887 | static pid_t child; | |
3888 | if (!child) { | |
3889 | child = vfork (); | |
3890 | if (child < 0) { | |
3891 | perror ("vfork"); | |
3892 | _exit(2); | |
3893 | } | |
3894 | if (!child) { | |
3895 | arg = getpid(); | |
3896 | write(-1, "", 0); | |
3897 | _exit (arg); | |
3898 | } | |
3899 | } | |
3900 | } | |
3901 | main() { | |
3902 | pid_t parent = getpid (); | |
3903 | pid_t child; | |
3904 | ||
3905 | sparc_address_test (); | |
3906 | ||
3907 | child = vfork (); | |
3908 | ||
3909 | if (child == 0) { | |
3910 | /* Here is another test for sparc vfork register problems. | |
3911 | This test uses lots of local variables, at least | |
3912 | as many local variables as main has allocated so far | |
3913 | including compiler temporaries. 4 locals are enough for | |
3914 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
3915 | A buggy compiler should reuse the register of parent | |
3916 | for one of the local variables, since it will think that | |
3917 | parent can't possibly be used any more in this routine. | |
3918 | Assigning to the local variable will thus munge parent | |
3919 | in the parent process. */ | |
3920 | pid_t | |
3921 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
3922 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
3923 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
3924 | use the same hardware register for all 8 local variables. */ | |
3925 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
3926 | || p != p5 || p != p6 || p != p7) | |
3927 | _exit(1); | |
3928 | ||
3929 | /* On some systems (e.g. IRIX 3.3), | |
3930 | vfork doesn't separate parent from child file descriptors. | |
3931 | If the child closes a descriptor before it execs or exits, | |
3932 | this munges the parent's descriptor as well. | |
3933 | Test for this by closing stdout in the child. */ | |
3934 | _exit(close(fileno(stdout)) != 0); | |
3935 | } else { | |
3936 | int status; | |
3937 | struct stat st; | |
3938 | ||
3939 | while (wait(&status) != child) | |
3940 | ; | |
3941 | exit( | |
3942 | /* Was there some problem with vforking? */ | |
3943 | child < 0 | |
3944 | ||
3945 | /* Did the child fail? (This shouldn't happen.) */ | |
3946 | || status | |
3947 | ||
3948 | /* Did the vfork/compiler bug occur? */ | |
3949 | || parent != getpid() | |
3950 | ||
3951 | /* Did the file descriptor bug occur? */ | |
3952 | || fstat(fileno(stdout), &st) != 0 | |
3953 | ); | |
3954 | } | |
3955 | } | |
3956 | EOF | |
e8bec136 | 3957 | if { (eval echo configure:3958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c375c43b KG |
3958 | then |
3959 | ac_cv_func_vfork_works=yes | |
3960 | else | |
3961 | echo "configure: failed program was:" >&5 | |
3962 | cat conftest.$ac_ext >&5 | |
3963 | rm -fr conftest* | |
3964 | ac_cv_func_vfork_works=no | |
3965 | fi | |
3966 | rm -fr conftest* | |
3967 | fi | |
3968 | ||
3969 | fi | |
3970 | ||
3971 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 | |
3972 | if test $ac_cv_func_vfork_works = no; then | |
3973 | cat >> confdefs.h <<\EOF | |
3974 | #define vfork fork | |
3975 | EOF | |
3976 | ||
3977 | fi | |
3978 | ||
81bf3d9e | 3979 | for ac_func in getpagesize |
0a4b6309 | 3980 | do |
81bf3d9e | 3981 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
e8bec136 | 3982 | echo "configure:3983: checking for $ac_func" >&5 |
81bf3d9e | 3983 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
0a4b6309 RL |
3984 | echo $ac_n "(cached) $ac_c" 1>&6 |
3985 | else | |
3986 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 3987 | #line 3988 "configure" |
0a4b6309 | 3988 | #include "confdefs.h" |
81bf3d9e RH |
3989 | /* System header to define __stub macros and hopefully few prototypes, |
3990 | which can conflict with char $ac_func(); below. */ | |
3991 | #include <assert.h> | |
3992 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3993 | /* We use char because int might match the return type of a gcc2 | |
3994 | builtin and then its argument prototype would still apply. */ | |
3995 | char $ac_func(); | |
8fa1f09f | 3996 | |
81bf3d9e RH |
3997 | int main() { |
3998 | ||
3999 | /* The GNU C library defines this for functions which it implements | |
4000 | to always fail with ENOSYS. Some functions are actually named | |
4001 | something starting with __ and the normal name is an alias. */ | |
4002 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4003 | choke me | |
c5c76735 | 4004 | #else |
99b09ff3 | 4005 | $ac_func(); |
c5c76735 JL |
4006 | #endif |
4007 | ||
c5c76735 JL |
4008 | ; return 0; } |
4009 | EOF | |
e8bec136 | 4010 | if { (eval echo configure:4011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c5c76735 | 4011 | rm -rf conftest* |
81bf3d9e | 4012 | eval "ac_cv_func_$ac_func=yes" |
c5c76735 JL |
4013 | else |
4014 | echo "configure: failed program was:" >&5 | |
4015 | cat conftest.$ac_ext >&5 | |
4016 | rm -rf conftest* | |
81bf3d9e | 4017 | eval "ac_cv_func_$ac_func=no" |
c5c76735 JL |
4018 | fi |
4019 | rm -f conftest* | |
4020 | fi | |
4021 | ||
81bf3d9e | 4022 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
c5c76735 | 4023 | echo "$ac_t""yes" 1>&6 |
81bf3d9e | 4024 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
c5c76735 | 4025 | cat >> confdefs.h <<EOF |
81bf3d9e | 4026 | #define $ac_tr_func 1 |
c5c76735 | 4027 | EOF |
81bf3d9e | 4028 | |
c5c76735 JL |
4029 | else |
4030 | echo "$ac_t""no" 1>&6 | |
4031 | fi | |
c5c76735 JL |
4032 | done |
4033 | ||
825b6926 ZW |
4034 | # The test program for the next two tests is the same except for one |
4035 | # set of ifdefs. | |
4036 | cat >ct-mmap.inc <<'EOF' | |
d2cabf16 | 4037 | #include <sys/types.h> |
81bf3d9e | 4038 | #include <sys/mman.h> |
825b6926 ZW |
4039 | #include <fcntl.h> |
4040 | #include <signal.h> | |
4041 | #include <setjmp.h> | |
4042 | #include <stdio.h> | |
0a4b6309 | 4043 | |
4c1331d6 DA |
4044 | #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON) |
4045 | # define MAP_ANONYMOUS MAP_ANON | |
4046 | #endif | |
4047 | ||
81bf3d9e RH |
4048 | /* This mess was copied from the GNU getpagesize.h. */ |
4049 | #ifndef HAVE_GETPAGESIZE | |
4050 | # ifdef HAVE_UNISTD_H | |
4051 | # include <unistd.h> | |
4052 | # endif | |
0a4b6309 | 4053 | |
81bf3d9e RH |
4054 | /* Assume that all systems that can run configure have sys/param.h. */ |
4055 | # ifndef HAVE_SYS_PARAM_H | |
4056 | # define HAVE_SYS_PARAM_H 1 | |
4057 | # endif | |
0a4b6309 | 4058 | |
81bf3d9e RH |
4059 | # ifdef _SC_PAGESIZE |
4060 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
4061 | # else /* no _SC_PAGESIZE */ | |
4062 | # ifdef HAVE_SYS_PARAM_H | |
4063 | # include <sys/param.h> | |
4064 | # ifdef EXEC_PAGESIZE | |
4065 | # define getpagesize() EXEC_PAGESIZE | |
4066 | # else /* no EXEC_PAGESIZE */ | |
4067 | # ifdef NBPG | |
4068 | # define getpagesize() NBPG * CLSIZE | |
4069 | # ifndef CLSIZE | |
4070 | # define CLSIZE 1 | |
4071 | # endif /* no CLSIZE */ | |
4072 | # else /* no NBPG */ | |
4073 | # ifdef NBPC | |
4074 | # define getpagesize() NBPC | |
4075 | # else /* no NBPC */ | |
4076 | # ifdef PAGESIZE | |
4077 | # define getpagesize() PAGESIZE | |
4078 | # endif /* PAGESIZE */ | |
4079 | # endif /* no NBPC */ | |
4080 | # endif /* no NBPG */ | |
4081 | # endif /* no EXEC_PAGESIZE */ | |
4082 | # else /* no HAVE_SYS_PARAM_H */ | |
4083 | # define getpagesize() 8192 /* punt totally */ | |
4084 | # endif /* no HAVE_SYS_PARAM_H */ | |
4085 | # endif /* no _SC_PAGESIZE */ | |
0a4b6309 | 4086 | |
81bf3d9e | 4087 | #endif /* no HAVE_GETPAGESIZE */ |
0a4b6309 | 4088 | |
825b6926 ZW |
4089 | #ifndef MAP_FAILED |
4090 | # define MAP_FAILED -1 | |
4c1331d6 | 4091 | #endif |
81bf3d9e | 4092 | |
825b6926 ZW |
4093 | #undef perror_exit |
4094 | #define perror_exit(str, val) \ | |
4095 | do { perror(str); exit(val); } while (0) | |
4096 | ||
4097 | /* Some versions of cygwin mmap require that munmap is called with the | |
4098 | same parameters as mmap. GCC expects that this is not the case. | |
4099 | Test for various forms of this problem. Warning - icky signal games. */ | |
4100 | ||
4101 | static sigset_t unblock_sigsegv; | |
4102 | static jmp_buf r; | |
4103 | static size_t pg; | |
4104 | static int devzero; | |
4105 | ||
4106 | static char * | |
4107 | anonmap (size) | |
4108 | size_t size; | |
4109 | { | |
4110 | #ifdef USE_MAP_ANON | |
4111 | return (char *) mmap (0, size, PROT_READ|PROT_WRITE, | |
4112 | MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); | |
4c1331d6 | 4113 | #else |
825b6926 ZW |
4114 | return (char *) mmap (0, size, PROT_READ|PROT_WRITE, |
4115 | MAP_PRIVATE, devzero, 0); | |
4c1331d6 | 4116 | #endif |
825b6926 ZW |
4117 | } |
4118 | ||
4119 | static void | |
4120 | sigsegv (unused) | |
4121 | int unused; | |
4122 | { | |
4123 | sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0); | |
4124 | longjmp (r, 1); | |
4125 | } | |
4126 | ||
4127 | /* Basic functionality test. */ | |
4128 | void | |
4129 | test_0 () | |
4130 | { | |
4131 | char *x = anonmap (pg); | |
4132 | if (x == (char *) MAP_FAILED) | |
4133 | perror_exit("test 0 mmap", 2); | |
81bf3d9e | 4134 | |
4acab94b | 4135 | *(int *)x += 1; |
81bf3d9e | 4136 | |
4acab94b | 4137 | if (munmap(x, pg) < 0) |
825b6926 ZW |
4138 | perror_exit("test 0 munmap", 3); |
4139 | } | |
4140 | ||
4141 | /* 1. If we map a 2-page region and unmap its second page, the first page | |
4142 | must remain. */ | |
4143 | static void | |
4144 | test_1 () | |
4145 | { | |
4146 | char *x = anonmap (pg * 2); | |
4147 | if (x == (char *)MAP_FAILED) | |
4148 | perror_exit ("test 1 mmap", 4); | |
4149 | ||
4150 | signal (SIGSEGV, sigsegv); | |
4151 | if (setjmp (r)) | |
4152 | perror_exit ("test 1 fault", 5); | |
4153 | ||
4154 | x[0] = 1; | |
4155 | x[pg] = 1; | |
4156 | ||
4157 | if (munmap (x + pg, pg) < 0) | |
4158 | perror_exit ("test 1 munmap 1", 6); | |
4159 | x[0] = 2; | |
4160 | ||
4161 | if (setjmp (r) == 0) | |
4162 | { | |
4163 | x[pg] = 1; | |
4164 | perror_exit ("test 1 no fault", 7); | |
4165 | } | |
4166 | if (munmap (x, pg) < 0) | |
4167 | perror_exit ("test 1 munmap 2", 8); | |
4168 | } | |
4169 | ||
4170 | /* 2. If we map a 2-page region and unmap its first page, the second | |
4171 | page must remain. */ | |
4172 | static void | |
4173 | test_2 () | |
4174 | { | |
4175 | char *x = anonmap (pg * 2); | |
4176 | if (x == (char *)MAP_FAILED) | |
4177 | perror_exit ("test 2 mmap", 9); | |
4178 | ||
4179 | signal (SIGSEGV, sigsegv); | |
4180 | if (setjmp (r)) | |
4181 | perror_exit ("test 2 fault", 10); | |
4182 | ||
4183 | x[0] = 1; | |
4184 | x[pg] = 1; | |
4185 | ||
4186 | if (munmap (x, pg) < 0) | |
4187 | perror_exit ("test 2 munmap 1", 11); | |
4188 | ||
4189 | x[pg] = 2; | |
4190 | ||
4191 | if (setjmp (r) == 0) | |
4192 | { | |
4193 | x[0] = 1; | |
4194 | perror_exit ("test 2 no fault", 12); | |
4195 | } | |
4196 | ||
4197 | if (munmap (x+pg, pg) < 0) | |
4198 | perror_exit ("test 2 munmap 2", 13); | |
4199 | } | |
4200 | ||
4201 | /* 3. If we map two adjacent 1-page regions and unmap them both with | |
4202 | one munmap, both must go away. | |
4203 | ||
4204 | Getting two adjacent 1-page regions with two mmap calls is slightly | |
4205 | tricky. All OS's tested skip over already-allocated blocks; therefore | |
4206 | we have been careful to unmap all allocated regions in previous tests. | |
4207 | HP/UX allocates pages backward in memory. No OS has yet been observed | |
4208 | to be so perverse as to leave unmapped space between consecutive calls | |
4209 | to mmap. */ | |
4210 | ||
4211 | static void | |
4212 | test_3 () | |
4213 | { | |
4214 | char *x, *y, *z; | |
4215 | ||
4216 | x = anonmap (pg); | |
4217 | if (x == (char *)MAP_FAILED) | |
4218 | perror_exit ("test 3 mmap 1", 14); | |
4219 | y = anonmap (pg); | |
4220 | if (y == (char *)MAP_FAILED) | |
4221 | perror_exit ("test 3 mmap 2", 15); | |
4222 | ||
4223 | if (y != x + pg) | |
4224 | { | |
4225 | if (y == x - pg) | |
4226 | z = y, y = x, x = z; | |
4227 | else | |
4228 | { | |
4229 | fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n", | |
4230 | (unsigned long)x, (unsigned long)y); | |
4231 | exit (16); | |
4232 | } | |
4233 | } | |
4234 | ||
4235 | signal (SIGSEGV, sigsegv); | |
4236 | if (setjmp (r)) | |
4237 | perror_exit ("test 3 fault", 17); | |
4238 | ||
4239 | x[0] = 1; | |
4240 | y[0] = 1; | |
4241 | ||
4242 | if (munmap (x, pg*2) < 0) | |
4243 | perror_exit ("test 3 munmap", 18); | |
4244 | ||
4245 | if (setjmp (r) == 0) | |
4246 | { | |
4247 | x[0] = 1; | |
4248 | perror_exit ("test 3 no fault 1", 19); | |
4249 | } | |
4250 | ||
4251 | signal (SIGSEGV, sigsegv); | |
4252 | if (setjmp (r) == 0) | |
4253 | { | |
4254 | y[0] = 1; | |
4255 | perror_exit ("test 3 no fault 2", 20); | |
4256 | } | |
4257 | } | |
4258 | ||
4259 | int | |
4260 | main () | |
4261 | { | |
4262 | sigemptyset (&unblock_sigsegv); | |
4263 | sigaddset (&unblock_sigsegv, SIGSEGV); | |
4264 | pg = getpagesize (); | |
4265 | #ifndef USE_MAP_ANON | |
4266 | devzero = open ("/dev/zero", O_RDWR); | |
4267 | if (devzero < 0) | |
4268 | perror_exit ("open /dev/zero", 1); | |
4269 | #endif | |
4270 | ||
4271 | test_0(); | |
4272 | test_1(); | |
4273 | test_2(); | |
4274 | test_3(); | |
81bf3d9e | 4275 | |
4acab94b AO |
4276 | exit(0); |
4277 | } | |
81bf3d9e | 4278 | EOF |
825b6926 ZW |
4279 | |
4280 | echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6 | |
e8bec136 | 4281 | echo "configure:4282: checking for working mmap from /dev/zero" >&5 |
825b6926 ZW |
4282 | if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then |
4283 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4284 | else | |
4285 | if test "$cross_compiling" = yes; then | |
4286 | # If this is not cygwin, and /dev/zero is a character device, it's probably | |
4287 | # safe to assume it works. | |
4288 | case "$host_os" in | |
4289 | cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;; | |
4290 | * ) if test -c /dev/zero | |
4291 | then ac_cv_func_mmap_dev_zero=yes | |
4292 | else ac_cv_func_mmap_dev_zero=no | |
4293 | fi ;; | |
4294 | esac | |
4295 | else | |
4296 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 4297 | #line 4298 "configure" |
825b6926 ZW |
4298 | #include "confdefs.h" |
4299 | #include "ct-mmap.inc" | |
4300 | EOF | |
e8bec136 | 4301 | if { (eval echo configure:4302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
825b6926 ZW |
4302 | then |
4303 | ac_cv_func_mmap_dev_zero=yes | |
4304 | else | |
4305 | echo "configure: failed program was:" >&5 | |
4306 | cat conftest.$ac_ext >&5 | |
4307 | rm -fr conftest* | |
4308 | if test $? -lt 4 | |
4309 | then ac_cv_func_mmap_dev_zero=no | |
4310 | else ac_cv_func_mmap_dev_zero=buggy | |
4311 | fi | |
4312 | fi | |
4313 | rm -fr conftest* | |
4314 | fi | |
4315 | ||
4316 | ||
4317 | fi | |
4318 | ||
4319 | echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6 | |
4320 | if test $ac_cv_func_mmap_dev_zero = yes; then | |
4321 | cat >> confdefs.h <<\EOF | |
4322 | #define HAVE_MMAP_DEV_ZERO 1 | |
4323 | EOF | |
4324 | ||
4325 | fi | |
4326 | ||
4327 | echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6 | |
e8bec136 | 4328 | echo "configure:4329: checking for working mmap with MAP_ANON(YMOUS)" >&5 |
825b6926 ZW |
4329 | if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then |
4330 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4331 | else | |
4332 | if test "$cross_compiling" = yes; then | |
4333 | # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works | |
4334 | # just because it's there. Some SCO Un*xen define it but don't implement it. | |
4335 | ac_cv_func_mmap_anon=no | |
4336 | else | |
4337 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 4338 | #line 4339 "configure" |
825b6926 ZW |
4339 | #include "confdefs.h" |
4340 | #define USE_MAP_ANON | |
4341 | #include "ct-mmap.inc" | |
4342 | EOF | |
e8bec136 | 4343 | if { (eval echo configure:4344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
81bf3d9e | 4344 | then |
825b6926 | 4345 | ac_cv_func_mmap_anon=yes |
81bf3d9e RH |
4346 | else |
4347 | echo "configure: failed program was:" >&5 | |
4348 | cat conftest.$ac_ext >&5 | |
4349 | rm -fr conftest* | |
825b6926 ZW |
4350 | if test $? -lt 4 |
4351 | then ac_cv_func_mmap_anon=no | |
4352 | else ac_cv_func_mmap_anon=buggy | |
4353 | fi | |
81bf3d9e RH |
4354 | fi |
4355 | rm -fr conftest* | |
4356 | fi | |
4357 | ||
825b6926 | 4358 | |
81bf3d9e RH |
4359 | fi |
4360 | ||
825b6926 ZW |
4361 | echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6 |
4362 | if test $ac_cv_func_mmap_anon = yes; then | |
81bf3d9e | 4363 | cat >> confdefs.h <<\EOF |
825b6926 | 4364 | #define HAVE_MMAP_ANON 1 |
81bf3d9e RH |
4365 | EOF |
4366 | ||
4367 | fi | |
825b6926 | 4368 | rm -f ct-mmap.inc |
81bf3d9e | 4369 | |
56f02b88 | 4370 | echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6 |
e8bec136 | 4371 | echo "configure:4372: checking for working mmap of a file" >&5 |
56f02b88 ZW |
4372 | if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then |
4373 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4374 | else | |
4375 | # Create a file one thousand bytes long. | |
4376 | for i in 1 2 3 4 5 6 7 8 9 0 | |
4377 | do for j in 1 2 3 4 5 6 7 8 9 0 | |
4378 | do echo $i $j xxxxx | |
4379 | done | |
4380 | done > conftestdata$$ | |
4381 | ||
4382 | if test "$cross_compiling" = yes; then | |
4383 | ac_cv_func_mmap_file=no | |
4384 | else | |
4385 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 4386 | #line 4387 "configure" |
56f02b88 ZW |
4387 | #include "confdefs.h" |
4388 | ||
4389 | /* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by | |
4390 | Richard Henderson and Alexandre Oliva. | |
4391 | Check whether read-only mmap of a plain file works. */ | |
4392 | #include <sys/types.h> | |
4393 | #include <sys/stat.h> | |
4394 | #include <fcntl.h> | |
4395 | #include <sys/mman.h> | |
4396 | ||
4397 | int main() | |
4398 | { | |
4399 | char *x; | |
4400 | int fd; | |
4401 | struct stat st; | |
4402 | ||
4403 | fd = open("conftestdata$$", O_RDONLY); | |
4404 | if (fd < 0) | |
4405 | exit(1); | |
4406 | ||
4407 | if (fstat (fd, &st)) | |
4408 | exit(2); | |
4409 | ||
4410 | x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); | |
4411 | if (x == (char *) -1) | |
4412 | exit(3); | |
4413 | ||
4414 | if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ') | |
4415 | exit(4); | |
4416 | ||
4417 | if (munmap(x, st.st_size) < 0) | |
4418 | exit(5); | |
4419 | ||
4420 | exit(0); | |
4421 | } | |
4422 | EOF | |
e8bec136 | 4423 | if { (eval echo configure:4424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
56f02b88 ZW |
4424 | then |
4425 | ac_cv_func_mmap_file=yes | |
4426 | else | |
4427 | echo "configure: failed program was:" >&5 | |
4428 | cat conftest.$ac_ext >&5 | |
4429 | rm -fr conftest* | |
4430 | ac_cv_func_mmap_file=no | |
4431 | fi | |
4432 | rm -fr conftest* | |
4433 | fi | |
4434 | ||
4435 | fi | |
4436 | ||
4437 | echo "$ac_t""$ac_cv_func_mmap_file" 1>&6 | |
4438 | if test $ac_cv_func_mmap_file = yes; then | |
4439 | cat >> confdefs.h <<\EOF | |
4440 | #define HAVE_MMAP_FILE 1 | |
4441 | EOF | |
4442 | ||
4443 | fi | |
4444 | ||
81bf3d9e | 4445 | |
86cf1cbd KG |
4446 | # We will need to find libiberty.h and ansidecl.h |
4447 | saved_CFLAGS="$CFLAGS" | |
4448 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
8e944909 | 4449 | for ac_func in getenv atol sbrk abort atof getcwd getwd \ |
6c889b67 | 4450 | strsignal putc_unlocked fputs_unlocked strstr environ errno \ |
c1800ec8 | 4451 | malloc realloc calloc free basename getopt clock |
81bf3d9e | 4452 | do |
f31e826b KG |
4453 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
4454 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 | |
e8bec136 | 4455 | echo "configure:4456: checking whether $ac_func is declared" >&5 |
f31e826b | 4456 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
81bf3d9e RH |
4457 | echo $ac_n "(cached) $ac_c" 1>&6 |
4458 | else | |
4459 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 4460 | #line 4461 "configure" |
81bf3d9e | 4461 | #include "confdefs.h" |
7afe8c41 KG |
4462 | #undef $ac_tr_decl |
4463 | #define $ac_tr_decl 1 | |
4464 | ||
d02af173 | 4465 | #include "ansidecl.h" |
86cf1cbd | 4466 | #include "system.h" |
f31e826b | 4467 | |
81bf3d9e | 4468 | int main() { |
86cf1cbd KG |
4469 | #ifndef $ac_func |
4470 | char *(*pfn) = (char *(*)) $ac_func ; | |
4471 | #endif | |
81bf3d9e RH |
4472 | ; return 0; } |
4473 | EOF | |
e8bec136 | 4474 | if { (eval echo configure:4475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
81bf3d9e | 4475 | rm -rf conftest* |
f31e826b | 4476 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e RH |
4477 | else |
4478 | echo "configure: failed program was:" >&5 | |
4479 | cat conftest.$ac_ext >&5 | |
4480 | rm -rf conftest* | |
f31e826b | 4481 | eval "gcc_cv_have_decl_$ac_func=no" |
81bf3d9e RH |
4482 | fi |
4483 | rm -f conftest* | |
4484 | fi | |
4485 | ||
f31e826b KG |
4486 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
4487 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF | |
86cf1cbd | 4488 | #define $ac_tr_decl 1 |
81bf3d9e | 4489 | EOF |
86cf1cbd | 4490 | |
81bf3d9e | 4491 | else |
f31e826b KG |
4492 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
4493 | #define $ac_tr_decl 0 | |
4494 | EOF | |
4495 | ||
81bf3d9e RH |
4496 | fi |
4497 | ||
4498 | done | |
86cf1cbd | 4499 | if test x = y ; then |
05e12634 | 4500 | cat >> confdefs.h <<\EOF |
f31e826b | 4501 | #define HAVE_DECL_GETENV 1 |
86cf1cbd | 4502 | EOF |
05e12634 | 4503 | cat >> confdefs.h <<\EOF |
f31e826b | 4504 | #define HAVE_DECL_ATOL 1 |
86cf1cbd | 4505 | EOF |
05e12634 | 4506 | cat >> confdefs.h <<\EOF |
f31e826b | 4507 | #define HAVE_DECL_SBRK 1 |
86cf1cbd | 4508 | EOF |
05e12634 | 4509 | cat >> confdefs.h <<\EOF |
f31e826b | 4510 | #define HAVE_DECL_ABORT 1 |
86cf1cbd | 4511 | EOF |
05e12634 | 4512 | cat >> confdefs.h <<\EOF |
f31e826b | 4513 | #define HAVE_DECL_ATOF 1 |
86cf1cbd | 4514 | EOF |
05e12634 | 4515 | cat >> confdefs.h <<\EOF |
f31e826b | 4516 | #define HAVE_DECL_GETCWD 1 |
86cf1cbd | 4517 | EOF |
05e12634 | 4518 | cat >> confdefs.h <<\EOF |
f31e826b | 4519 | #define HAVE_DECL_GETWD 1 |
86cf1cbd KG |
4520 | EOF |
4521 | \ | |
05e12634 | 4522 | cat >> confdefs.h <<\EOF |
f31e826b | 4523 | #define HAVE_DECL_STRSIGNAL 1 |
86cf1cbd | 4524 | EOF |
05e12634 | 4525 | cat >> confdefs.h <<\EOF |
f31e826b | 4526 | #define HAVE_DECL_PUTC_UNLOCKED 1 |
86cf1cbd | 4527 | EOF |
05e12634 | 4528 | cat >> confdefs.h <<\EOF |
f31e826b | 4529 | #define HAVE_DECL_FPUTS_UNLOCKED 1 |
86cf1cbd | 4530 | EOF |
05e12634 | 4531 | cat >> confdefs.h <<\EOF |
f31e826b | 4532 | #define HAVE_DECL_STRSTR 1 |
86cf1cbd | 4533 | EOF |
05e12634 | 4534 | cat >> confdefs.h <<\EOF |
f31e826b | 4535 | #define HAVE_DECL_ENVIRON 1 |
6c889b67 | 4536 | EOF |
05e12634 | 4537 | cat >> confdefs.h <<\EOF |
6c889b67 | 4538 | #define HAVE_DECL_ERRNO 1 |
86cf1cbd KG |
4539 | EOF |
4540 | \ | |
05e12634 | 4541 | cat >> confdefs.h <<\EOF |
f31e826b KG |
4542 | #define HAVE_DECL_MALLOC 1 |
4543 | EOF | |
05e12634 | 4544 | cat >> confdefs.h <<\EOF |
f31e826b | 4545 | #define HAVE_DECL_REALLOC 1 |
86cf1cbd | 4546 | EOF |
05e12634 | 4547 | cat >> confdefs.h <<\EOF |
f31e826b | 4548 | #define HAVE_DECL_CALLOC 1 |
86cf1cbd | 4549 | EOF |
05e12634 | 4550 | cat >> confdefs.h <<\EOF |
f31e826b | 4551 | #define HAVE_DECL_FREE 1 |
86cf1cbd | 4552 | EOF |
05e12634 | 4553 | cat >> confdefs.h <<\EOF |
f31e826b KG |
4554 | #define HAVE_DECL_BASENAME 1 |
4555 | EOF | |
05e12634 | 4556 | cat >> confdefs.h <<\EOF |
f31e826b | 4557 | #define HAVE_DECL_GETOPT 1 |
c1800ec8 | 4558 | EOF |
05e12634 | 4559 | cat >> confdefs.h <<\EOF |
c1800ec8 | 4560 | #define HAVE_DECL_CLOCK 1 |
81bf3d9e | 4561 | EOF |
81bf3d9e RH |
4562 | fi |
4563 | ||
81bf3d9e RH |
4564 | |
4565 | for ac_func in getrlimit setrlimit getrusage | |
4566 | do | |
f31e826b KG |
4567 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
4568 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 | |
e8bec136 | 4569 | echo "configure:4570: checking whether $ac_func is declared" >&5 |
f31e826b | 4570 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
81bf3d9e RH |
4571 | echo $ac_n "(cached) $ac_c" 1>&6 |
4572 | else | |
4573 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 4574 | #line 4575 "configure" |
81bf3d9e | 4575 | #include "confdefs.h" |
7afe8c41 KG |
4576 | #undef $ac_tr_decl |
4577 | #define $ac_tr_decl 1 | |
4578 | ||
d02af173 | 4579 | #include "ansidecl.h" |
86cf1cbd | 4580 | #include "system.h" |
81bf3d9e RH |
4581 | #ifdef HAVE_SYS_RESOURCE_H |
4582 | #include <sys/resource.h> | |
4583 | #endif | |
4584 | ||
f31e826b | 4585 | |
81bf3d9e | 4586 | int main() { |
86cf1cbd KG |
4587 | #ifndef $ac_func |
4588 | char *(*pfn) = (char *(*)) $ac_func ; | |
4589 | #endif | |
81bf3d9e RH |
4590 | ; return 0; } |
4591 | EOF | |
e8bec136 | 4592 | if { (eval echo configure:4593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
81bf3d9e | 4593 | rm -rf conftest* |
f31e826b | 4594 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e RH |
4595 | else |
4596 | echo "configure: failed program was:" >&5 | |
4597 | cat conftest.$ac_ext >&5 | |
4598 | rm -rf conftest* | |
f31e826b | 4599 | eval "gcc_cv_have_decl_$ac_func=no" |
81bf3d9e RH |
4600 | fi |
4601 | rm -f conftest* | |
4602 | fi | |
4603 | ||
f31e826b KG |
4604 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
4605 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF | |
86cf1cbd | 4606 | #define $ac_tr_decl 1 |
81bf3d9e | 4607 | EOF |
86cf1cbd | 4608 | |
81bf3d9e | 4609 | else |
f31e826b KG |
4610 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
4611 | #define $ac_tr_decl 0 | |
4612 | EOF | |
4613 | ||
81bf3d9e RH |
4614 | fi |
4615 | ||
4616 | done | |
86cf1cbd | 4617 | if test x = y ; then |
05e12634 | 4618 | cat >> confdefs.h <<\EOF |
f31e826b | 4619 | #define HAVE_DECL_GETRLIMIT 1 |
86cf1cbd | 4620 | EOF |
05e12634 | 4621 | cat >> confdefs.h <<\EOF |
f31e826b | 4622 | #define HAVE_DECL_SETRLIMIT 1 |
86cf1cbd | 4623 | EOF |
05e12634 | 4624 | cat >> confdefs.h <<\EOF |
f31e826b | 4625 | #define HAVE_DECL_GETRUSAGE 1 |
86cf1cbd KG |
4626 | EOF |
4627 | fi | |
4628 | ||
81bf3d9e | 4629 | |
c1800ec8 ZW |
4630 | for ac_func in times |
4631 | do | |
4632 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4633 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 | |
e8bec136 | 4634 | echo "configure:4635: checking whether $ac_func is declared" >&5 |
c1800ec8 ZW |
4635 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4636 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4637 | else | |
4638 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 4639 | #line 4640 "configure" |
c1800ec8 ZW |
4640 | #include "confdefs.h" |
4641 | #undef $ac_tr_decl | |
4642 | #define $ac_tr_decl 1 | |
4643 | ||
4644 | #include "ansidecl.h" | |
4645 | #include "system.h" | |
4646 | #ifdef HAVE_SYS_TIMES_H | |
4647 | #include <sys/times.h> | |
4648 | #endif | |
4649 | ||
4650 | ||
4651 | int main() { | |
4652 | #ifndef $ac_func | |
4653 | char *(*pfn) = (char *(*)) $ac_func ; | |
4654 | #endif | |
4655 | ; return 0; } | |
4656 | EOF | |
e8bec136 | 4657 | if { (eval echo configure:4658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c1800ec8 ZW |
4658 | rm -rf conftest* |
4659 | eval "gcc_cv_have_decl_$ac_func=yes" | |
4660 | else | |
4661 | echo "configure: failed program was:" >&5 | |
4662 | cat conftest.$ac_ext >&5 | |
4663 | rm -rf conftest* | |
4664 | eval "gcc_cv_have_decl_$ac_func=no" | |
4665 | fi | |
4666 | rm -f conftest* | |
4667 | fi | |
4668 | ||
4669 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
4670 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF | |
4671 | #define $ac_tr_decl 1 | |
4672 | EOF | |
4673 | ||
4674 | else | |
4675 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF | |
4676 | #define $ac_tr_decl 0 | |
4677 | EOF | |
4678 | ||
4679 | fi | |
4680 | ||
4681 | done | |
4682 | if test x = y ; then | |
05e12634 | 4683 | cat >> confdefs.h <<\EOF |
c1800ec8 ZW |
4684 | #define HAVE_DECL_TIMES 1 |
4685 | EOF | |
4686 | fi | |
4687 | ||
4688 | ||
4689 | # More time-related stuff. | |
4690 | echo $ac_n "checking for struct tms""... $ac_c" 1>&6 | |
e8bec136 | 4691 | echo "configure:4692: checking for struct tms" >&5 |
c1800ec8 ZW |
4692 | if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then |
4693 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4694 | else | |
4695 | ||
4696 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 4697 | #line 4698 "configure" |
c1800ec8 ZW |
4698 | #include "confdefs.h" |
4699 | ||
4700 | #include "ansidecl.h" | |
4701 | #include "system.h" | |
4702 | #ifdef HAVE_SYS_TIMES_H | |
4703 | #include <sys/times.h> | |
4704 | #endif | |
4705 | ||
4706 | int main() { | |
4707 | struct tms tms; | |
4708 | ; return 0; } | |
4709 | EOF | |
e8bec136 | 4710 | if { (eval echo configure:4711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c1800ec8 ZW |
4711 | rm -rf conftest* |
4712 | ac_cv_struct_tms=yes | |
4713 | else | |
4714 | echo "configure: failed program was:" >&5 | |
4715 | cat conftest.$ac_ext >&5 | |
4716 | rm -rf conftest* | |
4717 | ac_cv_struct_tms=no | |
4718 | fi | |
4719 | rm -f conftest* | |
4720 | fi | |
4721 | ||
4722 | echo "$ac_t""$ac_cv_struct_tms" 1>&6 | |
4723 | if test $ac_cv_struct_tms = yes; then | |
4724 | cat >> confdefs.h <<\EOF | |
4725 | #define HAVE_STRUCT_TMS 1 | |
4726 | EOF | |
4727 | ||
4728 | fi | |
4729 | ||
4730 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
4731 | # revisit after autoconf 2.50. | |
4732 | echo $ac_n "checking for clock_t""... $ac_c" 1>&6 | |
e8bec136 | 4733 | echo "configure:4734: checking for clock_t" >&5 |
c1800ec8 ZW |
4734 | if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then |
4735 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4736 | else | |
4737 | ||
4738 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 4739 | #line 4740 "configure" |
c1800ec8 ZW |
4740 | #include "confdefs.h" |
4741 | ||
4742 | #include "ansidecl.h" | |
4743 | #include "system.h" | |
4744 | ||
4745 | int main() { | |
4746 | clock_t x; | |
4747 | ; return 0; } | |
4748 | EOF | |
e8bec136 | 4749 | if { (eval echo configure:4750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c1800ec8 ZW |
4750 | rm -rf conftest* |
4751 | gcc_cv_type_clock_t=yes | |
4752 | else | |
4753 | echo "configure: failed program was:" >&5 | |
4754 | cat conftest.$ac_ext >&5 | |
4755 | rm -rf conftest* | |
4756 | gcc_cv_type_clock_t=no | |
4757 | fi | |
4758 | rm -f conftest* | |
4759 | fi | |
4760 | ||
4761 | echo "$ac_t""$gcc_cv_type_clock_t" 1>&6 | |
4762 | if test $gcc_cv_type_clock_t = yes; then | |
4763 | cat >> confdefs.h <<\EOF | |
4764 | #define HAVE_CLOCK_T 1 | |
4765 | EOF | |
4766 | ||
4767 | fi | |
4768 | ||
86cf1cbd KG |
4769 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
4770 | CFLAGS="$saved_CFLAGS" | |
81bf3d9e | 4771 | |
75923b2f MK |
4772 | # mkdir takes a single argument on some systems. |
4773 | echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6 | |
e8bec136 | 4774 | echo "configure:4775: checking if mkdir takes one argument" >&5 |
75923b2f MK |
4775 | if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then |
4776 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4777 | else | |
4778 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 4779 | #line 4780 "configure" |
75923b2f MK |
4780 | #include "confdefs.h" |
4781 | ||
4782 | #include <sys/types.h> | |
4783 | #ifdef HAVE_SYS_STAT_H | |
4784 | # include <sys/stat.h> | |
4785 | #endif | |
4786 | #ifdef HAVE_UNISTD_H | |
4787 | # include <unistd.h> | |
4788 | #endif | |
4789 | #ifdef HAVE_DIRECT_H | |
4790 | # include <direct.h> | |
4791 | #endif | |
4792 | int main() { | |
4793 | mkdir ("foo", 0); | |
4794 | ; return 0; } | |
4795 | EOF | |
e8bec136 | 4796 | if { (eval echo configure:4797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
75923b2f MK |
4797 | rm -rf conftest* |
4798 | gcc_cv_mkdir_takes_one_arg=no | |
4799 | else | |
4800 | echo "configure: failed program was:" >&5 | |
4801 | cat conftest.$ac_ext >&5 | |
4802 | rm -rf conftest* | |
4803 | gcc_cv_mkdir_takes_one_arg=yes | |
4804 | fi | |
4805 | rm -f conftest* | |
4806 | fi | |
4807 | ||
4808 | echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6 | |
4809 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then | |
4810 | cat >> confdefs.h <<\EOF | |
4811 | #define MKDIR_TAKES_ONE_ARG 1 | |
4812 | EOF | |
4813 | ||
4814 | fi | |
4815 | ||
4816 | ||
861bb6c1 JL |
4817 | # File extensions |
4818 | manext='.1' | |
4819 | objext='.o' | |
4820 | ||
4821 | ||
4822 | ||
4823 | build_xm_file= | |
f6cb0e63 | 4824 | build_xm_defines= |
861bb6c1 JL |
4825 | build_install_headers_dir=install-headers-tar |
4826 | build_exeext= | |
4827 | host_xm_file= | |
f6cb0e63 | 4828 | host_xm_defines= |
861bb6c1 JL |
4829 | host_xmake_file= |
4830 | host_truncate_target= | |
6e26218f | 4831 | host_exeext= |
861bb6c1 JL |
4832 | |
4833 | # Decode the host machine, then the target machine. | |
4834 | # For the host machine, we save the xm_file variable as host_xm_file; | |
4835 | # then we decode the target machine and forget everything else | |
4836 | # that came from the host machine. | |
4837 | for machine in $build $host $target; do | |
61ed06c3 | 4838 | . ${srcdir}/config.gcc |
861bb6c1 JL |
4839 | done |
4840 | ||
4841 | extra_objs="${host_extra_objs} ${extra_objs}" | |
4842 | ||
4843 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 4844 | if test x"$tm_file" = x |
861bb6c1 JL |
4845 | then tm_file=$cpu_type/$cpu_type.h; fi |
4846 | ||
6b2adea9 | 4847 | if test x"$extra_headers" = x |
861bb6c1 JL |
4848 | then extra_headers=; fi |
4849 | ||
75bffa71 | 4850 | if test x$md_file = x |
e98e406f | 4851 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 4852 | |
75bffa71 | 4853 | if test x$out_file = x |
861bb6c1 JL |
4854 | then out_file=$cpu_type/$cpu_type.c; fi |
4855 | ||
75bffa71 | 4856 | if test x"$tmake_file" = x |
861bb6c1 JL |
4857 | then tmake_file=$cpu_type/t-$cpu_type |
4858 | fi | |
4859 | ||
90e6a802 | 4860 | if test x"$dwarf2" = xyes |
756ee602 | 4861 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
4862 | fi |
4863 | ||
75bffa71 | 4864 | if test x$float_format = x |
861bb6c1 JL |
4865 | then float_format=i64 |
4866 | fi | |
4867 | ||
027ea2a7 JW |
4868 | if test $float_format = none |
4869 | then float_h_file=Makefile.in | |
4870 | else float_h_file=float-$float_format.h | |
4871 | fi | |
4872 | ||
9fc9b82a | 4873 | # Handle cpp installation. |
3ecc3258 | 4874 | if test x$enable_cpp != xno |
9fc9b82a L |
4875 | then |
4876 | tmake_file="$tmake_file t-install-cpp" | |
4877 | fi | |
4878 | ||
861bb6c1 | 4879 | # Say what files are being used for the output code and MD file. |
11642c3a | 4880 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
4881 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
4882 | ||
11642c3a | 4883 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
4884 | # about them and drop them. |
4885 | ||
11642c3a ZW |
4886 | bx= |
4887 | for x in $build_xm_file; do | |
4888 | if test -f $srcdir/config/$x | |
4889 | then bx="$bx $x" | |
11642c3a ZW |
4890 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
4891 | fi | |
4892 | done | |
4893 | build_xm_file="$bx" | |
4894 | ||
4895 | hx= | |
4896 | for x in $host_xm_file; do | |
4897 | if test -f $srcdir/config/$x | |
4898 | then hx="$hx $x" | |
11642c3a ZW |
4899 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
4900 | fi | |
4901 | done | |
4902 | host_xm_file="$hx" | |
4903 | ||
4904 | tx= | |
4905 | for x in $xm_file; do | |
4906 | if test -f $srcdir/config/$x | |
4907 | then tx="$tx $x" | |
11642c3a ZW |
4908 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
4909 | fi | |
4910 | done | |
4911 | xm_file="$tx" | |
4912 | ||
861bb6c1 JL |
4913 | count=a |
4914 | for f in $tm_file; do | |
4915 | count=${count}x | |
4916 | done | |
75bffa71 | 4917 | if test $count = ax; then |
861bb6c1 JL |
4918 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
4919 | else | |
4920 | echo "Using the following target machine macro files:" | |
4921 | for f in $tm_file; do | |
4922 | echo " $srcdir/config/$f" | |
4923 | done | |
4924 | fi | |
4925 | ||
4926 | count=a | |
4927 | for f in $host_xm_file; do | |
4928 | count=${count}x | |
4929 | done | |
11642c3a ZW |
4930 | if test $count = a; then |
4931 | : | |
4932 | elif test $count = ax; then | |
861bb6c1 JL |
4933 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
4934 | else | |
4935 | echo "Using the following host machine macro files:" | |
4936 | for f in $host_xm_file; do | |
4937 | echo " $srcdir/config/$f" | |
4938 | done | |
4939 | fi | |
4940 | ||
75bffa71 | 4941 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
4942 | count=a |
4943 | for f in $build_xm_file; do | |
4944 | count=${count}x | |
4945 | done | |
11642c3a ZW |
4946 | if test $count = a; then |
4947 | : | |
4948 | elif test $count = ax; then | |
861bb6c1 JL |
4949 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
4950 | else | |
4951 | echo "Using the following build machine macro files:" | |
4952 | for f in $build_xm_file; do | |
4953 | echo " $srcdir/config/$f" | |
4954 | done | |
4955 | fi | |
4956 | fi | |
4957 | ||
75bffa71 ILT |
4958 | if test x$thread_file = x; then |
4959 | if test x$target_thread_file != x; then | |
a851212a JW |
4960 | thread_file=$target_thread_file |
4961 | else | |
4962 | thread_file='single' | |
4963 | fi | |
861bb6c1 JL |
4964 | fi |
4965 | ||
b7cb92ad | 4966 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 4967 | # the first file included by config.h. |
b7cb92ad | 4968 | # If host=build, it is correct to have hconfig include auto-host.h |
db81d74a RH |
4969 | # as well. If host!=build, we are in error and need to do more |
4970 | # work to find out the build config parameters. | |
75bffa71 | 4971 | if test x$host = x$build |
db81d74a | 4972 | then |
eaf4e618 | 4973 | build_auto=auto-host.h |
b7cb92ad JL |
4974 | else |
4975 | # We create a subdir, then run autoconf in the subdir. | |
4976 | # To prevent recursion we set host and build for the new | |
4977 | # invocation of configure to the build for this invocation | |
4978 | # of configure. | |
4979 | tempdir=build.$$ | |
4980 | rm -rf $tempdir | |
4981 | mkdir $tempdir | |
4982 | cd $tempdir | |
4983 | case ${srcdir} in | |
255b8a49 | 4984 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
4985 | *) realsrcdir=../${srcdir};; |
4986 | esac | |
fe81dd69 | 4987 | CC=${CC_FOR_BUILD} ${realsrcdir}/configure \ |
b7cb92ad JL |
4988 | --target=$target --host=$build --build=$build |
4989 | ||
4990 | # We just finished tests for the build machine, so rename | |
4991 | # the file auto-build.h in the gcc directory. | |
4992 | mv auto-host.h ../auto-build.h | |
4993 | cd .. | |
4994 | rm -rf $tempdir | |
eaf4e618 | 4995 | build_auto=auto-build.h |
db81d74a RH |
4996 | fi |
4997 | ||
eaf4e618 | 4998 | tm_file="${tm_file} defaults.h" |
d02af173 ZW |
4999 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file} ${tm_file}" |
5000 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file} ${tm_file}" | |
5001 | xm_file="ansidecl.h ${xm_file} ${tm_file}" | |
0056a9b5 | 5002 | |
861bb6c1 | 5003 | # Truncate the target if necessary |
75bffa71 | 5004 | if test x$host_truncate_target != x; then |
861bb6c1 JL |
5005 | target=`echo $target | sed -e 's/\(..............\).*/\1/'` |
5006 | fi | |
5007 | ||
f1943b77 | 5008 | # Get the version trigger filename from the toplevel |
75bffa71 | 5009 | if test "${with_gcc_version_trigger+set}" = set; then |
f1943b77 MH |
5010 | gcc_version_trigger=$with_gcc_version_trigger |
5011 | else | |
5012 | gcc_version_trigger=${srcdir}/version.c | |
5013 | fi | |
022dae81 | 5014 | gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'` |
8763704d | 5015 | gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` |
861bb6c1 | 5016 | |
cc1e60ea | 5017 | # Compile in configure arguments. |
8105825d | 5018 | if test -f configargs.h ; then |
cc1e60ea | 5019 | # Being re-configured. |
022dae81 | 5020 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
5021 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
5022 | else | |
5023 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
5024 | fi | |
5025 | cat > configargs.h <<EOF | |
5026 | /* Generated automatically. */ | |
5027 | static const char configuration_arguments[] = "$gcc_config_arguments"; | |
a6687d2b | 5028 | static const char thread_model[] = "$thread_file"; |
cc1e60ea JM |
5029 | EOF |
5030 | ||
ab87f8c8 JL |
5031 | # Internationalization |
5032 | PACKAGE=gcc | |
5033 | VERSION="$gcc_version" | |
5034 | cat >> confdefs.h <<EOF | |
5035 | #define PACKAGE "$PACKAGE" | |
5036 | EOF | |
861bb6c1 | 5037 | |
ab87f8c8 JL |
5038 | cat >> confdefs.h <<EOF |
5039 | #define VERSION "$VERSION" | |
5040 | EOF | |
861bb6c1 | 5041 | |
861bb6c1 | 5042 | |
ab87f8c8 JL |
5043 | |
5044 | ||
2be36552 | 5045 | ALL_LINGUAS="sv" |
ab87f8c8 | 5046 | |
dc6746e7 | 5047 | # Enable NLS support by default |
ab87f8c8 JL |
5048 | # Check whether --enable-nls or --disable-nls was given. |
5049 | if test "${enable_nls+set}" = set; then | |
5050 | enableval="$enable_nls" | |
5051 | : | |
861bb6c1 | 5052 | else |
dc6746e7 | 5053 | enable_nls=yes |
861bb6c1 | 5054 | fi |
861bb6c1 | 5055 | |
861bb6c1 | 5056 | |
dc6746e7 PT |
5057 | # if cross compiling, disable NLS support. |
5058 | # It's not worth the trouble, at least for now. | |
5059 | ||
063a4b85 | 5060 | if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then |
dc6746e7 PT |
5061 | echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2 |
5062 | enable_nls=no | |
5063 | fi | |
5064 | ||
4adee315 PT |
5065 | # if NLS is enabled, also enable check in po subdir |
5066 | if test $enable_nls = yes; then | |
5067 | CHECK_PO=check-po | |
5068 | else | |
5069 | CHECK_PO="" | |
5070 | fi | |
5071 | ||
5072 | ||
5073 | ||
861bb6c1 | 5074 | |
ab87f8c8 | 5075 | echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6 |
e8bec136 | 5076 | echo "configure:5077: checking for strerror in -lcposix" >&5 |
ab87f8c8 JL |
5077 | ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'` |
5078 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5079 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5080 | else | |
5081 | ac_save_LIBS="$LIBS" | |
5082 | LIBS="-lcposix $LIBS" | |
5083 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 5084 | #line 5085 "configure" |
ab87f8c8 JL |
5085 | #include "confdefs.h" |
5086 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5087 | /* We use char because int might match the return type of a gcc2 | |
5088 | builtin and then its argument prototype would still apply. */ | |
5089 | char strerror(); | |
861bb6c1 | 5090 | |
ab87f8c8 JL |
5091 | int main() { |
5092 | strerror() | |
5093 | ; return 0; } | |
5094 | EOF | |
e8bec136 | 5095 | if { (eval echo configure:5096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 JL |
5096 | rm -rf conftest* |
5097 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5098 | else | |
5099 | echo "configure: failed program was:" >&5 | |
5100 | cat conftest.$ac_ext >&5 | |
5101 | rm -rf conftest* | |
5102 | eval "ac_cv_lib_$ac_lib_var=no" | |
861bb6c1 | 5103 | fi |
ab87f8c8 JL |
5104 | rm -f conftest* |
5105 | LIBS="$ac_save_LIBS" | |
861bb6c1 | 5106 | |
861bb6c1 | 5107 | fi |
ab87f8c8 JL |
5108 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
5109 | echo "$ac_t""yes" 1>&6 | |
5110 | LIBS="$LIBS -lcposix" | |
861bb6c1 | 5111 | else |
ab87f8c8 | 5112 | echo "$ac_t""no" 1>&6 |
861bb6c1 JL |
5113 | fi |
5114 | ||
ab87f8c8 | 5115 | |
2ce3c6c6 | 5116 | |
ab87f8c8 | 5117 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
e8bec136 | 5118 | echo "configure:5119: checking for working const" >&5 |
ab87f8c8 JL |
5119 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
5120 | echo $ac_n "(cached) $ac_c" 1>&6 | |
861bb6c1 | 5121 | else |
ab87f8c8 | 5122 | cat > conftest.$ac_ext <<EOF |
e8bec136 | 5123 | #line 5124 "configure" |
ab87f8c8 | 5124 | #include "confdefs.h" |
861bb6c1 | 5125 | |
ab87f8c8 JL |
5126 | int main() { |
5127 | ||
5128 | /* Ultrix mips cc rejects this. */ | |
130fadbb | 5129 | typedef int charset[2]; const charset x; |
ab87f8c8 JL |
5130 | /* SunOS 4.1.1 cc rejects this. */ |
5131 | char const *const *ccp; | |
5132 | char **p; | |
5133 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
5134 | struct point {int x, y;}; | |
5135 | static struct point const zero = {0,0}; | |
5136 | /* AIX XL C 1.02.0.0 rejects this. | |
5137 | It does not let you subtract one const X* pointer from another in an arm | |
5138 | of an if-expression whose if-part is not a constant expression */ | |
5139 | const char *g = "string"; | |
5140 | ccp = &g + (g ? g-g : 0); | |
5141 | /* HPUX 7.0 cc rejects these. */ | |
5142 | ++ccp; | |
5143 | p = (char**) ccp; | |
5144 | ccp = (char const *const *) p; | |
5145 | { /* SCO 3.2v4 cc rejects this. */ | |
5146 | char *t; | |
5147 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5148 | ||
5149 | *t++ = 0; | |
5150 | } | |
5151 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
5152 | int x[] = {25, 17}; | |
5153 | const int *foo = &x[0]; | |
5154 | ++foo; | |
5155 | } | |
5156 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
5157 | typedef const int *iptr; | |
5158 | iptr p = 0; | |
5159 | ++p; | |
5160 | } | |
5161 | { /* AIX XL C 1.02.0.0 rejects this saying | |
5162 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
5163 | struct s { int j; const int *ap[3]; }; | |
5164 | struct s *b; b->j = 5; | |
5165 | } | |
5166 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
5167 | const int foo = 10; | |
5168 | } | |
5169 | ||
5170 | ; return 0; } | |
5171 | EOF | |
e8bec136 | 5172 | if { (eval echo configure:5173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
ab87f8c8 JL |
5173 | rm -rf conftest* |
5174 | ac_cv_c_const=yes | |
861bb6c1 | 5175 | else |
ab87f8c8 JL |
5176 | echo "configure: failed program was:" >&5 |
5177 | cat conftest.$ac_ext >&5 | |
5178 | rm -rf conftest* | |
5179 | ac_cv_c_const=no | |
5180 | fi | |
5181 | rm -f conftest* | |
861bb6c1 JL |
5182 | fi |
5183 | ||
ab87f8c8 JL |
5184 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
5185 | if test $ac_cv_c_const = no; then | |
5186 | cat >> confdefs.h <<\EOF | |
5187 | #define const | |
5188 | EOF | |
5189 | ||
861bb6c1 JL |
5190 | fi |
5191 | ||
ab87f8c8 | 5192 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
e8bec136 | 5193 | echo "configure:5194: checking for off_t" >&5 |
ab87f8c8 JL |
5194 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
5195 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5196 | else | |
5197 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 5198 | #line 5199 "configure" |
ab87f8c8 JL |
5199 | #include "confdefs.h" |
5200 | #include <sys/types.h> | |
5201 | #if STDC_HEADERS | |
5202 | #include <stdlib.h> | |
5203 | #include <stddef.h> | |
5204 | #endif | |
5205 | EOF | |
5206 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
b27d2bd5 | 5207 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
ab87f8c8 | 5208 | rm -rf conftest* |
e8bec136 | 5209 | eval "ac_cv_type_off_t=yes" |
ab87f8c8 JL |
5210 | else |
5211 | rm -rf conftest* | |
e8bec136 | 5212 | eval "ac_cv_type_off_t=no" |
ab87f8c8 JL |
5213 | fi |
5214 | rm -f conftest* | |
5215 | ||
5216 | fi | |
e8bec136 RO |
5217 | if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then |
5218 | echo "$ac_t""yes" 1>&6 | |
5219 | else | |
5220 | echo "$ac_t""no" 1>&6 | |
5221 | cat >> confdefs.h <<EOF | |
ab87f8c8 JL |
5222 | #define off_t long |
5223 | EOF | |
5224 | ||
5225 | fi | |
5226 | ||
5227 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
e8bec136 | 5228 | echo "configure:5229: checking for size_t" >&5 |
ab87f8c8 JL |
5229 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
5230 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5231 | else | |
5232 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 5233 | #line 5234 "configure" |
ab87f8c8 JL |
5234 | #include "confdefs.h" |
5235 | #include <sys/types.h> | |
5236 | #if STDC_HEADERS | |
5237 | #include <stdlib.h> | |
5238 | #include <stddef.h> | |
5239 | #endif | |
5240 | EOF | |
5241 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
b27d2bd5 | 5242 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
ab87f8c8 | 5243 | rm -rf conftest* |
e8bec136 | 5244 | eval "ac_cv_type_size_t=yes" |
ab87f8c8 JL |
5245 | else |
5246 | rm -rf conftest* | |
e8bec136 | 5247 | eval "ac_cv_type_size_t=no" |
ab87f8c8 JL |
5248 | fi |
5249 | rm -f conftest* | |
5250 | ||
5251 | fi | |
e8bec136 RO |
5252 | if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then |
5253 | echo "$ac_t""yes" 1>&6 | |
5254 | else | |
5255 | echo "$ac_t""no" 1>&6 | |
5256 | cat >> confdefs.h <<EOF | |
ab87f8c8 JL |
5257 | #define size_t unsigned |
5258 | EOF | |
5259 | ||
5260 | fi | |
5261 | ||
b548dffb | 5262 | |
ab87f8c8 JL |
5263 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ |
5264 | unistd.h sys/param.h | |
5265 | do | |
5266 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5267 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
e8bec136 | 5268 | echo "configure:5269: checking for $ac_hdr" >&5 |
ab87f8c8 JL |
5269 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5270 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5271 | else | |
5272 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 5273 | #line 5274 "configure" |
ab87f8c8 JL |
5274 | #include "confdefs.h" |
5275 | #include <$ac_hdr> | |
5276 | EOF | |
5277 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e8bec136 | 5278 | { (eval echo configure:5279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 5279 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
ab87f8c8 JL |
5280 | if test -z "$ac_err"; then |
5281 | rm -rf conftest* | |
5282 | eval "ac_cv_header_$ac_safe=yes" | |
5283 | else | |
5284 | echo "$ac_err" >&5 | |
5285 | echo "configure: failed program was:" >&5 | |
5286 | cat conftest.$ac_ext >&5 | |
5287 | rm -rf conftest* | |
5288 | eval "ac_cv_header_$ac_safe=no" | |
5289 | fi | |
5290 | rm -f conftest* | |
5291 | fi | |
5292 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5293 | echo "$ac_t""yes" 1>&6 | |
5294 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5295 | cat >> confdefs.h <<EOF | |
5296 | #define $ac_tr_hdr 1 | |
5297 | EOF | |
5298 | ||
5299 | else | |
5300 | echo "$ac_t""no" 1>&6 | |
5301 | fi | |
5302 | done | |
5303 | ||
5304 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
5305 | strdup __argz_count __argz_stringify __argz_next | |
5306 | do | |
5307 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
e8bec136 | 5308 | echo "configure:5309: checking for $ac_func" >&5 |
ab87f8c8 JL |
5309 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5310 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5311 | else | |
5312 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 5313 | #line 5314 "configure" |
ab87f8c8 JL |
5314 | #include "confdefs.h" |
5315 | /* System header to define __stub macros and hopefully few prototypes, | |
5316 | which can conflict with char $ac_func(); below. */ | |
5317 | #include <assert.h> | |
5318 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5319 | /* We use char because int might match the return type of a gcc2 | |
5320 | builtin and then its argument prototype would still apply. */ | |
5321 | char $ac_func(); | |
5322 | ||
5323 | int main() { | |
5324 | ||
5325 | /* The GNU C library defines this for functions which it implements | |
5326 | to always fail with ENOSYS. Some functions are actually named | |
5327 | something starting with __ and the normal name is an alias. */ | |
5328 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5329 | choke me | |
5330 | #else | |
99b09ff3 | 5331 | $ac_func(); |
ab87f8c8 JL |
5332 | #endif |
5333 | ||
5334 | ; return 0; } | |
5335 | EOF | |
e8bec136 | 5336 | if { (eval echo configure:5337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 JL |
5337 | rm -rf conftest* |
5338 | eval "ac_cv_func_$ac_func=yes" | |
5339 | else | |
5340 | echo "configure: failed program was:" >&5 | |
5341 | cat conftest.$ac_ext >&5 | |
5342 | rm -rf conftest* | |
5343 | eval "ac_cv_func_$ac_func=no" | |
5344 | fi | |
5345 | rm -f conftest* | |
5346 | fi | |
5347 | ||
5348 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5349 | echo "$ac_t""yes" 1>&6 | |
5350 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5351 | cat >> confdefs.h <<EOF | |
5352 | #define $ac_tr_func 1 | |
5353 | EOF | |
5354 | ||
5355 | else | |
5356 | echo "$ac_t""no" 1>&6 | |
5357 | fi | |
5358 | done | |
5359 | ||
5360 | ||
5361 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
5362 | for ac_func in stpcpy | |
5363 | do | |
5364 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
e8bec136 | 5365 | echo "configure:5366: checking for $ac_func" >&5 |
ab87f8c8 JL |
5366 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5367 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5368 | else | |
5369 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 5370 | #line 5371 "configure" |
ab87f8c8 JL |
5371 | #include "confdefs.h" |
5372 | /* System header to define __stub macros and hopefully few prototypes, | |
5373 | which can conflict with char $ac_func(); below. */ | |
5374 | #include <assert.h> | |
5375 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5376 | /* We use char because int might match the return type of a gcc2 | |
5377 | builtin and then its argument prototype would still apply. */ | |
5378 | char $ac_func(); | |
5379 | ||
5380 | int main() { | |
5381 | ||
5382 | /* The GNU C library defines this for functions which it implements | |
5383 | to always fail with ENOSYS. Some functions are actually named | |
5384 | something starting with __ and the normal name is an alias. */ | |
5385 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5386 | choke me | |
5387 | #else | |
99b09ff3 | 5388 | $ac_func(); |
ab87f8c8 JL |
5389 | #endif |
5390 | ||
5391 | ; return 0; } | |
5392 | EOF | |
e8bec136 | 5393 | if { (eval echo configure:5394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 JL |
5394 | rm -rf conftest* |
5395 | eval "ac_cv_func_$ac_func=yes" | |
5396 | else | |
5397 | echo "configure: failed program was:" >&5 | |
5398 | cat conftest.$ac_ext >&5 | |
5399 | rm -rf conftest* | |
5400 | eval "ac_cv_func_$ac_func=no" | |
5401 | fi | |
5402 | rm -f conftest* | |
5403 | fi | |
5404 | ||
5405 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5406 | echo "$ac_t""yes" 1>&6 | |
5407 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5408 | cat >> confdefs.h <<EOF | |
5409 | #define $ac_tr_func 1 | |
5410 | EOF | |
5411 | ||
5412 | else | |
5413 | echo "$ac_t""no" 1>&6 | |
5414 | fi | |
5415 | done | |
5416 | ||
5417 | fi | |
5418 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
5419 | cat >> confdefs.h <<\EOF | |
5420 | #define HAVE_STPCPY 1 | |
5421 | EOF | |
5422 | ||
5423 | fi | |
5424 | ||
5425 | if test $ac_cv_header_locale_h = yes; then | |
5426 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
e8bec136 | 5427 | echo "configure:5428: checking for LC_MESSAGES" >&5 |
ab87f8c8 JL |
5428 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
5429 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5430 | else | |
5431 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 5432 | #line 5433 "configure" |
ab87f8c8 JL |
5433 | #include "confdefs.h" |
5434 | #include <locale.h> | |
5435 | int main() { | |
5436 | return LC_MESSAGES | |
5437 | ; return 0; } | |
5438 | EOF | |
e8bec136 | 5439 | if { (eval echo configure:5440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 JL |
5440 | rm -rf conftest* |
5441 | am_cv_val_LC_MESSAGES=yes | |
5442 | else | |
5443 | echo "configure: failed program was:" >&5 | |
5444 | cat conftest.$ac_ext >&5 | |
5445 | rm -rf conftest* | |
5446 | am_cv_val_LC_MESSAGES=no | |
5447 | fi | |
5448 | rm -f conftest* | |
5449 | fi | |
5450 | ||
5451 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
5452 | if test $am_cv_val_LC_MESSAGES = yes; then | |
5453 | cat >> confdefs.h <<\EOF | |
5454 | #define HAVE_LC_MESSAGES 1 | |
5455 | EOF | |
5456 | ||
5457 | fi | |
5458 | fi | |
5459 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
e8bec136 | 5460 | echo "configure:5461: checking whether NLS is requested" >&5 |
ab87f8c8 JL |
5461 | # Check whether --enable-nls or --disable-nls was given. |
5462 | if test "${enable_nls+set}" = set; then | |
5463 | enableval="$enable_nls" | |
5464 | USE_NLS=$enableval | |
5465 | else | |
5466 | USE_NLS=yes | |
5467 | fi | |
5468 | ||
5469 | echo "$ac_t""$USE_NLS" 1>&6 | |
5470 | ||
5471 | ||
5472 | USE_INCLUDED_LIBINTL=no | |
5473 | ||
5474 | if test "$USE_NLS" = "yes"; then | |
5475 | cat >> confdefs.h <<\EOF | |
5476 | #define ENABLE_NLS 1 | |
5477 | EOF | |
5478 | ||
5479 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
e8bec136 | 5480 | echo "configure:5481: checking whether included gettext is requested" >&5 |
ab87f8c8 JL |
5481 | # Check whether --with-included-gettext or --without-included-gettext was given. |
5482 | if test "${with_included_gettext+set}" = set; then | |
5483 | withval="$with_included_gettext" | |
5484 | nls_cv_force_use_gnu_gettext=$withval | |
5485 | else | |
bfa29b63 | 5486 | nls_cv_force_use_gnu_gettext=no |
ab87f8c8 JL |
5487 | fi |
5488 | ||
5489 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
5490 | ||
5491 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
5492 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
5493 | nls_cv_header_intl= | |
5494 | nls_cv_header_libgt= | |
5495 | CATOBJEXT=NONE | |
5496 | ||
5497 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
5498 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
e8bec136 | 5499 | echo "configure:5500: checking for libintl.h" >&5 |
ab87f8c8 JL |
5500 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5501 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5502 | else | |
5503 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 5504 | #line 5505 "configure" |
ab87f8c8 JL |
5505 | #include "confdefs.h" |
5506 | #include <libintl.h> | |
5507 | EOF | |
5508 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e8bec136 | 5509 | { (eval echo configure:5510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 5510 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
ab87f8c8 JL |
5511 | if test -z "$ac_err"; then |
5512 | rm -rf conftest* | |
5513 | eval "ac_cv_header_$ac_safe=yes" | |
5514 | else | |
5515 | echo "$ac_err" >&5 | |
5516 | echo "configure: failed program was:" >&5 | |
5517 | cat conftest.$ac_ext >&5 | |
5518 | rm -rf conftest* | |
5519 | eval "ac_cv_header_$ac_safe=no" | |
5520 | fi | |
5521 | rm -f conftest* | |
5522 | fi | |
5523 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5524 | echo "$ac_t""yes" 1>&6 | |
5525 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
e8bec136 | 5526 | echo "configure:5527: checking for gettext in libc" >&5 |
ab87f8c8 JL |
5527 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
5528 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5529 | else | |
5530 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 5531 | #line 5532 "configure" |
ab87f8c8 JL |
5532 | #include "confdefs.h" |
5533 | #include <libintl.h> | |
5534 | int main() { | |
5535 | return (int) gettext ("") | |
5536 | ; return 0; } | |
5537 | EOF | |
e8bec136 | 5538 | if { (eval echo configure:5539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 JL |
5539 | rm -rf conftest* |
5540 | gt_cv_func_gettext_libc=yes | |
5541 | else | |
5542 | echo "configure: failed program was:" >&5 | |
5543 | cat conftest.$ac_ext >&5 | |
5544 | rm -rf conftest* | |
5545 | gt_cv_func_gettext_libc=no | |
5546 | fi | |
5547 | rm -f conftest* | |
5548 | fi | |
5549 | ||
5550 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
5551 | ||
5552 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
5553 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
e8bec136 | 5554 | echo "configure:5555: checking for bindtextdomain in -lintl" >&5 |
ab87f8c8 JL |
5555 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
5556 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5557 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5558 | else | |
5559 | ac_save_LIBS="$LIBS" | |
5560 | LIBS="-lintl $LIBS" | |
5561 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 5562 | #line 5563 "configure" |
ab87f8c8 JL |
5563 | #include "confdefs.h" |
5564 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5565 | /* We use char because int might match the return type of a gcc2 | |
5566 | builtin and then its argument prototype would still apply. */ | |
5567 | char bindtextdomain(); | |
5568 | ||
5569 | int main() { | |
5570 | bindtextdomain() | |
5571 | ; return 0; } | |
5572 | EOF | |
e8bec136 | 5573 | if { (eval echo configure:5574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 JL |
5574 | rm -rf conftest* |
5575 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5576 | else | |
5577 | echo "configure: failed program was:" >&5 | |
5578 | cat conftest.$ac_ext >&5 | |
5579 | rm -rf conftest* | |
5580 | eval "ac_cv_lib_$ac_lib_var=no" | |
5581 | fi | |
5582 | rm -f conftest* | |
5583 | LIBS="$ac_save_LIBS" | |
5584 | ||
5585 | fi | |
5586 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5587 | echo "$ac_t""yes" 1>&6 | |
5588 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
e8bec136 | 5589 | echo "configure:5590: checking for gettext in libintl" >&5 |
ab87f8c8 JL |
5590 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
5591 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5592 | else | |
5593 | echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6 | |
e8bec136 | 5594 | echo "configure:5595: checking for gettext in -lintl" >&5 |
ab87f8c8 JL |
5595 | ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'` |
5596 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5597 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5598 | else | |
5599 | ac_save_LIBS="$LIBS" | |
5600 | LIBS="-lintl $LIBS" | |
5601 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 5602 | #line 5603 "configure" |
ab87f8c8 JL |
5603 | #include "confdefs.h" |
5604 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5605 | /* We use char because int might match the return type of a gcc2 | |
5606 | builtin and then its argument prototype would still apply. */ | |
5607 | char gettext(); | |
5608 | ||
5609 | int main() { | |
5610 | gettext() | |
5611 | ; return 0; } | |
5612 | EOF | |
e8bec136 | 5613 | if { (eval echo configure:5614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 JL |
5614 | rm -rf conftest* |
5615 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5616 | else | |
5617 | echo "configure: failed program was:" >&5 | |
5618 | cat conftest.$ac_ext >&5 | |
5619 | rm -rf conftest* | |
5620 | eval "ac_cv_lib_$ac_lib_var=no" | |
5621 | fi | |
5622 | rm -f conftest* | |
5623 | LIBS="$ac_save_LIBS" | |
5624 | ||
5625 | fi | |
5626 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5627 | echo "$ac_t""yes" 1>&6 | |
5628 | gt_cv_func_gettext_libintl=yes | |
5629 | else | |
5630 | echo "$ac_t""no" 1>&6 | |
5631 | gt_cv_func_gettext_libintl=no | |
5632 | fi | |
5633 | ||
5634 | fi | |
5635 | ||
5636 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
5637 | else | |
5638 | echo "$ac_t""no" 1>&6 | |
5639 | fi | |
5640 | ||
5641 | fi | |
5642 | ||
380a627a PT |
5643 | if test "$gt_cv_func_gettext_libintl" = "yes"; then |
5644 | LIBS="-lintl $LIBS" | |
5645 | fi | |
5646 | ||
ab87f8c8 JL |
5647 | if test "$gt_cv_func_gettext_libc" = "yes" \ |
5648 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
5649 | cat >> confdefs.h <<\EOF | |
5650 | #define HAVE_GETTEXT 1 | |
5651 | EOF | |
5652 | ||
5653 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
5654 | set dummy msgfmt; ac_word=$2 | |
5655 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e8bec136 | 5656 | echo "configure:5657: checking for $ac_word" >&5 |
00036f5c | 5657 | if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then |
ab87f8c8 JL |
5658 | echo $ac_n "(cached) $ac_c" 1>&6 |
5659 | else | |
5660 | case "$MSGFMT" in | |
5661 | /*) | |
00036f5c | 5662 | gcc_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
5663 | ;; |
5664 | *) | |
5665 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
5666 | for ac_dir in $PATH; do | |
5667 | test -z "$ac_dir" && ac_dir=. | |
5668 | if test -f $ac_dir/$ac_word; then | |
5669 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
00036f5c | 5670 | gcc_cv_path_MSGFMT="$ac_dir/$ac_word" |
ab87f8c8 JL |
5671 | break |
5672 | fi | |
5673 | fi | |
5674 | done | |
5675 | IFS="$ac_save_ifs" | |
00036f5c | 5676 | test -z "$gcc_cv_path_MSGFMT" && gcc_cv_path_MSGFMT="no" |
ab87f8c8 JL |
5677 | ;; |
5678 | esac | |
5679 | fi | |
00036f5c | 5680 | MSGFMT="$gcc_cv_path_MSGFMT" |
ab87f8c8 JL |
5681 | if test -n "$MSGFMT"; then |
5682 | echo "$ac_t""$MSGFMT" 1>&6 | |
5683 | else | |
5684 | echo "$ac_t""no" 1>&6 | |
5685 | fi | |
5686 | if test "$MSGFMT" != "no"; then | |
5687 | for ac_func in dcgettext | |
5688 | do | |
5689 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
e8bec136 | 5690 | echo "configure:5691: checking for $ac_func" >&5 |
ab87f8c8 JL |
5691 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5692 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5693 | else | |
5694 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 5695 | #line 5696 "configure" |
ab87f8c8 JL |
5696 | #include "confdefs.h" |
5697 | /* System header to define __stub macros and hopefully few prototypes, | |
5698 | which can conflict with char $ac_func(); below. */ | |
5699 | #include <assert.h> | |
5700 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5701 | /* We use char because int might match the return type of a gcc2 | |
5702 | builtin and then its argument prototype would still apply. */ | |
5703 | char $ac_func(); | |
5704 | ||
5705 | int main() { | |
5706 | ||
5707 | /* The GNU C library defines this for functions which it implements | |
5708 | to always fail with ENOSYS. Some functions are actually named | |
5709 | something starting with __ and the normal name is an alias. */ | |
5710 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5711 | choke me | |
5712 | #else | |
99b09ff3 | 5713 | $ac_func(); |
ab87f8c8 JL |
5714 | #endif |
5715 | ||
5716 | ; return 0; } | |
5717 | EOF | |
e8bec136 | 5718 | if { (eval echo configure:5719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 JL |
5719 | rm -rf conftest* |
5720 | eval "ac_cv_func_$ac_func=yes" | |
5721 | else | |
5722 | echo "configure: failed program was:" >&5 | |
5723 | cat conftest.$ac_ext >&5 | |
5724 | rm -rf conftest* | |
5725 | eval "ac_cv_func_$ac_func=no" | |
5726 | fi | |
5727 | rm -f conftest* | |
5728 | fi | |
5729 | ||
5730 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5731 | echo "$ac_t""yes" 1>&6 | |
5732 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5733 | cat >> confdefs.h <<EOF | |
5734 | #define $ac_tr_func 1 | |
5735 | EOF | |
5736 | ||
5737 | else | |
5738 | echo "$ac_t""no" 1>&6 | |
5739 | fi | |
5740 | done | |
5741 | ||
5742 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
5743 | set dummy gmsgfmt; ac_word=$2 | |
5744 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e8bec136 | 5745 | echo "configure:5746: checking for $ac_word" >&5 |
00036f5c | 5746 | if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then |
ab87f8c8 JL |
5747 | echo $ac_n "(cached) $ac_c" 1>&6 |
5748 | else | |
5749 | case "$GMSGFMT" in | |
5750 | /*) | |
00036f5c | 5751 | gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
5752 | ;; |
5753 | ?:/*) | |
00036f5c | 5754 | gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. |
ab87f8c8 JL |
5755 | ;; |
5756 | *) | |
cd9e5e7c | 5757 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
5758 | ac_dummy="$PATH" |
5759 | for ac_dir in $ac_dummy; do | |
ab87f8c8 JL |
5760 | test -z "$ac_dir" && ac_dir=. |
5761 | if test -f $ac_dir/$ac_word; then | |
00036f5c | 5762 | gcc_cv_path_GMSGFMT="$ac_dir/$ac_word" |
ab87f8c8 JL |
5763 | break |
5764 | fi | |
5765 | done | |
5766 | IFS="$ac_save_ifs" | |
00036f5c | 5767 | test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="$MSGFMT" |
ab87f8c8 JL |
5768 | ;; |
5769 | esac | |
5770 | fi | |
00036f5c | 5771 | GMSGFMT="$gcc_cv_path_GMSGFMT" |
ab87f8c8 JL |
5772 | if test -n "$GMSGFMT"; then |
5773 | echo "$ac_t""$GMSGFMT" 1>&6 | |
5774 | else | |
5775 | echo "$ac_t""no" 1>&6 | |
5776 | fi | |
5777 | ||
5778 | # Extract the first word of "xgettext", so it can be a program name with args. | |
5779 | set dummy xgettext; ac_word=$2 | |
5780 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e8bec136 | 5781 | echo "configure:5782: checking for $ac_word" >&5 |
00036f5c | 5782 | if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then |
ab87f8c8 JL |
5783 | echo $ac_n "(cached) $ac_c" 1>&6 |
5784 | else | |
5785 | case "$XGETTEXT" in | |
5786 | /*) | |
00036f5c | 5787 | gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. |
ab87f8c8 JL |
5788 | ;; |
5789 | *) | |
5790 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
5791 | for ac_dir in $PATH; do | |
5792 | test -z "$ac_dir" && ac_dir=. | |
5793 | if test -f $ac_dir/$ac_word; then | |
5794 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
00036f5c | 5795 | gcc_cv_path_XGETTEXT="$ac_dir/$ac_word" |
ab87f8c8 JL |
5796 | break |
5797 | fi | |
5798 | fi | |
5799 | done | |
5800 | IFS="$ac_save_ifs" | |
00036f5c | 5801 | test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":" |
ab87f8c8 JL |
5802 | ;; |
5803 | esac | |
5804 | fi | |
00036f5c | 5805 | XGETTEXT="$gcc_cv_path_XGETTEXT" |
ab87f8c8 JL |
5806 | if test -n "$XGETTEXT"; then |
5807 | echo "$ac_t""$XGETTEXT" 1>&6 | |
5808 | else | |
5809 | echo "$ac_t""no" 1>&6 | |
5810 | fi | |
5811 | ||
5812 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 5813 | #line 5814 "configure" |
ab87f8c8 JL |
5814 | #include "confdefs.h" |
5815 | ||
5816 | int main() { | |
5817 | extern int _nl_msg_cat_cntr; | |
5818 | return _nl_msg_cat_cntr | |
5819 | ; return 0; } | |
5820 | EOF | |
e8bec136 | 5821 | if { (eval echo configure:5822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 JL |
5822 | rm -rf conftest* |
5823 | CATOBJEXT=.gmo | |
5824 | DATADIRNAME=share | |
5825 | else | |
5826 | echo "configure: failed program was:" >&5 | |
5827 | cat conftest.$ac_ext >&5 | |
5828 | rm -rf conftest* | |
5829 | CATOBJEXT=.mo | |
5830 | DATADIRNAME=lib | |
5831 | fi | |
5832 | rm -f conftest* | |
5833 | INSTOBJEXT=.mo | |
9fdf713f PT |
5834 | else |
5835 | create_catalogs="no" | |
ab87f8c8 JL |
5836 | fi |
5837 | fi | |
5838 | ||
5839 | else | |
5840 | echo "$ac_t""no" 1>&6 | |
5841 | fi | |
5842 | ||
5843 | ||
5844 | if test "$CATOBJEXT" = "NONE"; then | |
5845 | echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6 | |
e8bec136 | 5846 | echo "configure:5847: checking whether catgets can be used" >&5 |
ab87f8c8 JL |
5847 | # Check whether --with-catgets or --without-catgets was given. |
5848 | if test "${with_catgets+set}" = set; then | |
5849 | withval="$with_catgets" | |
5850 | nls_cv_use_catgets=$withval | |
5851 | else | |
5852 | nls_cv_use_catgets=no | |
5853 | fi | |
5854 | ||
5855 | echo "$ac_t""$nls_cv_use_catgets" 1>&6 | |
5856 | ||
5857 | if test "$nls_cv_use_catgets" = "yes"; then | |
5858 | echo $ac_n "checking for main in -li""... $ac_c" 1>&6 | |
e8bec136 | 5859 | echo "configure:5860: checking for main in -li" >&5 |
ab87f8c8 JL |
5860 | ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'` |
5861 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5862 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5863 | else | |
5864 | ac_save_LIBS="$LIBS" | |
5865 | LIBS="-li $LIBS" | |
5866 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 5867 | #line 5868 "configure" |
ab87f8c8 JL |
5868 | #include "confdefs.h" |
5869 | ||
5870 | int main() { | |
5871 | main() | |
5872 | ; return 0; } | |
5873 | EOF | |
e8bec136 | 5874 | if { (eval echo configure:5875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 JL |
5875 | rm -rf conftest* |
5876 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5877 | else | |
5878 | echo "configure: failed program was:" >&5 | |
5879 | cat conftest.$ac_ext >&5 | |
5880 | rm -rf conftest* | |
5881 | eval "ac_cv_lib_$ac_lib_var=no" | |
5882 | fi | |
5883 | rm -f conftest* | |
5884 | LIBS="$ac_save_LIBS" | |
5885 | ||
5886 | fi | |
5887 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5888 | echo "$ac_t""yes" 1>&6 | |
5889 | ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
5890 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
5891 | cat >> confdefs.h <<EOF | |
5892 | #define $ac_tr_lib 1 | |
5893 | EOF | |
5894 | ||
5895 | LIBS="-li $LIBS" | |
5896 | ||
5897 | else | |
5898 | echo "$ac_t""no" 1>&6 | |
5899 | fi | |
5900 | ||
5901 | echo $ac_n "checking for catgets""... $ac_c" 1>&6 | |
e8bec136 | 5902 | echo "configure:5903: checking for catgets" >&5 |
ab87f8c8 JL |
5903 | if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then |
5904 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5905 | else | |
5906 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 5907 | #line 5908 "configure" |
ab87f8c8 JL |
5908 | #include "confdefs.h" |
5909 | /* System header to define __stub macros and hopefully few prototypes, | |
5910 | which can conflict with char catgets(); below. */ | |
5911 | #include <assert.h> | |
5912 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5913 | /* We use char because int might match the return type of a gcc2 | |
5914 | builtin and then its argument prototype would still apply. */ | |
5915 | char catgets(); | |
5916 | ||
5917 | int main() { | |
5918 | ||
5919 | /* The GNU C library defines this for functions which it implements | |
5920 | to always fail with ENOSYS. Some functions are actually named | |
5921 | something starting with __ and the normal name is an alias. */ | |
5922 | #if defined (__stub_catgets) || defined (__stub___catgets) | |
5923 | choke me | |
5924 | #else | |
99b09ff3 | 5925 | catgets(); |
ab87f8c8 JL |
5926 | #endif |
5927 | ||
5928 | ; return 0; } | |
5929 | EOF | |
e8bec136 | 5930 | if { (eval echo configure:5931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ab87f8c8 JL |
5931 | rm -rf conftest* |
5932 | eval "ac_cv_func_catgets=yes" | |
5933 | else | |
5934 | echo "configure: failed program was:" >&5 | |
5935 | cat conftest.$ac_ext >&5 | |
5936 | rm -rf conftest* | |
5937 | eval "ac_cv_func_catgets=no" | |
5938 | fi | |
5939 | rm -f conftest* | |
5940 | fi | |
5941 | ||
5942 | if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then | |
5943 | echo "$ac_t""yes" 1>&6 | |
5944 | cat >> confdefs.h <<\EOF | |
5945 | #define HAVE_CATGETS 1 | |
5946 | EOF | |
5947 | ||
5948 | INTLOBJS="\$(CATOBJS)" | |
5949 | # Extract the first word of "gencat", so it can be a program name with args. | |
5950 | set dummy gencat; ac_word=$2 | |
5951 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e8bec136 | 5952 | echo "configure:5953: checking for $ac_word" >&5 |
00036f5c | 5953 | if eval "test \"`echo '$''{'gcc_cv_path_GENCAT'+set}'`\" = set"; then |
ab87f8c8 JL |
5954 | echo $ac_n "(cached) $ac_c" 1>&6 |
5955 | else | |
5956 | case "$GENCAT" in | |
5957 | /*) | |
00036f5c | 5958 | gcc_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path. |
ab87f8c8 JL |
5959 | ;; |
5960 | ?:/*) | |
00036f5c | 5961 | gcc_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path. |
ab87f8c8 JL |
5962 | ;; |
5963 | *) | |
cd9e5e7c | 5964 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
5965 | ac_dummy="$PATH" |
5966 | for ac_dir in $ac_dummy; do | |
ab87f8c8 JL |
5967 | test -z "$ac_dir" && ac_dir=. |
5968 | if test -f $ac_dir/$ac_word; then | |
00036f5c | 5969 | gcc_cv_path_GENCAT="$ac_dir/$ac_word" |
ab87f8c8 JL |
5970 | break |
5971 | fi | |
5972 | done | |
5973 | IFS="$ac_save_ifs" | |
00036f5c | 5974 | test -z "$gcc_cv_path_GENCAT" && gcc_cv_path_GENCAT="no" |
ab87f8c8 JL |
5975 | ;; |
5976 | esac | |
5977 | fi | |
00036f5c | 5978 | GENCAT="$gcc_cv_path_GENCAT" |
ab87f8c8 JL |
5979 | if test -n "$GENCAT"; then |
5980 | echo "$ac_t""$GENCAT" 1>&6 | |
5981 | else | |
5982 | echo "$ac_t""no" 1>&6 | |
5983 | fi | |
5984 | if test "$GENCAT" != "no"; then | |
5985 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
5986 | set dummy gmsgfmt; ac_word=$2 | |
5987 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e8bec136 | 5988 | echo "configure:5989: checking for $ac_word" >&5 |
00036f5c | 5989 | if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then |
ab87f8c8 JL |
5990 | echo $ac_n "(cached) $ac_c" 1>&6 |
5991 | else | |
5992 | case "$GMSGFMT" in | |
5993 | /*) | |
00036f5c | 5994 | gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
5995 | ;; |
5996 | ?:/*) | |
00036f5c | 5997 | gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. |
ab87f8c8 JL |
5998 | ;; |
5999 | *) | |
cd9e5e7c | 6000 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
6001 | ac_dummy="$PATH" |
6002 | for ac_dir in $ac_dummy; do | |
ab87f8c8 JL |
6003 | test -z "$ac_dir" && ac_dir=. |
6004 | if test -f $ac_dir/$ac_word; then | |
00036f5c | 6005 | gcc_cv_path_GMSGFMT="$ac_dir/$ac_word" |
ab87f8c8 JL |
6006 | break |
6007 | fi | |
6008 | done | |
6009 | IFS="$ac_save_ifs" | |
00036f5c | 6010 | test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="no" |
ab87f8c8 JL |
6011 | ;; |
6012 | esac | |
6013 | fi | |
00036f5c | 6014 | GMSGFMT="$gcc_cv_path_GMSGFMT" |
ab87f8c8 JL |
6015 | if test -n "$GMSGFMT"; then |
6016 | echo "$ac_t""$GMSGFMT" 1>&6 | |
6017 | else | |
6018 | echo "$ac_t""no" 1>&6 | |
6019 | fi | |
6020 | ||
6021 | if test "$GMSGFMT" = "no"; then | |
6022 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
6023 | set dummy msgfmt; ac_word=$2 | |
6024 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e8bec136 | 6025 | echo "configure:6026: checking for $ac_word" >&5 |
00036f5c | 6026 | if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then |
ab87f8c8 JL |
6027 | echo $ac_n "(cached) $ac_c" 1>&6 |
6028 | else | |
6029 | case "$GMSGFMT" in | |
6030 | /*) | |
00036f5c | 6031 | gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6032 | ;; |
6033 | *) | |
6034 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6035 | for ac_dir in $PATH; do | |
6036 | test -z "$ac_dir" && ac_dir=. | |
6037 | if test -f $ac_dir/$ac_word; then | |
6038 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
00036f5c | 6039 | gcc_cv_path_GMSGFMT="$ac_dir/$ac_word" |
ab87f8c8 JL |
6040 | break |
6041 | fi | |
6042 | fi | |
6043 | done | |
6044 | IFS="$ac_save_ifs" | |
00036f5c | 6045 | test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="msgfmt" |
ab87f8c8 JL |
6046 | ;; |
6047 | esac | |
6048 | fi | |
00036f5c | 6049 | GMSGFMT="$gcc_cv_path_GMSGFMT" |
ab87f8c8 JL |
6050 | if test -n "$GMSGFMT"; then |
6051 | echo "$ac_t""$GMSGFMT" 1>&6 | |
6052 | else | |
6053 | echo "$ac_t""no" 1>&6 | |
6054 | fi | |
6055 | ||
cab10d56 | 6056 | if test "$GMSGFMT" = "msgfmt"; then |
17297c41 PT |
6057 | create_catalogs="no" |
6058 | fi | |
ab87f8c8 JL |
6059 | fi |
6060 | # Extract the first word of "xgettext", so it can be a program name with args. | |
6061 | set dummy xgettext; ac_word=$2 | |
6062 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e8bec136 | 6063 | echo "configure:6064: checking for $ac_word" >&5 |
00036f5c | 6064 | if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then |
ab87f8c8 JL |
6065 | echo $ac_n "(cached) $ac_c" 1>&6 |
6066 | else | |
6067 | case "$XGETTEXT" in | |
6068 | /*) | |
00036f5c | 6069 | gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. |
ab87f8c8 JL |
6070 | ;; |
6071 | *) | |
6072 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6073 | for ac_dir in $PATH; do | |
6074 | test -z "$ac_dir" && ac_dir=. | |
6075 | if test -f $ac_dir/$ac_word; then | |
6076 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
00036f5c | 6077 | gcc_cv_path_XGETTEXT="$ac_dir/$ac_word" |
ab87f8c8 JL |
6078 | break |
6079 | fi | |
6080 | fi | |
6081 | done | |
6082 | IFS="$ac_save_ifs" | |
00036f5c | 6083 | test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":" |
ab87f8c8 JL |
6084 | ;; |
6085 | esac | |
6086 | fi | |
00036f5c | 6087 | XGETTEXT="$gcc_cv_path_XGETTEXT" |
ab87f8c8 JL |
6088 | if test -n "$XGETTEXT"; then |
6089 | echo "$ac_t""$XGETTEXT" 1>&6 | |
6090 | else | |
6091 | echo "$ac_t""no" 1>&6 | |
6092 | fi | |
6093 | ||
6094 | USE_INCLUDED_LIBINTL=yes | |
6095 | CATOBJEXT=.cat | |
6096 | INSTOBJEXT=.cat | |
6097 | DATADIRNAME=lib | |
6098 | INTLDEPS='$(top_builddir)/intl/libintl.a' | |
6099 | INTLLIBS=$INTLDEPS | |
6100 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
6101 | nls_cv_header_intl=intl/libintl.h | |
6102 | nls_cv_header_libgt=intl/libgettext.h | |
6103 | fi | |
6104 | else | |
6105 | echo "$ac_t""no" 1>&6 | |
6106 | fi | |
6107 | ||
6108 | fi | |
6109 | fi | |
6110 | ||
6111 | if test "$CATOBJEXT" = "NONE"; then | |
6112 | nls_cv_use_gnu_gettext=yes | |
6113 | fi | |
6114 | fi | |
6115 | ||
6116 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
6117 | INTLOBJS="\$(GETTOBJS)" | |
6118 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
6119 | set dummy msgfmt; ac_word=$2 | |
6120 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e8bec136 | 6121 | echo "configure:6122: checking for $ac_word" >&5 |
00036f5c | 6122 | if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then |
ab87f8c8 JL |
6123 | echo $ac_n "(cached) $ac_c" 1>&6 |
6124 | else | |
6125 | case "$MSGFMT" in | |
6126 | /*) | |
00036f5c | 6127 | gcc_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6128 | ;; |
6129 | *) | |
6130 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6131 | for ac_dir in $PATH; do | |
6132 | test -z "$ac_dir" && ac_dir=. | |
6133 | if test -f $ac_dir/$ac_word; then | |
6134 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
00036f5c | 6135 | gcc_cv_path_MSGFMT="$ac_dir/$ac_word" |
ab87f8c8 JL |
6136 | break |
6137 | fi | |
6138 | fi | |
6139 | done | |
6140 | IFS="$ac_save_ifs" | |
00036f5c | 6141 | test -z "$gcc_cv_path_MSGFMT" && gcc_cv_path_MSGFMT="msgfmt" |
ab87f8c8 JL |
6142 | ;; |
6143 | esac | |
6144 | fi | |
00036f5c | 6145 | MSGFMT="$gcc_cv_path_MSGFMT" |
ab87f8c8 JL |
6146 | if test -n "$MSGFMT"; then |
6147 | echo "$ac_t""$MSGFMT" 1>&6 | |
6148 | else | |
6149 | echo "$ac_t""no" 1>&6 | |
6150 | fi | |
6151 | ||
6152 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
6153 | set dummy gmsgfmt; ac_word=$2 | |
6154 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e8bec136 | 6155 | echo "configure:6156: checking for $ac_word" >&5 |
00036f5c | 6156 | if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then |
ab87f8c8 JL |
6157 | echo $ac_n "(cached) $ac_c" 1>&6 |
6158 | else | |
6159 | case "$GMSGFMT" in | |
6160 | /*) | |
00036f5c | 6161 | gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6162 | ;; |
6163 | ?:/*) | |
00036f5c | 6164 | gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. |
ab87f8c8 JL |
6165 | ;; |
6166 | *) | |
cd9e5e7c | 6167 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b27d2bd5 MK |
6168 | ac_dummy="$PATH" |
6169 | for ac_dir in $ac_dummy; do | |
ab87f8c8 JL |
6170 | test -z "$ac_dir" && ac_dir=. |
6171 | if test -f $ac_dir/$ac_word; then | |
00036f5c | 6172 | gcc_cv_path_GMSGFMT="$ac_dir/$ac_word" |
ab87f8c8 JL |
6173 | break |
6174 | fi | |
6175 | done | |
6176 | IFS="$ac_save_ifs" | |
00036f5c | 6177 | test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="$MSGFMT" |
ab87f8c8 JL |
6178 | ;; |
6179 | esac | |
6180 | fi | |
00036f5c | 6181 | GMSGFMT="$gcc_cv_path_GMSGFMT" |
ab87f8c8 JL |
6182 | if test -n "$GMSGFMT"; then |
6183 | echo "$ac_t""$GMSGFMT" 1>&6 | |
6184 | else | |
6185 | echo "$ac_t""no" 1>&6 | |
6186 | fi | |
6187 | ||
cab10d56 | 6188 | if test "$MSGFMT" = "msgfmt" && test "$GMSGFMT" = "msgfmt"; then |
17297c41 | 6189 | create_catalogs="no" |
17297c41 | 6190 | fi |
ab87f8c8 JL |
6191 | # Extract the first word of "xgettext", so it can be a program name with args. |
6192 | set dummy xgettext; ac_word=$2 | |
6193 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
e8bec136 | 6194 | echo "configure:6195: checking for $ac_word" >&5 |
00036f5c | 6195 | if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then |
ab87f8c8 JL |
6196 | echo $ac_n "(cached) $ac_c" 1>&6 |
6197 | else | |
6198 | case "$XGETTEXT" in | |
6199 | /*) | |
00036f5c | 6200 | gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. |
ab87f8c8 JL |
6201 | ;; |
6202 | *) | |
6203 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6204 | for ac_dir in $PATH; do | |
6205 | test -z "$ac_dir" && ac_dir=. | |
6206 | if test -f $ac_dir/$ac_word; then | |
6207 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
00036f5c | 6208 | gcc_cv_path_XGETTEXT="$ac_dir/$ac_word" |
ab87f8c8 JL |
6209 | break |
6210 | fi | |
6211 | fi | |
6212 | done | |
6213 | IFS="$ac_save_ifs" | |
00036f5c | 6214 | test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":" |
ab87f8c8 JL |
6215 | ;; |
6216 | esac | |
6217 | fi | |
00036f5c | 6218 | XGETTEXT="$gcc_cv_path_XGETTEXT" |
ab87f8c8 JL |
6219 | if test -n "$XGETTEXT"; then |
6220 | echo "$ac_t""$XGETTEXT" 1>&6 | |
6221 | else | |
6222 | echo "$ac_t""no" 1>&6 | |
6223 | fi | |
6224 | ||
6225 | ||
6226 | USE_INCLUDED_LIBINTL=yes | |
6227 | CATOBJEXT=.gmo | |
6228 | INSTOBJEXT=.mo | |
6229 | DATADIRNAME=share | |
6230 | INTLDEPS='$(top_builddir)/intl/libintl.a' | |
6231 | INTLLIBS=$INTLDEPS | |
6232 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
6233 | nls_cv_header_intl=intl/libintl.h | |
6234 | nls_cv_header_libgt=intl/libgettext.h | |
6235 | fi | |
6236 | ||
6237 | if test "$XGETTEXT" != ":"; then | |
6238 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
6239 | : ; | |
6240 | else | |
6241 | echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6 | |
6242 | XGETTEXT=":" | |
6243 | fi | |
6244 | fi | |
6245 | ||
17297c41 PT |
6246 | |
6247 | ||
ab87f8c8 JL |
6248 | # We need to process the po/ directory. |
6249 | POSUB=po | |
6250 | else | |
6251 | DATADIRNAME=share | |
6252 | nls_cv_header_intl=intl/libintl.h | |
6253 | nls_cv_header_libgt=intl/libgettext.h | |
6254 | fi | |
6255 | ||
6256 | ||
6257 | ||
6258 | ||
6259 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
6260 | # because some of the sources are only built for this goal. | |
6261 | if test "$PACKAGE" = gettext; then | |
6262 | USE_NLS=yes | |
6263 | USE_INCLUDED_LIBINTL=yes | |
6264 | fi | |
6265 | ||
6266 | for lang in $ALL_LINGUAS; do | |
6267 | GMOFILES="$GMOFILES $lang.gmo" | |
6268 | POFILES="$POFILES $lang.po" | |
6269 | done | |
6270 | ||
6271 | ||
6272 | ||
6273 | ||
6274 | ||
6275 | ||
6276 | ||
6277 | ||
6278 | ||
6279 | ||
6280 | ||
6281 | ||
6282 | ||
6283 | ||
4d0230e1 | 6284 | if test "x$create_catalogs" = "xno"; then |
9fdf713f PT |
6285 | echo "configure: warning: No program for building catalogs found -> building disabled" 1>&2 |
6286 | fi | |
6287 | ||
17297c41 | 6288 | if test "x$CATOBJEXT" != "x" && test "x$create_catalogs" != "xno" ; then |
ab87f8c8 JL |
6289 | if test "x$ALL_LINGUAS" = "x"; then |
6290 | LINGUAS= | |
6291 | else | |
6292 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
e8bec136 | 6293 | echo "configure:6294: checking for catalogs to be installed" >&5 |
47f01856 PT |
6294 | if test "x$LINGUAS" = "x"; then |
6295 | LINGUAS=$ALL_LINGUAS | |
6296 | else | |
6297 | NEW_LINGUAS= | |
6298 | for lang in $ALL_LINGUAS; do | |
6299 | case " $LINGUAS " in | |
6300 | *" $lang "*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
6301 | esac | |
6302 | done | |
6303 | LINGUAS=$NEW_LINGUAS | |
6304 | fi | |
ab87f8c8 JL |
6305 | echo "$ac_t""$LINGUAS" 1>&6 |
6306 | fi | |
6307 | ||
6308 | if test -n "$LINGUAS"; then | |
6309 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
6310 | fi | |
6311 | fi | |
6312 | ||
6313 | if test $ac_cv_header_locale_h = yes; then | |
6314 | INCLUDE_LOCALE_H="#include <locale.h>" | |
6315 | else | |
6316 | INCLUDE_LOCALE_H="\ | |
6317 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
6318 | fi | |
6319 | ||
6320 | ||
6321 | test -d intl || mkdir intl | |
6322 | if test "$CATOBJEXT" = ".cat"; then | |
6323 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
6324 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
e8bec136 | 6325 | echo "configure:6326: checking for linux/version.h" >&5 |
ab87f8c8 JL |
6326 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6327 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6328 | else | |
6329 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 6330 | #line 6331 "configure" |
ab87f8c8 JL |
6331 | #include "confdefs.h" |
6332 | #include <linux/version.h> | |
6333 | EOF | |
6334 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
e8bec136 | 6335 | { (eval echo configure:6336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
cd9e5e7c | 6336 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
ab87f8c8 JL |
6337 | if test -z "$ac_err"; then |
6338 | rm -rf conftest* | |
6339 | eval "ac_cv_header_$ac_safe=yes" | |
6340 | else | |
6341 | echo "$ac_err" >&5 | |
6342 | echo "configure: failed program was:" >&5 | |
6343 | cat conftest.$ac_ext >&5 | |
6344 | rm -rf conftest* | |
6345 | eval "ac_cv_header_$ac_safe=no" | |
6346 | fi | |
6347 | rm -f conftest* | |
6348 | fi | |
6349 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
6350 | echo "$ac_t""yes" 1>&6 | |
6351 | msgformat=linux | |
6352 | else | |
6353 | echo "$ac_t""no" 1>&6 | |
6354 | msgformat=xopen | |
6355 | fi | |
6356 | ||
6357 | ||
6358 | sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed | |
6359 | fi | |
6360 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
6361 | $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed | |
6362 | ||
6363 | if test "$PACKAGE" = "gettext"; then | |
6364 | GT_NO="#NO#" | |
6365 | GT_YES= | |
6366 | else | |
6367 | GT_NO= | |
6368 | GT_YES="#YES#" | |
6369 | fi | |
6370 | ||
6371 | ||
6372 | ||
6373 | MKINSTALLDIRS= | |
6374 | if test -n "$ac_aux_dir"; then | |
6375 | MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" | |
6376 | fi | |
6377 | if test -z "$MKINSTALLDIRS"; then | |
6378 | MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" | |
6379 | fi | |
6380 | ||
6381 | ||
6382 | l= | |
6383 | ||
6384 | ||
6385 | test -d po || mkdir po | |
6386 | if test "x$srcdir" != "x."; then | |
6387 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
6388 | posrcprefix="$srcdir/" | |
6389 | else | |
6390 | posrcprefix="../$srcdir/" | |
6391 | fi | |
6392 | else | |
6393 | posrcprefix="../" | |
6394 | fi | |
6395 | rm -f po/POTFILES | |
6396 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
6397 | < $srcdir/po/POTFILES.in > po/POTFILES | |
6398 | ||
6399 | XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT" | |
6400 | ||
f4ab28e3 MK |
6401 | # Windows32 Registry support for specifying GCC installation paths. |
6402 | # Check whether --enable-win32-registry or --disable-win32-registry was given. | |
6403 | if test "${enable_win32_registry+set}" = set; then | |
6404 | enableval="$enable_win32_registry" | |
6405 | : | |
6406 | fi | |
6407 | ||
4e70264f ZW |
6408 | case $host_os in |
6409 | win32 | pe | cygwin* | mingw32* | uwin*) | |
f4ab28e3 | 6410 | echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6 |
e8bec136 | 6411 | echo "configure:6412: checking whether windows registry support is requested" >&5 |
9dd53f2c | 6412 | if test "x$enable_win32_registry" != xno; then |
f4ab28e3 MK |
6413 | cat >> confdefs.h <<\EOF |
6414 | #define ENABLE_WIN32_REGISTRY 1 | |
6415 | EOF | |
6416 | ||
6417 | echo "$ac_t""yes" 1>&6 | |
4e70264f ZW |
6418 | |
6419 | echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6 | |
e8bec136 | 6420 | echo "configure:6421: checking for library containing RegOpenKeyExA" >&5 |
4e70264f ZW |
6421 | if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then |
6422 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6423 | else | |
6424 | ac_func_search_save_LIBS="$LIBS" | |
6425 | ac_cv_search_RegOpenKeyExA="no" | |
6426 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 6427 | #line 6428 "configure" |
4e70264f ZW |
6428 | #include "confdefs.h" |
6429 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6430 | /* We use char because int might match the return type of a gcc2 | |
6431 | builtin and then its argument prototype would still apply. */ | |
6432 | char RegOpenKeyExA(); | |
6433 | ||
6434 | int main() { | |
6435 | RegOpenKeyExA() | |
6436 | ; return 0; } | |
6437 | EOF | |
e8bec136 | 6438 | if { (eval echo configure:6439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4e70264f ZW |
6439 | rm -rf conftest* |
6440 | ac_cv_search_RegOpenKeyExA="none required" | |
6441 | else | |
6442 | echo "configure: failed program was:" >&5 | |
6443 | cat conftest.$ac_ext >&5 | |
6444 | fi | |
6445 | rm -f conftest* | |
6446 | test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do | |
6447 | LIBS="-l$i $ac_func_search_save_LIBS" | |
6448 | cat > conftest.$ac_ext <<EOF | |
e8bec136 | 6449 | #line 6450 "configure" |
4e70264f ZW |
6450 | #include "confdefs.h" |
6451 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6452 | /* We use char because int might match the return type of a gcc2 | |
6453 | builtin and then its argument prototype would still apply. */ | |
6454 | char RegOpenKeyExA(); | |
6455 | ||
6456 | int main() { | |
6457 | RegOpenKeyExA() | |
6458 | ; return 0; } | |
6459 | EOF | |
e8bec136 | 6460 | if { (eval echo configure:6461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4e70264f ZW |
6461 | rm -rf conftest* |
6462 | ac_cv_search_RegOpenKeyExA="-l$i" | |
6463 | break | |
6464 | else | |
6465 | echo "configure: failed program was:" >&5 | |
6466 | cat conftest.$ac_ext >&5 | |
6467 | fi | |
6468 | rm -f conftest* | |
6469 | done | |
6470 | LIBS="$ac_func_search_save_LIBS" | |
6471 | fi | |
6472 | ||
6473 | echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6 | |
6474 | if test "$ac_cv_search_RegOpenKeyExA" != "no"; then | |
6475 | test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS" | |
6476 | ||
6477 | else : | |
6478 | ||
6479 | fi | |
f4ab28e3 MK |
6480 | else |
6481 | echo "$ac_t""no" 1>&6 | |
6482 | fi | |
6483 | ||
6484 | # Check if user specified a different registry key. | |
9dd53f2c | 6485 | case "x${enable_win32_registry}" in |
f4ab28e3 MK |
6486 | x | xyes) |
6487 | # default. | |
6488 | gcc_cv_win32_registry_key="$VERSION" | |
6489 | ;; | |
6490 | xno) | |
6491 | # no registry lookup. | |
6492 | gcc_cv_win32_registry_key='' | |
6493 | ;; | |
6494 | *) | |
6495 | # user-specified key. | |
6496 | gcc_cv_win32_registry_key="$enable_win32_registry" | |
6497 | ;; | |
6498 | esac | |
6499 | ||
9dd53f2c | 6500 | if test "x$enable_win32_registry" != xno; then |
f4ab28e3 | 6501 | echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6 |
e8bec136 | 6502 | echo "configure:6503: checking registry key on windows hosts" >&5 |
f4ab28e3 MK |
6503 | cat >> confdefs.h <<EOF |
6504 | #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key" | |
6505 | EOF | |
6506 | ||
6507 | echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6 | |
6508 | fi | |
4e70264f ZW |
6509 | ;; |
6510 | esac | |
f4ab28e3 | 6511 | |
ab87f8c8 JL |
6512 | # Get an absolute path to the GCC top-level source directory |
6513 | holddir=`pwd` | |
6514 | cd $srcdir | |
6515 | topdir=`pwd` | |
6516 | cd $holddir | |
6517 | ||
6518 | # Conditionalize the makefile for this host machine. | |
6519 | # Make-host contains the concatenation of all host makefile fragments | |
6520 | # [there can be more than one]. This file is built by configure.frag. | |
6521 | host_overrides=Make-host | |
6522 | dep_host_xmake_file= | |
6523 | for f in .. ${host_xmake_file} | |
6524 | do | |
6525 | if test -f ${srcdir}/config/$f | |
6526 | then | |
6527 | dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f" | |
6528 | fi | |
6529 | done | |
6530 | ||
6531 | # Conditionalize the makefile for this target machine. | |
6532 | # Make-target contains the concatenation of all host makefile fragments | |
6533 | # [there can be more than one]. This file is built by configure.frag. | |
6534 | target_overrides=Make-target | |
6535 | dep_tmake_file= | |
6536 | for f in .. ${tmake_file} | |
6537 | do | |
6538 | if test -f ${srcdir}/config/$f | |
6539 | then | |
6540 | dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f" | |
6541 | fi | |
6542 | done | |
6543 | ||
6544 | # If the host doesn't support symlinks, modify CC in | |
6545 | # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. | |
6546 | # Otherwise, we can use "CC=$(CC)". | |
6547 | rm -f symtest.tem | |
6548 | if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null | |
6549 | then | |
6550 | cc_set_by_configure="\$(CC)" | |
5aa82ace | 6551 | quoted_cc_set_by_configure="\$(CC)" |
ab87f8c8 JL |
6552 | stage_prefix_set_by_configure="\$(STAGE_PREFIX)" |
6553 | else | |
6554 | rm -f symtest.tem | |
6555 | if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null | |
6556 | then | |
6557 | symbolic_link="cp -p" | |
6558 | else | |
6559 | symbolic_link="cp" | |
6560 | fi | |
6561 | cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" | |
5aa82ace | 6562 | quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`" |
ab87f8c8 JL |
6563 | stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" |
6564 | fi | |
6565 | rm -f symtest.tem | |
6566 | ||
6567 | out_object_file=`basename $out_file .c`.o | |
6568 | ||
6569 | tm_file_list= | |
6570 | for f in $tm_file; do | |
64ccbc99 | 6571 | case $f in |
d02af173 ZW |
6572 | ansidecl.h ) |
6573 | tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
6574 | defaults.h ) | |
64ccbc99 KG |
6575 | tm_file_list="${tm_file_list} $f" ;; |
6576 | *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;; | |
6577 | esac | |
ab87f8c8 JL |
6578 | done |
6579 | ||
11642c3a ZW |
6580 | tm_p_file_list= |
6581 | for f in $tm_p_file; do | |
6582 | tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" | |
6583 | done | |
6584 | ||
ab87f8c8 JL |
6585 | host_xm_file_list= |
6586 | for f in $host_xm_file; do | |
64ccbc99 | 6587 | case $f in |
d02af173 ZW |
6588 | ansidecl.h ) |
6589 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
6590 | auto-host.h | defaults.h ) | |
64ccbc99 KG |
6591 | host_xm_file_list="${host_xm_file_list} $f" ;; |
6592 | *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;; | |
6593 | esac | |
ab87f8c8 JL |
6594 | done |
6595 | ||
6596 | build_xm_file_list= | |
6597 | for f in $build_xm_file; do | |
64ccbc99 | 6598 | case $f in |
d02af173 ZW |
6599 | ansidecl.h ) |
6600 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
6601 | auto-build.h | auto-host.h | defaults.h ) | |
64ccbc99 KG |
6602 | build_xm_file_list="${build_xm_file_list} $f" ;; |
6603 | *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;; | |
6604 | esac | |
ab87f8c8 JL |
6605 | done |
6606 | ||
6607 | # Define macro CROSS_COMPILE in compilation | |
6608 | # if this is a cross-compiler. | |
6609 | # Also use all.cross instead of all.internal | |
6610 | # and add cross-make to Makefile. | |
6611 | cross_overrides="/dev/null" | |
6612 | if test x$host != x$target | |
6613 | then | |
6614 | cross_defines="CROSS=-DCROSS_COMPILE" | |
6615 | cross_overrides="${topdir}/cross-make" | |
6616 | fi | |
6617 | ||
b39d221a EC |
6618 | # If this is a cross-compiler that does not |
6619 | # have its own set of headers then define | |
6620 | # inhibit_libc | |
6621 | ||
fecd6201 ZW |
6622 | # If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS. |
6623 | # This prevents libgcc2 from containing any code which requires libc | |
6624 | # support. | |
b39d221a EC |
6625 | inhibit_libc= |
6626 | if test x$host != x$target && test x$with_headers = x; then | |
6627 | inhibit_libc=-Dinhibit_libc | |
6628 | else | |
6629 | if test x$with_newlib = xyes; then | |
6630 | inhibit_libc=-Dinhibit_libc | |
6631 | fi | |
6632 | fi | |
6633 | ||
6634 | ||
ab87f8c8 JL |
6635 | # When building gcc with a cross-compiler, we need to fix a few things. |
6636 | # This must come after cross-make as we want all.build to override | |
6637 | # all.cross. | |
6638 | build_overrides="/dev/null" | |
6639 | if test x$build != x$host | |
6640 | then | |
6641 | build_overrides="${topdir}/build-make" | |
6642 | fi | |
6643 | ||
6644 | # Expand extra_headers to include complete path. | |
6645 | # This substitutes for lots of t-* files. | |
6646 | extra_headers_list= | |
6647 | if test "x$extra_headers" = x | |
6648 | then true | |
6649 | else | |
6650 | # Prepend ${srcdir}/ginclude/ to every entry in extra_headers. | |
6651 | for file in $extra_headers; | |
6652 | do | |
6653 | extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}" | |
6654 | done | |
6655 | fi | |
6656 | ||
6657 | if test x$use_collect2 = xno; then | |
6658 | use_collect2= | |
6659 | fi | |
6660 | ||
6661 | # Add a definition of USE_COLLECT2 if system wants one. | |
6662 | # Also tell toplev.c what to do. | |
6663 | # This substitutes for lots of t-* files. | |
6664 | if test x$use_collect2 = x | |
6665 | then | |
6666 | will_use_collect2= | |
6667 | maybe_use_collect2= | |
6668 | else | |
6669 | will_use_collect2="collect2" | |
6670 | maybe_use_collect2="-DUSE_COLLECT2" | |
6671 | fi | |
6672 | ||
ab87f8c8 JL |
6673 | # If we have gas in the build tree, make a link to it. |
6674 | if test -f ../gas/Makefile; then | |
6675 | rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null | |
6676 | fi | |
6677 | ||
6678 | # If we have nm in the build tree, make a link to it. | |
6679 | if test -f ../binutils/Makefile; then | |
6680 | rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null | |
6681 | fi | |
6682 | ||
6683 | # If we have ld in the build tree, make a link to it. | |
6684 | if test -f ../ld/Makefile; then | |
6685 | # if test x$use_collect2 = x; then | |
6686 | # rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null | |
6687 | # else | |
6688 | rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null | |
6689 | # fi | |
6690 | fi | |
6691 | ||
981d4858 JM |
6692 | # Figure out what assembler we will be using. |
6693 | echo $ac_n "checking what assembler to use""... $ac_c" 1>&6 | |
e8bec136 | 6694 | echo "configure:6695: checking what assembler to use" >&5 |
ab87f8c8 | 6695 | gcc_cv_as= |
981d4858 JM |
6696 | gcc_cv_gas_major_version= |
6697 | gcc_cv_gas_minor_version= | |
ab87f8c8 JL |
6698 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas |
6699 | if test -x "$DEFAULT_ASSEMBLER"; then | |
6700 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
6701 | elif test -x "$AS"; then | |
6702 | gcc_cv_as="$AS" | |
6703 | elif test -x as$host_exeext; then | |
6704 | # Build using assembler in the current directory. | |
6705 | gcc_cv_as=./as$host_exeext | |
6706 | elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then | |
6707 | # Single tree build which includes gas. | |
6708 | for f in $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in | |
6709 | do | |
6710 | gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` | |
6711 | if test x$gcc_cv_gas_version != x; then | |
6712 | break | |
6713 | fi | |
6714 | done | |
6715 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
6716 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
981d4858 | 6717 | fi |
9e423e6d | 6718 | |
981d4858 | 6719 | if test "x$gcc_cv_as" = x -a x$host = x$target; then |
9e423e6d | 6720 | # Native build. |
779243f7 JL |
6721 | # Search the same directories that the installed compiler will |
6722 | # search. Else we may find the wrong assembler and lose. If we | |
6723 | # do not find a suitable assembler binary, then try the user's | |
6724 | # path. | |
6725 | # | |
6726 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
6727 | # user's path. Unfortunately, there is no good way to get at the | |
6728 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
6729 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
6730 | # to be fixed as part of the make/configure rewrite too. | |
6731 | ||
6732 | if test "x$exec_prefix" = xNONE; then | |
6733 | if test "x$prefix" = xNONE; then | |
6734 | test_prefix=/usr/local | |
6735 | else | |
6736 | test_prefix=$prefix | |
6737 | fi | |
6738 | else | |
6739 | test_prefix=$exec_prefix | |
6740 | fi | |
6741 | ||
6742 | # If the loop below does not find an assembler, then use whatever | |
6743 | # one we can find in the users's path. | |
6744 | # user's path. | |
16a0fe50 | 6745 | gcc_cv_as=as$host_exeext |
779243f7 JL |
6746 | |
6747 | test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \ | |
6748 | $test_prefix/lib/gcc-lib/$target \ | |
6749 | /usr/lib/gcc/$target/$gcc_version \ | |
6750 | /usr/lib/gcc/$target \ | |
6751 | $test_prefix/$target/bin/$target/$gcc_version \ | |
6752 | $test_prefix/$target/bin \ | |
6753 | /usr/libexec \ | |
6754 | /usr/ccs/gcc \ | |
6755 | /usr/ccs/bin \ | |
6756 | /udk/usr/ccs/bin \ | |
6757 | /bsd43/usr/lib/cmplrs/cc \ | |
6758 | /usr/cross64/usr/bin \ | |
6759 | /usr/lib/cmplrs/cc \ | |
6760 | /sysv/usr/lib/cmplrs/cc \ | |
6761 | /svr4/usr/lib/cmplrs/cc \ | |
6762 | /usr/bin" | |
6763 | ||
6764 | for dir in $test_dirs; do | |
6765 | if test -f $dir/as$host_exeext; then | |
6766 | gcc_cv_as=$dir/as$host_exeext | |
6767 | break; | |
6768 | fi | |
6769 | done | |
9e423e6d | 6770 | fi |
981d4858 JM |
6771 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
6772 | echo "$ac_t"""newly built gas"" 1>&6 | |
6773 | else | |
6774 | echo "$ac_t""$gcc_cv_as" 1>&6 | |
6775 | fi | |
6776 | ||
6777 | # Figure out what nm we will be using. | |
6778 | echo $ac_n "checking what nm to use""... $ac_c" 1>&6 | |
e8bec136 | 6779 | echo "configure:6780: checking what nm to use" >&5 |
981d4858 JM |
6780 | if test -x nm$host_exeext; then |
6781 | gcc_cv_nm=./nm$host_exeext | |
6782 | elif test x$host = x$target; then | |
6783 | # Native build. | |
6784 | gcc_cv_nm=nm$host_exeext | |
6785 | fi | |
6786 | echo "$ac_t""$gcc_cv_nm" 1>&6 | |
6787 | ||
6788 | # Figure out what assembler alignment features are present. | |
6789 | echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6 | |
e8bec136 | 6790 | echo "configure:6791: checking assembler alignment features" >&5 |
9d147085 | 6791 | gcc_cv_as_alignment_features=none |
981d4858 JM |
6792 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
6793 | # Gas version 2.6 and later support for .balign and .p2align. | |
6794 | # bytes to skip when using .p2align. | |
6795 | 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 | |
6796 | gcc_cv_as_alignment_features=".balign and .p2align" | |
6797 | cat >> confdefs.h <<\EOF | |
6798 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 | |
6799 | EOF | |
6800 | ||
6801 | fi | |
6802 | # Gas version 2.8 and later support specifying the maximum | |
6803 | # bytes to skip when using .p2align. | |
6804 | 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 | |
6805 | gcc_cv_as_alignment_features=".p2align including maximum skip" | |
6806 | cat >> confdefs.h <<\EOF | |
6807 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 | |
6808 | EOF | |
6809 | ||
6810 | fi | |
6811 | elif test x$gcc_cv_as != x; then | |
00ccc16d JL |
6812 | # Check if we have .balign and .p2align |
6813 | echo ".balign 4" > conftest.s | |
6814 | echo ".p2align 2" >> conftest.s | |
6815 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
6816 | gcc_cv_as_alignment_features=".balign and .p2align" | |
6817 | cat >> confdefs.h <<\EOF | |
6818 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 | |
6819 | EOF | |
6820 | ||
6821 | fi | |
6822 | rm -f conftest.s conftest.o | |
9e423e6d JW |
6823 | # Check if specifying the maximum bytes to skip when |
6824 | # using .p2align is supported. | |
6825 | echo ".p2align 4,,7" > conftest.s | |
6826 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
6827 | gcc_cv_as_alignment_features=".p2align including maximum skip" | |
6828 | cat >> confdefs.h <<\EOF | |
6829 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 | |
6830 | EOF | |
6831 | ||
6832 | fi | |
6833 | rm -f conftest.s conftest.o | |
6834 | fi | |
6835 | echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6 | |
6836 | ||
d1accaa3 | 6837 | echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6 |
e8bec136 | 6838 | echo "configure:6839: checking assembler subsection support" >&5 |
9d147085 | 6839 | gcc_cv_as_subsections=no |
981d4858 JM |
6840 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
6841 | 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 | |
6842 | gcc_cv_as_subsections="working .subsection -1" | |
6843 | fi | |
6844 | elif test x$gcc_cv_as != x; then | |
d1accaa3 JJ |
6845 | # Check if we have .subsection |
6846 | echo ".subsection 1" > conftest.s | |
6847 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
6848 | gcc_cv_as_subsections=".subsection" | |
d1accaa3 JJ |
6849 | if test x$gcc_cv_nm != x; then |
6850 | cat > conftest.s <<EOF | |
6851 | conftest_label1: .word 0 | |
6852 | .subsection -1 | |
6853 | conftest_label2: .word 0 | |
6854 | .previous | |
6855 | EOF | |
6856 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
6857 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
6858 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
1b015bec AO |
6859 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then |
6860 | : | |
6861 | else | |
d1accaa3 | 6862 | gcc_cv_as_subsections="working .subsection -1" |
d1accaa3 JJ |
6863 | fi |
6864 | fi | |
6865 | fi | |
6866 | fi | |
6867 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
981d4858 JM |
6868 | fi |
6869 | if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then | |
6870 | cat >> confdefs.h <<\EOF | |
6871 | #define HAVE_GAS_SUBSECTION_ORDERING 1 | |
6872 | EOF | |
6873 | ||
d1accaa3 JJ |
6874 | fi |
6875 | echo "$ac_t""$gcc_cv_as_subsections" 1>&6 | |
6876 | ||
12822146 | 6877 | echo $ac_n "checking assembler weak support""... $ac_c" 1>&6 |
e8bec136 | 6878 | echo "configure:6879: checking assembler weak support" >&5 |
9d147085 | 6879 | gcc_cv_as_weak=no |
981d4858 JM |
6880 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
6881 | 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 | |
6882 | gcc_cv_as_weak="yes" | |
6883 | fi | |
6884 | elif test x$gcc_cv_as != x; then | |
12822146 JL |
6885 | # Check if we have .weak |
6886 | echo " .weak foobar" > conftest.s | |
6887 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
12822146 JL |
6888 | gcc_cv_as_weak="yes" |
6889 | fi | |
6890 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
981d4858 JM |
6891 | fi |
6892 | if test x"$gcc_cv_as_weak" = xyes; then | |
6893 | cat >> confdefs.h <<\EOF | |
6894 | #define HAVE_GAS_WEAK 1 | |
6895 | EOF | |
6896 | ||
12822146 JL |
6897 | fi |
6898 | echo "$ac_t""$gcc_cv_as_weak" 1>&6 | |
6899 | ||
6a9c5260 | 6900 | echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6 |
e8bec136 | 6901 | echo "configure:6902: checking assembler hidden support" >&5 |
9d147085 | 6902 | gcc_cv_as_hidden=no |
981d4858 JM |
6903 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
6904 | 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 | |
6905 | gcc_cv_as_hidden="yes" | |
6906 | fi | |
6907 | elif test x$gcc_cv_as != x; then | |
6a9c5260 UD |
6908 | # Check if we have .hidden |
6909 | echo " .hidden foobar" > conftest.s | |
6910 | echo "foobar:" >> conftest.s | |
6911 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
6a9c5260 UD |
6912 | gcc_cv_as_hidden="yes" |
6913 | fi | |
6914 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
981d4858 JM |
6915 | fi |
6916 | if test x"$gcc_cv_as_hidden" = xyes; then | |
6917 | cat >> confdefs.h <<\EOF | |
6918 | #define HAVE_GAS_HIDDEN 1 | |
6919 | EOF | |
6920 | ||
6a9c5260 UD |
6921 | fi |
6922 | echo "$ac_t""$gcc_cv_as_hidden" 1>&6 | |
6923 | ||
b7460f24 | 6924 | echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6 |
e8bec136 | 6925 | echo "configure:6926: checking assembler leb128 support" >&5 |
fbe42b1b | 6926 | gcc_cv_as_leb128=no |
b7460f24 | 6927 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
fbe42b1b | 6928 | if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 11 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then |
b7460f24 RH |
6929 | gcc_cv_as_leb128="yes" |
6930 | fi | |
6931 | elif test x$gcc_cv_as != x; then | |
6932 | # Check if we have .[us]leb128, and support symbol arithmetic with it. | |
6933 | cat > conftest.s <<EOF | |
6934 | .data | |
6935 | .uleb128 L2 - L1 | |
6936 | L1: | |
6937 | .uleb128 1280 | |
6938 | .sleb128 -1010 | |
6939 | L2: | |
6940 | EOF | |
6941 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
78e766a0 RH |
6942 | gcc_cv_as_leb128="yes" |
6943 | ||
6944 | # GAS versions before 2.11 do not support uleb128, | |
6945 | # despite appearing to. | |
6946 | # ??? There exists an elf-specific test that will crash | |
6947 | # the assembler. Perhaps it's better to figure out whether | |
6948 | # arbitrary sections are supported and try the test. | |
6949 | as_ver=`$gcc_cv_as --version 2>/dev/null | head -1` | |
6950 | if echo "$as_ver" | grep GNU > /dev/null; then | |
6951 | as_ver=`echo $as_ver | sed -e 's/.* //'` | |
6952 | as_major=`echo $as_ver | sed 's/\..*//'` | |
3d399d67 | 6953 | as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` |
78e766a0 RH |
6954 | if test $as_major -eq 2 -a $as_minor -lt 11; then |
6955 | gcc_cv_as_leb128="no" | |
6956 | fi | |
fbe42b1b | 6957 | fi |
b7460f24 RH |
6958 | fi |
6959 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
6960 | fi | |
6961 | if test x"$gcc_cv_as_leb128" = xyes; then | |
6962 | cat >> confdefs.h <<\EOF | |
6963 | #define HAVE_AS_LEB128 1 | |
6964 | EOF | |
6965 | ||
6966 | fi | |
6967 | echo "$ac_t""$gcc_cv_as_leb128" 1>&6 | |
6968 | ||
c64688ae | 6969 | echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6 |
e8bec136 | 6970 | echo "configure:6971: checking assembler eh_frame optimization" >&5 |
c64688ae RH |
6971 | gcc_cv_as_eh_frame=no |
6972 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then | |
6973 | if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
6974 | gcc_cv_as_eh_frame="yes" | |
6975 | fi | |
6976 | elif test x$gcc_cv_as != x; then | |
6977 | # Check if this is GAS. | |
41948db5 SS |
6978 | as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1` |
6979 | rm -f a.out 2> /dev/null | |
c64688ae RH |
6980 | if echo "$as_ver" | grep GNU > /dev/null; then |
6981 | # Versions up to and including 2.11.0 may mis-optimize | |
6982 | # .eh_frame data. Try something. | |
6983 | cat > conftest.s <<EOF | |
6984 | .text | |
6985 | .LFB1: | |
6986 | .4byte 0 | |
6987 | .L1: | |
6988 | .4byte 0 | |
6989 | .LFE1: | |
6990 | .section .eh_frame,"aw",@progbits | |
6991 | __FRAME_BEGIN__: | |
6992 | .4byte .LECIE1-.LSCIE1 | |
6993 | .LSCIE1: | |
6994 | .4byte 0x0 | |
6995 | .byte 0x1 | |
6996 | .ascii "z\0" | |
6997 | .byte 0x1 | |
6998 | .byte 0x78 | |
6999 | .byte 0x1a | |
7000 | .byte 0x0 | |
7001 | .byte 0x4 | |
7002 | .4byte 1 | |
7003 | .p2align 1 | |
7004 | .LECIE1: | |
7005 | .LSFDE1: | |
7006 | .4byte .LEFDE1-.LASFDE1 | |
7007 | .LASFDE1: | |
7008 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
7009 | .4byte .LFB1 | |
7010 | .4byte .LFE1-.LFB1 | |
7011 | .byte 0x4 | |
7012 | .4byte .LFE1-.LFB1 | |
7013 | .byte 0x4 | |
7014 | .4byte .L1-.LFB1 | |
7015 | .LEFDE1: | |
7016 | EOF | |
7017 | cat > conftest.exp <<EOF | |
7018 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... | |
7019 | 0010 01000000 12000000 18000000 00000000 ................ | |
7020 | 0020 08000000 04080000 0044 .........D | |
7021 | EOF | |
7022 | # If the assembler didn't choke, and we can objdump, | |
7023 | # and we got the correct data, then succeed. | |
7024 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ | |
7025 | && objdump -s -j .eh_frame conftest.o 2>/dev/null \ | |
7026 | | tail -3 > conftest.got \ | |
7027 | && cmp conftest.exp conftest.got > /dev/null 2>&1 | |
7028 | then | |
7029 | gcc_cv_as_eh_frame="yes" | |
7030 | else | |
7031 | gcc_cv_as_eh_frame="bad" | |
7032 | if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then | |
7033 | cat >> confdefs.h <<\EOF | |
7034 | #define USE_AS_TRADITIONAL_FORMAT 1 | |
7035 | EOF | |
7036 | ||
7037 | fi | |
7038 | fi | |
7039 | fi | |
7040 | rm -f conftest.* | |
7041 | fi | |
7042 | echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6 | |
7043 | ||
1cb36a98 RH |
7044 | case "$target" in |
7045 | sparc*-*-*) | |
7046 | echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6 | |
e8bec136 | 7047 | echo "configure:7048: checking assembler .register pseudo-op support" >&5 |
5b68c389 AO |
7048 | if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then |
7049 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7050 | else | |
7051 | ||
7052 | gcc_cv_as_register_pseudo_op=unknown | |
7053 | if test x$gcc_cv_as != x; then | |
7054 | # Check if we have .register | |
7055 | echo ".register %g2, #scratch" > conftest.s | |
7056 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
1cb36a98 | 7057 | gcc_cv_as_register_pseudo_op=yes |
5b68c389 AO |
7058 | else |
7059 | gcc_cv_as_register_pseudo_op=no | |
7060 | fi | |
7061 | rm -f conftest.s conftest.o | |
7062 | fi | |
7063 | ||
7064 | fi | |
7065 | ||
7066 | echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6 | |
7067 | if test "x$gcc_cv_as_register_pseudo_op" = xyes; then | |
7068 | cat >> confdefs.h <<\EOF | |
1cb36a98 RH |
7069 | #define HAVE_AS_REGISTER_PSEUDO_OP 1 |
7070 | EOF | |
7071 | ||
1cb36a98 | 7072 | fi |
1cb36a98 | 7073 | |
e95b1e6a | 7074 | echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6 |
e8bec136 | 7075 | echo "configure:7076: checking assembler supports -relax" >&5 |
e95b1e6a JJ |
7076 | if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then |
7077 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7078 | else | |
7079 | ||
7080 | gcc_cv_as_relax_opt=unknown | |
7081 | if test x$gcc_cv_as != x; then | |
7082 | # Check if gas supports -relax | |
7083 | echo ".text" > conftest.s | |
7084 | if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then | |
7085 | gcc_cv_as_relax_opt=yes | |
7086 | else | |
7087 | gcc_cv_as_relax_opt=no | |
7088 | fi | |
7089 | rm -f conftest.s conftest.o | |
7090 | fi | |
7091 | ||
7092 | fi | |
7093 | ||
7094 | echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6 | |
7095 | if test "x$gcc_cv_as_relax_opt" = xyes; then | |
7096 | cat >> confdefs.h <<\EOF | |
7097 | #define HAVE_AS_RELAX_OPTION 1 | |
7098 | EOF | |
7099 | ||
7100 | fi | |
7101 | ||
5b68c389 AO |
7102 | case "$tm_file" in |
7103 | *64*) | |
7104 | echo $ac_n "checking for 64 bit support in assembler ($gcc_cv_as)""... $ac_c" 1>&6 | |
e8bec136 | 7105 | echo "configure:7106: checking for 64 bit support in assembler ($gcc_cv_as)" >&5 |
5b68c389 AO |
7106 | if eval "test \"`echo '$''{'gcc_cv_as_flags64'+set}'`\" = set"; then |
7107 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7108 | else | |
7109 | ||
7110 | if test -n "$gcc_cv_as"; then | |
7111 | echo ".xword foo" > conftest.s | |
7112 | gcc_cv_as_flags64=no | |
8a90b95d | 7113 | for flag in "-xarch=v9" "-64 -Av9"; do |
5b68c389 AO |
7114 | if $gcc_cv_as $flag -o conftest.o conftest.s \ |
7115 | > /dev/null 2>&1; then | |
7116 | gcc_cv_as_flags64=$flag | |
7117 | break | |
7118 | fi | |
7119 | done | |
7120 | rm -f conftest.s conftest.o | |
7121 | else | |
7122 | if test "$gas" = yes; then | |
7123 | gcc_cv_as_flags64="-64 -Av9" | |
7124 | else | |
7125 | gcc_cv_as_flags64="-xarch=v9" | |
7126 | fi | |
1cb36a98 | 7127 | fi |
5b68c389 AO |
7128 | |
7129 | fi | |
7130 | ||
7131 | echo "$ac_t""$gcc_cv_as_flags64" 1>&6 | |
7132 | if test "x$gcc_cv_as_flags64" = xno; then | |
7133 | ||
7134 | tmake_file=`echo " $tmake_file " | sed -e 's, sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'` | |
7135 | dep_tmake_file=`echo " $dep_tmake_file " | sed -e 's, [^ ]*/config/sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'` | |
7136 | ||
7137 | else | |
7138 | cat >> confdefs.h <<EOF | |
7139 | #define AS_SPARC64_FLAG "$gcc_cv_as_flags64" | |
7140 | EOF | |
7141 | ||
1cb36a98 | 7142 | fi |
5b68c389 AO |
7143 | ;; |
7144 | *) gcc_cv_as_flags64=${gcc_cv_as_flags64-no} | |
7145 | ;; | |
7146 | esac | |
7147 | ||
7148 | if test "x$gcc_cv_as_flags64" != xno; then | |
7149 | echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6 | |
e8bec136 | 7150 | echo "configure:7151: checking for assembler offsetable %lo() support" >&5 |
5b68c389 AO |
7151 | if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then |
7152 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7153 | else | |
7154 | ||
7155 | gcc_cv_as_offsetable_lo10=unknown | |
7156 | if test "x$gcc_cv_as" != x; then | |
7157 | # Check if assembler has offsetable %lo() | |
7158 | echo "or %g1, %lo(ab) + 12, %g1" > conftest.s | |
7159 | echo "or %g1, %lo(ab + 12), %g1" > conftest1.s | |
7160 | if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \ | |
7161 | > /dev/null 2>&1 && | |
7162 | $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \ | |
7163 | > /dev/null 2>&1; then | |
7164 | if cmp conftest.o conftest1.o > /dev/null 2>&1; then | |
7165 | gcc_cv_as_offsetable_lo10=no | |
7166 | else | |
7167 | gcc_cv_as_offsetable_lo10=yes | |
7168 | fi | |
7169 | else | |
7170 | gcc_cv_as_offsetable_lo10=no | |
7171 | fi | |
7172 | rm -f conftest.s conftest.o conftest1.s conftest1.o | |
7173 | fi | |
7174 | ||
7175 | fi | |
7176 | ||
7177 | echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6 | |
7178 | if test "x$gcc_cv_as_offsetable_lo10" = xyes; then | |
7179 | cat >> confdefs.h <<\EOF | |
1cb36a98 RH |
7180 | #define HAVE_AS_OFFSETABLE_LO10 1 |
7181 | EOF | |
7182 | ||
1cb36a98 | 7183 | fi |
1cb36a98 | 7184 | fi |
43160d01 | 7185 | echo $ac_n "checking assembler R_SPARC_UA32 relocation support""... $ac_c" 1>&6 |
e8bec136 | 7186 | echo "configure:7187: checking assembler R_SPARC_UA32 relocation support" >&5 |
43160d01 NS |
7187 | if eval "test \"`echo '$''{'gcc_cv_as_ua32_reloc'+set}'`\" = set"; then |
7188 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7189 | else | |
7190 | ||
7191 | gcc_cv_as_ua32_reloc= | |
7192 | cat >conftest.s << EOF | |
7193 | .byte 0x1 | |
7194 | .uaword foo | |
7195 | EOF | |
7196 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7197 | if (readelf -r conftest.o > conftest.elf) 2>/dev/null ; then | |
7198 | true | |
7199 | elif (elfdump -r conftest.o > conftest.elf) 2>/dev/null ; then | |
7200 | true | |
7201 | elif (`dirname $gcc_cv_as`/readelf -r conftest.o > conftest.elf) 2>/dev/null ; then | |
7202 | true | |
7203 | elif (`dirname $gcc_cv_as`/elfdump -r conftest.o > conftest.elf) 2>/dev/null ; then | |
7204 | true | |
7205 | else | |
7206 | gcc_cv_as_ua32_reloc=unknown | |
7207 | fi | |
7208 | if test x$gcc_cv_as_ua32_reloc = x && test `grep -c R_SPARC_UA32 conftest.elf` = 1 ; then | |
7209 | gcc_cv_as_ua32_reloc=yes | |
7210 | else | |
7211 | gcc_cv_as_ua32_reloc=no | |
7212 | fi | |
7213 | else | |
7214 | gcc_cv_as_ua32_reloc=unknown | |
7215 | fi | |
7216 | rm -f conftest.s conftest.o conftest.elf | |
7217 | ||
7218 | fi | |
7219 | ||
7220 | echo "$ac_t""$gcc_cv_as_ua32_reloc" 1>&6 | |
7221 | if test "x$gcc_cv_as_ua32_reloc" = xno; then | |
7222 | { echo "configure: error: Assembler does not support R_SPARC_UA32 correctly. | |
7223 | Please use native assembler or upgrade to binutils >= 2.11.1" 1>&2; exit 1; } | |
7224 | elif test "x$gcc_cv_as_ua32_reloc" != xyes ; then | |
7225 | echo "configure: warning: Cannot determine whether assembler supports R_SPARC_UA32 correctly. | |
7226 | The resulting compiler might not produce useable executables." 1>&2 | |
7227 | fi | |
1cb36a98 RH |
7228 | ;; |
7229 | ||
7230 | i[34567]86-*-*) | |
7231 | echo $ac_n "checking assembler instructions""... $ac_c" 1>&6 | |
e8bec136 | 7232 | echo "configure:7233: checking assembler instructions" >&5 |
1cb36a98 | 7233 | gcc_cv_as_instructions= |
981d4858 JM |
7234 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then |
7235 | 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 | |
7236 | gcc_cv_as_instructions="filds fists" | |
7237 | fi | |
7238 | elif test x$gcc_cv_as != x; then | |
53b5ce19 JW |
7239 | set "filds fists" "filds mem; fists mem" |
7240 | while test $# -gt 0 | |
7241 | do | |
7242 | echo "$2" > conftest.s | |
7243 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7244 | gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" " | |
53b5ce19 JW |
7245 | fi |
7246 | shift 2 | |
7247 | done | |
7248 | rm -f conftest.s conftest.o | |
1cb36a98 | 7249 | fi |
981d4858 JM |
7250 | if test x"$gcc_cv_as_instructions" != x; then |
7251 | cat >> confdefs.h <<EOF | |
ee7692d2 | 7252 | #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1 |
981d4858 JM |
7253 | EOF |
7254 | ||
7255 | fi | |
1cb36a98 RH |
7256 | echo "$ac_t""$gcc_cv_as_instructions" 1>&6 |
7257 | ;; | |
7258 | esac | |
53b5ce19 | 7259 | |
9d147085 | 7260 | echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6 |
e8bec136 | 7261 | echo "configure:7262: checking assembler dwarf2 debug_line support" >&5 |
9d147085 RH |
7262 | gcc_cv_as_dwarf2_debug_line=no |
7263 | # ??? Not all targets support dwarf2 debug_line, even within a version | |
7264 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
7265 | # info to the output file. So, as supported targets are added to gas 2.11, | |
7266 | # add some instruction here to (also) show we expect this might work. | |
7267 | # ??? Once 2.11 is released, probably need to add first known working | |
7268 | # version to the per-target configury. | |
7269 | case "$target" in | |
e6978109 | 7270 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-*) |
9d147085 RH |
7271 | insn="nop" |
7272 | ;; | |
7273 | ia64*-*-*) | |
7274 | insn="nop 0" | |
7275 | ;; | |
7276 | esac | |
7277 | if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; | |
7278 | then | |
7279 | if test "$gcc_cv_gas_major_version" -eq 2 \ | |
7280 | -a "$gcc_cv_gas_minor_version" -ge 11 \ | |
7281 | -o "$gcc_cv_gas_major_version" -gt 2 \ | |
7282 | && grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
7283 | && test x"$insn" != x ; then | |
7284 | gcc_cv_as_dwarf2_debug_line="yes" | |
7285 | fi | |
7286 | elif test x$gcc_cv_as != x -a x"$insn" != x ; then | |
acc187f5 RH |
7287 | echo ' .file 1 "conftest.s"' > conftest.s |
7288 | echo ' .loc 1 3 0' >> conftest.s | |
9d147085 | 7289 | echo " $insn" >> conftest.s |
981975b6 | 7290 | # ??? This fails with non-gnu grep. |
9d147085 RH |
7291 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ |
7292 | && grep debug_line conftest.o > /dev/null 2>&1 ; then | |
981975b6 RH |
7293 | # The .debug_line file table must be in the exact order that |
7294 | # we specified the files, since these indicies are also used | |
7295 | # by DW_AT_decl_file. Approximate this test by testing if | |
7296 | # the assembler bitches if the same index is assigned twice. | |
7297 | echo ' .file 1 "foo.s"' > conftest.s | |
7298 | echo ' .file 1 "bar.s"' >> conftest.s | |
7299 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 | |
7300 | then | |
7301 | gcc_cv_as_dwarf2_debug_line="no" | |
7302 | else | |
7303 | gcc_cv_as_dwarf2_debug_line="yes" | |
7304 | fi | |
9d147085 RH |
7305 | fi |
7306 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
7307 | fi | |
7308 | if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then | |
7309 | cat >> confdefs.h <<\EOF | |
7310 | #define HAVE_AS_DWARF2_DEBUG_LINE 1 | |
7311 | EOF | |
7312 | ||
7313 | fi | |
7314 | echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6 | |
7315 | ||
861bb6c1 | 7316 | # Figure out what language subdirectories are present. |
71205e0b MH |
7317 | # Look if the user specified --enable-languages="..."; if not, use |
7318 | # the environment variable $LANGUAGES if defined. $LANGUAGES might | |
7319 | # go away some day. | |
7320 | if test x"${enable_languages+set}" != xset; then | |
7321 | if test x"${LANGUAGES+set}" = xset; then | |
7322 | enable_languages="`echo ${LANGUAGES} | tr ' ' ','`" | |
7323 | else | |
7324 | enable_languages=all | |
7325 | fi | |
d6c6b553 PE |
7326 | else |
7327 | if test x"${enable_languages}" = x; then | |
7328 | { echo "configure: error: --enable-languages needs at least one argument" 1>&2; exit 1; } | |
7329 | fi | |
71205e0b | 7330 | fi |
75382c6d TT |
7331 | |
7332 | # First scan to see if an enabled language requires some other language. | |
7333 | # We assume that a given config-lang.in will list all the language | |
7334 | # front ends it requires, even if some are required indirectly. | |
7335 | for lang in ${srcdir}/*/config-lang.in .. | |
7336 | do | |
7337 | case $lang in | |
7338 | ..) | |
7339 | ;; | |
7340 | # The odd quoting in the next line works around | |
7341 | # an apparent bug in bash 1.12 on linux. | |
7342 | ${srcdir}/[*]/config-lang.in) | |
7343 | ;; | |
7344 | *) | |
7345 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
7346 | this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang` | |
7347 | for other in $this_lang_requires | |
7348 | do | |
7349 | case ,${enable_languages}, in | |
7350 | *,$other,*) | |
7351 | ;; | |
7352 | *,all,*) | |
7353 | ;; | |
1bf17cc4 | 7354 | *,$lang_alias,*) |
75382c6d TT |
7355 | enable_languages="$enable_languages,$other" |
7356 | ;; | |
7357 | esac | |
7358 | done | |
7359 | ;; | |
7360 | esac | |
7361 | done | |
7362 | ||
861bb6c1 JL |
7363 | subdirs= |
7364 | for lang in ${srcdir}/*/config-lang.in .. | |
7365 | do | |
7366 | case $lang in | |
7367 | ..) ;; | |
7368 | # The odd quoting in the next line works around | |
7369 | # an apparent bug in bash 1.12 on linux. | |
7370 | ${srcdir}/[*]/config-lang.in) ;; | |
71205e0b MH |
7371 | *) |
7372 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
2b60b2cb AO |
7373 | this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang` |
7374 | build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang` | |
71205e0b MH |
7375 | if test "x$lang_alias" = x |
7376 | then | |
7377 | echo "$lang doesn't set \$language." 1>&2 | |
7378 | exit 1 | |
7379 | fi | |
2b60b2cb AO |
7380 | case ${build_by_default},${enable_languages}, in |
7381 | *,$lang_alias,*) add_this_lang=yes ;; | |
7382 | no,*) add_this_lang=no ;; | |
7383 | *,all,*) add_this_lang=yes ;; | |
7384 | *) add_this_lang=no ;; | |
7385 | esac | |
71205e0b MH |
7386 | if test x"${add_this_lang}" = xyes; then |
7387 | case $lang in | |
7388 | ${srcdir}/ada/config-lang.in) | |
1ffc5c6e | 7389 | if test x$have_gnat = xyes ; then |
71205e0b MH |
7390 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" |
7391 | fi | |
7392 | ;; | |
7393 | *) | |
7394 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" | |
7395 | ;; | |
7396 | esac | |
7397 | fi | |
7398 | ;; | |
861bb6c1 JL |
7399 | esac |
7400 | done | |
7401 | ||
f24af81b TT |
7402 | # Make gthr-default.h if we have a thread file. |
7403 | gthread_flags= | |
75bffa71 | 7404 | if test $thread_file != single; then |
f24af81b | 7405 | rm -f gthr-default.h |
db0d1ed9 | 7406 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h |
f24af81b TT |
7407 | gthread_flags=-DHAVE_GTHR_DEFAULT |
7408 | fi | |
7409 | ||
7410 | ||
81bf3d9e RH |
7411 | # Find out what GC implementation we want, or may, use. |
7412 | # Check whether --with-gc or --without-gc was given. | |
7413 | if test "${with_gc+set}" = set; then | |
7414 | withval="$with_gc" | |
7415 | case "$withval" in | |
7416 | simple | page) | |
7417 | GGC=ggc-$withval | |
7418 | ;; | |
7419 | *) | |
7420 | { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; } | |
7421 | ;; | |
7422 | esac | |
7423 | else | |
005537df | 7424 | GGC=ggc-page |
81bf3d9e RH |
7425 | fi |
7426 | ||
7427 | ||
7428 | echo "Using $GGC for garbage collection." | |
7429 | ||
3c809ba4 | 7430 | # Use the system's zlib library. |
b8dad04b ZW |
7431 | zlibdir=-L../zlib |
7432 | zlibinc="-I\$(srcdir)/../zlib" | |
3c809ba4 AG |
7433 | # Check whether --with-system-zlib or --without-system-zlib was given. |
7434 | if test "${with_system_zlib+set}" = set; then | |
7435 | withval="$with_system_zlib" | |
7436 | zlibdir= | |
7437 | zlibinc= | |
7438 | ||
7439 | fi | |
7440 | ||
7441 | ||
7442 | ||
7443 | ||
dc6746e7 PT |
7444 | |
7445 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 | |
e8bec136 | 7446 | echo "configure:7447: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
dc6746e7 PT |
7447 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
7448 | if test "${enable_maintainer_mode+set}" = set; then | |
7449 | enableval="$enable_maintainer_mode" | |
7450 | maintainer_mode=$enableval | |
7451 | else | |
7452 | maintainer_mode=no | |
7453 | fi | |
7454 | ||
7455 | ||
7456 | echo "$ac_t""$maintainer_mode" 1>&6 | |
7457 | ||
7458 | if test "$maintainer_mode" = "yes"; then | |
7459 | MAINT='' | |
7460 | else | |
7461 | MAINT='#' | |
7462 | fi | |
7463 | ||
531073e7 RH |
7464 | # With Setjmp/Longjmp based exception handling. |
7465 | # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. | |
7466 | if test "${enable_sjlj_exceptions+set}" = set; then | |
7467 | enableval="$enable_sjlj_exceptions" | |
7468 | sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` | |
7469 | cat >> confdefs.h <<EOF | |
7470 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj | |
7471 | EOF | |
7472 | ||
7473 | fi | |
7474 | ||
7475 | ||
861bb6c1 JL |
7476 | # Make empty files to contain the specs and options for each language. |
7477 | # Then add #include lines to for a compiler that has specs and/or options. | |
7478 | ||
7479 | lang_specs_files= | |
7480 | lang_options_files= | |
3103b7db ML |
7481 | lang_tree_files= |
7482 | rm -f specs.h options.h gencheck.h | |
7483 | touch specs.h options.h gencheck.h | |
861bb6c1 JL |
7484 | for subdir in . $subdirs |
7485 | do | |
75bffa71 | 7486 | if test -f $srcdir/$subdir/lang-specs.h; then |
861bb6c1 JL |
7487 | echo "#include \"$subdir/lang-specs.h\"" >>specs.h |
7488 | lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" | |
7489 | fi | |
75bffa71 | 7490 | if test -f $srcdir/$subdir/lang-options.h; then |
861bb6c1 JL |
7491 | echo "#include \"$subdir/lang-options.h\"" >>options.h |
7492 | lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h" | |
7493 | fi | |
3103b7db ML |
7494 | if test -f $srcdir/$subdir/$subdir-tree.def; then |
7495 | echo "#include \"$subdir/$subdir-tree.def\"" >>gencheck.h | |
7496 | lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" | |
7497 | fi | |
861bb6c1 JL |
7498 | done |
7499 | ||
7500 | # These (without "all_") are set in each config-lang.in. | |
7501 | # `language' must be a single word so is spelled singularly. | |
7502 | all_languages= | |
7503 | all_boot_languages= | |
7504 | all_compilers= | |
7505 | all_stagestuff= | |
7506 | all_diff_excludes= | |
3ec83fc2 | 7507 | all_outputs='Makefile intl/Makefile po/Makefile.in fixinc/Makefile gccbug mklibgcc' |
861bb6c1 JL |
7508 | # List of language makefile fragments. |
7509 | all_lang_makefiles= | |
7510 | all_headers= | |
7511 | all_lib2funcs= | |
7512 | ||
7513 | # Add the language fragments. | |
7514 | # Languages are added via two mechanisms. Some information must be | |
7515 | # recorded in makefile variables, these are defined in config-lang.in. | |
7516 | # We accumulate them and plug them into the main Makefile. | |
7517 | # The other mechanism is a set of hooks for each of the main targets | |
7518 | # like `clean', `install', etc. | |
7519 | ||
7520 | language_fragments="Make-lang" | |
7521 | language_hooks="Make-hooks" | |
861bb6c1 JL |
7522 | |
7523 | for s in .. $subdirs | |
7524 | do | |
75bffa71 | 7525 | if test $s != ".." |
861bb6c1 JL |
7526 | then |
7527 | language= | |
7528 | boot_language= | |
7529 | compilers= | |
7530 | stagestuff= | |
7531 | diff_excludes= | |
7532 | headers= | |
7533 | outputs= | |
7534 | lib2funcs= | |
7535 | . ${srcdir}/$s/config-lang.in | |
75bffa71 | 7536 | if test "x$language" = x |
861bb6c1 JL |
7537 | then |
7538 | echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2 | |
7539 | exit 1 | |
7540 | fi | |
72aaffbd ZW |
7541 | all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in" |
7542 | if test -f ${srcdir}/$s/Makefile.in | |
7543 | then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in" | |
7544 | fi | |
861bb6c1 | 7545 | all_languages="$all_languages $language" |
75bffa71 | 7546 | if test "x$boot_language" = xyes |
861bb6c1 JL |
7547 | then |
7548 | all_boot_languages="$all_boot_languages $language" | |
7549 | fi | |
7550 | all_compilers="$all_compilers $compilers" | |
7551 | all_stagestuff="$all_stagestuff $stagestuff" | |
7552 | all_diff_excludes="$all_diff_excludes $diff_excludes" | |
7553 | all_headers="$all_headers $headers" | |
7554 | all_outputs="$all_outputs $outputs" | |
861bb6c1 JL |
7555 | all_lib2funcs="$all_lib2funcs $lib2funcs" |
7556 | fi | |
7557 | done | |
7558 | ||
cbc59f01 DD |
7559 | check_languages= |
7560 | for language in .. $all_languages | |
7561 | do | |
7562 | if test $language != ".." | |
7563 | then | |
7564 | check_languages="$check_languages check-$language" | |
7565 | fi | |
7566 | done | |
7567 | ||
861bb6c1 JL |
7568 | # Since we can't use `::' targets, we link each language in |
7569 | # with a set of hooks, reached indirectly via lang.${target}. | |
7570 | ||
7571 | rm -f Make-hooks | |
7572 | touch Make-hooks | |
7573 | target_list="all.build all.cross start.encap rest.encap \ | |
7574 | info dvi \ | |
7575 | install-normal install-common install-info install-man \ | |
436a88a6 | 7576 | uninstall \ |
861bb6c1 JL |
7577 | mostlyclean clean distclean extraclean maintainer-clean \ |
7578 | stage1 stage2 stage3 stage4" | |
7579 | for t in $target_list | |
7580 | do | |
7581 | x= | |
ab87f8c8 | 7582 | for lang in .. $all_languages |
861bb6c1 | 7583 | do |
ab87f8c8 JL |
7584 | if test $lang != ".."; then |
7585 | x="$x $lang.$t" | |
861bb6c1 JL |
7586 | fi |
7587 | done | |
7588 | echo "lang.$t: $x" >> Make-hooks | |
7589 | done | |
7590 | ||
cc06d68c | 7591 | # Create .gdbinit. |
861bb6c1 | 7592 | |
cc06d68c GP |
7593 | echo "dir ." > .gdbinit |
7594 | echo "dir ${srcdir}" >> .gdbinit | |
7595 | if test x$gdb_needs_out_file_path = xyes | |
7596 | then | |
7597 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
7598 | fi | |
7599 | if test "x$subdirs" != x; then | |
7600 | for s in $subdirs | |
7601 | do | |
7602 | echo "dir ${srcdir}/$s" >> .gdbinit | |
7603 | done | |
861bb6c1 | 7604 | fi |
cc06d68c | 7605 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 7606 | |
88111b26 JL |
7607 | # Define variables host_canonical and build_canonical |
7608 | # because some Cygnus local changes in the Makefile depend on them. | |
7609 | build_canonical=${build} | |
7610 | host_canonical=${host} | |
7611 | target_subdir= | |
75bffa71 | 7612 | if test "${host}" != "${target}" ; then |
924c96eb | 7613 | target_subdir=${target_alias}/ |
88111b26 JL |
7614 | fi |
7615 | ||
7616 | ||
7617 | ||
7618 | ||
8f8d3278 NC |
7619 | # If $(exec_prefix) exists and is not the same as $(prefix), then compute an |
7620 | # absolute path for gcc_tooldir based on inserting the number of up-directory | |
7621 | # movements required to get from $(exec_prefix) to $(prefix) into the basic | |
7622 | # $(libsubdir)/@(unlibsubdir) based path. | |
82cbf8f7 JL |
7623 | # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel |
7624 | # make and thus we'd get different behavior depending on where we built the | |
7625 | # sources. | |
5949a9fc | 7626 | if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then |
d062c304 JL |
7627 | gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)' |
7628 | else | |
8f8d3278 NC |
7629 | # An explanation of the sed strings: |
7630 | # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix' | |
7631 | # -e 's|/$||' match a trailing forward slash and eliminates it | |
7632 | # -e 's|^[^/]|/|' forces the string to start with a forward slash (*) | |
7633 | # -e 's|/[^/]*|../|g' replaces each occurance of /<directory> with ../ | |
7634 | # | |
7635 | # (*) Note this pattern overwrites the first character of the string | |
7636 | # with a forward slash if one is not already present. This is not a | |
7637 | # problem because the exact names of the sub-directories concerned is | |
7638 | # unimportant, just the number of them matters. | |
7639 | # | |
7640 | # The practical upshot of these patterns is like this: | |
7641 | # | |
7642 | # prefix exec_prefix result | |
7643 | # ------ ----------- ------ | |
7644 | # /foo /foo/bar ../ | |
7645 | # /foo/ /foo/bar ../ | |
7646 | # /foo /foo/bar/ ../ | |
7647 | # /foo/ /foo/bar/ ../ | |
7648 | # /foo /foo/bar/ugg ../../ | |
7649 | # | |
4c112cda NC |
7650 | dollar='$$' |
7651 | gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)" | |
d062c304 JL |
7652 | fi |
7653 | ||
7654 | ||
2ce3c6c6 | 7655 | |
2bbea3a6 RH |
7656 | # Find a directory in which to install a shared libgcc. |
7657 | ||
7658 | # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. | |
7659 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
7660 | enableval="$enable_version_specific_runtime_libs" | |
7661 | : | |
7662 | fi | |
7663 | ||
7664 | ||
5b15f277 RH |
7665 | # Check whether --with-slibdir or --without-slibdir was given. |
7666 | if test "${with_slibdir+set}" = set; then | |
7667 | withval="$with_slibdir" | |
7668 | slibdir="$with_slibdir" | |
7669 | else | |
7670 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 7671 | slibdir='$(libsubdir)' |
5b15f277 | 7672 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
7673 | slibdir='$(build_tooldir)/lib' |
7674 | else | |
5b15f277 | 7675 | slibdir='$(libdir)' |
2bbea3a6 | 7676 | fi |
5b15f277 RH |
7677 | fi |
7678 | ||
2bbea3a6 RH |
7679 | |
7680 | ||
7e717196 JL |
7681 | # Nothing to do for FLOAT_H, float_format already handled. |
7682 | objdir=`pwd` | |
7683 | ||
7684 | ||
861bb6c1 JL |
7685 | # Process the language and host/target makefile fragments. |
7686 | ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file" | |
7687 | ||
7688 | # Substitute configuration variables | |
7689 | ||
7690 | ||
7691 | ||
7692 | ||
7693 | ||
7694 | ||
7695 | ||
7696 | ||
7697 | ||
7698 | ||
7699 | ||
7700 | ||
7701 | ||
7702 | ||
7703 | ||
7704 | ||
7705 | ||
7706 | ||
7707 | ||
7708 | ||
7709 | ||
7710 | ||
7711 | ||
7712 | ||
7713 | ||
7714 | ||
7715 | ||
7716 | ||
7717 | ||
7718 | ||
7719 | ||
7720 | ||
7721 | ||
7722 | ||
7723 | ||
7724 | ||
7725 | ||
7726 | ||
7727 | ||
7728 | ||
7729 | ||
7730 | ||
7731 | ||
7732 | ||
7733 | ||
7734 | ||
9b16d2c4 | 7735 | |
e9a25f70 | 7736 | |
6e26218f | 7737 | |
c8724862 | 7738 | |
e061d1ce | 7739 | |
d8bb17c8 | 7740 | |
11642c3a ZW |
7741 | |
7742 | ||
7743 | ||
7744 | ||
7745 | ||
7746 | ||
7747 | ||
7748 | ||
9fc9b82a | 7749 | |
8763704d | 7750 | |
aac69a49 NC |
7751 | |
7752 | ||
cc1e60ea | 7753 | |
e2187d3b | 7754 | |
cbc59f01 | 7755 | |
3d9d2476 | 7756 | |
861bb6c1 JL |
7757 | |
7758 | ||
7759 | # Echo that links are built | |
75bffa71 | 7760 | if test x$host = x$target |
861bb6c1 JL |
7761 | then |
7762 | str1="native " | |
7763 | else | |
7764 | str1="cross-" | |
7765 | str2=" from $host" | |
7766 | fi | |
7767 | ||
75bffa71 | 7768 | if test x$host != x$build |
861bb6c1 JL |
7769 | then |
7770 | str3=" on a $build system" | |
7771 | fi | |
7772 | ||
75bffa71 | 7773 | if test "x$str2" != x || test "x$str3" != x |
861bb6c1 JL |
7774 | then |
7775 | str4= | |
7776 | fi | |
7777 | ||
7778 | echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2 | |
7779 | ||
75bffa71 | 7780 | if test "x$str2" != x || test "x$str3" != x |
861bb6c1 JL |
7781 | then |
7782 | echo " ${str2}${str3}." 1>&2 | |
7783 | fi | |
7784 | ||
f6cb0e63 | 7785 | # Truncate the target if necessary |
75bffa71 | 7786 | if test x$host_truncate_target != x; then |
f6cb0e63 JL |
7787 | target=`echo $target | sed -e 's/\(..............\).*/\1/'` |
7788 | fi | |
7789 | ||
861bb6c1 JL |
7790 | # Configure the subdirectories |
7791 | # AC_CONFIG_SUBDIRS($subdirs) | |
7792 | ||
7793 | # Create the Makefile | |
7794 | # and configure language subdirectories | |
7795 | trap '' 1 2 15 | |
7796 | cat > confcache <<\EOF | |
7797 | # This file is a shell script that caches the results of configure | |
7798 | # tests run on this system so they can be shared between configure | |
7799 | # scripts and configure runs. It is not useful on other systems. | |
7800 | # If it contains results you don't want to keep, you may remove or edit it. | |
7801 | # | |
7802 | # By default, configure uses ./config.cache as the cache file, | |
7803 | # creating it if it does not exist already. You can give configure | |
7804 | # the --cache-file=FILE option to use a different cache file; that is | |
7805 | # what configure does when it calls configure scripts in | |
7806 | # subdirectories, so they share the cache. | |
7807 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
7808 | # config.status only pays attention to the cache file if you give it the | |
7809 | # --recheck option to rerun configure. | |
7810 | # | |
7811 | EOF | |
7812 | # The following way of writing the cache mishandles newlines in values, | |
7813 | # but we know of no workaround that is simple, portable, and efficient. | |
7814 | # So, don't put newlines in cache variables' values. | |
7815 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
7816 | # and sets the high bit in the cache file unless we assign to the vars. | |
7817 | (set) 2>&1 | | |
b27d2bd5 | 7818 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
861bb6c1 JL |
7819 | *ac_space=\ *) |
7820 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
7821 | # turns \\\\ into \\, and sed turns \\ into \). | |
7822 | sed -n \ | |
7823 | -e "s/'/'\\\\''/g" \ | |
7824 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
7825 | ;; | |
7826 | *) | |
7827 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
7828 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
7829 | ;; | |
7830 | esac >> confcache | |
7831 | if cmp -s $cache_file confcache; then | |
7832 | : | |
7833 | else | |
7834 | if test -w $cache_file; then | |
7835 | echo "updating cache $cache_file" | |
7836 | cat confcache > $cache_file | |
7837 | else | |
7838 | echo "not updating unwritable cache $cache_file" | |
7839 | fi | |
7840 | fi | |
7841 | rm -f confcache | |
7842 | ||
7843 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
7844 | ||
7845 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
7846 | # Let make expand exec_prefix. | |
7847 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7848 | ||
7849 | # Any assignment to VPATH causes Sun make to only execute | |
7850 | # the first set of double-colon rules, so remove it if not needed. | |
7851 | # If there is a colon in the path, we need to keep it. | |
7852 | if test "x$srcdir" = x.; then | |
7853 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
7854 | fi | |
7855 | ||
7856 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
7857 | ||
7858 | DEFS=-DHAVE_CONFIG_H | |
7859 | ||
7860 | # Without the "./", some shells look in PATH for config.status. | |
7861 | : ${CONFIG_STATUS=./config.status} | |
7862 | ||
7863 | echo creating $CONFIG_STATUS | |
7864 | rm -f $CONFIG_STATUS | |
7865 | cat > $CONFIG_STATUS <<EOF | |
7866 | #! /bin/sh | |
7867 | # Generated automatically by configure. | |
7868 | # Run this file to recreate the current configuration. | |
7869 | # This directory was configured as follows, | |
7870 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
7871 | # | |
7872 | # $0 $ac_configure_args | |
7873 | # | |
7874 | # Compiler output produced by configure, useful for debugging | |
7875 | # configure, is in ./config.log if it exists. | |
7876 | ||
7877 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
7878 | for ac_option | |
7879 | do | |
7880 | case "\$ac_option" in | |
7881 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
7882 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
7883 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
7884 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
b27d2bd5 | 7885 | echo "$CONFIG_STATUS generated by autoconf version 2.13" |
861bb6c1 JL |
7886 | exit 0 ;; |
7887 | -help | --help | --hel | --he | --h) | |
7888 | echo "\$ac_cs_usage"; exit 0 ;; | |
7889 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
7890 | esac | |
7891 | done | |
7892 | ||
7893 | ac_given_srcdir=$srcdir | |
861bb6c1 | 7894 | |
b7cb92ad | 7895 | trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
861bb6c1 JL |
7896 | EOF |
7897 | cat >> $CONFIG_STATUS <<EOF | |
7898 | ||
7899 | # Protect against being on the right side of a sed subst in config.status. | |
7900 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
7901 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
7902 | $ac_vpsub | |
7903 | $extrasub | |
6f144c9c | 7904 | s%@SHELL@%$SHELL%g |
861bb6c1 JL |
7905 | s%@CFLAGS@%$CFLAGS%g |
7906 | s%@CPPFLAGS@%$CPPFLAGS%g | |
7907 | s%@CXXFLAGS@%$CXXFLAGS%g | |
b27d2bd5 | 7908 | s%@FFLAGS@%$FFLAGS%g |
861bb6c1 JL |
7909 | s%@DEFS@%$DEFS%g |
7910 | s%@LDFLAGS@%$LDFLAGS%g | |
7911 | s%@LIBS@%$LIBS%g | |
7912 | s%@exec_prefix@%$exec_prefix%g | |
7913 | s%@prefix@%$prefix%g | |
7914 | s%@program_transform_name@%$program_transform_name%g | |
7915 | s%@bindir@%$bindir%g | |
7916 | s%@sbindir@%$sbindir%g | |
7917 | s%@libexecdir@%$libexecdir%g | |
7918 | s%@datadir@%$datadir%g | |
7919 | s%@sysconfdir@%$sysconfdir%g | |
7920 | s%@sharedstatedir@%$sharedstatedir%g | |
7921 | s%@localstatedir@%$localstatedir%g | |
7922 | s%@libdir@%$libdir%g | |
7923 | s%@includedir@%$includedir%g | |
7924 | s%@oldincludedir@%$oldincludedir%g | |
7925 | s%@infodir@%$infodir%g | |
7926 | s%@mandir@%$mandir%g | |
39d6f2e8 | 7927 | s%@enable_multilib@%$enable_multilib%g |
50503ac8 | 7928 | s%@enable_shared@%$enable_shared%g |
861bb6c1 JL |
7929 | s%@host@%$host%g |
7930 | s%@host_alias@%$host_alias%g | |
7931 | s%@host_cpu@%$host_cpu%g | |
7932 | s%@host_vendor@%$host_vendor%g | |
7933 | s%@host_os@%$host_os%g | |
7934 | s%@target@%$target%g | |
7935 | s%@target_alias@%$target_alias%g | |
7936 | s%@target_cpu@%$target_cpu%g | |
7937 | s%@target_vendor@%$target_vendor%g | |
7938 | s%@target_os@%$target_os%g | |
7939 | s%@build@%$build%g | |
7940 | s%@build_alias@%$build_alias%g | |
7941 | s%@build_cpu@%$build_cpu%g | |
7942 | s%@build_vendor@%$build_vendor%g | |
7943 | s%@build_os@%$build_os%g | |
e9a25f70 | 7944 | s%@CC@%$CC%g |
3ec83fc2 | 7945 | s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g |
b8dad04b ZW |
7946 | s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g |
7947 | s%@strict1_warn@%$strict1_warn%g | |
84c041a1 | 7948 | s%@CPP@%$CPP%g |
b8dad04b ZW |
7949 | s%@warn_cflags@%$warn_cflags%g |
7950 | s%@stage1_cflags@%$stage1_cflags%g | |
e9a25f70 | 7951 | s%@SET_MAKE@%$SET_MAKE%g |
861bb6c1 | 7952 | s%@AWK@%$AWK%g |
0a4b6309 RL |
7953 | s%@LN@%$LN%g |
7954 | s%@LN_S@%$LN_S%g | |
861bb6c1 | 7955 | s%@RANLIB@%$RANLIB%g |
0a4b6309 RL |
7956 | s%@INSTALL@%$INSTALL%g |
7957 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g | |
7958 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
1ffc5c6e | 7959 | s%@have_gnat@%$have_gnat%g |
955be633 | 7960 | s%@have_mktemp_command@%$have_mktemp_command%g |
09fa0705 ZW |
7961 | s%@MAKEINFO@%$MAKEINFO%g |
7962 | s%@BUILD_INFO@%$BUILD_INFO%g | |
fd939e46 | 7963 | s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g |
1e608388 ZW |
7964 | s%@FLEX@%$FLEX%g |
7965 | s%@BISON@%$BISON%g | |
4e70264f | 7966 | s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g |
7f2749d4 | 7967 | s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g |
e256b8b6 | 7968 | s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g |
0a4b6309 RL |
7969 | s%@vfprintf@%$vfprintf%g |
7970 | s%@doprint@%$doprint%g | |
b3e1e64f | 7971 | s%@strstr@%$strstr%g |
861bb6c1 | 7972 | s%@manext@%$manext%g |
992d1248 | 7973 | s%@objext@%$objext%g |
ab87f8c8 JL |
7974 | s%@PACKAGE@%$PACKAGE%g |
7975 | s%@VERSION@%$VERSION%g | |
4adee315 | 7976 | s%@CHECK_PO@%$CHECK_PO%g |
ab87f8c8 JL |
7977 | s%@USE_NLS@%$USE_NLS%g |
7978 | s%@MSGFMT@%$MSGFMT%g | |
7979 | s%@GMSGFMT@%$GMSGFMT%g | |
7980 | s%@XGETTEXT@%$XGETTEXT%g | |
7981 | s%@GENCAT@%$GENCAT%g | |
7982 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
7983 | s%@CATALOGS@%$CATALOGS%g | |
7984 | s%@CATOBJEXT@%$CATOBJEXT%g | |
7985 | s%@DATADIRNAME@%$DATADIRNAME%g | |
7986 | s%@GMOFILES@%$GMOFILES%g | |
7987 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
7988 | s%@INTLDEPS@%$INTLDEPS%g | |
7989 | s%@INTLLIBS@%$INTLLIBS%g | |
7990 | s%@INTLOBJS@%$INTLOBJS%g | |
7991 | s%@POFILES@%$POFILES%g | |
7992 | s%@POSUB@%$POSUB%g | |
7993 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
7994 | s%@GT_NO@%$GT_NO%g | |
7995 | s%@GT_YES@%$GT_YES%g | |
7996 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
7997 | s%@l@%$l%g | |
b39d221a | 7998 | s%@inhibit_libc@%$inhibit_libc%g |
f24af81b | 7999 | s%@gthread_flags@%$gthread_flags%g |
81bf3d9e | 8000 | s%@GGC@%$GGC%g |
3c809ba4 AG |
8001 | s%@zlibdir@%$zlibdir%g |
8002 | s%@zlibinc@%$zlibinc%g | |
dc6746e7 | 8003 | s%@MAINT@%$MAINT%g |
88111b26 JL |
8004 | s%@build_canonical@%$build_canonical%g |
8005 | s%@host_canonical@%$host_canonical%g | |
8006 | s%@target_subdir@%$target_subdir%g | |
d062c304 | 8007 | s%@gcc_tooldir@%$gcc_tooldir%g |
4c112cda | 8008 | s%@dollar@%$dollar%g |
2bbea3a6 | 8009 | s%@slibdir@%$slibdir%g |
7e717196 | 8010 | s%@objdir@%$objdir%g |
861bb6c1 | 8011 | s%@subdirs@%$subdirs%g |
861bb6c1 JL |
8012 | s%@all_boot_languages@%$all_boot_languages%g |
8013 | s%@all_compilers@%$all_compilers%g | |
861bb6c1 | 8014 | s%@all_diff_excludes@%$all_diff_excludes%g |
861bb6c1 | 8015 | s%@all_headers@%$all_headers%g |
4f3ae93c BK |
8016 | s%@all_lang_makefiles@%$all_lang_makefiles%g |
8017 | s%@all_languages@%$all_languages%g | |
8018 | s%@all_lib2funcs@%$all_lib2funcs%g | |
8019 | s%@all_stagestuff@%$all_stagestuff%g | |
8020 | s%@build_exeext@%$build_exeext%g | |
8021 | s%@build_install_headers_dir@%$build_install_headers_dir%g | |
8022 | s%@build_xm_file_list@%$build_xm_file_list%g | |
11642c3a ZW |
8023 | s%@build_xm_file@%$build_xm_file%g |
8024 | s%@build_xm_defines@%$build_xm_defines%g | |
cbc59f01 | 8025 | s%@check_languages@%$check_languages%g |
4f3ae93c | 8026 | s%@cc_set_by_configure@%$cc_set_by_configure%g |
5aa82ace | 8027 | s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g |
4f3ae93c | 8028 | s%@cpp_install_dir@%$cpp_install_dir%g |
4f3ae93c BK |
8029 | s%@dep_host_xmake_file@%$dep_host_xmake_file%g |
8030 | s%@dep_tmake_file@%$dep_tmake_file%g | |
8031 | s%@extra_c_flags@%$extra_c_flags%g | |
4f3ae93c | 8032 | s%@extra_headers_list@%$extra_headers_list%g |
861bb6c1 | 8033 | s%@extra_objs@%$extra_objs%g |
4f3ae93c BK |
8034 | s%@extra_parts@%$extra_parts%g |
8035 | s%@extra_passes@%$extra_passes%g | |
8036 | s%@extra_programs@%$extra_programs%g | |
4f3ae93c | 8037 | s%@float_h_file@%$float_h_file%g |
cc1e60ea | 8038 | s%@gcc_config_arguments@%$gcc_config_arguments%g |
4f3ae93c | 8039 | s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g |
e2187d3b | 8040 | s%@libstdcxx_incdir@%$libstdcxx_incdir%g |
4f3ae93c | 8041 | s%@gcc_version@%$gcc_version%g |
8763704d | 8042 | s%@gcc_version_full@%$gcc_version_full%g |
4f3ae93c BK |
8043 | s%@gcc_version_trigger@%$gcc_version_trigger%g |
8044 | s%@host_exeext@%$host_exeext%g | |
861bb6c1 | 8045 | s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g |
861bb6c1 | 8046 | s%@host_xm_file_list@%$host_xm_file_list%g |
11642c3a ZW |
8047 | s%@host_xm_file@%$host_xm_file%g |
8048 | s%@host_xm_defines@%$host_xm_defines%g | |
4f3ae93c | 8049 | s%@install@%$install%g |
861bb6c1 | 8050 | s%@lang_options_files@%$lang_options_files%g |
4f3ae93c | 8051 | s%@lang_specs_files@%$lang_specs_files%g |
3103b7db | 8052 | s%@lang_tree_files@%$lang_tree_files%g |
861bb6c1 | 8053 | s%@local_prefix@%$local_prefix%g |
861bb6c1 | 8054 | s%@maybe_use_collect2@%$maybe_use_collect2%g |
4f3ae93c BK |
8055 | s%@md_file@%$md_file%g |
8056 | s%@objc_boehm_gc@%$objc_boehm_gc%g | |
8057 | s%@out_file@%$out_file%g | |
8058 | s%@out_object_file@%$out_object_file%g | |
861bb6c1 | 8059 | s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g |
e9a25f70 | 8060 | s%@symbolic_link@%$symbolic_link%g |
4f3ae93c BK |
8061 | s%@thread_file@%$thread_file%g |
8062 | s%@tm_file_list@%$tm_file_list%g | |
11642c3a ZW |
8063 | s%@tm_file@%$tm_file%g |
8064 | s%@tm_p_file_list@%$tm_p_file_list%g | |
8065 | s%@tm_p_file@%$tm_p_file%g | |
8066 | s%@xm_file@%$xm_file%g | |
3d9d2476 | 8067 | s%@xm_defines@%$xm_defines%g |
4f3ae93c | 8068 | s%@will_use_collect2@%$will_use_collect2%g |
aac69a49 NC |
8069 | s%@c_target_objs@%$c_target_objs%g |
8070 | s%@cxx_target_objs@%$cxx_target_objs%g | |
11642c3a | 8071 | s%@target_cpu_default@%$target_cpu_default%g |
861bb6c1 JL |
8072 | /@target_overrides@/r $target_overrides |
8073 | s%@target_overrides@%%g | |
8074 | /@host_overrides@/r $host_overrides | |
8075 | s%@host_overrides@%%g | |
8076 | s%@cross_defines@%$cross_defines%g | |
8077 | /@cross_overrides@/r $cross_overrides | |
8078 | s%@cross_overrides@%%g | |
8079 | /@build_overrides@/r $build_overrides | |
8080 | s%@build_overrides@%%g | |
8081 | /@language_fragments@/r $language_fragments | |
8082 | s%@language_fragments@%%g | |
8083 | /@language_hooks@/r $language_hooks | |
8084 | s%@language_hooks@%%g | |
8085 | ||
8086 | CEOF | |
8087 | EOF | |
8088 | ||
8089 | cat >> $CONFIG_STATUS <<\EOF | |
8090 | ||
8091 | # Split the substitutions into bite-sized pieces for seds with | |
8092 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
8093 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
8094 | ac_file=1 # Number of current file. | |
8095 | ac_beg=1 # First line for current file. | |
8096 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
8097 | ac_more_lines=: | |
8098 | ac_sed_cmds="" | |
8099 | while $ac_more_lines; do | |
8100 | if test $ac_beg -gt 1; then | |
8101 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
8102 | else | |
8103 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
8104 | fi | |
8105 | if test ! -s conftest.s$ac_file; then | |
8106 | ac_more_lines=false | |
8107 | rm -f conftest.s$ac_file | |
8108 | else | |
8109 | if test -z "$ac_sed_cmds"; then | |
8110 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
8111 | else | |
8112 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
8113 | fi | |
8114 | ac_file=`expr $ac_file + 1` | |
8115 | ac_beg=$ac_end | |
8116 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
8117 | fi | |
8118 | done | |
8119 | if test -z "$ac_sed_cmds"; then | |
8120 | ac_sed_cmds=cat | |
8121 | fi | |
8122 | EOF | |
8123 | ||
8124 | cat >> $CONFIG_STATUS <<EOF | |
8125 | ||
8126 | CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"} | |
8127 | EOF | |
8128 | cat >> $CONFIG_STATUS <<\EOF | |
8129 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
8130 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
8131 | case "$ac_file" in | |
8132 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
8133 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
8134 | *) ac_file_in="${ac_file}.in" ;; | |
8135 | esac | |
8136 | ||
8137 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
8138 | ||
8139 | # Remove last slash and all that follows it. Not all systems have dirname. | |
8140 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
8141 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
8142 | # The file is in a subdirectory. | |
8143 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
8144 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
8145 | # A "../" for each directory in $ac_dir_suffix. | |
8146 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
8147 | else | |
8148 | ac_dir_suffix= ac_dots= | |
8149 | fi | |
8150 | ||
8151 | case "$ac_given_srcdir" in | |
8152 | .) srcdir=. | |
8153 | if test -z "$ac_dots"; then top_srcdir=. | |
8154 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
8155 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
8156 | *) # Relative path. | |
8157 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
8158 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
8159 | esac | |
8160 | ||
861bb6c1 JL |
8161 | |
8162 | echo creating "$ac_file" | |
8163 | rm -f "$ac_file" | |
8164 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
8165 | case "$ac_file" in | |
8166 | *Makefile*) ac_comsub="1i\\ | |
8167 | # $configure_input" ;; | |
8168 | *) ac_comsub= ;; | |
8169 | esac | |
8170 | ||
8171 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
8172 | sed -e "$ac_comsub | |
8173 | s%@configure_input@%$configure_input%g | |
8174 | s%@srcdir@%$srcdir%g | |
8175 | s%@top_srcdir@%$top_srcdir%g | |
861bb6c1 JL |
8176 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
8177 | fi; done | |
8178 | rm -f conftest.s* | |
8179 | ||
8180 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
8181 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
8182 | # | |
8183 | # ac_d sets the value in "#define NAME VALUE" lines. | |
8184 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
8185 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
8186 | ac_dC='\3' | |
8187 | ac_dD='%g' | |
8188 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
8189 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
8190 | ac_uB='\([ ]\)%\1#\2define\3' | |
8191 | ac_uC=' ' | |
8192 | ac_uD='\4%g' | |
8193 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
8194 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
8195 | ac_eB='$%\1#\2define\3' | |
8196 | ac_eC=' ' | |
8197 | ac_eD='%g' | |
8198 | ||
8199 | if test "${CONFIG_HEADERS+set}" != set; then | |
8200 | EOF | |
8201 | cat >> $CONFIG_STATUS <<EOF | |
b7cb92ad | 8202 | CONFIG_HEADERS="auto-host.h:config.in" |
861bb6c1 JL |
8203 | EOF |
8204 | cat >> $CONFIG_STATUS <<\EOF | |
8205 | fi | |
8206 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
8207 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
8208 | case "$ac_file" in | |
8209 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
8210 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
8211 | *) ac_file_in="${ac_file}.in" ;; | |
8212 | esac | |
8213 | ||
8214 | echo creating $ac_file | |
8215 | ||
8216 | rm -f conftest.frag conftest.in conftest.out | |
8217 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
8218 | cat $ac_file_inputs > conftest.in | |
8219 | ||
8220 | EOF | |
8221 | ||
8222 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
8223 | # the proper values into config.h.in to produce config.h. And first: | |
8224 | # Protect against being on the right side of a sed subst in config.status. | |
8225 | # Protect against being in an unquoted here document in config.status. | |
8226 | rm -f conftest.vals | |
8227 | cat > conftest.hdr <<\EOF | |
8228 | s/[\\&%]/\\&/g | |
8229 | s%[\\$`]%\\&%g | |
8230 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
8231 | s%ac_d%ac_u%gp | |
8232 | s%ac_u%ac_e%gp | |
8233 | EOF | |
8234 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
8235 | rm -f conftest.hdr | |
8236 | ||
8237 | # This sed command replaces #undef with comments. This is necessary, for | |
8238 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
8239 | # on some systems where configure will not decide to define it. | |
8240 | cat >> conftest.vals <<\EOF | |
8241 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
8242 | EOF | |
8243 | ||
8244 | # Break up conftest.vals because some shells have a limit on | |
8245 | # the size of here documents, and old seds have small limits too. | |
8246 | ||
8247 | rm -f conftest.tail | |
8248 | while : | |
8249 | do | |
8250 | ac_lines=`grep -c . conftest.vals` | |
8251 | # grep -c gives empty output for an empty file on some AIX systems. | |
8252 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
8253 | # Write a limited-size here document to conftest.frag. | |
8254 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
8255 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
8256 | echo 'CEOF | |
8257 | sed -f conftest.frag conftest.in > conftest.out | |
8258 | rm -f conftest.in | |
8259 | mv conftest.out conftest.in | |
8260 | ' >> $CONFIG_STATUS | |
8261 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
8262 | rm -f conftest.vals | |
8263 | mv conftest.tail conftest.vals | |
8264 | done | |
8265 | rm -f conftest.vals | |
8266 | ||
8267 | cat >> $CONFIG_STATUS <<\EOF | |
8268 | rm -f conftest.frag conftest.h | |
8269 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
8270 | cat conftest.in >> conftest.h | |
8271 | rm -f conftest.in | |
8272 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
8273 | echo "$ac_file is unchanged" | |
8274 | rm -f conftest.h | |
8275 | else | |
8276 | # Remove last slash and all that follows it. Not all systems have dirname. | |
8277 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
8278 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
8279 | # The file is in a subdirectory. | |
8280 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
8281 | fi | |
8282 | rm -f $ac_file | |
8283 | mv conftest.h $ac_file | |
8284 | fi | |
8285 | fi; done | |
8286 | ||
ab87f8c8 JL |
8287 | EOF |
8288 | ||
8289 | cat >> $CONFIG_STATUS <<EOF | |
8290 | ac_sources="$nls_cv_header_libgt" | |
8291 | ac_dests="$nls_cv_header_intl" | |
8292 | EOF | |
8293 | ||
8294 | cat >> $CONFIG_STATUS <<\EOF | |
8295 | srcdir=$ac_given_srcdir | |
8296 | while test -n "$ac_sources"; do | |
8297 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
8298 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
8299 | ||
8300 | echo "linking $srcdir/$ac_source to $ac_dest" | |
8301 | ||
8302 | if test ! -r $srcdir/$ac_source; then | |
8303 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
8304 | fi | |
8305 | rm -f $ac_dest | |
8306 | ||
8307 | # Make relative symlinks. | |
8308 | # Remove last slash and all that follows it. Not all systems have dirname. | |
8309 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
8310 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
8311 | # The dest file is in a subdirectory. | |
8312 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
8313 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
8314 | # A "../" for each directory in $ac_dest_dir_suffix. | |
8315 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
8316 | else | |
8317 | ac_dest_dir_suffix= ac_dots= | |
8318 | fi | |
8319 | ||
8320 | case "$srcdir" in | |
8321 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
8322 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
8323 | esac | |
8324 | ||
8325 | # Make a symlink if possible; otherwise try a hard link. | |
8326 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
8327 | ln $srcdir/$ac_source $ac_dest; then : | |
8328 | else | |
8329 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
8330 | fi | |
8331 | done | |
861bb6c1 JL |
8332 | EOF |
8333 | cat >> $CONFIG_STATUS <<EOF | |
8334 | ||
ab87f8c8 | 8335 | |
861bb6c1 JL |
8336 | host='${host}' |
8337 | build='${build}' | |
8338 | target='${target}' | |
8339 | target_alias='${target_alias}' | |
8340 | srcdir='${srcdir}' | |
8341 | subdirs='${subdirs}' | |
861bb6c1 JL |
8342 | symbolic_link='${symbolic_link}' |
8343 | program_transform_set='${program_transform_set}' | |
8344 | program_transform_name='${program_transform_name}' | |
8345 | dep_host_xmake_file='${dep_host_xmake_file}' | |
8346 | host_xmake_file='${host_xmake_file}' | |
8347 | dep_tmake_file='${dep_tmake_file}' | |
8348 | tmake_file='${tmake_file}' | |
8349 | thread_file='${thread_file}' | |
cc1e60ea | 8350 | gcc_config_arguments='${gcc_config_arguments}' |
f1943b77 | 8351 | gcc_version='${gcc_version}' |
8763704d | 8352 | gcc_version_full='${gcc_version_full}' |
f1943b77 | 8353 | gcc_version_trigger='${gcc_version_trigger}' |
861bb6c1 JL |
8354 | local_prefix='${local_prefix}' |
8355 | build_install_headers_dir='${build_install_headers_dir}' | |
8356 | build_exeext='${build_exeext}' | |
6e26218f | 8357 | host_exeext='${host_exeext}' |
7ed46111 | 8358 | out_file='${out_file}' |
861bb6c1 JL |
8359 | gdb_needs_out_file_path='${gdb_needs_out_file_path}' |
8360 | SET_MAKE='${SET_MAKE}' | |
861bb6c1 JL |
8361 | target_list='${target_list}' |
8362 | target_overrides='${target_overrides}' | |
8363 | host_overrides='${host_overrides}' | |
8364 | cross_defines='${cross_defines}' | |
8365 | cross_overrides='${cross_overrides}' | |
8366 | build_overrides='${build_overrides}' | |
9fc9b82a | 8367 | cpp_install_dir='${cpp_install_dir}' |
861bb6c1 JL |
8368 | |
8369 | EOF | |
8370 | cat >> $CONFIG_STATUS <<\EOF | |
ab87f8c8 JL |
8371 | case "$CONFIG_FILES" in *po/Makefile.in*) |
8372 | sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile | |
8373 | esac | |
861bb6c1 | 8374 | |
861bb6c1 | 8375 | case x$CONFIG_HEADERS in |
b7cb92ad | 8376 | xauto-host.h:config.in) |
861bb6c1 JL |
8377 | echo > cstamp-h ;; |
8378 | esac | |
93cf819d BK |
8379 | # If the host supports symlinks, point stage[1234] at ../stage[1234] so |
8380 | # bootstrapping and the installation procedure can still use | |
8381 | # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks, | |
8382 | # FLAGS_TO_PASS has been modified to solve the problem there. | |
8383 | # This is virtually a duplicate of what happens in configure.lang; we do | |
8384 | # an extra check to make sure this only happens if ln -s can be used. | |
75bffa71 | 8385 | if test "$symbolic_link" = "ln -s"; then |
93cf819d | 8386 | for d in .. ${subdirs} ; do |
75bffa71 | 8387 | if test $d != ..; then |
4e8a434e BK |
8388 | STARTDIR=`pwd` |
8389 | cd $d | |
8390 | for t in stage1 stage2 stage3 stage4 include | |
8391 | do | |
8392 | rm -f $t | |
8393 | $symbolic_link ../$t $t 2>/dev/null | |
8394 | done | |
8395 | cd $STARTDIR | |
93cf819d BK |
8396 | fi |
8397 | done | |
8398 | else true ; fi | |
ab87f8c8 JL |
8399 | # Avoid having to add intl to our include paths. |
8400 | if test -f intl/libintl.h; then | |
8401 | echo creating libintl.h | |
8402 | echo '#include "intl/libintl.h"' >libintl.h | |
8403 | fi | |
861bb6c1 JL |
8404 | |
8405 | exit 0 | |
8406 | EOF | |
8407 | chmod +x $CONFIG_STATUS | |
8408 | rm -fr confdefs* $ac_clean_files | |
8409 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
8410 |