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