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