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