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