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