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