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