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