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