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