Commit | Line | Data |
---|---|---|
c906108c SS |
1 | #! /bin/sh |
2 | ||
3 | ||
4 | ||
5 | ||
6 | ||
7 | ||
8 | ||
9 | ||
10 | ||
11 | ||
12 | ||
13 | ||
14 | ||
15 | ||
16 | ||
17 | ||
18 | ||
19 | ||
20 | ||
21 | ||
22 | ||
23 | ||
24 | ||
25 | ||
26 | ||
27 | ||
28 | ||
29 | ||
30 | ||
31 | ||
32 | ||
33 | ||
34 | ||
35 | ||
36 | ||
37 | ||
38 | ||
39 | ||
40 | ||
41 | ||
42 | ||
43 | ||
44 | ||
45 | sim_inline="-DDEFAULT_INLINE=0" | |
46 | ||
47 | ||
48 | ||
49 | ||
50 | ||
51 | ||
52 | ||
53 | ||
54 | ||
55 | ||
56 | ||
57 | ||
58 | ||
59 | ||
60 | ||
61 | ||
62 | ||
63 | ||
64 | ||
65 | ||
66 | ||
67 | ||
68 | ||
69 | ||
70 | ||
71 | ||
72 | ||
73 | ||
74 | ||
75 | ||
76 | ||
77 | ||
78 | ||
79 | ||
80 | ||
81 | # This file is derived from `gettext.m4'. The difference is that the | |
82 | # included macros assume Cygnus-style source and build trees. | |
83 | ||
84 | # Macro to add for using GNU gettext. | |
85 | # Ulrich Drepper <drepper@cygnus.com>, 1995. | |
86 | # | |
87 | # This file file be copied and used freely without restrictions. It can | |
88 | # be used in projects which are not available under the GNU Public License | |
89 | # but which still want to provide support for the GNU gettext functionality. | |
90 | # Please note that the actual code is *not* freely available. | |
91 | ||
92 | # serial 3 | |
93 | ||
94 | ||
95 | ||
96 | ||
97 | ||
98 | # Search path for a program which passes the given test. | |
99 | # Ulrich Drepper <drepper@cygnus.com>, 1996. | |
100 | # | |
101 | # This file file be copied and used freely without restrictions. It can | |
102 | # be used in projects which are not available under the GNU Public License | |
103 | # but which still want to provide support for the GNU gettext functionality. | |
104 | # Please note that the actual code is *not* freely available. | |
105 | ||
106 | # serial 1 | |
107 | ||
108 | ||
109 | ||
110 | # Check whether LC_MESSAGES is available in <locale.h>. | |
111 | # Ulrich Drepper <drepper@cygnus.com>, 1995. | |
112 | # | |
113 | # This file file be copied and used freely without restrictions. It can | |
114 | # be used in projects which are not available under the GNU Public License | |
115 | # but which still want to provide support for the GNU gettext functionality. | |
116 | # Please note that the actual code is *not* freely available. | |
117 | ||
118 | # serial 1 | |
119 | ||
120 | ||
121 | ||
c906108c SS |
122 | |
123 | ||
124 | ||
125 | # Guess values for system-dependent variables and create Makefiles. | |
cd0fc7c3 | 126 | # Generated automatically using autoconf version 2.13 |
c906108c SS |
127 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
128 | # | |
129 | # This configure script is free software; the Free Software Foundation | |
130 | # gives unlimited permission to copy, distribute and modify it. | |
131 | ||
132 | # Defaults: | |
133 | ac_help= | |
134 | ac_default_prefix=/usr/local | |
135 | # Any additions from configure.in: | |
136 | ac_help="$ac_help | |
137 | --disable-nls do not use Native Language Support" | |
138 | ac_help="$ac_help | |
139 | --with-included-gettext use the GNU gettext library included here" | |
140 | ac_help="$ac_help | |
141 | --enable-maintainer-mode Enable developer functionality." | |
142 | ac_help="$ac_help | |
143 | --enable-sim-bswap Use Host specific BSWAP instruction." | |
144 | ac_help="$ac_help | |
145 | --enable-sim-cflags=opts Extra CFLAGS for use in building simulator" | |
146 | ac_help="$ac_help | |
147 | --enable-sim-debug=opts Enable debugging flags" | |
148 | ac_help="$ac_help | |
149 | --enable-sim-stdio Specify whether to use stdio for console input/output." | |
150 | ac_help="$ac_help | |
151 | --enable-sim-trace=opts Enable tracing flags" | |
152 | ac_help="$ac_help | |
153 | --enable-sim-profile=opts Enable profiling flags" | |
154 | ac_help="$ac_help | |
155 | --enable-sim-endian=endian Specify target byte endian orientation." | |
156 | ac_help="$ac_help | |
157 | --enable-sim-alignment=align Specify strict, nonstrict or forced alignment of memory accesses." | |
158 | ac_help="$ac_help | |
159 | --enable-sim-hostendian=end Specify host byte endian orientation." | |
160 | ac_help="$ac_help | |
161 | --enable-build-warnings[=LIST] Enable build-time compiler warnings" | |
162 | ac_help="$ac_help | |
163 | --enable-sim-reserved-bits Specify whether to check reserved bits in instruction." | |
164 | ac_help="$ac_help | |
165 | --enable-sim-bitsize=N Specify target bitsize (32 or 64)." | |
166 | ||
167 | # Initialize some variables set by options. | |
168 | # The variables have the same names as the options, with | |
169 | # dashes changed to underlines. | |
170 | build=NONE | |
171 | cache_file=./config.cache | |
172 | exec_prefix=NONE | |
173 | host=NONE | |
174 | no_create= | |
175 | nonopt=NONE | |
176 | no_recursion= | |
177 | prefix=NONE | |
178 | program_prefix=NONE | |
179 | program_suffix=NONE | |
180 | program_transform_name=s,x,x, | |
181 | silent= | |
182 | site= | |
cd0fc7c3 | 183 | sitefile= |
c906108c SS |
184 | srcdir= |
185 | target=NONE | |
186 | verbose= | |
187 | x_includes=NONE | |
188 | x_libraries=NONE | |
189 | bindir='${exec_prefix}/bin' | |
190 | sbindir='${exec_prefix}/sbin' | |
191 | libexecdir='${exec_prefix}/libexec' | |
192 | datadir='${prefix}/share' | |
193 | sysconfdir='${prefix}/etc' | |
194 | sharedstatedir='${prefix}/com' | |
195 | localstatedir='${prefix}/var' | |
196 | libdir='${exec_prefix}/lib' | |
197 | includedir='${prefix}/include' | |
198 | oldincludedir='/usr/include' | |
199 | infodir='${prefix}/info' | |
200 | mandir='${prefix}/man' | |
201 | ||
202 | # Initialize some other variables. | |
203 | subdirs= | |
204 | MFLAGS= MAKEFLAGS= | |
205 | SHELL=${CONFIG_SHELL-/bin/sh} | |
206 | # Maximum number of lines to put in a shell here document. | |
207 | ac_max_here_lines=12 | |
208 | ||
209 | ac_prev= | |
210 | for ac_option | |
211 | do | |
212 | ||
213 | # If the previous option needs an argument, assign it. | |
214 | if test -n "$ac_prev"; then | |
215 | eval "$ac_prev=\$ac_option" | |
216 | ac_prev= | |
217 | continue | |
218 | fi | |
219 | ||
220 | case "$ac_option" in | |
221 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
222 | *) ac_optarg= ;; | |
223 | esac | |
224 | ||
225 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
226 | ||
227 | case "$ac_option" in | |
228 | ||
229 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
230 | ac_prev=bindir ;; | |
231 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
232 | bindir="$ac_optarg" ;; | |
233 | ||
234 | -build | --build | --buil | --bui | --bu) | |
235 | ac_prev=build ;; | |
236 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
237 | build="$ac_optarg" ;; | |
238 | ||
239 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
240 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
241 | ac_prev=cache_file ;; | |
242 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
243 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
244 | cache_file="$ac_optarg" ;; | |
245 | ||
246 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
247 | ac_prev=datadir ;; | |
248 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
249 | | --da=*) | |
250 | datadir="$ac_optarg" ;; | |
251 | ||
252 | -disable-* | --disable-*) | |
253 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
254 | # Reject names that are not valid shell variable names. | |
255 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
256 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
257 | fi | |
258 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
259 | eval "enable_${ac_feature}=no" ;; | |
260 | ||
261 | -enable-* | --enable-*) | |
262 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
263 | # Reject names that are not valid shell variable names. | |
264 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
265 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
266 | fi | |
267 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
268 | case "$ac_option" in | |
269 | *=*) ;; | |
270 | *) ac_optarg=yes ;; | |
271 | esac | |
272 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
273 | ||
274 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
275 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
276 | | --exec | --exe | --ex) | |
277 | ac_prev=exec_prefix ;; | |
278 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
279 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
280 | | --exec=* | --exe=* | --ex=*) | |
281 | exec_prefix="$ac_optarg" ;; | |
282 | ||
283 | -gas | --gas | --ga | --g) | |
284 | # Obsolete; use --with-gas. | |
285 | with_gas=yes ;; | |
286 | ||
287 | -help | --help | --hel | --he) | |
288 | # Omit some internal or obsolete options to make the list less imposing. | |
289 | # This message is too long to be a string in the A/UX 3.1 sh. | |
290 | cat << EOF | |
291 | Usage: configure [options] [host] | |
292 | Options: [defaults in brackets after descriptions] | |
293 | Configuration: | |
294 | --cache-file=FILE cache test results in FILE | |
295 | --help print this message | |
296 | --no-create do not create output files | |
297 | --quiet, --silent do not print \`checking...' messages | |
cd0fc7c3 | 298 | --site-file=FILE use FILE as the site file |
c906108c SS |
299 | --version print the version of autoconf that created configure |
300 | Directory and file names: | |
301 | --prefix=PREFIX install architecture-independent files in PREFIX | |
302 | [$ac_default_prefix] | |
303 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
304 | [same as prefix] | |
305 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
306 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
307 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
308 | --datadir=DIR read-only architecture-independent data in DIR | |
309 | [PREFIX/share] | |
310 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
311 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
312 | [PREFIX/com] | |
313 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
314 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
315 | --includedir=DIR C header files in DIR [PREFIX/include] | |
316 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
317 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
318 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
319 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
320 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
321 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
322 | --program-transform-name=PROGRAM | |
323 | run sed PROGRAM on installed program names | |
324 | EOF | |
325 | cat << EOF | |
326 | Host type: | |
327 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
328 | --host=HOST configure for HOST [guessed] | |
329 | --target=TARGET configure for TARGET [TARGET=HOST] | |
330 | Features and packages: | |
331 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
332 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
333 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
334 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
335 | --x-includes=DIR X include files are in DIR | |
336 | --x-libraries=DIR X library files are in DIR | |
337 | EOF | |
338 | if test -n "$ac_help"; then | |
339 | echo "--enable and --with options recognized:$ac_help" | |
340 | fi | |
341 | exit 0 ;; | |
342 | ||
343 | -host | --host | --hos | --ho) | |
344 | ac_prev=host ;; | |
345 | -host=* | --host=* | --hos=* | --ho=*) | |
346 | host="$ac_optarg" ;; | |
347 | ||
348 | -includedir | --includedir | --includedi | --included | --include \ | |
349 | | --includ | --inclu | --incl | --inc) | |
350 | ac_prev=includedir ;; | |
351 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
352 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
353 | includedir="$ac_optarg" ;; | |
354 | ||
355 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
356 | ac_prev=infodir ;; | |
357 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
358 | infodir="$ac_optarg" ;; | |
359 | ||
360 | -libdir | --libdir | --libdi | --libd) | |
361 | ac_prev=libdir ;; | |
362 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
363 | libdir="$ac_optarg" ;; | |
364 | ||
365 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
366 | | --libexe | --libex | --libe) | |
367 | ac_prev=libexecdir ;; | |
368 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
369 | | --libexe=* | --libex=* | --libe=*) | |
370 | libexecdir="$ac_optarg" ;; | |
371 | ||
372 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
373 | | --localstate | --localstat | --localsta | --localst \ | |
374 | | --locals | --local | --loca | --loc | --lo) | |
375 | ac_prev=localstatedir ;; | |
376 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
377 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
378 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
379 | localstatedir="$ac_optarg" ;; | |
380 | ||
381 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
382 | ac_prev=mandir ;; | |
383 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
384 | mandir="$ac_optarg" ;; | |
385 | ||
386 | -nfp | --nfp | --nf) | |
387 | # Obsolete; use --without-fp. | |
388 | with_fp=no ;; | |
389 | ||
390 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
391 | | --no-cr | --no-c) | |
392 | no_create=yes ;; | |
393 | ||
394 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
395 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
396 | no_recursion=yes ;; | |
397 | ||
398 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
399 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
400 | | --oldin | --oldi | --old | --ol | --o) | |
401 | ac_prev=oldincludedir ;; | |
402 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
403 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
404 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
405 | oldincludedir="$ac_optarg" ;; | |
406 | ||
407 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
408 | ac_prev=prefix ;; | |
409 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
410 | prefix="$ac_optarg" ;; | |
411 | ||
412 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
413 | | --program-pre | --program-pr | --program-p) | |
414 | ac_prev=program_prefix ;; | |
415 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
416 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
417 | program_prefix="$ac_optarg" ;; | |
418 | ||
419 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
420 | | --program-suf | --program-su | --program-s) | |
421 | ac_prev=program_suffix ;; | |
422 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
423 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
424 | program_suffix="$ac_optarg" ;; | |
425 | ||
426 | -program-transform-name | --program-transform-name \ | |
427 | | --program-transform-nam | --program-transform-na \ | |
428 | | --program-transform-n | --program-transform- \ | |
429 | | --program-transform | --program-transfor \ | |
430 | | --program-transfo | --program-transf \ | |
431 | | --program-trans | --program-tran \ | |
432 | | --progr-tra | --program-tr | --program-t) | |
433 | ac_prev=program_transform_name ;; | |
434 | -program-transform-name=* | --program-transform-name=* \ | |
435 | | --program-transform-nam=* | --program-transform-na=* \ | |
436 | | --program-transform-n=* | --program-transform-=* \ | |
437 | | --program-transform=* | --program-transfor=* \ | |
438 | | --program-transfo=* | --program-transf=* \ | |
439 | | --program-trans=* | --program-tran=* \ | |
440 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
441 | program_transform_name="$ac_optarg" ;; | |
442 | ||
443 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
444 | | -silent | --silent | --silen | --sile | --sil) | |
445 | silent=yes ;; | |
446 | ||
447 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
448 | ac_prev=sbindir ;; | |
449 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
450 | | --sbi=* | --sb=*) | |
451 | sbindir="$ac_optarg" ;; | |
452 | ||
453 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
454 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
455 | | --sharedst | --shareds | --shared | --share | --shar \ | |
456 | | --sha | --sh) | |
457 | ac_prev=sharedstatedir ;; | |
458 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
459 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
460 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
461 | | --sha=* | --sh=*) | |
462 | sharedstatedir="$ac_optarg" ;; | |
463 | ||
464 | -site | --site | --sit) | |
465 | ac_prev=site ;; | |
466 | -site=* | --site=* | --sit=*) | |
467 | site="$ac_optarg" ;; | |
468 | ||
cd0fc7c3 SS |
469 | -site-file | --site-file | --site-fil | --site-fi | --site-f) |
470 | ac_prev=sitefile ;; | |
471 | -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) | |
472 | sitefile="$ac_optarg" ;; | |
473 | ||
c906108c SS |
474 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
475 | ac_prev=srcdir ;; | |
476 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
477 | srcdir="$ac_optarg" ;; | |
478 | ||
479 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
480 | | --syscon | --sysco | --sysc | --sys | --sy) | |
481 | ac_prev=sysconfdir ;; | |
482 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
483 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
484 | sysconfdir="$ac_optarg" ;; | |
485 | ||
486 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
487 | ac_prev=target ;; | |
488 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
489 | target="$ac_optarg" ;; | |
490 | ||
491 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
492 | verbose=yes ;; | |
493 | ||
494 | -version | --version | --versio | --versi | --vers) | |
cd0fc7c3 | 495 | echo "configure generated by autoconf version 2.13" |
c906108c SS |
496 | exit 0 ;; |
497 | ||
498 | -with-* | --with-*) | |
499 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
500 | # Reject names that are not valid shell variable names. | |
501 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
502 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
503 | fi | |
504 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
505 | case "$ac_option" in | |
506 | *=*) ;; | |
507 | *) ac_optarg=yes ;; | |
508 | esac | |
509 | eval "with_${ac_package}='$ac_optarg'" ;; | |
510 | ||
511 | -without-* | --without-*) | |
512 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
513 | # Reject names that are not valid shell variable names. | |
514 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
515 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
516 | fi | |
517 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
518 | eval "with_${ac_package}=no" ;; | |
519 | ||
520 | --x) | |
521 | # Obsolete; use --with-x. | |
522 | with_x=yes ;; | |
523 | ||
524 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
525 | | --x-incl | --x-inc | --x-in | --x-i) | |
526 | ac_prev=x_includes ;; | |
527 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
528 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
529 | x_includes="$ac_optarg" ;; | |
530 | ||
531 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
532 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
533 | ac_prev=x_libraries ;; | |
534 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
535 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
536 | x_libraries="$ac_optarg" ;; | |
537 | ||
538 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
539 | ;; | |
540 | ||
541 | *) | |
542 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
543 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
544 | fi | |
545 | if test "x$nonopt" != xNONE; then | |
546 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
547 | fi | |
548 | nonopt="$ac_option" | |
549 | ;; | |
550 | ||
551 | esac | |
552 | done | |
553 | ||
554 | if test -n "$ac_prev"; then | |
555 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
556 | fi | |
557 | ||
558 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
559 | ||
560 | # File descriptor usage: | |
561 | # 0 standard input | |
562 | # 1 file creation | |
563 | # 2 errors and warnings | |
564 | # 3 some systems may open it to /dev/tty | |
565 | # 4 used on the Kubota Titan | |
566 | # 6 checking for... messages and results | |
567 | # 5 compiler messages saved in config.log | |
568 | if test "$silent" = yes; then | |
569 | exec 6>/dev/null | |
570 | else | |
571 | exec 6>&1 | |
572 | fi | |
573 | exec 5>./config.log | |
574 | ||
575 | echo "\ | |
576 | This file contains any messages produced by compilers while | |
577 | running configure, to aid debugging if configure makes a mistake. | |
578 | " 1>&5 | |
579 | ||
580 | # Strip out --no-create and --no-recursion so they do not pile up. | |
581 | # Also quote any args containing shell metacharacters. | |
582 | ac_configure_args= | |
583 | for ac_arg | |
584 | do | |
585 | case "$ac_arg" in | |
586 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
587 | | --no-cr | --no-c) ;; | |
588 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
589 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
590 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
591 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
592 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
593 | esac | |
594 | done | |
595 | ||
596 | # NLS nuisances. | |
597 | # Only set these to C if already set. These must not be set unconditionally | |
598 | # because not all systems understand e.g. LANG=C (notably SCO). | |
599 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
600 | # Non-C LC_CTYPE values break the ctype check. | |
601 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
602 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
603 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
604 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
605 | ||
606 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
607 | rm -rf conftest* confdefs.h | |
608 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
609 | echo > confdefs.h | |
610 | ||
611 | # A filename unique to this package, relative to the directory that | |
612 | # configure is in, which we can look for to find out if srcdir is correct. | |
613 | ac_unique_file=Makefile.in | |
614 | ||
615 | # Find the source files, if location was not specified. | |
616 | if test -z "$srcdir"; then | |
617 | ac_srcdir_defaulted=yes | |
618 | # Try the directory containing this script, then its parent. | |
619 | ac_prog=$0 | |
620 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
621 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
622 | srcdir=$ac_confdir | |
623 | if test ! -r $srcdir/$ac_unique_file; then | |
624 | srcdir=.. | |
625 | fi | |
626 | else | |
627 | ac_srcdir_defaulted=no | |
628 | fi | |
629 | if test ! -r $srcdir/$ac_unique_file; then | |
630 | if test "$ac_srcdir_defaulted" = yes; then | |
631 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
632 | else | |
633 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
634 | fi | |
635 | fi | |
636 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
637 | ||
638 | # Prefer explicitly selected file to automatically selected ones. | |
cd0fc7c3 SS |
639 | if test -z "$sitefile"; then |
640 | if test -z "$CONFIG_SITE"; then | |
641 | if test "x$prefix" != xNONE; then | |
642 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
643 | else | |
644 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
645 | fi | |
c906108c | 646 | fi |
cd0fc7c3 SS |
647 | else |
648 | CONFIG_SITE="$sitefile" | |
c906108c SS |
649 | fi |
650 | for ac_site_file in $CONFIG_SITE; do | |
651 | if test -r "$ac_site_file"; then | |
652 | echo "loading site script $ac_site_file" | |
653 | . "$ac_site_file" | |
654 | fi | |
655 | done | |
656 | ||
657 | if test -r "$cache_file"; then | |
658 | echo "loading cache $cache_file" | |
659 | . $cache_file | |
660 | else | |
661 | echo "creating cache $cache_file" | |
662 | > $cache_file | |
663 | fi | |
664 | ||
665 | ac_ext=c | |
666 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
667 | ac_cpp='$CPP $CPPFLAGS' | |
668 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
669 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
670 | cross_compiling=$ac_cv_prog_cc_cross | |
671 | ||
672 | ac_exeext= | |
673 | ac_objext=o | |
674 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
675 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
676 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
677 | ac_n= ac_c=' | |
678 | ' ac_t=' ' | |
679 | else | |
680 | ac_n=-n ac_c= ac_t= | |
681 | fi | |
682 | else | |
683 | ac_n= ac_c='\c' ac_t= | |
684 | fi | |
685 | ||
686 | ||
687 | ||
688 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
cd0fc7c3 | 689 | echo "configure:690: checking how to run the C preprocessor" >&5 |
c906108c SS |
690 | # On Suns, sometimes $CPP names a directory. |
691 | if test -n "$CPP" && test -d "$CPP"; then | |
692 | CPP= | |
693 | fi | |
694 | if test -z "$CPP"; then | |
695 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
696 | echo $ac_n "(cached) $ac_c" 1>&6 | |
697 | else | |
698 | # This must be in double quotes, not single quotes, because CPP may get | |
699 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
700 | CPP="${CC-cc} -E" | |
701 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
702 | # not just through cpp. | |
703 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 704 | #line 705 "configure" |
c906108c SS |
705 | #include "confdefs.h" |
706 | #include <assert.h> | |
707 | Syntax Error | |
708 | EOF | |
709 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
cd0fc7c3 | 710 | { (eval echo configure:711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
711 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
712 | if test -z "$ac_err"; then | |
713 | : | |
714 | else | |
715 | echo "$ac_err" >&5 | |
716 | echo "configure: failed program was:" >&5 | |
717 | cat conftest.$ac_ext >&5 | |
718 | rm -rf conftest* | |
719 | CPP="${CC-cc} -E -traditional-cpp" | |
720 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 721 | #line 722 "configure" |
c906108c SS |
722 | #include "confdefs.h" |
723 | #include <assert.h> | |
724 | Syntax Error | |
725 | EOF | |
726 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
cd0fc7c3 | 727 | { (eval echo configure:728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
728 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
729 | if test -z "$ac_err"; then | |
730 | : | |
731 | else | |
732 | echo "$ac_err" >&5 | |
733 | echo "configure: failed program was:" >&5 | |
734 | cat conftest.$ac_ext >&5 | |
735 | rm -rf conftest* | |
736 | CPP="${CC-cc} -nologo -E" | |
737 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 738 | #line 739 "configure" |
c906108c SS |
739 | #include "confdefs.h" |
740 | #include <assert.h> | |
741 | Syntax Error | |
742 | EOF | |
743 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
cd0fc7c3 | 744 | { (eval echo configure:745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
745 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
746 | if test -z "$ac_err"; then | |
747 | : | |
748 | else | |
749 | echo "$ac_err" >&5 | |
750 | echo "configure: failed program was:" >&5 | |
751 | cat conftest.$ac_ext >&5 | |
752 | rm -rf conftest* | |
753 | CPP=/lib/cpp | |
754 | fi | |
755 | rm -f conftest* | |
756 | fi | |
757 | rm -f conftest* | |
758 | fi | |
759 | rm -f conftest* | |
760 | ac_cv_prog_CPP="$CPP" | |
761 | fi | |
762 | CPP="$ac_cv_prog_CPP" | |
763 | else | |
764 | ac_cv_prog_CPP="$CPP" | |
765 | fi | |
766 | echo "$ac_t""$CPP" 1>&6 | |
767 | ||
768 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
cd0fc7c3 | 769 | echo "configure:770: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
c906108c SS |
770 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
771 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
772 | echo $ac_n "(cached) $ac_c" 1>&6 | |
773 | else | |
774 | cat > conftestmake <<\EOF | |
775 | all: | |
776 | @echo 'ac_maketemp="${MAKE}"' | |
777 | EOF | |
778 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
779 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
780 | if test -n "$ac_maketemp"; then | |
781 | eval ac_cv_prog_make_${ac_make}_set=yes | |
782 | else | |
783 | eval ac_cv_prog_make_${ac_make}_set=no | |
784 | fi | |
785 | rm -f conftestmake | |
786 | fi | |
787 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
788 | echo "$ac_t""yes" 1>&6 | |
789 | SET_MAKE= | |
790 | else | |
791 | echo "$ac_t""no" 1>&6 | |
792 | SET_MAKE="MAKE=${MAKE-make}" | |
793 | fi | |
794 | ||
795 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 | |
cd0fc7c3 | 796 | echo "configure:797: checking for POSIXized ISC" >&5 |
c906108c SS |
797 | if test -d /etc/conf/kconfig.d && |
798 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
799 | then | |
800 | echo "$ac_t""yes" 1>&6 | |
801 | ISC=yes # If later tests want to check for ISC. | |
802 | cat >> confdefs.h <<\EOF | |
803 | #define _POSIX_SOURCE 1 | |
804 | EOF | |
805 | ||
806 | if test "$GCC" = yes; then | |
807 | CC="$CC -posix" | |
808 | else | |
809 | CC="$CC -Xp" | |
810 | fi | |
811 | else | |
812 | echo "$ac_t""no" 1>&6 | |
813 | ISC= | |
814 | fi | |
815 | ||
816 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
cd0fc7c3 | 817 | echo "configure:818: checking for ANSI C header files" >&5 |
c906108c SS |
818 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
819 | echo $ac_n "(cached) $ac_c" 1>&6 | |
820 | else | |
821 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 822 | #line 823 "configure" |
c906108c SS |
823 | #include "confdefs.h" |
824 | #include <stdlib.h> | |
825 | #include <stdarg.h> | |
826 | #include <string.h> | |
827 | #include <float.h> | |
828 | EOF | |
829 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
cd0fc7c3 | 830 | { (eval echo configure:831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
831 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
832 | if test -z "$ac_err"; then | |
833 | rm -rf conftest* | |
834 | ac_cv_header_stdc=yes | |
835 | else | |
836 | echo "$ac_err" >&5 | |
837 | echo "configure: failed program was:" >&5 | |
838 | cat conftest.$ac_ext >&5 | |
839 | rm -rf conftest* | |
840 | ac_cv_header_stdc=no | |
841 | fi | |
842 | rm -f conftest* | |
843 | ||
844 | if test $ac_cv_header_stdc = yes; then | |
845 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
846 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 847 | #line 848 "configure" |
c906108c SS |
848 | #include "confdefs.h" |
849 | #include <string.h> | |
850 | EOF | |
851 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
852 | egrep "memchr" >/dev/null 2>&1; then | |
853 | : | |
854 | else | |
855 | rm -rf conftest* | |
856 | ac_cv_header_stdc=no | |
857 | fi | |
858 | rm -f conftest* | |
859 | ||
860 | fi | |
861 | ||
862 | if test $ac_cv_header_stdc = yes; then | |
863 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
864 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 865 | #line 866 "configure" |
c906108c SS |
866 | #include "confdefs.h" |
867 | #include <stdlib.h> | |
868 | EOF | |
869 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
870 | egrep "free" >/dev/null 2>&1; then | |
871 | : | |
872 | else | |
873 | rm -rf conftest* | |
874 | ac_cv_header_stdc=no | |
875 | fi | |
876 | rm -f conftest* | |
877 | ||
878 | fi | |
879 | ||
880 | if test $ac_cv_header_stdc = yes; then | |
881 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
882 | if test "$cross_compiling" = yes; then | |
883 | : | |
884 | else | |
885 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 886 | #line 887 "configure" |
c906108c SS |
887 | #include "confdefs.h" |
888 | #include <ctype.h> | |
889 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
890 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
891 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
892 | int main () { int i; for (i = 0; i < 256; i++) | |
893 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
894 | exit (0); } | |
895 | ||
896 | EOF | |
cd0fc7c3 | 897 | if { (eval echo configure:898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
898 | then |
899 | : | |
900 | else | |
901 | echo "configure: failed program was:" >&5 | |
902 | cat conftest.$ac_ext >&5 | |
903 | rm -fr conftest* | |
904 | ac_cv_header_stdc=no | |
905 | fi | |
906 | rm -fr conftest* | |
907 | fi | |
908 | ||
909 | fi | |
910 | fi | |
911 | ||
912 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
913 | if test $ac_cv_header_stdc = yes; then | |
914 | cat >> confdefs.h <<\EOF | |
915 | #define STDC_HEADERS 1 | |
916 | EOF | |
917 | ||
918 | fi | |
919 | ||
920 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
cd0fc7c3 | 921 | echo "configure:922: checking for working const" >&5 |
c906108c SS |
922 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
923 | echo $ac_n "(cached) $ac_c" 1>&6 | |
924 | else | |
925 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 926 | #line 927 "configure" |
c906108c SS |
927 | #include "confdefs.h" |
928 | ||
929 | int main() { | |
930 | ||
931 | /* Ultrix mips cc rejects this. */ | |
932 | typedef int charset[2]; const charset x; | |
933 | /* SunOS 4.1.1 cc rejects this. */ | |
934 | char const *const *ccp; | |
935 | char **p; | |
936 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
937 | struct point {int x, y;}; | |
938 | static struct point const zero = {0,0}; | |
939 | /* AIX XL C 1.02.0.0 rejects this. | |
940 | It does not let you subtract one const X* pointer from another in an arm | |
941 | of an if-expression whose if-part is not a constant expression */ | |
942 | const char *g = "string"; | |
943 | ccp = &g + (g ? g-g : 0); | |
944 | /* HPUX 7.0 cc rejects these. */ | |
945 | ++ccp; | |
946 | p = (char**) ccp; | |
947 | ccp = (char const *const *) p; | |
948 | { /* SCO 3.2v4 cc rejects this. */ | |
949 | char *t; | |
950 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
951 | ||
952 | *t++ = 0; | |
953 | } | |
954 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
955 | int x[] = {25, 17}; | |
956 | const int *foo = &x[0]; | |
957 | ++foo; | |
958 | } | |
959 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
960 | typedef const int *iptr; | |
961 | iptr p = 0; | |
962 | ++p; | |
963 | } | |
964 | { /* AIX XL C 1.02.0.0 rejects this saying | |
965 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
966 | struct s { int j; const int *ap[3]; }; | |
967 | struct s *b; b->j = 5; | |
968 | } | |
969 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
970 | const int foo = 10; | |
971 | } | |
972 | ||
973 | ; return 0; } | |
974 | EOF | |
cd0fc7c3 | 975 | if { (eval echo configure:976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
976 | rm -rf conftest* |
977 | ac_cv_c_const=yes | |
978 | else | |
979 | echo "configure: failed program was:" >&5 | |
980 | cat conftest.$ac_ext >&5 | |
981 | rm -rf conftest* | |
982 | ac_cv_c_const=no | |
983 | fi | |
984 | rm -f conftest* | |
985 | fi | |
986 | ||
987 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
988 | if test $ac_cv_c_const = no; then | |
989 | cat >> confdefs.h <<\EOF | |
990 | #define const | |
991 | EOF | |
992 | ||
993 | fi | |
994 | ||
995 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
cd0fc7c3 | 996 | echo "configure:997: checking for inline" >&5 |
c906108c SS |
997 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
998 | echo $ac_n "(cached) $ac_c" 1>&6 | |
999 | else | |
1000 | ac_cv_c_inline=no | |
1001 | for ac_kw in inline __inline__ __inline; do | |
1002 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 1003 | #line 1004 "configure" |
c906108c SS |
1004 | #include "confdefs.h" |
1005 | ||
1006 | int main() { | |
1007 | } $ac_kw foo() { | |
1008 | ; return 0; } | |
1009 | EOF | |
cd0fc7c3 | 1010 | if { (eval echo configure:1011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1011 | rm -rf conftest* |
1012 | ac_cv_c_inline=$ac_kw; break | |
1013 | else | |
1014 | echo "configure: failed program was:" >&5 | |
1015 | cat conftest.$ac_ext >&5 | |
1016 | fi | |
1017 | rm -f conftest* | |
1018 | done | |
1019 | ||
1020 | fi | |
1021 | ||
1022 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1023 | case "$ac_cv_c_inline" in | |
1024 | inline | yes) ;; | |
1025 | no) cat >> confdefs.h <<\EOF | |
1026 | #define inline | |
1027 | EOF | |
1028 | ;; | |
1029 | *) cat >> confdefs.h <<EOF | |
1030 | #define inline $ac_cv_c_inline | |
1031 | EOF | |
1032 | ;; | |
1033 | esac | |
1034 | ||
1035 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
cd0fc7c3 | 1036 | echo "configure:1037: checking for off_t" >&5 |
c906108c SS |
1037 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
1038 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1039 | else | |
1040 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 1041 | #line 1042 "configure" |
c906108c SS |
1042 | #include "confdefs.h" |
1043 | #include <sys/types.h> | |
1044 | #if STDC_HEADERS | |
1045 | #include <stdlib.h> | |
1046 | #include <stddef.h> | |
1047 | #endif | |
1048 | EOF | |
1049 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
cd0fc7c3 | 1050 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
c906108c SS |
1051 | rm -rf conftest* |
1052 | ac_cv_type_off_t=yes | |
1053 | else | |
1054 | rm -rf conftest* | |
1055 | ac_cv_type_off_t=no | |
1056 | fi | |
1057 | rm -f conftest* | |
1058 | ||
1059 | fi | |
1060 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
1061 | if test $ac_cv_type_off_t = no; then | |
1062 | cat >> confdefs.h <<\EOF | |
1063 | #define off_t long | |
1064 | EOF | |
1065 | ||
1066 | fi | |
1067 | ||
1068 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
cd0fc7c3 | 1069 | echo "configure:1070: checking for size_t" >&5 |
c906108c SS |
1070 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
1071 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1072 | else | |
1073 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 1074 | #line 1075 "configure" |
c906108c SS |
1075 | #include "confdefs.h" |
1076 | #include <sys/types.h> | |
1077 | #if STDC_HEADERS | |
1078 | #include <stdlib.h> | |
1079 | #include <stddef.h> | |
1080 | #endif | |
1081 | EOF | |
1082 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
cd0fc7c3 | 1083 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
c906108c SS |
1084 | rm -rf conftest* |
1085 | ac_cv_type_size_t=yes | |
1086 | else | |
1087 | rm -rf conftest* | |
1088 | ac_cv_type_size_t=no | |
1089 | fi | |
1090 | rm -f conftest* | |
1091 | ||
1092 | fi | |
1093 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
1094 | if test $ac_cv_type_size_t = no; then | |
1095 | cat >> confdefs.h <<\EOF | |
1096 | #define size_t unsigned | |
1097 | EOF | |
1098 | ||
1099 | fi | |
1100 | ||
1101 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1102 | # for constant arguments. Useless! | |
1103 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
cd0fc7c3 | 1104 | echo "configure:1105: checking for working alloca.h" >&5 |
c906108c SS |
1105 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1106 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1107 | else | |
1108 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 1109 | #line 1110 "configure" |
c906108c SS |
1110 | #include "confdefs.h" |
1111 | #include <alloca.h> | |
1112 | int main() { | |
1113 | char *p = alloca(2 * sizeof(int)); | |
1114 | ; return 0; } | |
1115 | EOF | |
cd0fc7c3 | 1116 | if { (eval echo configure:1117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1117 | rm -rf conftest* |
1118 | ac_cv_header_alloca_h=yes | |
1119 | else | |
1120 | echo "configure: failed program was:" >&5 | |
1121 | cat conftest.$ac_ext >&5 | |
1122 | rm -rf conftest* | |
1123 | ac_cv_header_alloca_h=no | |
1124 | fi | |
1125 | rm -f conftest* | |
1126 | fi | |
1127 | ||
1128 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
1129 | if test $ac_cv_header_alloca_h = yes; then | |
1130 | cat >> confdefs.h <<\EOF | |
1131 | #define HAVE_ALLOCA_H 1 | |
1132 | EOF | |
1133 | ||
1134 | fi | |
1135 | ||
1136 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
cd0fc7c3 | 1137 | echo "configure:1138: checking for alloca" >&5 |
c906108c SS |
1138 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
1139 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1140 | else | |
1141 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 1142 | #line 1143 "configure" |
c906108c SS |
1143 | #include "confdefs.h" |
1144 | ||
1145 | #ifdef __GNUC__ | |
1146 | # define alloca __builtin_alloca | |
1147 | #else | |
1148 | # ifdef _MSC_VER | |
1149 | # include <malloc.h> | |
1150 | # define alloca _alloca | |
1151 | # else | |
1152 | # if HAVE_ALLOCA_H | |
1153 | # include <alloca.h> | |
1154 | # else | |
1155 | # ifdef _AIX | |
1156 | #pragma alloca | |
1157 | # else | |
1158 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1159 | char *alloca (); | |
1160 | # endif | |
1161 | # endif | |
1162 | # endif | |
1163 | # endif | |
1164 | #endif | |
1165 | ||
1166 | int main() { | |
1167 | char *p = (char *) alloca(1); | |
1168 | ; return 0; } | |
1169 | EOF | |
cd0fc7c3 | 1170 | if { (eval echo configure:1171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1171 | rm -rf conftest* |
1172 | ac_cv_func_alloca_works=yes | |
1173 | else | |
1174 | echo "configure: failed program was:" >&5 | |
1175 | cat conftest.$ac_ext >&5 | |
1176 | rm -rf conftest* | |
1177 | ac_cv_func_alloca_works=no | |
1178 | fi | |
1179 | rm -f conftest* | |
1180 | fi | |
1181 | ||
1182 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
1183 | if test $ac_cv_func_alloca_works = yes; then | |
1184 | cat >> confdefs.h <<\EOF | |
1185 | #define HAVE_ALLOCA 1 | |
1186 | EOF | |
1187 | ||
1188 | fi | |
1189 | ||
1190 | if test $ac_cv_func_alloca_works = no; then | |
1191 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1192 | # that cause trouble. Some versions do not even contain alloca or | |
1193 | # contain a buggy version. If you still want to use their alloca, | |
1194 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
1195 | ALLOCA=alloca.${ac_objext} | |
1196 | cat >> confdefs.h <<\EOF | |
1197 | #define C_ALLOCA 1 | |
1198 | EOF | |
1199 | ||
1200 | ||
1201 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
cd0fc7c3 | 1202 | echo "configure:1203: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
1203 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1204 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1205 | else | |
1206 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 1207 | #line 1208 "configure" |
c906108c SS |
1208 | #include "confdefs.h" |
1209 | #if defined(CRAY) && ! defined(CRAY2) | |
1210 | webecray | |
1211 | #else | |
1212 | wenotbecray | |
1213 | #endif | |
1214 | ||
1215 | EOF | |
1216 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1217 | egrep "webecray" >/dev/null 2>&1; then | |
1218 | rm -rf conftest* | |
1219 | ac_cv_os_cray=yes | |
1220 | else | |
1221 | rm -rf conftest* | |
1222 | ac_cv_os_cray=no | |
1223 | fi | |
1224 | rm -f conftest* | |
1225 | ||
1226 | fi | |
1227 | ||
1228 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
1229 | if test $ac_cv_os_cray = yes; then | |
1230 | for ac_func in _getb67 GETB67 getb67; do | |
1231 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
cd0fc7c3 | 1232 | echo "configure:1233: checking for $ac_func" >&5 |
c906108c SS |
1233 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1234 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1235 | else | |
1236 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 1237 | #line 1238 "configure" |
c906108c SS |
1238 | #include "confdefs.h" |
1239 | /* System header to define __stub macros and hopefully few prototypes, | |
1240 | which can conflict with char $ac_func(); below. */ | |
1241 | #include <assert.h> | |
1242 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1243 | /* We use char because int might match the return type of a gcc2 | |
1244 | builtin and then its argument prototype would still apply. */ | |
1245 | char $ac_func(); | |
1246 | ||
1247 | int main() { | |
1248 | ||
1249 | /* The GNU C library defines this for functions which it implements | |
1250 | to always fail with ENOSYS. Some functions are actually named | |
1251 | something starting with __ and the normal name is an alias. */ | |
1252 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1253 | choke me | |
1254 | #else | |
1255 | $ac_func(); | |
1256 | #endif | |
1257 | ||
1258 | ; return 0; } | |
1259 | EOF | |
cd0fc7c3 | 1260 | if { (eval echo configure:1261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1261 | rm -rf conftest* |
1262 | eval "ac_cv_func_$ac_func=yes" | |
1263 | else | |
1264 | echo "configure: failed program was:" >&5 | |
1265 | cat conftest.$ac_ext >&5 | |
1266 | rm -rf conftest* | |
1267 | eval "ac_cv_func_$ac_func=no" | |
1268 | fi | |
1269 | rm -f conftest* | |
1270 | fi | |
1271 | ||
1272 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1273 | echo "$ac_t""yes" 1>&6 | |
1274 | cat >> confdefs.h <<EOF | |
1275 | #define CRAY_STACKSEG_END $ac_func | |
1276 | EOF | |
1277 | ||
1278 | break | |
1279 | else | |
1280 | echo "$ac_t""no" 1>&6 | |
1281 | fi | |
1282 | ||
1283 | done | |
1284 | fi | |
1285 | ||
1286 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
cd0fc7c3 | 1287 | echo "configure:1288: checking stack direction for C alloca" >&5 |
c906108c SS |
1288 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
1289 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1290 | else | |
1291 | if test "$cross_compiling" = yes; then | |
1292 | ac_cv_c_stack_direction=0 | |
1293 | else | |
1294 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 1295 | #line 1296 "configure" |
c906108c SS |
1296 | #include "confdefs.h" |
1297 | find_stack_direction () | |
1298 | { | |
1299 | static char *addr = 0; | |
1300 | auto char dummy; | |
1301 | if (addr == 0) | |
1302 | { | |
1303 | addr = &dummy; | |
1304 | return find_stack_direction (); | |
1305 | } | |
1306 | else | |
1307 | return (&dummy > addr) ? 1 : -1; | |
1308 | } | |
1309 | main () | |
1310 | { | |
1311 | exit (find_stack_direction() < 0); | |
1312 | } | |
1313 | EOF | |
cd0fc7c3 | 1314 | if { (eval echo configure:1315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1315 | then |
1316 | ac_cv_c_stack_direction=1 | |
1317 | else | |
1318 | echo "configure: failed program was:" >&5 | |
1319 | cat conftest.$ac_ext >&5 | |
1320 | rm -fr conftest* | |
1321 | ac_cv_c_stack_direction=-1 | |
1322 | fi | |
1323 | rm -fr conftest* | |
1324 | fi | |
1325 | ||
1326 | fi | |
1327 | ||
1328 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
1329 | cat >> confdefs.h <<EOF | |
1330 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1331 | EOF | |
1332 | ||
1333 | fi | |
1334 | ||
1335 | for ac_hdr in unistd.h | |
1336 | do | |
1337 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1338 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
cd0fc7c3 | 1339 | echo "configure:1340: checking for $ac_hdr" >&5 |
c906108c SS |
1340 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1341 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1342 | else | |
1343 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 1344 | #line 1345 "configure" |
c906108c SS |
1345 | #include "confdefs.h" |
1346 | #include <$ac_hdr> | |
1347 | EOF | |
1348 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
cd0fc7c3 | 1349 | { (eval echo configure:1350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1350 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1351 | if test -z "$ac_err"; then | |
1352 | rm -rf conftest* | |
1353 | eval "ac_cv_header_$ac_safe=yes" | |
1354 | else | |
1355 | echo "$ac_err" >&5 | |
1356 | echo "configure: failed program was:" >&5 | |
1357 | cat conftest.$ac_ext >&5 | |
1358 | rm -rf conftest* | |
1359 | eval "ac_cv_header_$ac_safe=no" | |
1360 | fi | |
1361 | rm -f conftest* | |
1362 | fi | |
1363 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1364 | echo "$ac_t""yes" 1>&6 | |
1365 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1366 | cat >> confdefs.h <<EOF | |
1367 | #define $ac_tr_hdr 1 | |
1368 | EOF | |
1369 | ||
1370 | else | |
1371 | echo "$ac_t""no" 1>&6 | |
1372 | fi | |
1373 | done | |
1374 | ||
1375 | for ac_func in getpagesize | |
1376 | do | |
1377 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
cd0fc7c3 | 1378 | echo "configure:1379: checking for $ac_func" >&5 |
c906108c SS |
1379 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1380 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1381 | else | |
1382 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 1383 | #line 1384 "configure" |
c906108c SS |
1384 | #include "confdefs.h" |
1385 | /* System header to define __stub macros and hopefully few prototypes, | |
1386 | which can conflict with char $ac_func(); below. */ | |
1387 | #include <assert.h> | |
1388 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1389 | /* We use char because int might match the return type of a gcc2 | |
1390 | builtin and then its argument prototype would still apply. */ | |
1391 | char $ac_func(); | |
1392 | ||
1393 | int main() { | |
1394 | ||
1395 | /* The GNU C library defines this for functions which it implements | |
1396 | to always fail with ENOSYS. Some functions are actually named | |
1397 | something starting with __ and the normal name is an alias. */ | |
1398 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1399 | choke me | |
1400 | #else | |
1401 | $ac_func(); | |
1402 | #endif | |
1403 | ||
1404 | ; return 0; } | |
1405 | EOF | |
cd0fc7c3 | 1406 | if { (eval echo configure:1407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1407 | rm -rf conftest* |
1408 | eval "ac_cv_func_$ac_func=yes" | |
1409 | else | |
1410 | echo "configure: failed program was:" >&5 | |
1411 | cat conftest.$ac_ext >&5 | |
1412 | rm -rf conftest* | |
1413 | eval "ac_cv_func_$ac_func=no" | |
1414 | fi | |
1415 | rm -f conftest* | |
1416 | fi | |
1417 | ||
1418 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1419 | echo "$ac_t""yes" 1>&6 | |
1420 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1421 | cat >> confdefs.h <<EOF | |
1422 | #define $ac_tr_func 1 | |
1423 | EOF | |
1424 | ||
1425 | else | |
1426 | echo "$ac_t""no" 1>&6 | |
1427 | fi | |
1428 | done | |
1429 | ||
1430 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
cd0fc7c3 | 1431 | echo "configure:1432: checking for working mmap" >&5 |
c906108c SS |
1432 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
1433 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1434 | else | |
1435 | if test "$cross_compiling" = yes; then | |
1436 | ac_cv_func_mmap_fixed_mapped=no | |
1437 | else | |
1438 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 1439 | #line 1440 "configure" |
c906108c SS |
1440 | #include "confdefs.h" |
1441 | ||
1442 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
1443 | Here is a matrix of mmap possibilities: | |
1444 | mmap private not fixed | |
1445 | mmap private fixed at somewhere currently unmapped | |
1446 | mmap private fixed at somewhere already mapped | |
1447 | mmap shared not fixed | |
1448 | mmap shared fixed at somewhere currently unmapped | |
1449 | mmap shared fixed at somewhere already mapped | |
1450 | For private mappings, we should verify that changes cannot be read() | |
1451 | back from the file, nor mmap's back from the file at a different | |
1452 | address. (There have been systems where private was not correctly | |
1453 | implemented like the infamous i386 svr4.0, and systems where the | |
1454 | VM page cache was not coherent with the filesystem buffer cache | |
1455 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1456 | For shared mappings, we should conversely verify that changes get | |
1457 | propogated back to all the places they're supposed to be. | |
1458 | ||
1459 | Grep wants private fixed already mapped. | |
1460 | The main things grep needs to know about mmap are: | |
1461 | * does it exist and is it safe to write into the mmap'd area | |
1462 | * how to use it (BSD variants) */ | |
1463 | #include <sys/types.h> | |
1464 | #include <fcntl.h> | |
1465 | #include <sys/mman.h> | |
1466 | ||
1467 | /* This mess was copied from the GNU getpagesize.h. */ | |
1468 | #ifndef HAVE_GETPAGESIZE | |
1469 | # ifdef HAVE_UNISTD_H | |
1470 | # include <unistd.h> | |
1471 | # endif | |
1472 | ||
1473 | /* Assume that all systems that can run configure have sys/param.h. */ | |
1474 | # ifndef HAVE_SYS_PARAM_H | |
1475 | # define HAVE_SYS_PARAM_H 1 | |
1476 | # endif | |
1477 | ||
1478 | # ifdef _SC_PAGESIZE | |
1479 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
1480 | # else /* no _SC_PAGESIZE */ | |
1481 | # ifdef HAVE_SYS_PARAM_H | |
1482 | # include <sys/param.h> | |
1483 | # ifdef EXEC_PAGESIZE | |
1484 | # define getpagesize() EXEC_PAGESIZE | |
1485 | # else /* no EXEC_PAGESIZE */ | |
1486 | # ifdef NBPG | |
1487 | # define getpagesize() NBPG * CLSIZE | |
1488 | # ifndef CLSIZE | |
1489 | # define CLSIZE 1 | |
1490 | # endif /* no CLSIZE */ | |
1491 | # else /* no NBPG */ | |
1492 | # ifdef NBPC | |
1493 | # define getpagesize() NBPC | |
1494 | # else /* no NBPC */ | |
1495 | # ifdef PAGESIZE | |
1496 | # define getpagesize() PAGESIZE | |
1497 | # endif /* PAGESIZE */ | |
1498 | # endif /* no NBPC */ | |
1499 | # endif /* no NBPG */ | |
1500 | # endif /* no EXEC_PAGESIZE */ | |
1501 | # else /* no HAVE_SYS_PARAM_H */ | |
1502 | # define getpagesize() 8192 /* punt totally */ | |
1503 | # endif /* no HAVE_SYS_PARAM_H */ | |
1504 | # endif /* no _SC_PAGESIZE */ | |
1505 | ||
1506 | #endif /* no HAVE_GETPAGESIZE */ | |
1507 | ||
1508 | #ifdef __cplusplus | |
1509 | extern "C" { void *malloc(unsigned); } | |
1510 | #else | |
1511 | char *malloc(); | |
1512 | #endif | |
1513 | ||
1514 | int | |
1515 | main() | |
1516 | { | |
1517 | char *data, *data2, *data3; | |
1518 | int i, pagesize; | |
1519 | int fd; | |
1520 | ||
1521 | pagesize = getpagesize(); | |
1522 | ||
1523 | /* | |
1524 | * First, make a file with some known garbage in it. | |
1525 | */ | |
1526 | data = malloc(pagesize); | |
1527 | if (!data) | |
1528 | exit(1); | |
1529 | for (i = 0; i < pagesize; ++i) | |
1530 | *(data + i) = rand(); | |
1531 | umask(0); | |
1532 | fd = creat("conftestmmap", 0600); | |
1533 | if (fd < 0) | |
1534 | exit(1); | |
1535 | if (write(fd, data, pagesize) != pagesize) | |
1536 | exit(1); | |
1537 | close(fd); | |
1538 | ||
1539 | /* | |
1540 | * Next, try to mmap the file at a fixed address which | |
1541 | * already has something else allocated at it. If we can, | |
1542 | * also make sure that we see the same garbage. | |
1543 | */ | |
1544 | fd = open("conftestmmap", O_RDWR); | |
1545 | if (fd < 0) | |
1546 | exit(1); | |
1547 | data2 = malloc(2 * pagesize); | |
1548 | if (!data2) | |
1549 | exit(1); | |
1550 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
1551 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
1552 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
1553 | exit(1); | |
1554 | for (i = 0; i < pagesize; ++i) | |
1555 | if (*(data + i) != *(data2 + i)) | |
1556 | exit(1); | |
1557 | ||
1558 | /* | |
1559 | * Finally, make sure that changes to the mapped area | |
1560 | * do not percolate back to the file as seen by read(). | |
1561 | * (This is a bug on some variants of i386 svr4.0.) | |
1562 | */ | |
1563 | for (i = 0; i < pagesize; ++i) | |
1564 | *(data2 + i) = *(data2 + i) + 1; | |
1565 | data3 = malloc(pagesize); | |
1566 | if (!data3) | |
1567 | exit(1); | |
1568 | if (read(fd, data3, pagesize) != pagesize) | |
1569 | exit(1); | |
1570 | for (i = 0; i < pagesize; ++i) | |
1571 | if (*(data + i) != *(data3 + i)) | |
1572 | exit(1); | |
1573 | close(fd); | |
1574 | unlink("conftestmmap"); | |
1575 | exit(0); | |
1576 | } | |
1577 | ||
1578 | EOF | |
cd0fc7c3 | 1579 | if { (eval echo configure:1580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1580 | then |
1581 | ac_cv_func_mmap_fixed_mapped=yes | |
1582 | else | |
1583 | echo "configure: failed program was:" >&5 | |
1584 | cat conftest.$ac_ext >&5 | |
1585 | rm -fr conftest* | |
1586 | ac_cv_func_mmap_fixed_mapped=no | |
1587 | fi | |
1588 | rm -fr conftest* | |
1589 | fi | |
1590 | ||
1591 | fi | |
1592 | ||
1593 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
1594 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
1595 | cat >> confdefs.h <<\EOF | |
1596 | #define HAVE_MMAP 1 | |
1597 | EOF | |
1598 | ||
1599 | fi | |
1600 | ||
cd0fc7c3 SS |
1601 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 |
1602 | echo "configure:1603: checking for Cygwin environment" >&5 | |
1603 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then | |
1604 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1605 | else | |
1606 | cat > conftest.$ac_ext <<EOF | |
1607 | #line 1608 "configure" | |
1608 | #include "confdefs.h" | |
1609 | ||
1610 | int main() { | |
1611 | ||
1612 | #ifndef __CYGWIN__ | |
1613 | #define __CYGWIN__ __CYGWIN32__ | |
1614 | #endif | |
1615 | return __CYGWIN__; | |
1616 | ; return 0; } | |
1617 | EOF | |
1618 | if { (eval echo configure:1619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
1619 | rm -rf conftest* | |
1620 | ac_cv_cygwin=yes | |
1621 | else | |
1622 | echo "configure: failed program was:" >&5 | |
1623 | cat conftest.$ac_ext >&5 | |
1624 | rm -rf conftest* | |
1625 | ac_cv_cygwin=no | |
1626 | fi | |
1627 | rm -f conftest* | |
1628 | rm -f conftest* | |
1629 | fi | |
1630 | ||
1631 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
1632 | CYGWIN= | |
1633 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
1634 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
1635 | echo "configure:1636: checking for mingw32 environment" >&5 | |
1636 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then | |
1637 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1638 | else | |
1639 | cat > conftest.$ac_ext <<EOF | |
1640 | #line 1641 "configure" | |
1641 | #include "confdefs.h" | |
1642 | ||
1643 | int main() { | |
1644 | return __MINGW32__; | |
1645 | ; return 0; } | |
1646 | EOF | |
1647 | if { (eval echo configure:1648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
1648 | rm -rf conftest* | |
1649 | ac_cv_mingw32=yes | |
1650 | else | |
1651 | echo "configure: failed program was:" >&5 | |
1652 | cat conftest.$ac_ext >&5 | |
1653 | rm -rf conftest* | |
1654 | ac_cv_mingw32=no | |
1655 | fi | |
1656 | rm -f conftest* | |
1657 | rm -f conftest* | |
1658 | fi | |
1659 | ||
1660 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
1661 | MINGW32= | |
1662 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
c906108c SS |
1663 | |
1664 | # autoconf.info says this should be called right after AC_INIT. | |
1665 | ||
1666 | ||
1667 | ac_aux_dir= | |
1668 | for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do | |
1669 | if test -f $ac_dir/install-sh; then | |
1670 | ac_aux_dir=$ac_dir | |
1671 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1672 | break | |
1673 | elif test -f $ac_dir/install.sh; then | |
1674 | ac_aux_dir=$ac_dir | |
1675 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1676 | break | |
1677 | fi | |
1678 | done | |
1679 | if test -z "$ac_aux_dir"; then | |
1680 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; } | |
1681 | fi | |
1682 | ac_config_guess=$ac_aux_dir/config.guess | |
1683 | ac_config_sub=$ac_aux_dir/config.sub | |
1684 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
1685 | ||
1686 | ||
1687 | # Do some error checking and defaulting for the host and target type. | |
1688 | # The inputs are: | |
1689 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
1690 | # | |
1691 | # The rules are: | |
1692 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1693 | # same time. | |
1694 | # 2. Host defaults to nonopt. | |
1695 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1696 | # as determined by config.guess. | |
1697 | # 4. Target and build default to nonopt. | |
1698 | # 5. If nonopt is not specified, then target and build default to host. | |
1699 | ||
1700 | # The aliases save the names the user supplied, while $host etc. | |
1701 | # will get canonicalized. | |
1702 | case $host---$target---$nonopt in | |
1703 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1704 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1705 | esac | |
1706 | ||
1707 | ||
1708 | # Make sure we can run config.sub. | |
1709 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
1710 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
1711 | fi | |
1712 | ||
1713 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
cd0fc7c3 | 1714 | echo "configure:1715: checking host system type" >&5 |
c906108c SS |
1715 | |
1716 | host_alias=$host | |
1717 | case "$host_alias" in | |
1718 | NONE) | |
1719 | case $nonopt in | |
1720 | NONE) | |
1721 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
1722 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
1723 | fi ;; | |
1724 | *) host_alias=$nonopt ;; | |
1725 | esac ;; | |
1726 | esac | |
1727 | ||
1728 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
1729 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1730 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1731 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1732 | echo "$ac_t""$host" 1>&6 | |
1733 | ||
1734 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
cd0fc7c3 | 1735 | echo "configure:1736: checking target system type" >&5 |
c906108c SS |
1736 | |
1737 | target_alias=$target | |
1738 | case "$target_alias" in | |
1739 | NONE) | |
1740 | case $nonopt in | |
1741 | NONE) target_alias=$host_alias ;; | |
1742 | *) target_alias=$nonopt ;; | |
1743 | esac ;; | |
1744 | esac | |
1745 | ||
1746 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
1747 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1748 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1749 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1750 | echo "$ac_t""$target" 1>&6 | |
1751 | ||
1752 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
cd0fc7c3 | 1753 | echo "configure:1754: checking build system type" >&5 |
c906108c SS |
1754 | |
1755 | build_alias=$build | |
1756 | case "$build_alias" in | |
1757 | NONE) | |
1758 | case $nonopt in | |
1759 | NONE) build_alias=$host_alias ;; | |
1760 | *) build_alias=$nonopt ;; | |
1761 | esac ;; | |
1762 | esac | |
1763 | ||
1764 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
1765 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1766 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1767 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1768 | echo "$ac_t""$build" 1>&6 | |
1769 | ||
1770 | test "$host_alias" != "$target_alias" && | |
1771 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1772 | NONENONEs,x,x, && | |
1773 | program_prefix=${target_alias}- | |
1774 | ||
1775 | if test "$program_transform_name" = s,x,x,; then | |
1776 | program_transform_name= | |
1777 | else | |
1778 | # Double any \ or $. echo might interpret backslashes. | |
1779 | cat <<\EOF_SED > conftestsed | |
1780 | s,\\,\\\\,g; s,\$,$$,g | |
1781 | EOF_SED | |
1782 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
1783 | rm -f conftestsed | |
1784 | fi | |
1785 | test "$program_prefix" != NONE && | |
1786 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
1787 | # Use a double $ so make ignores it. | |
1788 | test "$program_suffix" != NONE && | |
1789 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
1790 | ||
1791 | # sed with no file args requires a program. | |
1792 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
1793 | ||
1794 | # Extract the first word of "gcc", so it can be a program name with args. | |
1795 | set dummy gcc; ac_word=$2 | |
1796 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
cd0fc7c3 | 1797 | echo "configure:1798: checking for $ac_word" >&5 |
c906108c SS |
1798 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1799 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1800 | else | |
1801 | if test -n "$CC"; then | |
1802 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1803 | else | |
1804 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
cd0fc7c3 SS |
1805 | ac_dummy="$PATH" |
1806 | for ac_dir in $ac_dummy; do | |
c906108c SS |
1807 | test -z "$ac_dir" && ac_dir=. |
1808 | if test -f $ac_dir/$ac_word; then | |
1809 | ac_cv_prog_CC="gcc" | |
1810 | break | |
1811 | fi | |
1812 | done | |
1813 | IFS="$ac_save_ifs" | |
1814 | fi | |
1815 | fi | |
1816 | CC="$ac_cv_prog_CC" | |
1817 | if test -n "$CC"; then | |
1818 | echo "$ac_t""$CC" 1>&6 | |
1819 | else | |
1820 | echo "$ac_t""no" 1>&6 | |
1821 | fi | |
1822 | ||
1823 | if test -z "$CC"; then | |
1824 | # Extract the first word of "cc", so it can be a program name with args. | |
1825 | set dummy cc; ac_word=$2 | |
1826 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
cd0fc7c3 | 1827 | echo "configure:1828: checking for $ac_word" >&5 |
c906108c SS |
1828 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1829 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1830 | else | |
1831 | if test -n "$CC"; then | |
1832 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1833 | else | |
1834 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1835 | ac_prog_rejected=no | |
cd0fc7c3 SS |
1836 | ac_dummy="$PATH" |
1837 | for ac_dir in $ac_dummy; do | |
c906108c SS |
1838 | test -z "$ac_dir" && ac_dir=. |
1839 | if test -f $ac_dir/$ac_word; then | |
1840 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
1841 | ac_prog_rejected=yes | |
1842 | continue | |
1843 | fi | |
1844 | ac_cv_prog_CC="cc" | |
1845 | break | |
1846 | fi | |
1847 | done | |
1848 | IFS="$ac_save_ifs" | |
1849 | if test $ac_prog_rejected = yes; then | |
1850 | # We found a bogon in the path, so make sure we never use it. | |
1851 | set dummy $ac_cv_prog_CC | |
1852 | shift | |
1853 | if test $# -gt 0; then | |
1854 | # We chose a different compiler from the bogus one. | |
1855 | # However, it has the same basename, so the bogon will be chosen | |
1856 | # first if we set CC to just the basename; use the full file name. | |
1857 | shift | |
1858 | set dummy "$ac_dir/$ac_word" "$@" | |
1859 | shift | |
1860 | ac_cv_prog_CC="$@" | |
1861 | fi | |
1862 | fi | |
1863 | fi | |
1864 | fi | |
1865 | CC="$ac_cv_prog_CC" | |
1866 | if test -n "$CC"; then | |
1867 | echo "$ac_t""$CC" 1>&6 | |
1868 | else | |
1869 | echo "$ac_t""no" 1>&6 | |
1870 | fi | |
1871 | ||
1872 | if test -z "$CC"; then | |
1873 | case "`uname -s`" in | |
1874 | *win32* | *WIN32*) | |
1875 | # Extract the first word of "cl", so it can be a program name with args. | |
1876 | set dummy cl; ac_word=$2 | |
1877 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
cd0fc7c3 | 1878 | echo "configure:1879: checking for $ac_word" >&5 |
c906108c SS |
1879 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1880 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1881 | else | |
1882 | if test -n "$CC"; then | |
1883 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1884 | else | |
1885 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
cd0fc7c3 SS |
1886 | ac_dummy="$PATH" |
1887 | for ac_dir in $ac_dummy; do | |
c906108c SS |
1888 | test -z "$ac_dir" && ac_dir=. |
1889 | if test -f $ac_dir/$ac_word; then | |
1890 | ac_cv_prog_CC="cl" | |
1891 | break | |
1892 | fi | |
1893 | done | |
1894 | IFS="$ac_save_ifs" | |
1895 | fi | |
1896 | fi | |
1897 | CC="$ac_cv_prog_CC" | |
1898 | if test -n "$CC"; then | |
1899 | echo "$ac_t""$CC" 1>&6 | |
1900 | else | |
1901 | echo "$ac_t""no" 1>&6 | |
1902 | fi | |
1903 | ;; | |
1904 | esac | |
1905 | fi | |
1906 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
1907 | fi | |
1908 | ||
1909 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
cd0fc7c3 | 1910 | echo "configure:1911: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
c906108c SS |
1911 | |
1912 | ac_ext=c | |
1913 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1914 | ac_cpp='$CPP $CPPFLAGS' | |
1915 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1916 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1917 | cross_compiling=$ac_cv_prog_cc_cross | |
1918 | ||
cd0fc7c3 SS |
1919 | cat > conftest.$ac_ext << EOF |
1920 | ||
1921 | #line 1922 "configure" | |
c906108c | 1922 | #include "confdefs.h" |
cd0fc7c3 | 1923 | |
c906108c SS |
1924 | main(){return(0);} |
1925 | EOF | |
cd0fc7c3 | 1926 | if { (eval echo configure:1927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1927 | ac_cv_prog_cc_works=yes |
1928 | # If we can't run a trivial program, we are probably using a cross compiler. | |
1929 | if (./conftest; exit) 2>/dev/null; then | |
1930 | ac_cv_prog_cc_cross=no | |
1931 | else | |
1932 | ac_cv_prog_cc_cross=yes | |
1933 | fi | |
1934 | else | |
1935 | echo "configure: failed program was:" >&5 | |
1936 | cat conftest.$ac_ext >&5 | |
1937 | ac_cv_prog_cc_works=no | |
1938 | fi | |
1939 | rm -fr conftest* | |
cd0fc7c3 SS |
1940 | ac_ext=c |
1941 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1942 | ac_cpp='$CPP $CPPFLAGS' | |
1943 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1944 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1945 | cross_compiling=$ac_cv_prog_cc_cross | |
c906108c SS |
1946 | |
1947 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
1948 | if test $ac_cv_prog_cc_works = no; then | |
1949 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
1950 | fi | |
1951 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
cd0fc7c3 | 1952 | echo "configure:1953: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
c906108c SS |
1953 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
1954 | cross_compiling=$ac_cv_prog_cc_cross | |
1955 | ||
1956 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
cd0fc7c3 | 1957 | echo "configure:1958: checking whether we are using GNU C" >&5 |
c906108c SS |
1958 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
1959 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1960 | else | |
1961 | cat > conftest.c <<EOF | |
1962 | #ifdef __GNUC__ | |
1963 | yes; | |
1964 | #endif | |
1965 | EOF | |
cd0fc7c3 | 1966 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
c906108c SS |
1967 | ac_cv_prog_gcc=yes |
1968 | else | |
1969 | ac_cv_prog_gcc=no | |
1970 | fi | |
1971 | fi | |
1972 | ||
1973 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
1974 | ||
1975 | if test $ac_cv_prog_gcc = yes; then | |
1976 | GCC=yes | |
1977 | else | |
1978 | GCC= | |
1979 | fi | |
1980 | ||
1981 | ac_test_CFLAGS="${CFLAGS+set}" | |
1982 | ac_save_CFLAGS="$CFLAGS" | |
1983 | CFLAGS= | |
1984 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
cd0fc7c3 | 1985 | echo "configure:1986: checking whether ${CC-cc} accepts -g" >&5 |
c906108c SS |
1986 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
1987 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1988 | else | |
1989 | echo 'void f(){}' > conftest.c | |
1990 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
1991 | ac_cv_prog_cc_g=yes | |
1992 | else | |
1993 | ac_cv_prog_cc_g=no | |
1994 | fi | |
1995 | rm -f conftest* | |
1996 | ||
1997 | fi | |
1998 | ||
1999 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
2000 | if test "$ac_test_CFLAGS" = set; then | |
2001 | CFLAGS="$ac_save_CFLAGS" | |
2002 | elif test $ac_cv_prog_cc_g = yes; then | |
2003 | if test "$GCC" = yes; then | |
2004 | CFLAGS="-g -O2" | |
2005 | else | |
2006 | CFLAGS="-g" | |
2007 | fi | |
2008 | else | |
2009 | if test "$GCC" = yes; then | |
2010 | CFLAGS="-O2" | |
2011 | else | |
2012 | CFLAGS= | |
2013 | fi | |
2014 | fi | |
2015 | ||
2016 | # Find a good install program. We prefer a C program (faster), | |
2017 | # so one script is as good as another. But avoid the broken or | |
2018 | # incompatible versions: | |
2019 | # SysV /etc/install, /usr/sbin/install | |
2020 | # SunOS /usr/etc/install | |
2021 | # IRIX /sbin/install | |
2022 | # AIX /bin/install | |
2023 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
2024 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2025 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2026 | # ./install, which can be erroneously created by make from ./install.sh. | |
2027 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
cd0fc7c3 | 2028 | echo "configure:2029: checking for a BSD compatible install" >&5 |
c906108c SS |
2029 | if test -z "$INSTALL"; then |
2030 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
2031 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2032 | else | |
2033 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
2034 | for ac_dir in $PATH; do | |
2035 | # Account for people who put trailing slashes in PATH elements. | |
2036 | case "$ac_dir/" in | |
2037 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
2038 | *) | |
2039 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2040 | # Don't use installbsd from OSF since it installs stuff as root | |
2041 | # by default. | |
2042 | for ac_prog in ginstall scoinst install; do | |
2043 | if test -f $ac_dir/$ac_prog; then | |
2044 | if test $ac_prog = install && | |
2045 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
2046 | # AIX install. It has an incompatible calling convention. | |
2047 | : | |
2048 | else | |
2049 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
2050 | break 2 | |
2051 | fi | |
2052 | fi | |
2053 | done | |
2054 | ;; | |
2055 | esac | |
2056 | done | |
2057 | IFS="$ac_save_IFS" | |
2058 | ||
2059 | fi | |
2060 | if test "${ac_cv_path_install+set}" = set; then | |
2061 | INSTALL="$ac_cv_path_install" | |
2062 | else | |
2063 | # As a last resort, use the slow shell script. We don't cache a | |
2064 | # path for INSTALL within a source directory, because that will | |
2065 | # break other packages using the cache if that directory is | |
2066 | # removed, or if the path is relative. | |
2067 | INSTALL="$ac_install_sh" | |
2068 | fi | |
2069 | fi | |
2070 | echo "$ac_t""$INSTALL" 1>&6 | |
2071 | ||
2072 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
2073 | # It thinks the first close brace ends the variable substitution. | |
2074 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
2075 | ||
cd0fc7c3 SS |
2076 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' |
2077 | ||
c906108c SS |
2078 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
2079 | ||
2080 | ||
2081 | # Put a plausible default for CC_FOR_BUILD in Makefile. | |
2082 | if test "x$cross_compiling" = "xno"; then | |
2083 | CC_FOR_BUILD='$(CC)' | |
2084 | else | |
2085 | CC_FOR_BUILD=gcc | |
2086 | fi | |
2087 | ||
2088 | ||
2089 | ||
2090 | ||
2091 | AR=${AR-ar} | |
2092 | ||
2093 | # Extract the first word of "ranlib", so it can be a program name with args. | |
2094 | set dummy ranlib; ac_word=$2 | |
2095 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
cd0fc7c3 | 2096 | echo "configure:2097: checking for $ac_word" >&5 |
c906108c SS |
2097 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
2098 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2099 | else | |
2100 | if test -n "$RANLIB"; then | |
2101 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2102 | else | |
2103 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
cd0fc7c3 SS |
2104 | ac_dummy="$PATH" |
2105 | for ac_dir in $ac_dummy; do | |
c906108c SS |
2106 | test -z "$ac_dir" && ac_dir=. |
2107 | if test -f $ac_dir/$ac_word; then | |
2108 | ac_cv_prog_RANLIB="ranlib" | |
2109 | break | |
2110 | fi | |
2111 | done | |
2112 | IFS="$ac_save_ifs" | |
2113 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
2114 | fi | |
2115 | fi | |
2116 | RANLIB="$ac_cv_prog_RANLIB" | |
2117 | if test -n "$RANLIB"; then | |
2118 | echo "$ac_t""$RANLIB" 1>&6 | |
2119 | else | |
2120 | echo "$ac_t""no" 1>&6 | |
2121 | fi | |
2122 | ||
2123 | ||
2124 | ALL_LINGUAS= | |
2125 | ||
2126 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
2127 | unistd.h values.h sys/param.h | |
2128 | do | |
2129 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2130 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
cd0fc7c3 | 2131 | echo "configure:2132: checking for $ac_hdr" >&5 |
c906108c SS |
2132 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2133 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2134 | else | |
2135 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 2136 | #line 2137 "configure" |
c906108c SS |
2137 | #include "confdefs.h" |
2138 | #include <$ac_hdr> | |
2139 | EOF | |
2140 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
cd0fc7c3 | 2141 | { (eval echo configure:2142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2142 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2143 | if test -z "$ac_err"; then | |
2144 | rm -rf conftest* | |
2145 | eval "ac_cv_header_$ac_safe=yes" | |
2146 | else | |
2147 | echo "$ac_err" >&5 | |
2148 | echo "configure: failed program was:" >&5 | |
2149 | cat conftest.$ac_ext >&5 | |
2150 | rm -rf conftest* | |
2151 | eval "ac_cv_header_$ac_safe=no" | |
2152 | fi | |
2153 | rm -f conftest* | |
2154 | fi | |
2155 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2156 | echo "$ac_t""yes" 1>&6 | |
2157 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2158 | cat >> confdefs.h <<EOF | |
2159 | #define $ac_tr_hdr 1 | |
2160 | EOF | |
2161 | ||
2162 | else | |
2163 | echo "$ac_t""no" 1>&6 | |
2164 | fi | |
2165 | done | |
2166 | ||
2167 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
2168 | __argz_count __argz_stringify __argz_next | |
2169 | do | |
2170 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
cd0fc7c3 | 2171 | echo "configure:2172: checking for $ac_func" >&5 |
c906108c SS |
2172 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2173 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2174 | else | |
2175 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 2176 | #line 2177 "configure" |
c906108c SS |
2177 | #include "confdefs.h" |
2178 | /* System header to define __stub macros and hopefully few prototypes, | |
2179 | which can conflict with char $ac_func(); below. */ | |
2180 | #include <assert.h> | |
2181 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2182 | /* We use char because int might match the return type of a gcc2 | |
2183 | builtin and then its argument prototype would still apply. */ | |
2184 | char $ac_func(); | |
2185 | ||
2186 | int main() { | |
2187 | ||
2188 | /* The GNU C library defines this for functions which it implements | |
2189 | to always fail with ENOSYS. Some functions are actually named | |
2190 | something starting with __ and the normal name is an alias. */ | |
2191 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2192 | choke me | |
2193 | #else | |
2194 | $ac_func(); | |
2195 | #endif | |
2196 | ||
2197 | ; return 0; } | |
2198 | EOF | |
cd0fc7c3 | 2199 | if { (eval echo configure:2200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2200 | rm -rf conftest* |
2201 | eval "ac_cv_func_$ac_func=yes" | |
2202 | else | |
2203 | echo "configure: failed program was:" >&5 | |
2204 | cat conftest.$ac_ext >&5 | |
2205 | rm -rf conftest* | |
2206 | eval "ac_cv_func_$ac_func=no" | |
2207 | fi | |
2208 | rm -f conftest* | |
2209 | fi | |
2210 | ||
2211 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2212 | echo "$ac_t""yes" 1>&6 | |
2213 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2214 | cat >> confdefs.h <<EOF | |
2215 | #define $ac_tr_func 1 | |
2216 | EOF | |
2217 | ||
2218 | else | |
2219 | echo "$ac_t""no" 1>&6 | |
2220 | fi | |
2221 | done | |
2222 | ||
2223 | ||
2224 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
2225 | for ac_func in stpcpy | |
2226 | do | |
2227 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
cd0fc7c3 | 2228 | echo "configure:2229: checking for $ac_func" >&5 |
c906108c SS |
2229 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2230 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2231 | else | |
2232 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 2233 | #line 2234 "configure" |
c906108c SS |
2234 | #include "confdefs.h" |
2235 | /* System header to define __stub macros and hopefully few prototypes, | |
2236 | which can conflict with char $ac_func(); below. */ | |
2237 | #include <assert.h> | |
2238 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2239 | /* We use char because int might match the return type of a gcc2 | |
2240 | builtin and then its argument prototype would still apply. */ | |
2241 | char $ac_func(); | |
2242 | ||
2243 | int main() { | |
2244 | ||
2245 | /* The GNU C library defines this for functions which it implements | |
2246 | to always fail with ENOSYS. Some functions are actually named | |
2247 | something starting with __ and the normal name is an alias. */ | |
2248 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2249 | choke me | |
2250 | #else | |
2251 | $ac_func(); | |
2252 | #endif | |
2253 | ||
2254 | ; return 0; } | |
2255 | EOF | |
cd0fc7c3 | 2256 | if { (eval echo configure:2257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2257 | rm -rf conftest* |
2258 | eval "ac_cv_func_$ac_func=yes" | |
2259 | else | |
2260 | echo "configure: failed program was:" >&5 | |
2261 | cat conftest.$ac_ext >&5 | |
2262 | rm -rf conftest* | |
2263 | eval "ac_cv_func_$ac_func=no" | |
2264 | fi | |
2265 | rm -f conftest* | |
2266 | fi | |
2267 | ||
2268 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2269 | echo "$ac_t""yes" 1>&6 | |
2270 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2271 | cat >> confdefs.h <<EOF | |
2272 | #define $ac_tr_func 1 | |
2273 | EOF | |
2274 | ||
2275 | else | |
2276 | echo "$ac_t""no" 1>&6 | |
2277 | fi | |
2278 | done | |
2279 | ||
2280 | fi | |
2281 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
2282 | cat >> confdefs.h <<\EOF | |
2283 | #define HAVE_STPCPY 1 | |
2284 | EOF | |
2285 | ||
2286 | fi | |
2287 | ||
2288 | if test $ac_cv_header_locale_h = yes; then | |
2289 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
cd0fc7c3 | 2290 | echo "configure:2291: checking for LC_MESSAGES" >&5 |
c906108c SS |
2291 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
2292 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2293 | else | |
2294 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 2295 | #line 2296 "configure" |
c906108c SS |
2296 | #include "confdefs.h" |
2297 | #include <locale.h> | |
2298 | int main() { | |
2299 | return LC_MESSAGES | |
2300 | ; return 0; } | |
2301 | EOF | |
cd0fc7c3 | 2302 | if { (eval echo configure:2303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2303 | rm -rf conftest* |
2304 | am_cv_val_LC_MESSAGES=yes | |
2305 | else | |
2306 | echo "configure: failed program was:" >&5 | |
2307 | cat conftest.$ac_ext >&5 | |
2308 | rm -rf conftest* | |
2309 | am_cv_val_LC_MESSAGES=no | |
2310 | fi | |
2311 | rm -f conftest* | |
2312 | fi | |
2313 | ||
2314 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
2315 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2316 | cat >> confdefs.h <<\EOF | |
2317 | #define HAVE_LC_MESSAGES 1 | |
2318 | EOF | |
2319 | ||
2320 | fi | |
2321 | fi | |
2322 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
cd0fc7c3 | 2323 | echo "configure:2324: checking whether NLS is requested" >&5 |
c906108c SS |
2324 | # Check whether --enable-nls or --disable-nls was given. |
2325 | if test "${enable_nls+set}" = set; then | |
2326 | enableval="$enable_nls" | |
2327 | USE_NLS=$enableval | |
2328 | else | |
2329 | USE_NLS=yes | |
2330 | fi | |
2331 | ||
2332 | echo "$ac_t""$USE_NLS" 1>&6 | |
2333 | ||
2334 | ||
2335 | USE_INCLUDED_LIBINTL=no | |
2336 | ||
2337 | if test "$USE_NLS" = "yes"; then | |
2338 | cat >> confdefs.h <<\EOF | |
2339 | #define ENABLE_NLS 1 | |
2340 | EOF | |
2341 | ||
2342 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
cd0fc7c3 | 2343 | echo "configure:2344: checking whether included gettext is requested" >&5 |
c906108c SS |
2344 | # Check whether --with-included-gettext or --without-included-gettext was given. |
2345 | if test "${with_included_gettext+set}" = set; then | |
2346 | withval="$with_included_gettext" | |
2347 | nls_cv_force_use_gnu_gettext=$withval | |
2348 | else | |
2349 | nls_cv_force_use_gnu_gettext=no | |
2350 | fi | |
2351 | ||
2352 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
2353 | ||
2354 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
2355 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
2356 | nls_cv_header_intl= | |
2357 | nls_cv_header_libgt= | |
2358 | CATOBJEXT=NONE | |
2359 | ||
2360 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
2361 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
cd0fc7c3 | 2362 | echo "configure:2363: checking for libintl.h" >&5 |
c906108c SS |
2363 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2364 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2365 | else | |
2366 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 2367 | #line 2368 "configure" |
c906108c SS |
2368 | #include "confdefs.h" |
2369 | #include <libintl.h> | |
2370 | EOF | |
2371 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
cd0fc7c3 | 2372 | { (eval echo configure:2373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2373 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2374 | if test -z "$ac_err"; then | |
2375 | rm -rf conftest* | |
2376 | eval "ac_cv_header_$ac_safe=yes" | |
2377 | else | |
2378 | echo "$ac_err" >&5 | |
2379 | echo "configure: failed program was:" >&5 | |
2380 | cat conftest.$ac_ext >&5 | |
2381 | rm -rf conftest* | |
2382 | eval "ac_cv_header_$ac_safe=no" | |
2383 | fi | |
2384 | rm -f conftest* | |
2385 | fi | |
2386 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2387 | echo "$ac_t""yes" 1>&6 | |
2388 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
cd0fc7c3 | 2389 | echo "configure:2390: checking for gettext in libc" >&5 |
c906108c SS |
2390 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
2391 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2392 | else | |
2393 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 2394 | #line 2395 "configure" |
c906108c SS |
2395 | #include "confdefs.h" |
2396 | #include <libintl.h> | |
2397 | int main() { | |
2398 | return (int) gettext ("") | |
2399 | ; return 0; } | |
2400 | EOF | |
cd0fc7c3 | 2401 | if { (eval echo configure:2402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2402 | rm -rf conftest* |
2403 | gt_cv_func_gettext_libc=yes | |
2404 | else | |
2405 | echo "configure: failed program was:" >&5 | |
2406 | cat conftest.$ac_ext >&5 | |
2407 | rm -rf conftest* | |
2408 | gt_cv_func_gettext_libc=no | |
2409 | fi | |
2410 | rm -f conftest* | |
2411 | fi | |
2412 | ||
2413 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
2414 | ||
2415 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
2416 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
cd0fc7c3 | 2417 | echo "configure:2418: checking for bindtextdomain in -lintl" >&5 |
c906108c SS |
2418 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
2419 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2420 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2421 | else | |
2422 | ac_save_LIBS="$LIBS" | |
2423 | LIBS="-lintl $LIBS" | |
2424 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 2425 | #line 2426 "configure" |
c906108c SS |
2426 | #include "confdefs.h" |
2427 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2428 | /* We use char because int might match the return type of a gcc2 | |
2429 | builtin and then its argument prototype would still apply. */ | |
2430 | char bindtextdomain(); | |
2431 | ||
2432 | int main() { | |
2433 | bindtextdomain() | |
2434 | ; return 0; } | |
2435 | EOF | |
cd0fc7c3 | 2436 | if { (eval echo configure:2437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2437 | rm -rf conftest* |
2438 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2439 | else | |
2440 | echo "configure: failed program was:" >&5 | |
2441 | cat conftest.$ac_ext >&5 | |
2442 | rm -rf conftest* | |
2443 | eval "ac_cv_lib_$ac_lib_var=no" | |
2444 | fi | |
2445 | rm -f conftest* | |
2446 | LIBS="$ac_save_LIBS" | |
2447 | ||
2448 | fi | |
2449 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2450 | echo "$ac_t""yes" 1>&6 | |
2451 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
cd0fc7c3 | 2452 | echo "configure:2453: checking for gettext in libintl" >&5 |
c906108c SS |
2453 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
2454 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2455 | else | |
2456 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 2457 | #line 2458 "configure" |
c906108c SS |
2458 | #include "confdefs.h" |
2459 | ||
2460 | int main() { | |
2461 | return (int) gettext ("") | |
2462 | ; return 0; } | |
2463 | EOF | |
cd0fc7c3 | 2464 | if { (eval echo configure:2465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2465 | rm -rf conftest* |
2466 | gt_cv_func_gettext_libintl=yes | |
2467 | else | |
2468 | echo "configure: failed program was:" >&5 | |
2469 | cat conftest.$ac_ext >&5 | |
2470 | rm -rf conftest* | |
2471 | gt_cv_func_gettext_libintl=no | |
2472 | fi | |
2473 | rm -f conftest* | |
2474 | fi | |
2475 | ||
2476 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
2477 | else | |
2478 | echo "$ac_t""no" 1>&6 | |
2479 | fi | |
2480 | ||
2481 | fi | |
2482 | ||
2483 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
2484 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
2485 | cat >> confdefs.h <<\EOF | |
2486 | #define HAVE_GETTEXT 1 | |
2487 | EOF | |
2488 | ||
2489 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2490 | set dummy msgfmt; ac_word=$2 | |
2491 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
cd0fc7c3 | 2492 | echo "configure:2493: checking for $ac_word" >&5 |
c906108c SS |
2493 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2494 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2495 | else | |
2496 | case "$MSGFMT" in | |
2497 | /*) | |
2498 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2499 | ;; | |
2500 | *) | |
2501 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2502 | for ac_dir in $PATH; do | |
2503 | test -z "$ac_dir" && ac_dir=. | |
2504 | if test -f $ac_dir/$ac_word; then | |
2505 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2506 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2507 | break | |
2508 | fi | |
2509 | fi | |
2510 | done | |
2511 | IFS="$ac_save_ifs" | |
2512 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
2513 | ;; | |
2514 | esac | |
2515 | fi | |
2516 | MSGFMT="$ac_cv_path_MSGFMT" | |
2517 | if test -n "$MSGFMT"; then | |
2518 | echo "$ac_t""$MSGFMT" 1>&6 | |
2519 | else | |
2520 | echo "$ac_t""no" 1>&6 | |
2521 | fi | |
2522 | if test "$MSGFMT" != "no"; then | |
2523 | for ac_func in dcgettext | |
2524 | do | |
2525 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
cd0fc7c3 | 2526 | echo "configure:2527: checking for $ac_func" >&5 |
c906108c SS |
2527 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2528 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2529 | else | |
2530 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 2531 | #line 2532 "configure" |
c906108c SS |
2532 | #include "confdefs.h" |
2533 | /* System header to define __stub macros and hopefully few prototypes, | |
2534 | which can conflict with char $ac_func(); below. */ | |
2535 | #include <assert.h> | |
2536 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2537 | /* We use char because int might match the return type of a gcc2 | |
2538 | builtin and then its argument prototype would still apply. */ | |
2539 | char $ac_func(); | |
2540 | ||
2541 | int main() { | |
2542 | ||
2543 | /* The GNU C library defines this for functions which it implements | |
2544 | to always fail with ENOSYS. Some functions are actually named | |
2545 | something starting with __ and the normal name is an alias. */ | |
2546 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2547 | choke me | |
2548 | #else | |
2549 | $ac_func(); | |
2550 | #endif | |
2551 | ||
2552 | ; return 0; } | |
2553 | EOF | |
cd0fc7c3 | 2554 | if { (eval echo configure:2555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2555 | rm -rf conftest* |
2556 | eval "ac_cv_func_$ac_func=yes" | |
2557 | else | |
2558 | echo "configure: failed program was:" >&5 | |
2559 | cat conftest.$ac_ext >&5 | |
2560 | rm -rf conftest* | |
2561 | eval "ac_cv_func_$ac_func=no" | |
2562 | fi | |
2563 | rm -f conftest* | |
2564 | fi | |
2565 | ||
2566 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2567 | echo "$ac_t""yes" 1>&6 | |
2568 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2569 | cat >> confdefs.h <<EOF | |
2570 | #define $ac_tr_func 1 | |
2571 | EOF | |
2572 | ||
2573 | else | |
2574 | echo "$ac_t""no" 1>&6 | |
2575 | fi | |
2576 | done | |
2577 | ||
2578 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2579 | set dummy gmsgfmt; ac_word=$2 | |
2580 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
cd0fc7c3 | 2581 | echo "configure:2582: checking for $ac_word" >&5 |
c906108c SS |
2582 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2583 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2584 | else | |
2585 | case "$GMSGFMT" in | |
2586 | /*) | |
2587 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2588 | ;; | |
2589 | ?:/*) | |
2590 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2591 | ;; | |
2592 | *) | |
2593 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
cd0fc7c3 SS |
2594 | ac_dummy="$PATH" |
2595 | for ac_dir in $ac_dummy; do | |
c906108c SS |
2596 | test -z "$ac_dir" && ac_dir=. |
2597 | if test -f $ac_dir/$ac_word; then | |
2598 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2599 | break | |
2600 | fi | |
2601 | done | |
2602 | IFS="$ac_save_ifs" | |
2603 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2604 | ;; | |
2605 | esac | |
2606 | fi | |
2607 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2608 | if test -n "$GMSGFMT"; then | |
2609 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2610 | else | |
2611 | echo "$ac_t""no" 1>&6 | |
2612 | fi | |
2613 | ||
2614 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2615 | set dummy xgettext; ac_word=$2 | |
2616 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
cd0fc7c3 | 2617 | echo "configure:2618: checking for $ac_word" >&5 |
c906108c SS |
2618 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2619 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2620 | else | |
2621 | case "$XGETTEXT" in | |
2622 | /*) | |
2623 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2624 | ;; | |
2625 | *) | |
2626 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2627 | for ac_dir in $PATH; do | |
2628 | test -z "$ac_dir" && ac_dir=. | |
2629 | if test -f $ac_dir/$ac_word; then | |
2630 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2631 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2632 | break | |
2633 | fi | |
2634 | fi | |
2635 | done | |
2636 | IFS="$ac_save_ifs" | |
2637 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2638 | ;; | |
2639 | esac | |
2640 | fi | |
2641 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2642 | if test -n "$XGETTEXT"; then | |
2643 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2644 | else | |
2645 | echo "$ac_t""no" 1>&6 | |
2646 | fi | |
2647 | ||
2648 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 2649 | #line 2650 "configure" |
c906108c SS |
2650 | #include "confdefs.h" |
2651 | ||
2652 | int main() { | |
2653 | extern int _nl_msg_cat_cntr; | |
2654 | return _nl_msg_cat_cntr | |
2655 | ; return 0; } | |
2656 | EOF | |
cd0fc7c3 | 2657 | if { (eval echo configure:2658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2658 | rm -rf conftest* |
2659 | CATOBJEXT=.gmo | |
2660 | DATADIRNAME=share | |
2661 | else | |
2662 | echo "configure: failed program was:" >&5 | |
2663 | cat conftest.$ac_ext >&5 | |
2664 | rm -rf conftest* | |
2665 | CATOBJEXT=.mo | |
2666 | DATADIRNAME=lib | |
2667 | fi | |
2668 | rm -f conftest* | |
2669 | INSTOBJEXT=.mo | |
2670 | fi | |
2671 | fi | |
2672 | ||
2673 | else | |
2674 | echo "$ac_t""no" 1>&6 | |
2675 | fi | |
2676 | ||
2677 | ||
2678 | ||
2679 | if test "$CATOBJEXT" = "NONE"; then | |
2680 | nls_cv_use_gnu_gettext=yes | |
2681 | fi | |
2682 | fi | |
2683 | ||
2684 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
2685 | INTLOBJS="\$(GETTOBJS)" | |
2686 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2687 | set dummy msgfmt; ac_word=$2 | |
2688 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
cd0fc7c3 | 2689 | echo "configure:2690: checking for $ac_word" >&5 |
c906108c SS |
2690 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2691 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2692 | else | |
2693 | case "$MSGFMT" in | |
2694 | /*) | |
2695 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2696 | ;; | |
2697 | *) | |
2698 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2699 | for ac_dir in $PATH; do | |
2700 | test -z "$ac_dir" && ac_dir=. | |
2701 | if test -f $ac_dir/$ac_word; then | |
2702 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2703 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2704 | break | |
2705 | fi | |
2706 | fi | |
2707 | done | |
2708 | IFS="$ac_save_ifs" | |
2709 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
2710 | ;; | |
2711 | esac | |
2712 | fi | |
2713 | MSGFMT="$ac_cv_path_MSGFMT" | |
2714 | if test -n "$MSGFMT"; then | |
2715 | echo "$ac_t""$MSGFMT" 1>&6 | |
2716 | else | |
2717 | echo "$ac_t""no" 1>&6 | |
2718 | fi | |
2719 | ||
2720 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2721 | set dummy gmsgfmt; ac_word=$2 | |
2722 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
cd0fc7c3 | 2723 | echo "configure:2724: checking for $ac_word" >&5 |
c906108c SS |
2724 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2725 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2726 | else | |
2727 | case "$GMSGFMT" in | |
2728 | /*) | |
2729 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2730 | ;; | |
2731 | ?:/*) | |
2732 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2733 | ;; | |
2734 | *) | |
2735 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
cd0fc7c3 SS |
2736 | ac_dummy="$PATH" |
2737 | for ac_dir in $ac_dummy; do | |
c906108c SS |
2738 | test -z "$ac_dir" && ac_dir=. |
2739 | if test -f $ac_dir/$ac_word; then | |
2740 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2741 | break | |
2742 | fi | |
2743 | done | |
2744 | IFS="$ac_save_ifs" | |
2745 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2746 | ;; | |
2747 | esac | |
2748 | fi | |
2749 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2750 | if test -n "$GMSGFMT"; then | |
2751 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2752 | else | |
2753 | echo "$ac_t""no" 1>&6 | |
2754 | fi | |
2755 | ||
2756 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2757 | set dummy xgettext; ac_word=$2 | |
2758 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
cd0fc7c3 | 2759 | echo "configure:2760: checking for $ac_word" >&5 |
c906108c SS |
2760 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2761 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2762 | else | |
2763 | case "$XGETTEXT" in | |
2764 | /*) | |
2765 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2766 | ;; | |
2767 | *) | |
2768 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2769 | for ac_dir in $PATH; do | |
2770 | test -z "$ac_dir" && ac_dir=. | |
2771 | if test -f $ac_dir/$ac_word; then | |
2772 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2773 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2774 | break | |
2775 | fi | |
2776 | fi | |
2777 | done | |
2778 | IFS="$ac_save_ifs" | |
2779 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2780 | ;; | |
2781 | esac | |
2782 | fi | |
2783 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2784 | if test -n "$XGETTEXT"; then | |
2785 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2786 | else | |
2787 | echo "$ac_t""no" 1>&6 | |
2788 | fi | |
2789 | ||
2790 | ||
2791 | USE_INCLUDED_LIBINTL=yes | |
2792 | CATOBJEXT=.gmo | |
2793 | INSTOBJEXT=.mo | |
2794 | DATADIRNAME=share | |
2795 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
2796 | INTLLIBS=$INTLDEPS | |
2797 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
2798 | nls_cv_header_intl=libintl.h | |
2799 | nls_cv_header_libgt=libgettext.h | |
2800 | fi | |
2801 | ||
2802 | if test "$XGETTEXT" != ":"; then | |
2803 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
2804 | : ; | |
2805 | else | |
2806 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
2807 | XGETTEXT=":" | |
2808 | fi | |
2809 | fi | |
2810 | ||
2811 | # We need to process the po/ directory. | |
2812 | POSUB=po | |
2813 | else | |
2814 | DATADIRNAME=share | |
2815 | nls_cv_header_intl=libintl.h | |
2816 | nls_cv_header_libgt=libgettext.h | |
2817 | fi | |
2818 | ||
2819 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
2820 | # because some of the sources are only built for this goal. | |
2821 | if test "$PACKAGE" = gettext; then | |
2822 | USE_NLS=yes | |
2823 | USE_INCLUDED_LIBINTL=yes | |
2824 | fi | |
2825 | ||
2826 | for lang in $ALL_LINGUAS; do | |
2827 | GMOFILES="$GMOFILES $lang.gmo" | |
2828 | POFILES="$POFILES $lang.po" | |
2829 | done | |
2830 | ||
2831 | ||
2832 | ||
2833 | ||
2834 | ||
2835 | ||
2836 | ||
2837 | ||
2838 | ||
2839 | ||
2840 | ||
2841 | ||
2842 | ||
2843 | ||
2844 | if test "x$CATOBJEXT" != "x"; then | |
2845 | if test "x$ALL_LINGUAS" = "x"; then | |
2846 | LINGUAS= | |
2847 | else | |
2848 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
cd0fc7c3 | 2849 | echo "configure:2850: checking for catalogs to be installed" >&5 |
c906108c SS |
2850 | NEW_LINGUAS= |
2851 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
2852 | case "$ALL_LINGUAS" in | |
2853 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
2854 | esac | |
2855 | done | |
2856 | LINGUAS=$NEW_LINGUAS | |
2857 | echo "$ac_t""$LINGUAS" 1>&6 | |
2858 | fi | |
2859 | ||
2860 | if test -n "$LINGUAS"; then | |
2861 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
2862 | fi | |
2863 | fi | |
2864 | ||
2865 | if test $ac_cv_header_locale_h = yes; then | |
2866 | INCLUDE_LOCALE_H="#include <locale.h>" | |
2867 | else | |
2868 | INCLUDE_LOCALE_H="\ | |
2869 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
2870 | fi | |
2871 | ||
2872 | ||
2873 | if test -f $srcdir/po2tbl.sed.in; then | |
2874 | if test "$CATOBJEXT" = ".cat"; then | |
2875 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
2876 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
cd0fc7c3 | 2877 | echo "configure:2878: checking for linux/version.h" >&5 |
c906108c SS |
2878 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2879 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2880 | else | |
2881 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 2882 | #line 2883 "configure" |
c906108c SS |
2883 | #include "confdefs.h" |
2884 | #include <linux/version.h> | |
2885 | EOF | |
2886 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
cd0fc7c3 | 2887 | { (eval echo configure:2888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2888 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2889 | if test -z "$ac_err"; then | |
2890 | rm -rf conftest* | |
2891 | eval "ac_cv_header_$ac_safe=yes" | |
2892 | else | |
2893 | echo "$ac_err" >&5 | |
2894 | echo "configure: failed program was:" >&5 | |
2895 | cat conftest.$ac_ext >&5 | |
2896 | rm -rf conftest* | |
2897 | eval "ac_cv_header_$ac_safe=no" | |
2898 | fi | |
2899 | rm -f conftest* | |
2900 | fi | |
2901 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2902 | echo "$ac_t""yes" 1>&6 | |
2903 | msgformat=linux | |
2904 | else | |
2905 | echo "$ac_t""no" 1>&6 | |
2906 | msgformat=xopen | |
2907 | fi | |
2908 | ||
2909 | ||
2910 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed | |
2911 | fi | |
2912 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
2913 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
2914 | fi | |
2915 | ||
2916 | if test "$PACKAGE" = "gettext"; then | |
2917 | GT_NO="#NO#" | |
2918 | GT_YES= | |
2919 | else | |
2920 | GT_NO= | |
2921 | GT_YES="#YES#" | |
2922 | fi | |
2923 | ||
2924 | ||
2925 | ||
2926 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
2927 | ||
2928 | ||
2929 | l= | |
2930 | ||
2931 | ||
2932 | if test -d $srcdir/po; then | |
2933 | test -d po || mkdir po | |
2934 | if test "x$srcdir" != "x."; then | |
2935 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
2936 | posrcprefix="$srcdir/" | |
2937 | else | |
2938 | posrcprefix="../$srcdir/" | |
2939 | fi | |
2940 | else | |
2941 | posrcprefix="../" | |
2942 | fi | |
2943 | rm -f po/POTFILES | |
2944 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
2945 | < $srcdir/po/POTFILES.in > po/POTFILES | |
2946 | fi | |
2947 | ||
2948 | ||
2949 | # Check for common headers. | |
2950 | # FIXME: Seems to me this can cause problems for i386-windows hosts. | |
2951 | # At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*. | |
2952 | for ac_hdr in stdlib.h string.h strings.h unistd.h time.h | |
2953 | do | |
2954 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2955 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
cd0fc7c3 | 2956 | echo "configure:2957: checking for $ac_hdr" >&5 |
c906108c SS |
2957 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2958 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2959 | else | |
2960 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 2961 | #line 2962 "configure" |
c906108c SS |
2962 | #include "confdefs.h" |
2963 | #include <$ac_hdr> | |
2964 | EOF | |
2965 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
cd0fc7c3 | 2966 | { (eval echo configure:2967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2967 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2968 | if test -z "$ac_err"; then | |
2969 | rm -rf conftest* | |
2970 | eval "ac_cv_header_$ac_safe=yes" | |
2971 | else | |
2972 | echo "$ac_err" >&5 | |
2973 | echo "configure: failed program was:" >&5 | |
2974 | cat conftest.$ac_ext >&5 | |
2975 | rm -rf conftest* | |
2976 | eval "ac_cv_header_$ac_safe=no" | |
2977 | fi | |
2978 | rm -f conftest* | |
2979 | fi | |
2980 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2981 | echo "$ac_t""yes" 1>&6 | |
2982 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2983 | cat >> confdefs.h <<EOF | |
2984 | #define $ac_tr_hdr 1 | |
2985 | EOF | |
2986 | ||
2987 | else | |
2988 | echo "$ac_t""no" 1>&6 | |
2989 | fi | |
2990 | done | |
2991 | ||
2992 | for ac_hdr in sys/time.h sys/resource.h | |
2993 | do | |
2994 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2995 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
cd0fc7c3 | 2996 | echo "configure:2997: checking for $ac_hdr" >&5 |
c906108c SS |
2997 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2998 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2999 | else | |
3000 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 3001 | #line 3002 "configure" |
c906108c SS |
3002 | #include "confdefs.h" |
3003 | #include <$ac_hdr> | |
3004 | EOF | |
3005 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
cd0fc7c3 | 3006 | { (eval echo configure:3007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
3007 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3008 | if test -z "$ac_err"; then | |
3009 | rm -rf conftest* | |
3010 | eval "ac_cv_header_$ac_safe=yes" | |
3011 | else | |
3012 | echo "$ac_err" >&5 | |
3013 | echo "configure: failed program was:" >&5 | |
3014 | cat conftest.$ac_ext >&5 | |
3015 | rm -rf conftest* | |
3016 | eval "ac_cv_header_$ac_safe=no" | |
3017 | fi | |
3018 | rm -f conftest* | |
3019 | fi | |
3020 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3021 | echo "$ac_t""yes" 1>&6 | |
3022 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3023 | cat >> confdefs.h <<EOF | |
3024 | #define $ac_tr_hdr 1 | |
3025 | EOF | |
3026 | ||
3027 | else | |
3028 | echo "$ac_t""no" 1>&6 | |
3029 | fi | |
3030 | done | |
3031 | ||
3032 | for ac_hdr in fcntl.h fpu_control.h | |
3033 | do | |
3034 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3035 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
cd0fc7c3 SS |
3036 | echo "configure:3037: checking for $ac_hdr" >&5 |
3037 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
3038 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3039 | else | |
3040 | cat > conftest.$ac_ext <<EOF | |
3041 | #line 3042 "configure" | |
3042 | #include "confdefs.h" | |
3043 | #include <$ac_hdr> | |
3044 | EOF | |
3045 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3046 | { (eval echo configure:3047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
3047 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
3048 | if test -z "$ac_err"; then | |
3049 | rm -rf conftest* | |
3050 | eval "ac_cv_header_$ac_safe=yes" | |
3051 | else | |
3052 | echo "$ac_err" >&5 | |
3053 | echo "configure: failed program was:" >&5 | |
3054 | cat conftest.$ac_ext >&5 | |
3055 | rm -rf conftest* | |
3056 | eval "ac_cv_header_$ac_safe=no" | |
3057 | fi | |
3058 | rm -f conftest* | |
3059 | fi | |
3060 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3061 | echo "$ac_t""yes" 1>&6 | |
3062 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3063 | cat >> confdefs.h <<EOF | |
3064 | #define $ac_tr_hdr 1 | |
3065 | EOF | |
3066 | ||
3067 | else | |
3068 | echo "$ac_t""no" 1>&6 | |
3069 | fi | |
3070 | done | |
3071 | ||
3072 | for ac_hdr in dlfcn.h errno.h sys/stat.h | |
3073 | do | |
3074 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3075 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
3076 | echo "configure:3077: checking for $ac_hdr" >&5 | |
c906108c SS |
3077 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3078 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3079 | else | |
3080 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 3081 | #line 3082 "configure" |
c906108c SS |
3082 | #include "confdefs.h" |
3083 | #include <$ac_hdr> | |
3084 | EOF | |
3085 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
cd0fc7c3 | 3086 | { (eval echo configure:3087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
3087 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3088 | if test -z "$ac_err"; then | |
3089 | rm -rf conftest* | |
3090 | eval "ac_cv_header_$ac_safe=yes" | |
3091 | else | |
3092 | echo "$ac_err" >&5 | |
3093 | echo "configure: failed program was:" >&5 | |
3094 | cat conftest.$ac_ext >&5 | |
3095 | rm -rf conftest* | |
3096 | eval "ac_cv_header_$ac_safe=no" | |
3097 | fi | |
3098 | rm -f conftest* | |
3099 | fi | |
3100 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3101 | echo "$ac_t""yes" 1>&6 | |
3102 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3103 | cat >> confdefs.h <<EOF | |
3104 | #define $ac_tr_hdr 1 | |
3105 | EOF | |
3106 | ||
3107 | else | |
3108 | echo "$ac_t""no" 1>&6 | |
3109 | fi | |
3110 | done | |
3111 | ||
3112 | for ac_func in getrusage time sigaction __setfpucw | |
3113 | do | |
3114 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
cd0fc7c3 | 3115 | echo "configure:3116: checking for $ac_func" >&5 |
c906108c SS |
3116 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3117 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3118 | else | |
3119 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 3120 | #line 3121 "configure" |
c906108c SS |
3121 | #include "confdefs.h" |
3122 | /* System header to define __stub macros and hopefully few prototypes, | |
3123 | which can conflict with char $ac_func(); below. */ | |
3124 | #include <assert.h> | |
3125 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3126 | /* We use char because int might match the return type of a gcc2 | |
3127 | builtin and then its argument prototype would still apply. */ | |
3128 | char $ac_func(); | |
3129 | ||
3130 | int main() { | |
3131 | ||
3132 | /* The GNU C library defines this for functions which it implements | |
3133 | to always fail with ENOSYS. Some functions are actually named | |
3134 | something starting with __ and the normal name is an alias. */ | |
3135 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3136 | choke me | |
3137 | #else | |
3138 | $ac_func(); | |
3139 | #endif | |
3140 | ||
3141 | ; return 0; } | |
3142 | EOF | |
cd0fc7c3 | 3143 | if { (eval echo configure:3144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3144 | rm -rf conftest* |
3145 | eval "ac_cv_func_$ac_func=yes" | |
3146 | else | |
3147 | echo "configure: failed program was:" >&5 | |
3148 | cat conftest.$ac_ext >&5 | |
3149 | rm -rf conftest* | |
3150 | eval "ac_cv_func_$ac_func=no" | |
3151 | fi | |
3152 | rm -f conftest* | |
3153 | fi | |
3154 | ||
3155 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3156 | echo "$ac_t""yes" 1>&6 | |
3157 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3158 | cat >> confdefs.h <<EOF | |
3159 | #define $ac_tr_func 1 | |
3160 | EOF | |
3161 | ||
3162 | else | |
3163 | echo "$ac_t""no" 1>&6 | |
3164 | fi | |
3165 | done | |
3166 | ||
3167 | ||
3168 | # Check for socket libraries | |
3169 | echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6 | |
cd0fc7c3 | 3170 | echo "configure:3171: checking for bind in -lsocket" >&5 |
c906108c SS |
3171 | ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'` |
3172 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3173 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3174 | else | |
3175 | ac_save_LIBS="$LIBS" | |
3176 | LIBS="-lsocket $LIBS" | |
3177 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 3178 | #line 3179 "configure" |
c906108c SS |
3179 | #include "confdefs.h" |
3180 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3181 | /* We use char because int might match the return type of a gcc2 | |
3182 | builtin and then its argument prototype would still apply. */ | |
3183 | char bind(); | |
3184 | ||
3185 | int main() { | |
3186 | bind() | |
3187 | ; return 0; } | |
3188 | EOF | |
cd0fc7c3 | 3189 | if { (eval echo configure:3190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3190 | rm -rf conftest* |
3191 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3192 | else | |
3193 | echo "configure: failed program was:" >&5 | |
3194 | cat conftest.$ac_ext >&5 | |
3195 | rm -rf conftest* | |
3196 | eval "ac_cv_lib_$ac_lib_var=no" | |
3197 | fi | |
3198 | rm -f conftest* | |
3199 | LIBS="$ac_save_LIBS" | |
3200 | ||
3201 | fi | |
3202 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3203 | echo "$ac_t""yes" 1>&6 | |
3204 | ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3205 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3206 | cat >> confdefs.h <<EOF | |
3207 | #define $ac_tr_lib 1 | |
3208 | EOF | |
3209 | ||
3210 | LIBS="-lsocket $LIBS" | |
3211 | ||
3212 | else | |
3213 | echo "$ac_t""no" 1>&6 | |
3214 | fi | |
3215 | ||
3216 | echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 | |
cd0fc7c3 | 3217 | echo "configure:3218: checking for gethostbyname in -lnsl" >&5 |
c906108c SS |
3218 | ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` |
3219 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3220 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3221 | else | |
3222 | ac_save_LIBS="$LIBS" | |
3223 | LIBS="-lnsl $LIBS" | |
3224 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 3225 | #line 3226 "configure" |
c906108c SS |
3226 | #include "confdefs.h" |
3227 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3228 | /* We use char because int might match the return type of a gcc2 | |
3229 | builtin and then its argument prototype would still apply. */ | |
3230 | char gethostbyname(); | |
3231 | ||
3232 | int main() { | |
3233 | gethostbyname() | |
3234 | ; return 0; } | |
3235 | EOF | |
cd0fc7c3 | 3236 | if { (eval echo configure:3237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3237 | rm -rf conftest* |
3238 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3239 | else | |
3240 | echo "configure: failed program was:" >&5 | |
3241 | cat conftest.$ac_ext >&5 | |
3242 | rm -rf conftest* | |
3243 | eval "ac_cv_lib_$ac_lib_var=no" | |
3244 | fi | |
3245 | rm -f conftest* | |
3246 | LIBS="$ac_save_LIBS" | |
3247 | ||
3248 | fi | |
3249 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3250 | echo "$ac_t""yes" 1>&6 | |
3251 | ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3252 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3253 | cat >> confdefs.h <<EOF | |
3254 | #define $ac_tr_lib 1 | |
3255 | EOF | |
3256 | ||
3257 | LIBS="-lnsl $LIBS" | |
3258 | ||
3259 | else | |
3260 | echo "$ac_t""no" 1>&6 | |
3261 | fi | |
3262 | ||
3263 | ||
3264 | . ${srcdir}/../../bfd/configure.host | |
3265 | ||
3266 | ||
3267 | ||
3268 | USE_MAINTAINER_MODE=no | |
3269 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. | |
3270 | if test "${enable_maintainer_mode+set}" = set; then | |
3271 | enableval="$enable_maintainer_mode" | |
3272 | case "${enableval}" in | |
3273 | yes) MAINT="" USE_MAINTAINER_MODE=yes ;; | |
3274 | no) MAINT="#" ;; | |
3275 | *) { echo "configure: error: "--enable-maintainer-mode does not take a value"" 1>&2; exit 1; }; MAINT="#" ;; | |
3276 | esac | |
3277 | if test x"$silent" != x"yes" && test x"$MAINT" = x""; then | |
3278 | echo "Setting maintainer mode" 6>&1 | |
3279 | fi | |
3280 | else | |
3281 | MAINT="#" | |
3282 | fi | |
3283 | ||
3284 | ||
3285 | ||
3286 | # Check whether --enable-sim-bswap or --disable-sim-bswap was given. | |
3287 | if test "${enable_sim_bswap+set}" = set; then | |
3288 | enableval="$enable_sim_bswap" | |
3289 | case "${enableval}" in | |
3290 | yes) sim_bswap="-DWITH_BSWAP=1 -DUSE_BSWAP=1";; | |
3291 | no) sim_bswap="-DWITH_BSWAP=0";; | |
3292 | *) { echo "configure: error: "--enable-sim-bswap does not take a value"" 1>&2; exit 1; }; sim_bswap="";; | |
3293 | esac | |
3294 | if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then | |
3295 | echo "Setting bswap flags = $sim_bswap" 6>&1 | |
3296 | fi | |
3297 | else | |
3298 | sim_bswap="" | |
3299 | fi | |
3300 | ||
3301 | ||
3302 | ||
3303 | # Check whether --enable-sim-cflags or --disable-sim-cflags was given. | |
3304 | if test "${enable_sim_cflags+set}" = set; then | |
3305 | enableval="$enable_sim_cflags" | |
3306 | case "${enableval}" in | |
3307 | yes) sim_cflags="-O2 -fomit-frame-pointer";; | |
3308 | trace) { echo "configure: error: "Please use --enable-sim-debug instead."" 1>&2; exit 1; }; sim_cflags="";; | |
3309 | no) sim_cflags="";; | |
3310 | *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
3311 | esac | |
3312 | if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then | |
3313 | echo "Setting sim cflags = $sim_cflags" 6>&1 | |
3314 | fi | |
3315 | else | |
3316 | sim_cflags="" | |
3317 | fi | |
3318 | ||
3319 | ||
3320 | ||
3321 | # Check whether --enable-sim-debug or --disable-sim-debug was given. | |
3322 | if test "${enable_sim_debug+set}" = set; then | |
3323 | enableval="$enable_sim_debug" | |
3324 | case "${enableval}" in | |
3325 | yes) sim_debug="-DDEBUG=7 -DWITH_DEBUG=7";; | |
3326 | no) sim_debug="-DDEBUG=0 -DWITH_DEBUG=0";; | |
3327 | *) sim_debug="-DDEBUG='(${enableval})' -DWITH_DEBUG='(${enableval})'";; | |
3328 | esac | |
3329 | if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then | |
3330 | echo "Setting sim debug = $sim_debug" 6>&1 | |
3331 | fi | |
3332 | else | |
3333 | sim_debug="" | |
3334 | fi | |
3335 | ||
3336 | ||
3337 | ||
3338 | # Check whether --enable-sim-stdio or --disable-sim-stdio was given. | |
3339 | if test "${enable_sim_stdio+set}" = set; then | |
3340 | enableval="$enable_sim_stdio" | |
3341 | case "${enableval}" in | |
3342 | yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";; | |
3343 | no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";; | |
3344 | *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-stdio"" 1>&2; exit 1; }; sim_stdio="";; | |
3345 | esac | |
3346 | if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then | |
3347 | echo "Setting stdio flags = $sim_stdio" 6>&1 | |
3348 | fi | |
3349 | else | |
3350 | sim_stdio="" | |
3351 | fi | |
3352 | ||
3353 | ||
3354 | ||
3355 | # Check whether --enable-sim-trace or --disable-sim-trace was given. | |
3356 | if test "${enable_sim_trace+set}" = set; then | |
3357 | enableval="$enable_sim_trace" | |
3358 | case "${enableval}" in | |
3359 | yes) sim_trace="-DTRACE=1 -DWITH_TRACE=-1";; | |
3360 | no) sim_trace="-DTRACE=0 -DWITH_TRACE=0";; | |
3361 | [-0-9]*) | |
3362 | sim_trace="-DTRACE='(${enableval})' -DWITH_TRACE='(${enableval})'";; | |
3363 | [a-z]*) | |
3364 | sim_trace="" | |
3365 | for x in `echo "$enableval" | sed -e "s/,/ /g"`; do | |
3366 | if test x"$sim_trace" = x; then | |
3367 | sim_trace="-DWITH_TRACE='(TRACE_$x" | |
3368 | else | |
3369 | sim_trace="${sim_trace}|TRACE_$x" | |
3370 | fi | |
3371 | done | |
3372 | sim_trace="$sim_trace)'" ;; | |
3373 | esac | |
3374 | if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then | |
3375 | echo "Setting sim trace = $sim_trace" 6>&1 | |
3376 | fi | |
3377 | else | |
3378 | sim_trace="" | |
3379 | fi | |
3380 | ||
3381 | ||
3382 | ||
3383 | # Check whether --enable-sim-profile or --disable-sim-profile was given. | |
3384 | if test "${enable_sim_profile+set}" = set; then | |
3385 | enableval="$enable_sim_profile" | |
3386 | case "${enableval}" in | |
3387 | yes) sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1";; | |
3388 | no) sim_profile="-DPROFILE=0 -DWITH_PROFILE=0";; | |
3389 | [-0-9]*) | |
3390 | sim_profile="-DPROFILE='(${enableval})' -DWITH_PROFILE='(${enableval})'";; | |
3391 | [a-z]*) | |
3392 | sim_profile="" | |
3393 | for x in `echo "$enableval" | sed -e "s/,/ /g"`; do | |
3394 | if test x"$sim_profile" = x; then | |
3395 | sim_profile="-DWITH_PROFILE='(PROFILE_$x" | |
3396 | else | |
3397 | sim_profile="${sim_profile}|PROFILE_$x" | |
3398 | fi | |
3399 | done | |
3400 | sim_profile="$sim_profile)'" ;; | |
3401 | esac | |
3402 | if test x"$silent" != x"yes" && test x"$sim_profile" != x""; then | |
3403 | echo "Setting sim profile = $sim_profile" 6>&1 | |
3404 | fi | |
3405 | else | |
3406 | sim_profile="" | |
3407 | fi | |
3408 | ||
3409 | ||
3410 | ||
3411 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
cd0fc7c3 | 3412 | echo "configure:3413: checking return type of signal handlers" >&5 |
c906108c SS |
3413 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
3414 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3415 | else | |
3416 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 3417 | #line 3418 "configure" |
c906108c SS |
3418 | #include "confdefs.h" |
3419 | #include <sys/types.h> | |
3420 | #include <signal.h> | |
3421 | #ifdef signal | |
3422 | #undef signal | |
3423 | #endif | |
3424 | #ifdef __cplusplus | |
3425 | extern "C" void (*signal (int, void (*)(int)))(int); | |
3426 | #else | |
3427 | void (*signal ()) (); | |
3428 | #endif | |
3429 | ||
3430 | int main() { | |
3431 | int i; | |
3432 | ; return 0; } | |
3433 | EOF | |
cd0fc7c3 | 3434 | if { (eval echo configure:3435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
3435 | rm -rf conftest* |
3436 | ac_cv_type_signal=void | |
3437 | else | |
3438 | echo "configure: failed program was:" >&5 | |
3439 | cat conftest.$ac_ext >&5 | |
3440 | rm -rf conftest* | |
3441 | ac_cv_type_signal=int | |
3442 | fi | |
3443 | rm -f conftest* | |
3444 | fi | |
3445 | ||
3446 | echo "$ac_t""$ac_cv_type_signal" 1>&6 | |
3447 | cat >> confdefs.h <<EOF | |
3448 | #define RETSIGTYPE $ac_cv_type_signal | |
3449 | EOF | |
3450 | ||
3451 | ||
3452 | ||
cd0fc7c3 SS |
3453 | |
3454 | ||
c906108c | 3455 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 |
cd0fc7c3 SS |
3456 | echo "configure:3457: checking for executable suffix" >&5 |
3457 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then | |
c906108c SS |
3458 | echo $ac_n "(cached) $ac_c" 1>&6 |
3459 | else | |
cd0fc7c3 SS |
3460 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then |
3461 | ac_cv_exeext=.exe | |
3462 | else | |
3463 | rm -f conftest* | |
3464 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
3465 | ac_cv_exeext= | |
3466 | if { (eval echo configure:3467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then | |
3467 | for file in conftest.*; do | |
3468 | case $file in | |
3469 | *.c | *.o | *.obj | *.ilk | *.pdb) ;; | |
3470 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; | |
3471 | esac | |
3472 | done | |
3473 | else | |
3474 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
3475 | fi | |
3476 | rm -f conftest* | |
3477 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
c906108c | 3478 | fi |
c906108c | 3479 | fi |
cd0fc7c3 | 3480 | |
c906108c | 3481 | EXEEXT="" |
cd0fc7c3 SS |
3482 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} |
3483 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
3484 | ac_exeext=$EXEEXT | |
c906108c SS |
3485 | |
3486 | ||
3487 | sim_link_files= | |
3488 | sim_link_links= | |
3489 | ||
3490 | sim_link_links=tconfig.h | |
3491 | if test -f ${srcdir}/tconfig.in | |
3492 | then | |
3493 | sim_link_files=tconfig.in | |
3494 | else | |
3495 | sim_link_files=../common/tconfig.in | |
3496 | fi | |
3497 | ||
3498 | # targ-vals.def points to the libc macro description file. | |
3499 | case "${target}" in | |
3500 | *-*-*) TARG_VALS_DEF=../common/nltvals.def ;; | |
3501 | esac | |
3502 | sim_link_files="${sim_link_files} ${TARG_VALS_DEF}" | |
3503 | sim_link_links="${sim_link_links} targ-vals.def" | |
3504 | ||
3505 | ||
3506 | ||
3507 | ||
3508 | wire_endian="LITTLE_ENDIAN" | |
3509 | default_endian="" | |
3510 | # Check whether --enable-sim-endian or --disable-sim-endian was given. | |
3511 | if test "${enable_sim_endian+set}" = set; then | |
3512 | enableval="$enable_sim_endian" | |
3513 | case "${enableval}" in | |
3514 | b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; | |
3515 | l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; | |
3516 | yes) if test x"$wire_endian" != x; then | |
3517 | sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" | |
3518 | else | |
3519 | if test x"$default_endian" != x; then | |
3520 | sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" | |
3521 | else | |
3522 | echo "No hard-wired endian for target $target" 1>&6 | |
3523 | sim_endian="-DWITH_TARGET_BYTE_ORDER=0" | |
3524 | fi | |
3525 | fi;; | |
3526 | no) if test x"$default_endian" != x; then | |
3527 | sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" | |
3528 | else | |
3529 | if test x"$wire_endian" != x; then | |
3530 | sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" | |
3531 | else | |
3532 | echo "No default endian for target $target" 1>&6 | |
3533 | sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" | |
3534 | fi | |
3535 | fi;; | |
3536 | *) { echo "configure: error: "Unknown value $enableval for --enable-sim-endian"" 1>&2; exit 1; }; sim_endian="";; | |
3537 | esac | |
3538 | if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then | |
3539 | echo "Setting endian flags = $sim_endian" 6>&1 | |
3540 | fi | |
3541 | else | |
3542 | if test x"$default_endian" != x; then | |
3543 | sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" | |
3544 | else | |
3545 | if test x"$wire_endian" != x; then | |
3546 | sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" | |
3547 | else | |
3548 | sim_endian= | |
3549 | fi | |
3550 | fi | |
3551 | fi | |
3552 | ||
3553 | wire_alignment="" | |
3554 | default_alignment="NONSTRICT_ALIGNMENT" | |
3555 | ||
3556 | # Check whether --enable-sim-alignment or --disable-sim-alignment was given. | |
3557 | if test "${enable_sim_alignment+set}" = set; then | |
3558 | enableval="$enable_sim_alignment" | |
3559 | case "${enableval}" in | |
3560 | strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; | |
3561 | nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; | |
3562 | forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; | |
3563 | yes) if test x"$wire_alignment" != x; then | |
3564 | sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" | |
3565 | else | |
3566 | if test x"$default_alignment" != x; then | |
3567 | sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" | |
3568 | else | |
3569 | echo "No hard-wired alignment for target $target" 1>&6 | |
3570 | sim_alignment="-DWITH_ALIGNMENT=0" | |
3571 | fi | |
3572 | fi;; | |
3573 | no) if test x"$default_alignment" != x; then | |
3574 | sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" | |
3575 | else | |
3576 | if test x"$wire_alignment" != x; then | |
3577 | sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" | |
3578 | else | |
3579 | echo "No default alignment for target $target" 1>&6 | |
3580 | sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" | |
3581 | fi | |
3582 | fi;; | |
3583 | *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-alignment"" 1>&2; exit 1; }; sim_alignment="";; | |
3584 | esac | |
3585 | if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then | |
3586 | echo "Setting alignment flags = $sim_alignment" 6>&1 | |
3587 | fi | |
3588 | else | |
3589 | if test x"$default_alignment" != x; then | |
3590 | sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" | |
3591 | else | |
3592 | if test x"$wire_alignment" != x; then | |
3593 | sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" | |
3594 | else | |
3595 | sim_alignment= | |
3596 | fi | |
3597 | fi | |
3598 | fi | |
3599 | ||
3600 | ||
3601 | # Check whether --enable-sim-hostendian or --disable-sim-hostendian was given. | |
3602 | if test "${enable_sim_hostendian+set}" = set; then | |
3603 | enableval="$enable_sim_hostendian" | |
3604 | case "${enableval}" in | |
3605 | no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; | |
3606 | b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; | |
3607 | l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; | |
3608 | *) { echo "configure: error: "Unknown value $enableval for --enable-sim-hostendian"" 1>&2; exit 1; }; sim_hostendian="";; | |
3609 | esac | |
3610 | if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then | |
3611 | echo "Setting hostendian flags = $sim_hostendian" 6>&1 | |
3612 | fi | |
3613 | else | |
3614 | ||
3615 | if test "x$cross_compiling" = "xno"; then | |
3616 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 | |
cd0fc7c3 | 3617 | echo "configure:3618: checking whether byte ordering is bigendian" >&5 |
c906108c SS |
3618 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
3619 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3620 | else | |
3621 | ac_cv_c_bigendian=unknown | |
3622 | # See if sys/param.h defines the BYTE_ORDER macro. | |
3623 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 3624 | #line 3625 "configure" |
c906108c SS |
3625 | #include "confdefs.h" |
3626 | #include <sys/types.h> | |
3627 | #include <sys/param.h> | |
3628 | int main() { | |
3629 | ||
3630 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN | |
3631 | bogus endian macros | |
3632 | #endif | |
3633 | ; return 0; } | |
3634 | EOF | |
cd0fc7c3 | 3635 | if { (eval echo configure:3636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
3636 | rm -rf conftest* |
3637 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
3638 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 3639 | #line 3640 "configure" |
c906108c SS |
3640 | #include "confdefs.h" |
3641 | #include <sys/types.h> | |
3642 | #include <sys/param.h> | |
3643 | int main() { | |
3644 | ||
3645 | #if BYTE_ORDER != BIG_ENDIAN | |
3646 | not big endian | |
3647 | #endif | |
3648 | ; return 0; } | |
3649 | EOF | |
cd0fc7c3 | 3650 | if { (eval echo configure:3651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
3651 | rm -rf conftest* |
3652 | ac_cv_c_bigendian=yes | |
3653 | else | |
3654 | echo "configure: failed program was:" >&5 | |
3655 | cat conftest.$ac_ext >&5 | |
3656 | rm -rf conftest* | |
3657 | ac_cv_c_bigendian=no | |
3658 | fi | |
3659 | rm -f conftest* | |
3660 | else | |
3661 | echo "configure: failed program was:" >&5 | |
3662 | cat conftest.$ac_ext >&5 | |
3663 | fi | |
3664 | rm -f conftest* | |
3665 | if test $ac_cv_c_bigendian = unknown; then | |
3666 | if test "$cross_compiling" = yes; then | |
3667 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } | |
3668 | else | |
3669 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 3670 | #line 3671 "configure" |
c906108c SS |
3671 | #include "confdefs.h" |
3672 | main () { | |
3673 | /* Are we little or big endian? From Harbison&Steele. */ | |
3674 | union | |
3675 | { | |
3676 | long l; | |
3677 | char c[sizeof (long)]; | |
3678 | } u; | |
3679 | u.l = 1; | |
3680 | exit (u.c[sizeof (long) - 1] == 1); | |
3681 | } | |
3682 | EOF | |
cd0fc7c3 | 3683 | if { (eval echo configure:3684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
3684 | then |
3685 | ac_cv_c_bigendian=no | |
3686 | else | |
3687 | echo "configure: failed program was:" >&5 | |
3688 | cat conftest.$ac_ext >&5 | |
3689 | rm -fr conftest* | |
3690 | ac_cv_c_bigendian=yes | |
3691 | fi | |
3692 | rm -fr conftest* | |
3693 | fi | |
3694 | ||
3695 | fi | |
3696 | fi | |
3697 | ||
3698 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 | |
3699 | if test $ac_cv_c_bigendian = yes; then | |
3700 | cat >> confdefs.h <<\EOF | |
3701 | #define WORDS_BIGENDIAN 1 | |
3702 | EOF | |
3703 | ||
3704 | fi | |
3705 | ||
3706 | if test $ac_cv_c_bigendian = yes; then | |
3707 | sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" | |
3708 | else | |
3709 | sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" | |
3710 | fi | |
3711 | else | |
3712 | sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" | |
3713 | fi | |
3714 | fi | |
3715 | ||
3716 | ||
3717 | # Check whether --enable-build-warnings or --disable-build-warnings was given. | |
3718 | if test "${enable_build_warnings+set}" = set; then | |
3719 | enableval="$enable_build_warnings" | |
3720 | build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations" | |
3721 | case "${enableval}" in | |
3722 | yes) ;; | |
3723 | no) build_warnings="-w";; | |
3724 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
3725 | build_warnings="${build_warnings} ${t}";; | |
3726 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
3727 | build_warnings="${t} ${build_warnings}";; | |
3728 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
3729 | esac | |
3730 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
3731 | echo "Setting warning flags = $build_warnings" 6>&1 | |
3732 | fi | |
3733 | else | |
3734 | build_warnings="" | |
3735 | fi | |
3736 | ||
3737 | ||
3738 | default_sim_reserved_bits="1" | |
3739 | # Check whether --enable-sim-reserved-bits or --disable-sim-reserved-bits was given. | |
3740 | if test "${enable_sim_reserved_bits+set}" = set; then | |
3741 | enableval="$enable_sim_reserved_bits" | |
3742 | case "${enableval}" in | |
3743 | yes) sim_reserved_bits="-DWITH_RESERVED_BITS=1";; | |
3744 | no) sim_reserved_bits="-DWITH_RESERVED_BITS=0";; | |
3745 | *) { echo "configure: error: "--enable-sim-reserved-bits does not take a value"" 1>&2; exit 1; }; sim_reserved_bits="";; | |
3746 | esac | |
3747 | if test x"$silent" != x"yes" && test x"$sim_reserved_bits" != x""; then | |
3748 | echo "Setting reserved flags = $sim_reserved_bits" 6>&1 | |
3749 | fi | |
3750 | else | |
3751 | sim_reserved_bits="-DWITH_RESERVED_BITS=${default_sim_reserved_bits}" | |
3752 | fi | |
3753 | ||
3754 | wire_word_bitsize="32" | |
3755 | wire_word_msb="31" | |
3756 | wire_address_bitsize="" | |
3757 | wire_cell_bitsize="" | |
3758 | # Check whether --enable-sim-bitsize or --disable-sim-bitsize was given. | |
3759 | if test "${enable_sim_bitsize+set}" = set; then | |
3760 | enableval="$enable_sim_bitsize" | |
3761 | sim_bitsize= | |
3762 | case "${enableval}" in | |
3763 | 64,63 | 64,63,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63";; | |
3764 | 32,31 | 32,31,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31";; | |
3765 | 64,0 | 64,0,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0";; | |
3766 | 32,0 | 64,0,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0";; | |
3767 | 32) if test x"$wire_word_msb" != x -a x"$wire_word_msb" != x0; then | |
3768 | sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31" | |
3769 | else | |
3770 | sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0" | |
3771 | fi ;; | |
3772 | 64) if test x"$wire_word_msb" != x -a x"$wire_word_msb" != x0; then | |
3773 | sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63" | |
3774 | else | |
3775 | sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=0" | |
3776 | fi ;; | |
3777 | *) { echo "configure: error: "--enable-sim-bitsize was given $enableval. Expected 32 or 64"" 1>&2; exit 1; } ;; | |
3778 | esac | |
3779 | # address bitsize | |
3780 | tmp=`echo "${enableval}" | sed -e "s/^[0-9]*,*[0-9]*,*//"` | |
3781 | case x"${tmp}" in | |
3782 | x ) ;; | |
3783 | x32 | x32,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_ADDRESS_BITSIZE=32" ;; | |
3784 | x64 | x64,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_ADDRESS_BITSIZE=64" ;; | |
3785 | * ) { echo "configure: error: "--enable-sim-bitsize was given address size $enableval. Expected 32 or 64"" 1>&2; exit 1; } ;; | |
3786 | esac | |
3787 | # cell bitsize | |
3788 | tmp=`echo "${enableval}" | sed -e "s/^[0-9]*,*[0-9*]*,*[0-9]*,*//"` | |
3789 | case x"${tmp}" in | |
3790 | x ) ;; | |
3791 | x32 | x32,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_CELL_BITSIZE=32" ;; | |
3792 | x64 | x64,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_CELL_BITSIZE=64" ;; | |
3793 | * ) { echo "configure: error: "--enable-sim-bitsize was given cell size $enableval. Expected 32 or 64"" 1>&2; exit 1; } ;; | |
3794 | esac | |
3795 | if test x"$silent" != x"yes" && test x"$sim_bitsize" != x""; then | |
3796 | echo "Setting bitsize flags = $sim_bitsize" 6>&1 | |
3797 | fi | |
3798 | else | |
3799 | sim_bitsize="" | |
3800 | if test x"$wire_word_bitsize" != x; then | |
3801 | sim_bitsize="$sim_bitsize -DWITH_TARGET_WORD_BITSIZE=$wire_word_bitsize" | |
3802 | fi | |
3803 | if test x"$wire_word_msb" != x; then | |
3804 | sim_bitsize="$sim_bitsize -DWITH_TARGET_WORD_MSB=$wire_word_msb" | |
3805 | fi | |
3806 | if test x"$wire_address_bitsize" != x; then | |
3807 | sim_bitsize="$sim_bitsize -DWITH_TARGET_ADDRESS_BITSIZE=$wire_address_bitsize" | |
3808 | fi | |
3809 | if test x"$wire_cell_bitsize" != x; then | |
3810 | sim_bitsize="$sim_bitsize -DWITH_TARGET_CELL_BITSIZE=$wire_cell_bitsize" | |
3811 | fi | |
3812 | fi | |
3813 | ||
3814 | ||
3815 | for ac_func in time chmod utime fork execve execv chown | |
3816 | do | |
3817 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
cd0fc7c3 | 3818 | echo "configure:3819: checking for $ac_func" >&5 |
c906108c SS |
3819 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3820 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3821 | else | |
3822 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 3823 | #line 3824 "configure" |
c906108c SS |
3824 | #include "confdefs.h" |
3825 | /* System header to define __stub macros and hopefully few prototypes, | |
3826 | which can conflict with char $ac_func(); below. */ | |
3827 | #include <assert.h> | |
3828 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3829 | /* We use char because int might match the return type of a gcc2 | |
3830 | builtin and then its argument prototype would still apply. */ | |
3831 | char $ac_func(); | |
3832 | ||
3833 | int main() { | |
3834 | ||
3835 | /* The GNU C library defines this for functions which it implements | |
3836 | to always fail with ENOSYS. Some functions are actually named | |
3837 | something starting with __ and the normal name is an alias. */ | |
3838 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3839 | choke me | |
3840 | #else | |
3841 | $ac_func(); | |
3842 | #endif | |
3843 | ||
3844 | ; return 0; } | |
3845 | EOF | |
cd0fc7c3 | 3846 | if { (eval echo configure:3847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3847 | rm -rf conftest* |
3848 | eval "ac_cv_func_$ac_func=yes" | |
3849 | else | |
3850 | echo "configure: failed program was:" >&5 | |
3851 | cat conftest.$ac_ext >&5 | |
3852 | rm -rf conftest* | |
3853 | eval "ac_cv_func_$ac_func=no" | |
3854 | fi | |
3855 | rm -f conftest* | |
3856 | fi | |
3857 | ||
3858 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3859 | echo "$ac_t""yes" 1>&6 | |
3860 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3861 | cat >> confdefs.h <<EOF | |
3862 | #define $ac_tr_func 1 | |
3863 | EOF | |
3864 | ||
3865 | else | |
3866 | echo "$ac_t""no" 1>&6 | |
3867 | fi | |
3868 | done | |
3869 | ||
3870 | for ac_hdr in unistd.h stdlib.h string.h strings.h utime.h time.h | |
3871 | do | |
3872 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3873 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
cd0fc7c3 | 3874 | echo "configure:3875: checking for $ac_hdr" >&5 |
c906108c SS |
3875 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3876 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3877 | else | |
3878 | cat > conftest.$ac_ext <<EOF | |
cd0fc7c3 | 3879 | #line 3880 "configure" |
c906108c SS |
3880 | #include "confdefs.h" |
3881 | #include <$ac_hdr> | |
3882 | EOF | |
3883 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
cd0fc7c3 | 3884 | { (eval echo configure:3885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
3885 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3886 | if test -z "$ac_err"; then | |
3887 | rm -rf conftest* | |
3888 | eval "ac_cv_header_$ac_safe=yes" | |
3889 | else | |
3890 | echo "$ac_err" >&5 | |
3891 | echo "configure: failed program was:" >&5 | |
3892 | cat conftest.$ac_ext >&5 | |
3893 | rm -rf conftest* | |
3894 | eval "ac_cv_header_$ac_safe=no" | |
3895 | fi | |
3896 | rm -f conftest* | |
3897 | fi | |
3898 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3899 | echo "$ac_t""yes" 1>&6 | |
3900 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3901 | cat >> confdefs.h <<EOF | |
3902 | #define $ac_tr_hdr 1 | |
3903 | EOF | |
3904 | ||
3905 | else | |
3906 | echo "$ac_t""no" 1>&6 | |
3907 | fi | |
3908 | done | |
3909 | ||
3910 | ||
3911 | ||
3912 | ||
3913 | trap '' 1 2 15 | |
3914 | cat > confcache <<\EOF | |
3915 | # This file is a shell script that caches the results of configure | |
3916 | # tests run on this system so they can be shared between configure | |
3917 | # scripts and configure runs. It is not useful on other systems. | |
3918 | # If it contains results you don't want to keep, you may remove or edit it. | |
3919 | # | |
3920 | # By default, configure uses ./config.cache as the cache file, | |
3921 | # creating it if it does not exist already. You can give configure | |
3922 | # the --cache-file=FILE option to use a different cache file; that is | |
3923 | # what configure does when it calls configure scripts in | |
3924 | # subdirectories, so they share the cache. | |
3925 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
3926 | # config.status only pays attention to the cache file if you give it the | |
3927 | # --recheck option to rerun configure. | |
3928 | # | |
3929 | EOF | |
3930 | # The following way of writing the cache mishandles newlines in values, | |
3931 | # but we know of no workaround that is simple, portable, and efficient. | |
3932 | # So, don't put newlines in cache variables' values. | |
3933 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
3934 | # and sets the high bit in the cache file unless we assign to the vars. | |
3935 | (set) 2>&1 | | |
cd0fc7c3 | 3936 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
c906108c SS |
3937 | *ac_space=\ *) |
3938 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
3939 | # turns \\\\ into \\, and sed turns \\ into \). | |
3940 | sed -n \ | |
3941 | -e "s/'/'\\\\''/g" \ | |
3942 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
3943 | ;; | |
3944 | *) | |
3945 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
3946 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
3947 | ;; | |
3948 | esac >> confcache | |
3949 | if cmp -s $cache_file confcache; then | |
3950 | : | |
3951 | else | |
3952 | if test -w $cache_file; then | |
3953 | echo "updating cache $cache_file" | |
3954 | cat confcache > $cache_file | |
3955 | else | |
3956 | echo "not updating unwritable cache $cache_file" | |
3957 | fi | |
3958 | fi | |
3959 | rm -f confcache | |
3960 | ||
3961 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
3962 | ||
3963 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
3964 | # Let make expand exec_prefix. | |
3965 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
3966 | ||
3967 | # Any assignment to VPATH causes Sun make to only execute | |
3968 | # the first set of double-colon rules, so remove it if not needed. | |
3969 | # If there is a colon in the path, we need to keep it. | |
3970 | if test "x$srcdir" = x.; then | |
3971 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
3972 | fi | |
3973 | ||
3974 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
3975 | ||
3976 | DEFS=-DHAVE_CONFIG_H | |
3977 | ||
3978 | # Without the "./", some shells look in PATH for config.status. | |
3979 | : ${CONFIG_STATUS=./config.status} | |
3980 | ||
3981 | echo creating $CONFIG_STATUS | |
3982 | rm -f $CONFIG_STATUS | |
3983 | cat > $CONFIG_STATUS <<EOF | |
3984 | #! /bin/sh | |
3985 | # Generated automatically by configure. | |
3986 | # Run this file to recreate the current configuration. | |
3987 | # This directory was configured as follows, | |
3988 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
3989 | # | |
3990 | # $0 $ac_configure_args | |
3991 | # | |
3992 | # Compiler output produced by configure, useful for debugging | |
3993 | # configure, is in ./config.log if it exists. | |
3994 | ||
3995 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
3996 | for ac_option | |
3997 | do | |
3998 | case "\$ac_option" in | |
3999 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
4000 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
4001 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
4002 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
cd0fc7c3 | 4003 | echo "$CONFIG_STATUS generated by autoconf version 2.13" |
c906108c SS |
4004 | exit 0 ;; |
4005 | -help | --help | --hel | --he | --h) | |
4006 | echo "\$ac_cs_usage"; exit 0 ;; | |
4007 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
4008 | esac | |
4009 | done | |
4010 | ||
4011 | ac_given_srcdir=$srcdir | |
4012 | ac_given_INSTALL="$INSTALL" | |
4013 | ||
4014 | trap 'rm -fr `echo "Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 | |
4015 | EOF | |
4016 | cat >> $CONFIG_STATUS <<EOF | |
4017 | ||
4018 | # Protect against being on the right side of a sed subst in config.status. | |
4019 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
4020 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
4021 | $ac_vpsub | |
4022 | $extrasub | |
4023 | s%@sim_environment@%$sim_environment%g | |
4024 | s%@sim_alignment@%$sim_alignment%g | |
4025 | s%@sim_assert@%$sim_assert%g | |
4026 | s%@sim_bitsize@%$sim_bitsize%g | |
4027 | s%@sim_endian@%$sim_endian%g | |
4028 | s%@sim_hostendian@%$sim_hostendian%g | |
4029 | s%@sim_float@%$sim_float%g | |
4030 | s%@sim_scache@%$sim_scache%g | |
4031 | s%@sim_default_model@%$sim_default_model%g | |
4032 | s%@sim_hw_cflags@%$sim_hw_cflags%g | |
4033 | s%@sim_hw_objs@%$sim_hw_objs%g | |
4034 | s%@sim_hw@%$sim_hw%g | |
4035 | s%@sim_inline@%$sim_inline%g | |
4036 | s%@sim_packages@%$sim_packages%g | |
4037 | s%@sim_regparm@%$sim_regparm%g | |
4038 | s%@sim_reserved_bits@%$sim_reserved_bits%g | |
4039 | s%@sim_smp@%$sim_smp%g | |
4040 | s%@sim_stdcall@%$sim_stdcall%g | |
4041 | s%@sim_xor_endian@%$sim_xor_endian%g | |
4042 | s%@build_warnings@%$build_warnings%g | |
4043 | s%@SHELL@%$SHELL%g | |
4044 | s%@CFLAGS@%$CFLAGS%g | |
4045 | s%@CPPFLAGS@%$CPPFLAGS%g | |
4046 | s%@CXXFLAGS@%$CXXFLAGS%g | |
cd0fc7c3 | 4047 | s%@FFLAGS@%$FFLAGS%g |
c906108c SS |
4048 | s%@DEFS@%$DEFS%g |
4049 | s%@LDFLAGS@%$LDFLAGS%g | |
4050 | s%@LIBS@%$LIBS%g | |
4051 | s%@exec_prefix@%$exec_prefix%g | |
4052 | s%@prefix@%$prefix%g | |
4053 | s%@program_transform_name@%$program_transform_name%g | |
4054 | s%@bindir@%$bindir%g | |
4055 | s%@sbindir@%$sbindir%g | |
4056 | s%@libexecdir@%$libexecdir%g | |
4057 | s%@datadir@%$datadir%g | |
4058 | s%@sysconfdir@%$sysconfdir%g | |
4059 | s%@sharedstatedir@%$sharedstatedir%g | |
4060 | s%@localstatedir@%$localstatedir%g | |
4061 | s%@libdir@%$libdir%g | |
4062 | s%@includedir@%$includedir%g | |
4063 | s%@oldincludedir@%$oldincludedir%g | |
4064 | s%@infodir@%$infodir%g | |
4065 | s%@mandir@%$mandir%g | |
4066 | s%@host@%$host%g | |
4067 | s%@host_alias@%$host_alias%g | |
4068 | s%@host_cpu@%$host_cpu%g | |
4069 | s%@host_vendor@%$host_vendor%g | |
4070 | s%@host_os@%$host_os%g | |
4071 | s%@target@%$target%g | |
4072 | s%@target_alias@%$target_alias%g | |
4073 | s%@target_cpu@%$target_cpu%g | |
4074 | s%@target_vendor@%$target_vendor%g | |
4075 | s%@target_os@%$target_os%g | |
4076 | s%@build@%$build%g | |
4077 | s%@build_alias@%$build_alias%g | |
4078 | s%@build_cpu@%$build_cpu%g | |
4079 | s%@build_vendor@%$build_vendor%g | |
4080 | s%@build_os@%$build_os%g | |
4081 | s%@CC@%$CC%g | |
4082 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g | |
cd0fc7c3 | 4083 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g |
c906108c SS |
4084 | s%@INSTALL_DATA@%$INSTALL_DATA%g |
4085 | s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g | |
4086 | s%@HDEFINES@%$HDEFINES%g | |
4087 | s%@AR@%$AR%g | |
4088 | s%@RANLIB@%$RANLIB%g | |
4089 | s%@SET_MAKE@%$SET_MAKE%g | |
4090 | s%@CPP@%$CPP%g | |
4091 | s%@ALLOCA@%$ALLOCA%g | |
4092 | s%@USE_NLS@%$USE_NLS%g | |
4093 | s%@MSGFMT@%$MSGFMT%g | |
4094 | s%@GMSGFMT@%$GMSGFMT%g | |
4095 | s%@XGETTEXT@%$XGETTEXT%g | |
4096 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
4097 | s%@CATALOGS@%$CATALOGS%g | |
4098 | s%@CATOBJEXT@%$CATOBJEXT%g | |
4099 | s%@DATADIRNAME@%$DATADIRNAME%g | |
4100 | s%@GMOFILES@%$GMOFILES%g | |
4101 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
4102 | s%@INTLDEPS@%$INTLDEPS%g | |
4103 | s%@INTLLIBS@%$INTLLIBS%g | |
4104 | s%@INTLOBJS@%$INTLOBJS%g | |
4105 | s%@POFILES@%$POFILES%g | |
4106 | s%@POSUB@%$POSUB%g | |
4107 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
4108 | s%@GT_NO@%$GT_NO%g | |
4109 | s%@GT_YES@%$GT_YES%g | |
4110 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
4111 | s%@l@%$l%g | |
4112 | s%@MAINT@%$MAINT%g | |
4113 | s%@sim_bswap@%$sim_bswap%g | |
4114 | s%@sim_cflags@%$sim_cflags%g | |
4115 | s%@sim_debug@%$sim_debug%g | |
4116 | s%@sim_stdio@%$sim_stdio%g | |
4117 | s%@sim_trace@%$sim_trace%g | |
4118 | s%@sim_profile@%$sim_profile%g | |
4119 | s%@EXEEXT@%$EXEEXT%g | |
4120 | ||
4121 | CEOF | |
4122 | EOF | |
4123 | ||
4124 | cat >> $CONFIG_STATUS <<\EOF | |
4125 | ||
4126 | # Split the substitutions into bite-sized pieces for seds with | |
4127 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
4128 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
4129 | ac_file=1 # Number of current file. | |
4130 | ac_beg=1 # First line for current file. | |
4131 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
4132 | ac_more_lines=: | |
4133 | ac_sed_cmds="" | |
4134 | while $ac_more_lines; do | |
4135 | if test $ac_beg -gt 1; then | |
4136 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
4137 | else | |
4138 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
4139 | fi | |
4140 | if test ! -s conftest.s$ac_file; then | |
4141 | ac_more_lines=false | |
4142 | rm -f conftest.s$ac_file | |
4143 | else | |
4144 | if test -z "$ac_sed_cmds"; then | |
4145 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
4146 | else | |
4147 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
4148 | fi | |
4149 | ac_file=`expr $ac_file + 1` | |
4150 | ac_beg=$ac_end | |
4151 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
4152 | fi | |
4153 | done | |
4154 | if test -z "$ac_sed_cmds"; then | |
4155 | ac_sed_cmds=cat | |
4156 | fi | |
4157 | EOF | |
4158 | ||
4159 | cat >> $CONFIG_STATUS <<EOF | |
4160 | ||
4161 | CONFIG_FILES=\${CONFIG_FILES-"Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in"} | |
4162 | EOF | |
4163 | cat >> $CONFIG_STATUS <<\EOF | |
4164 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
4165 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
4166 | case "$ac_file" in | |
4167 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
4168 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
4169 | *) ac_file_in="${ac_file}.in" ;; | |
4170 | esac | |
4171 | ||
4172 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
4173 | ||
4174 | # Remove last slash and all that follows it. Not all systems have dirname. | |
4175 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
4176 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
4177 | # The file is in a subdirectory. | |
4178 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
4179 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
4180 | # A "../" for each directory in $ac_dir_suffix. | |
4181 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
4182 | else | |
4183 | ac_dir_suffix= ac_dots= | |
4184 | fi | |
4185 | ||
4186 | case "$ac_given_srcdir" in | |
4187 | .) srcdir=. | |
4188 | if test -z "$ac_dots"; then top_srcdir=. | |
4189 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
4190 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
4191 | *) # Relative path. | |
4192 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
4193 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
4194 | esac | |
4195 | ||
4196 | case "$ac_given_INSTALL" in | |
4197 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
4198 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
4199 | esac | |
4200 | ||
4201 | echo creating "$ac_file" | |
4202 | rm -f "$ac_file" | |
4203 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
4204 | case "$ac_file" in | |
4205 | *Makefile*) ac_comsub="1i\\ | |
4206 | # $configure_input" ;; | |
4207 | *) ac_comsub= ;; | |
4208 | esac | |
4209 | ||
4210 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
4211 | sed -e "$ac_comsub | |
4212 | s%@configure_input@%$configure_input%g | |
4213 | s%@srcdir@%$srcdir%g | |
4214 | s%@top_srcdir@%$top_srcdir%g | |
4215 | s%@INSTALL@%$INSTALL%g | |
4216 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
4217 | fi; done | |
4218 | rm -f conftest.s* | |
4219 | ||
4220 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
4221 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
4222 | # | |
4223 | # ac_d sets the value in "#define NAME VALUE" lines. | |
4224 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
4225 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
4226 | ac_dC='\3' | |
4227 | ac_dD='%g' | |
4228 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
4229 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
4230 | ac_uB='\([ ]\)%\1#\2define\3' | |
4231 | ac_uC=' ' | |
4232 | ac_uD='\4%g' | |
4233 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
4234 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
4235 | ac_eB='$%\1#\2define\3' | |
4236 | ac_eC=' ' | |
4237 | ac_eD='%g' | |
4238 | ||
4239 | if test "${CONFIG_HEADERS+set}" != set; then | |
4240 | EOF | |
4241 | cat >> $CONFIG_STATUS <<EOF | |
4242 | CONFIG_HEADERS="config.h:config.in" | |
4243 | EOF | |
4244 | cat >> $CONFIG_STATUS <<\EOF | |
4245 | fi | |
4246 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
4247 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
4248 | case "$ac_file" in | |
4249 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
4250 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
4251 | *) ac_file_in="${ac_file}.in" ;; | |
4252 | esac | |
4253 | ||
4254 | echo creating $ac_file | |
4255 | ||
4256 | rm -f conftest.frag conftest.in conftest.out | |
4257 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
4258 | cat $ac_file_inputs > conftest.in | |
4259 | ||
4260 | EOF | |
4261 | ||
4262 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
4263 | # the proper values into config.h.in to produce config.h. And first: | |
4264 | # Protect against being on the right side of a sed subst in config.status. | |
4265 | # Protect against being in an unquoted here document in config.status. | |
4266 | rm -f conftest.vals | |
4267 | cat > conftest.hdr <<\EOF | |
4268 | s/[\\&%]/\\&/g | |
4269 | s%[\\$`]%\\&%g | |
4270 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
4271 | s%ac_d%ac_u%gp | |
4272 | s%ac_u%ac_e%gp | |
4273 | EOF | |
4274 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
4275 | rm -f conftest.hdr | |
4276 | ||
4277 | # This sed command replaces #undef with comments. This is necessary, for | |
4278 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
4279 | # on some systems where configure will not decide to define it. | |
4280 | cat >> conftest.vals <<\EOF | |
4281 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
4282 | EOF | |
4283 | ||
4284 | # Break up conftest.vals because some shells have a limit on | |
4285 | # the size of here documents, and old seds have small limits too. | |
4286 | ||
4287 | rm -f conftest.tail | |
4288 | while : | |
4289 | do | |
4290 | ac_lines=`grep -c . conftest.vals` | |
4291 | # grep -c gives empty output for an empty file on some AIX systems. | |
4292 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
4293 | # Write a limited-size here document to conftest.frag. | |
4294 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
4295 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
4296 | echo 'CEOF | |
4297 | sed -f conftest.frag conftest.in > conftest.out | |
4298 | rm -f conftest.in | |
4299 | mv conftest.out conftest.in | |
4300 | ' >> $CONFIG_STATUS | |
4301 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
4302 | rm -f conftest.vals | |
4303 | mv conftest.tail conftest.vals | |
4304 | done | |
4305 | rm -f conftest.vals | |
4306 | ||
4307 | cat >> $CONFIG_STATUS <<\EOF | |
4308 | rm -f conftest.frag conftest.h | |
4309 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
4310 | cat conftest.in >> conftest.h | |
4311 | rm -f conftest.in | |
4312 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
4313 | echo "$ac_file is unchanged" | |
4314 | rm -f conftest.h | |
4315 | else | |
4316 | # Remove last slash and all that follows it. Not all systems have dirname. | |
4317 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
4318 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
4319 | # The file is in a subdirectory. | |
4320 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
4321 | fi | |
4322 | rm -f $ac_file | |
4323 | mv conftest.h $ac_file | |
4324 | fi | |
4325 | fi; done | |
4326 | ||
4327 | EOF | |
4328 | ||
4329 | cat >> $CONFIG_STATUS <<EOF | |
4330 | ac_sources="$sim_link_files" | |
4331 | ac_dests="$sim_link_links" | |
4332 | EOF | |
4333 | ||
4334 | cat >> $CONFIG_STATUS <<\EOF | |
4335 | srcdir=$ac_given_srcdir | |
4336 | while test -n "$ac_sources"; do | |
4337 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
4338 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
4339 | ||
4340 | echo "linking $srcdir/$ac_source to $ac_dest" | |
4341 | ||
4342 | if test ! -r $srcdir/$ac_source; then | |
4343 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
4344 | fi | |
4345 | rm -f $ac_dest | |
4346 | ||
4347 | # Make relative symlinks. | |
4348 | # Remove last slash and all that follows it. Not all systems have dirname. | |
4349 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
4350 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
4351 | # The dest file is in a subdirectory. | |
4352 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
4353 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
4354 | # A "../" for each directory in $ac_dest_dir_suffix. | |
4355 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
4356 | else | |
4357 | ac_dest_dir_suffix= ac_dots= | |
4358 | fi | |
4359 | ||
4360 | case "$srcdir" in | |
4361 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
4362 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
4363 | esac | |
4364 | ||
4365 | # Make a symlink if possible; otherwise try a hard link. | |
4366 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
4367 | ln $srcdir/$ac_source $ac_dest; then : | |
4368 | else | |
4369 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
4370 | fi | |
4371 | done | |
4372 | EOF | |
4373 | cat >> $CONFIG_STATUS <<EOF | |
4374 | ||
4375 | EOF | |
4376 | cat >> $CONFIG_STATUS <<\EOF | |
4377 | case "x$CONFIG_FILES" in | |
4378 | xMakefile*) | |
4379 | echo "Merging Makefile.sim+Make-common.sim into Makefile ..." | |
4380 | rm -f Makesim1.tmp Makesim2.tmp Makefile | |
4381 | sed -n -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ p' <Make-common.sim >Makesim1.tmp | |
4382 | sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >Makesim2.tmp | |
4383 | sed -e '/^## COMMON_PRE_/ r Makesim1.tmp' \ | |
4384 | -e '/^## COMMON_POST_/ r Makesim2.tmp' \ | |
4385 | <Makefile.sim >Makefile | |
4386 | rm -f Makefile.sim Make-common.sim Makesim1.tmp Makesim2.tmp | |
4387 | ;; | |
4388 | esac | |
4389 | case "x$CONFIG_HEADERS" in xconfig.h:config.in) echo > stamp-h ;; esac | |
4390 | ||
4391 | exit 0 | |
4392 | EOF | |
4393 | chmod +x $CONFIG_STATUS | |
4394 | rm -fr confdefs* $ac_clean_files | |
4395 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
4396 | ||
4397 |