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