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