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