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