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