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