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