]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/mips/configure
* config/sh/tm-sh.h (BELIEVE_PCC_PROMOTION): Define, so that
[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 mips64vr5xxx*-*-*) SIM_SUBTARGET="-DTARGET_ENABLE_FR=1" ;;
3677 mips*tx39*) SIM_SUBTARGET="-DSUBTARGET_R3900=1";;
3678 *) SIM_SUBTARGET="";;
3679 esac
3680
3681
3682
3683
3684 #
3685 # Select the byte order of the target
3686 #
3687 mips_endian=
3688 default_endian=
3689 case "${target}" in
3690 # start-sanitize-tx19
3691 mips*tx19*) default_endian=BIG_ENDIAN ;;
3692 # end-sanitize-tx19
3693 # start-sanitize-r5900
3694 mips64r59*-*-*) mips_endian=LITTLE_ENDIAN ;;
3695 # end-sanitize-r5900
3696 mips64el*-*-*) mips_endian=LITTLE_ENDIAN ;;
3697 mips64*-*-*) default_endian=BIG_ENDIAN ;;
3698 mips16*-*-*) default_endian=BIG_ENDIAN ;;
3699 mips*-*-*) default_endian=BIG_ENDIAN ;;
3700 *) default_endian=BIG_ENDIAN ;;
3701 esac
3702
3703 wire_endian="$mips_endian"
3704 default_endian="$default_endian"
3705 # Check whether --enable-sim-endian or --disable-sim-endian was given.
3706 if test "${enable_sim_endian+set}" = set; then
3707 enableval="$enable_sim_endian"
3708 case "${enableval}" in
3709 b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";;
3710 l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";;
3711 yes) if test x"$wire_endian" != x; then
3712 sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
3713 else
3714 if test x"$default_endian" != x; then
3715 sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}"
3716 else
3717 echo "No hard-wired endian for target $target" 1>&6
3718 sim_endian="-DWITH_TARGET_BYTE_ORDER=0"
3719 fi
3720 fi;;
3721 no) if test x"$default_endian" != x; then
3722 sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
3723 else
3724 if test x"$wire_endian" != x; then
3725 sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}"
3726 else
3727 echo "No default endian for target $target" 1>&6
3728 sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0"
3729 fi
3730 fi;;
3731 *) { echo "configure: error: "Unknown value $enableval for --enable-sim-endian"" 1>&2; exit 1; }; sim_endian="";;
3732 esac
3733 if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then
3734 echo "Setting endian flags = $sim_endian" 6>&1
3735 fi
3736 else
3737 if test x"$default_endian" != x; then
3738 sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
3739 else
3740 if test x"$wire_endian" != x; then
3741 sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
3742 else
3743 sim_endian=
3744 fi
3745 fi
3746 fi
3747
3748
3749
3750
3751 #
3752 # Select the bitsize of the target
3753 #
3754 mips_addr_bitsize=
3755 case "${target}" in
3756 # start-sanitize-tx19
3757 mips*tx19*) mips_bitsize=32 ; mips_msb=31 ;;
3758 # end-sanitize-tx19
3759 # start-sanitize-r5900
3760 mips64r59*-*-*) mips_bitsize=64 ; mips_msb=63 ; mips_addr_bitsize=32;;
3761 # end-sanitize-r5900
3762 # start-sanitize-sky
3763 mips64*-sky*-*) mips_bitsize=64 ; mips_msb=63 ; mips_addr_bitsize=32;;
3764 # end-sanitize-sky
3765 mips64*-*-*) mips_bitsize=64 ; mips_msb=63 ;;
3766 mips16*-*-*) mips_bitsize=64 ; mips_msb=63 ;;
3767 mips*-*-*) mips_bitsize=32 ; mips_msb=31 ;;
3768 *) mips_bitsize=64 ; mips_msb=63 ;;
3769 esac
3770 wire_word_bitsize="$mips_bitsize"
3771 wire_word_msb="$mips_msb"
3772 wire_address_bitsize="$mips_addr_bitsize"
3773 wire_cell_bitsize=""
3774 # Check whether --enable-sim-bitsize or --disable-sim-bitsize was given.
3775 if test "${enable_sim_bitsize+set}" = set; then
3776 enableval="$enable_sim_bitsize"
3777 sim_bitsize=
3778 case "${enableval}" in
3779 64,63 | 64,63,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63";;
3780 32,31 | 32,31,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31";;
3781 64,0 | 64,0,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0";;
3782 32,0 | 64,0,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0";;
3783 32) if test x"$wire_word_msb" != x -a x"$wire_word_msb" != x0; then
3784 sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31"
3785 else
3786 sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0"
3787 fi ;;
3788 64) if test x"$wire_word_msb" != x -a x"$wire_word_msb" != x0; then
3789 sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63"
3790 else
3791 sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=0"
3792 fi ;;
3793 *) { echo "configure: error: "--enable-sim-bitsize was given $enableval. Expected 32 or 64"" 1>&2; exit 1; } ;;
3794 esac
3795 # address bitsize
3796 tmp=`echo "${enableval}" | sed -e "s/^[0-9]*,*[0-9]*,*//"`
3797 case x"${tmp}" in
3798 x ) ;;
3799 x32 | x32,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_ADDRESS_BITSIZE=32" ;;
3800 x64 | x64,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_ADDRESS_BITSIZE=64" ;;
3801 * ) { echo "configure: error: "--enable-sim-bitsize was given address size $enableval. Expected 32 or 64"" 1>&2; exit 1; } ;;
3802 esac
3803 # cell bitsize
3804 tmp=`echo "${enableval}" | sed -e "s/^[0-9]*,*[0-9*]*,*[0-9]*,*//"`
3805 case x"${tmp}" in
3806 x ) ;;
3807 x32 | x32,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_CELL_BITSIZE=32" ;;
3808 x64 | x64,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_CELL_BITSIZE=64" ;;
3809 * ) { echo "configure: error: "--enable-sim-bitsize was given cell size $enableval. Expected 32 or 64"" 1>&2; exit 1; } ;;
3810 esac
3811 if test x"$silent" != x"yes" && test x"$sim_bitsize" != x""; then
3812 echo "Setting bitsize flags = $sim_bitsize" 6>&1
3813 fi
3814 else
3815 sim_bitsize=""
3816 if test x"$wire_word_bitsize" != x; then
3817 sim_bitsize="$sim_bitsize -DWITH_TARGET_WORD_BITSIZE=$wire_word_bitsize"
3818 fi
3819 if test x"$wire_word_msb" != x; then
3820 sim_bitsize="$sim_bitsize -DWITH_TARGET_WORD_MSB=$wire_word_msb"
3821 fi
3822 if test x"$wire_address_bitsize" != x; then
3823 sim_bitsize="$sim_bitsize -DWITH_TARGET_ADDRESS_BITSIZE=$wire_address_bitsize"
3824 fi
3825 if test x"$wire_cell_bitsize" != x; then
3826 sim_bitsize="$sim_bitsize -DWITH_TARGET_CELL_BITSIZE=$wire_cell_bitsize"
3827 fi
3828 fi
3829
3830
3831
3832
3833 #
3834 # Select the floating hardware support of the target
3835 #
3836 mips_fpu=HARDWARE_FLOATING_POINT
3837 mips_fpu_bitsize=
3838 case "${target}" in
3839 # start-sanitize-tx19
3840 mips*tx19*) mips_fpu=SOFT_FLOATING_POINT ;;
3841 # end-sanitize-tx19
3842 mips*tx39*) mips_fpu=HARD_FLOATING_POINT
3843 mips_fpu_bitsize=32
3844 ;;
3845 # start-sanitize-vr4xxx
3846 mips64vr4xxx*-*-*) mips_fpu=HARD_FLOATING_POINT ; mips_fpu_bitsize=64 ;;
3847 # end-sanitize-vr4xxx
3848 # start-sanitize-r5900
3849 mips64r59*-*-*) mips_fpu=HARD_FLOATING_POINT ; mips_fpu_bitsize=32 ;;
3850 # end-sanitize-r5900
3851 # start-sanitize-sky
3852 mips64*-sky*-*) mips_fpu=HARD_FLOATING_POINT ; mips_fpu_bitsize=32 ;;
3853 # end-sanitize-sky
3854 mips64*-*-*) mips_fpu=HARD_FLOATING_POINT ;;
3855 mips16*-*-*) mips_fpu=HARD_FLOATING_POINT ;;
3856 mips*-*-*) mips_fpu=HARD_FLOATING_POINT ; mips_fpu_bitsize=32 ;;
3857 *) mips_fpu=HARD_FLOATING_POINT ;;
3858 esac
3859
3860 default_sim_float="$mips_fpu"
3861 default_sim_float_bitsize="$mips_fpu_bitsize"
3862 # Check whether --enable-sim-float or --disable-sim-float was given.
3863 if test "${enable_sim_float+set}" = set; then
3864 enableval="$enable_sim_float"
3865 case "${enableval}" in
3866 yes | hard) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";;
3867 no | soft) sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";;
3868 32) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT -DWITH_TARGET_FLOATING_POINT_BITSIZE=32";;
3869 64) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT -DWITH_TARGET_FLOATING_POINT_BITSIZE=64";;
3870 *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-float"" 1>&2; exit 1; }; sim_float="";;
3871 esac
3872 if test x"$silent" != x"yes" && test x"$sim_float" != x""; then
3873 echo "Setting float flags = $sim_float" 6>&1
3874 fi
3875 else
3876
3877 sim_float=
3878 if test x"${default_sim_float}" != x""; then
3879 sim_float="-DWITH_FLOATING_POINT=${default_sim_float}"
3880 fi
3881 if test x"${default_sim_float_bitsize}" != x""; then
3882 sim_float="$sim_float -DWITH_TARGET_FLOATING_POINT_BITSIZE=${default_sim_float_bitsize}"
3883 fi
3884
3885 fi
3886
3887
3888
3889
3890 #
3891 # Select the level of SMP support
3892 #
3893 case "${target}" in
3894 # start-sanitize-r5900
3895 mips64r59*-*-*) mips_smp=1 ;;
3896 # end-sanitize-r5900
3897 *) mips_smp=0 ;;
3898 esac
3899
3900 default_sim_smp="$mips_smp"
3901 # Check whether --enable-sim-smp or --disable-sim-smp was given.
3902 if test "${enable_sim_smp+set}" = set; then
3903 enableval="$enable_sim_smp"
3904 case "${enableval}" in
3905 yes) sim_smp="-DWITH_SMP=5" ; sim_igen_smp="-N 5";;
3906 no) sim_smp="-DWITH_SMP=0" ; sim_igen_smp="-N 0";;
3907 *) sim_smp="-DWITH_SMP=$enableval" ; sim_igen_smp="-N $enableval";;
3908 esac
3909 if test x"$silent" != x"yes" && test x"$sim_smp" != x""; then
3910 echo "Setting smp flags = $sim_smp" 6>&1
3911 fi
3912 else
3913 sim_smp="-DWITH_SMP=${default_sim_smp}" ; sim_igen_smp="-N ${default_sim_smp}"
3914 if test x"$silent" != x"yes"; then
3915 echo "Setting smp flags = $sim_smp" 6>&1
3916 fi
3917 fi
3918
3919
3920
3921
3922 #
3923 # Select the IGEN architecture
3924 #
3925 sim_gen=IGEN
3926 sim_igen_machine="-M mipsIV"
3927 sim_m16_machine="-M mips16"
3928 sim_igen_filter="32,64,f"
3929 sim_m16_filter="16"
3930 case "${target}" in
3931 # start-sanitize-tx19
3932 mips*tx19*) sim_gen=M16
3933 sim_igen_machine="-M tx19"
3934 sim_m16_machine="-M tx19"
3935 sim_igen_filter="32"
3936 sim_m16_filter="16"
3937 ;;
3938 # end-sanitize-tx19
3939 mips*tx39*) sim_gen=IGEN
3940 sim_igen_filter="32,f"
3941 sim_igen_machine="-M r3900"
3942 ;;
3943 # start-sanitize-r5900
3944 mips64r59*-*-*) sim_gen=IGEN
3945 sim_igen_machine="-M r5900"
3946 ;;
3947 # end-sanitize-r5900
3948 # start-sanitize-vr4320
3949 mips64vr4320-*-*) sim_gen=IGEN
3950 sim_igen_machine="-M mipsIV,vr4320 -G gen-multi-sim=vr4320"
3951 ;;
3952 # end-sanitize-vr4320
3953 mips64vr43*-*-*) sim_gen=IGEN
3954 sim_igen_machine="-M mipsIV"
3955 # start-sanitize-vr4320
3956 sim_igen_machine="-M mipsIV,vr4320 -G gen-multi-sim=mipsIV"
3957 # end-sanitize-vr4320
3958 ;;
3959 # start-sanitize-cygnus
3960 mips64vr54*-*-*) sim_gen=IGEN
3961 sim_igen_machine="-M vr5000,vr5400 -G gen-multi-sim=vr5400"
3962 ;;
3963 # end-sanitize-cygnus
3964 mips64vr5*-*-*) sim_gen=IGEN
3965 sim_igen_machine="-M vr5000"
3966 # start-sanitize-cygnus
3967 sim_igen_machine="-M vr5000,vr5400 -G gen-multi-sim=vr5000"
3968 ;;
3969 # end-sanitize-cygnus
3970 # start-sanitize-vr4xxx
3971 mips64vr4xxx*-*-*) sim_gen=HACK
3972 sim_igen_filter="32,64,f"
3973 ;;
3974 # mips64vr4xxx*-*-*) sim_gen=IGEN
3975 # sim_igen_machine="-M mipsIV,vr4100,vr4121 -G gen-multi-sim=mipsIV"
3976 # ;;
3977 # mips64vr4xxx*-*-*) sim_gen=M16
3978 # sim_igen_machine="-M mipsIV,vr4100 -G gen-multi-sim=mipsV"
3979 # sim_m16_machine="-M vr4100"
3980 # sim_igen_filter="32,64,f"
3981 # sim_m16_filter="16"
3982 # ;;
3983 # end-sanitize-vr4xxx
3984 mips64vr41*) sim_gen=M16
3985 sim_igen_machine="-M vr4100"
3986 sim_m16_machine="-M vr4100"
3987 sim_igen_filter="32,64,f"
3988 sim_m16_filter="16"
3989 ;;
3990 mips64*-*-*) sim_igen_filter="32,64,f"
3991 sim_gen=IGEN
3992 ;;
3993 mips16*-*-*) sim_gen=M16
3994 sim_igen_filter="32,64,f"
3995 sim_m16_filter="16"
3996 ;;
3997 mips*lsi*) sim_gen=M16
3998 sim_igen_machine="-M mipsIII,mips16"
3999 sim_m16_machine="-M mips16,mipsIII"
4000 sim_igen_filter="32,f"
4001 sim_m16_filter="16"
4002 ;;
4003 mips*-*-*) sim_gen=IGEN
4004 sim_igen_filter="32,f"
4005 ;;
4006 esac
4007 sim_igen_flags="-F ${sim_igen_filter} ${sim_igen_machine} ${sim_igen_smp}"
4008 sim_m16_flags=" -F ${sim_m16_filter} ${sim_m16_machine} ${sim_igen_smp}"
4009
4010
4011
4012
4013
4014 #
4015 # Add simulated hardware devices
4016 #
4017 hw_enabled=no
4018 case "${target}" in
4019 mips*tx39*)
4020 hw_enabled=yes
4021 hw_extra_devices="tx3904cpu tx3904irc tx3904tmr tx3904sio"
4022 mips_extra_objs="dv-sockser.o"
4023 SIM_SUBTARGET="$SIM_SUBTARGET -DTARGET_TX3904=1"
4024 ;;
4025 # start-sanitize-sky
4026 mips64r59*-sky-*)
4027 mips_extra_objs='$(SIM_SKY_OBJS)'
4028 SIM_SUBTARGET="-DTARGET_SKY -DWITH_DEVICES=1 -DDEVICE_INIT=1"
4029 ;;
4030 mips64*-skyb-*)
4031 mips_extra_objs='$(SIM_SKY_OBJS)'
4032 SIM_SUBTARGET="-DTARGET_SKY -DTARGET_SKY_B -DWITH_DEVICES=1 -DDEVICE_INIT=1"
4033 ;;
4034 # end-sanitize-sky
4035 *)
4036 mips_extra_objs=""
4037 ;;
4038 esac
4039
4040 if test x"$hw_enabled" = x"yes"; then
4041 sim_hw_p=yes
4042 else
4043 sim_hw_p=no
4044 fi
4045 if test "$hw_devices"; then
4046 hardware="core pal glue"
4047 else
4048 hardware="core pal glue $hw_extra_devices"
4049 fi
4050 sim_hw_cflags="-DWITH_HW=1"
4051 sim_hw="$hardware"
4052 sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([^ ][^ ]*\)/dv-\1.o/g'`"
4053 # Check whether --enable-sim-hardware or --disable-sim-hardware was given.
4054 if test "${enable_sim_hardware+set}" = set; then
4055 enableval="$enable_sim_hardware"
4056
4057 case "${enableval}" in
4058 yes) sim_hw_p=yes;;
4059 no) sim_hw_p=no;;
4060 ,*) sim_hw_p=yes; hardware="${hardware} `echo ${enableval} | sed -e 's/,/ /'`";;
4061 *,) sim_hw_p=yes; hardware="`echo ${enableval} | sed -e 's/,/ /'` ${hardware}";;
4062 *) sim_hw_p=yes; hardware="`echo ${enableval} | sed -e 's/,/ /'`"'';;
4063 esac
4064 if test "$sim_hw_p" != yes; then
4065 sim_hw_objs=
4066 sim_hw_cflags="-DWITH_HW=0"
4067 sim_hw=
4068 else
4069 sim_hw_cflags="-DWITH_HW=1"
4070 # remove duplicates
4071 sim_hw=""
4072 sim_hw_objs="\$(SIM_COMMON_HW_OBJS)"
4073 for i in x $hardware ; do
4074 case " $f " in
4075 x) ;;
4076 *" $i "*) ;;
4077 *) sim_hw="$sim_hw $i" ; sim_hw_objs="$sim_hw_objs dv-$i.o";;
4078 esac
4079 done
4080 fi
4081 if test x"$silent" != x"yes" && test "$sim_hw_p" = "yes"; then
4082 echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
4083 fi
4084 else
4085
4086 if test "$sim_hw_p" != yes; then
4087 sim_hw_objs=
4088 sim_hw_cflags="-DWITH_HW=0"
4089 sim_hw=
4090 fi
4091 if test x"$silent" != x"yes"; then
4092 echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
4093 fi
4094 fi
4095
4096
4097
4098
4099 # Choose simulator engine
4100 case "${target}" in
4101 # start-sanitize-sky
4102 mips64r59*-sky-*)
4103 mips_igen_engine=""
4104 ;;
4105 mips64*-skyb-*)
4106 mips_igen_engine=""
4107 ;;
4108 # end-sanitize-sky
4109 *) mips_igen_engine="engine.o"
4110 ;;
4111 esac
4112
4113
4114
4115 # If we find X, set shell vars x_includes and x_libraries to the
4116 # paths, otherwise set no_x=yes.
4117 # Uses ac_ vars as temps to allow command line to override cache and checks.
4118 # --without-x overrides everything else, but does not touch the cache.
4119 echo $ac_n "checking for X""... $ac_c" 1>&6
4120 echo "configure:4123: checking for X" >&5
4121
4122 # Check whether --with-x or --without-x was given.
4123 if test "${with_x+set}" = set; then
4124 withval="$with_x"
4125 :
4126 fi
4127
4128 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4129 if test "x$with_x" = xno; then
4130 # The user explicitly disabled X.
4131 have_x=disabled
4132 else
4133 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4134 # Both variables are already set.
4135 have_x=yes
4136 else
4137 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
4138 echo $ac_n "(cached) $ac_c" 1>&6
4139 else
4140 # One or both of the vars are not set, and there is no cached value.
4141 ac_x_includes=NO ac_x_libraries=NO
4142 rm -fr conftestdir
4143 if mkdir conftestdir; then
4144 cd conftestdir
4145 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4146 cat > Imakefile <<'EOF'
4147 acfindx:
4148 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4149 EOF
4150 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4151 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4152 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4153 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4154 for ac_extension in a so sl; do
4155 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4156 test -f $ac_im_libdir/libX11.$ac_extension; then
4157 ac_im_usrlibdir=$ac_im_libdir; break
4158 fi
4159 done
4160 # Screen out bogus values from the imake configuration. They are
4161 # bogus both because they are the default anyway, and because
4162 # using them would break gcc on systems where it needs fixed includes.
4163 case "$ac_im_incroot" in
4164 /usr/include) ;;
4165 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4166 esac
4167 case "$ac_im_usrlibdir" in
4168 /usr/lib | /lib) ;;
4169 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4170 esac
4171 fi
4172 cd ..
4173 rm -fr conftestdir
4174 fi
4175
4176 if test "$ac_x_includes" = NO; then
4177 # Guess where to find include files, by looking for this one X11 .h file.
4178 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4179
4180 # First, try using that file with no special directory specified.
4181 cat > conftest.$ac_ext <<EOF
4182 #line 4185 "configure"
4183 #include "confdefs.h"
4184 #include <$x_direct_test_include>
4185 EOF
4186 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4187 { (eval echo configure:4190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4188 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4189 if test -z "$ac_err"; then
4190 rm -rf conftest*
4191 # We can compile using X headers with no special include directory.
4192 ac_x_includes=
4193 else
4194 echo "$ac_err" >&5
4195 echo "configure: failed program was:" >&5
4196 cat conftest.$ac_ext >&5
4197 rm -rf conftest*
4198 # Look for the header file in a standard set of common directories.
4199 # Check X11 before X11Rn because it is often a symlink to the current release.
4200 for ac_dir in \
4201 /usr/X11/include \
4202 /usr/X11R6/include \
4203 /usr/X11R5/include \
4204 /usr/X11R4/include \
4205 \
4206 /usr/include/X11 \
4207 /usr/include/X11R6 \
4208 /usr/include/X11R5 \
4209 /usr/include/X11R4 \
4210 \
4211 /usr/local/X11/include \
4212 /usr/local/X11R6/include \
4213 /usr/local/X11R5/include \
4214 /usr/local/X11R4/include \
4215 \
4216 /usr/local/include/X11 \
4217 /usr/local/include/X11R6 \
4218 /usr/local/include/X11R5 \
4219 /usr/local/include/X11R4 \
4220 \
4221 /usr/X386/include \
4222 /usr/x386/include \
4223 /usr/XFree86/include/X11 \
4224 \
4225 /usr/include \
4226 /usr/local/include \
4227 /usr/unsupported/include \
4228 /usr/athena/include \
4229 /usr/local/x11r5/include \
4230 /usr/lpp/Xamples/include \
4231 \
4232 /usr/openwin/include \
4233 /usr/openwin/share/include \
4234 ; \
4235 do
4236 if test -r "$ac_dir/$x_direct_test_include"; then
4237 ac_x_includes=$ac_dir
4238 break
4239 fi
4240 done
4241 fi
4242 rm -f conftest*
4243 fi # $ac_x_includes = NO
4244
4245 if test "$ac_x_libraries" = NO; then
4246 # Check for the libraries.
4247
4248 test -z "$x_direct_test_library" && x_direct_test_library=Xt
4249 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4250
4251 # See if we find them without any special options.
4252 # Don't add to $LIBS permanently.
4253 ac_save_LIBS="$LIBS"
4254 LIBS="-l$x_direct_test_library $LIBS"
4255 cat > conftest.$ac_ext <<EOF
4256 #line 4259 "configure"
4257 #include "confdefs.h"
4258
4259 int main() {
4260 ${x_direct_test_function}()
4261 ; return 0; }
4262 EOF
4263 if { (eval echo configure:4266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4264 rm -rf conftest*
4265 LIBS="$ac_save_LIBS"
4266 # We can link X programs with no special library path.
4267 ac_x_libraries=
4268 else
4269 echo "configure: failed program was:" >&5
4270 cat conftest.$ac_ext >&5
4271 rm -rf conftest*
4272 LIBS="$ac_save_LIBS"
4273 # First see if replacing the include by lib works.
4274 # Check X11 before X11Rn because it is often a symlink to the current release.
4275 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4276 /usr/X11/lib \
4277 /usr/X11R6/lib \
4278 /usr/X11R5/lib \
4279 /usr/X11R4/lib \
4280 \
4281 /usr/lib/X11 \
4282 /usr/lib/X11R6 \
4283 /usr/lib/X11R5 \
4284 /usr/lib/X11R4 \
4285 \
4286 /usr/local/X11/lib \
4287 /usr/local/X11R6/lib \
4288 /usr/local/X11R5/lib \
4289 /usr/local/X11R4/lib \
4290 \
4291 /usr/local/lib/X11 \
4292 /usr/local/lib/X11R6 \
4293 /usr/local/lib/X11R5 \
4294 /usr/local/lib/X11R4 \
4295 \
4296 /usr/X386/lib \
4297 /usr/x386/lib \
4298 /usr/XFree86/lib/X11 \
4299 \
4300 /usr/lib \
4301 /usr/local/lib \
4302 /usr/unsupported/lib \
4303 /usr/athena/lib \
4304 /usr/local/x11r5/lib \
4305 /usr/lpp/Xamples/lib \
4306 /lib/usr/lib/X11 \
4307 \
4308 /usr/openwin/lib \
4309 /usr/openwin/share/lib \
4310 ; \
4311 do
4312 for ac_extension in a so sl; do
4313 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4314 ac_x_libraries=$ac_dir
4315 break 2
4316 fi
4317 done
4318 done
4319 fi
4320 rm -f conftest*
4321 fi # $ac_x_libraries = NO
4322
4323 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4324 # Didn't find X anywhere. Cache the known absence of X.
4325 ac_cv_have_x="have_x=no"
4326 else
4327 # Record where we found X for the cache.
4328 ac_cv_have_x="have_x=yes \
4329 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4330 fi
4331 fi
4332 fi
4333 eval "$ac_cv_have_x"
4334 fi # $with_x != no
4335
4336 if test "$have_x" != yes; then
4337 echo "$ac_t""$have_x" 1>&6
4338 no_x=yes
4339 else
4340 # If each of the values was on the command line, it overrides each guess.
4341 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4342 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4343 # Update the cache value to reflect the command line values.
4344 ac_cv_have_x="have_x=yes \
4345 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4346 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4347 fi
4348
4349 mips_extra_libs=""
4350 # start-sanitize-sky
4351 # Enable GPU2 library
4352 # Check whether --with-sim-gpu2 or --without-sim-gpu2 was given.
4353 if test "${with_sim_gpu2+set}" = set; then
4354 withval="$with_sim_gpu2"
4355 if test -d "${withval}"
4356 then
4357 SIM_SUBTARGET="${SIM_SUBTARGET} -DSKY_GPU2 -I${withval}/include"
4358 mips_extra_libs="-L${withval}/lib -lgpu2 -L${x_libraries} -lX11 -lXext"
4359 WITH_GPU2="yes" ; export WITH_GPU2
4360
4361 # complex X/etc. detection; stolen shamelessly from tcl/tk/gdb configury. --angela
4362
4363 #--------------------------------------------------------------------
4364 # Locate the X11 header files and the X11 library archive. Try
4365 # the ac_path_x macro first, but if it doesn't find the X stuff
4366 # (e.g. because there's no xmkmf program) then check through
4367 # a list of possible directories. Under some conditions the
4368 # autoconf macro will return an include directory that contains
4369 # no include files, so double-check its result just to be safe.
4370 #--------------------------------------------------------------------
4371
4372 # If we find X, set shell vars x_includes and x_libraries to the
4373 # paths, otherwise set no_x=yes.
4374 # Uses ac_ vars as temps to allow command line to override cache and checks.
4375 # --without-x overrides everything else, but does not touch the cache.
4376 echo $ac_n "checking for X""... $ac_c" 1>&6
4377 echo "configure:4380: checking for X" >&5
4378
4379 # Check whether --with-x or --without-x was given.
4380 if test "${with_x+set}" = set; then
4381 withval="$with_x"
4382 :
4383 fi
4384
4385 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4386 if test "x$with_x" = xno; then
4387 # The user explicitly disabled X.
4388 have_x=disabled
4389 else
4390 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4391 # Both variables are already set.
4392 have_x=yes
4393 else
4394 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
4395 echo $ac_n "(cached) $ac_c" 1>&6
4396 else
4397 # One or both of the vars are not set, and there is no cached value.
4398 ac_x_includes=NO ac_x_libraries=NO
4399 rm -fr conftestdir
4400 if mkdir conftestdir; then
4401 cd conftestdir
4402 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4403 cat > Imakefile <<'EOF'
4404 acfindx:
4405 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4406 EOF
4407 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4408 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4409 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4410 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4411 for ac_extension in a so sl; do
4412 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4413 test -f $ac_im_libdir/libX11.$ac_extension; then
4414 ac_im_usrlibdir=$ac_im_libdir; break
4415 fi
4416 done
4417 # Screen out bogus values from the imake configuration. They are
4418 # bogus both because they are the default anyway, and because
4419 # using them would break gcc on systems where it needs fixed includes.
4420 case "$ac_im_incroot" in
4421 /usr/include) ;;
4422 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4423 esac
4424 case "$ac_im_usrlibdir" in
4425 /usr/lib | /lib) ;;
4426 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4427 esac
4428 fi
4429 cd ..
4430 rm -fr conftestdir
4431 fi
4432
4433 if test "$ac_x_includes" = NO; then
4434 # Guess where to find include files, by looking for this one X11 .h file.
4435 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4436
4437 # First, try using that file with no special directory specified.
4438 cat > conftest.$ac_ext <<EOF
4439 #line 4442 "configure"
4440 #include "confdefs.h"
4441 #include <$x_direct_test_include>
4442 EOF
4443 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4444 { (eval echo configure:4447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4445 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4446 if test -z "$ac_err"; then
4447 rm -rf conftest*
4448 # We can compile using X headers with no special include directory.
4449 ac_x_includes=
4450 else
4451 echo "$ac_err" >&5
4452 echo "configure: failed program was:" >&5
4453 cat conftest.$ac_ext >&5
4454 rm -rf conftest*
4455 # Look for the header file in a standard set of common directories.
4456 # Check X11 before X11Rn because it is often a symlink to the current release.
4457 for ac_dir in \
4458 /usr/X11/include \
4459 /usr/X11R6/include \
4460 /usr/X11R5/include \
4461 /usr/X11R4/include \
4462 \
4463 /usr/include/X11 \
4464 /usr/include/X11R6 \
4465 /usr/include/X11R5 \
4466 /usr/include/X11R4 \
4467 \
4468 /usr/local/X11/include \
4469 /usr/local/X11R6/include \
4470 /usr/local/X11R5/include \
4471 /usr/local/X11R4/include \
4472 \
4473 /usr/local/include/X11 \
4474 /usr/local/include/X11R6 \
4475 /usr/local/include/X11R5 \
4476 /usr/local/include/X11R4 \
4477 \
4478 /usr/X386/include \
4479 /usr/x386/include \
4480 /usr/XFree86/include/X11 \
4481 \
4482 /usr/include \
4483 /usr/local/include \
4484 /usr/unsupported/include \
4485 /usr/athena/include \
4486 /usr/local/x11r5/include \
4487 /usr/lpp/Xamples/include \
4488 \
4489 /usr/openwin/include \
4490 /usr/openwin/share/include \
4491 ; \
4492 do
4493 if test -r "$ac_dir/$x_direct_test_include"; then
4494 ac_x_includes=$ac_dir
4495 break
4496 fi
4497 done
4498 fi
4499 rm -f conftest*
4500 fi # $ac_x_includes = NO
4501
4502 if test "$ac_x_libraries" = NO; then
4503 # Check for the libraries.
4504
4505 test -z "$x_direct_test_library" && x_direct_test_library=Xt
4506 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4507
4508 # See if we find them without any special options.
4509 # Don't add to $LIBS permanently.
4510 ac_save_LIBS="$LIBS"
4511 LIBS="-l$x_direct_test_library $LIBS"
4512 cat > conftest.$ac_ext <<EOF
4513 #line 4516 "configure"
4514 #include "confdefs.h"
4515
4516 int main() {
4517 ${x_direct_test_function}()
4518 ; return 0; }
4519 EOF
4520 if { (eval echo configure:4523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4521 rm -rf conftest*
4522 LIBS="$ac_save_LIBS"
4523 # We can link X programs with no special library path.
4524 ac_x_libraries=
4525 else
4526 echo "configure: failed program was:" >&5
4527 cat conftest.$ac_ext >&5
4528 rm -rf conftest*
4529 LIBS="$ac_save_LIBS"
4530 # First see if replacing the include by lib works.
4531 # Check X11 before X11Rn because it is often a symlink to the current release.
4532 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4533 /usr/X11/lib \
4534 /usr/X11R6/lib \
4535 /usr/X11R5/lib \
4536 /usr/X11R4/lib \
4537 \
4538 /usr/lib/X11 \
4539 /usr/lib/X11R6 \
4540 /usr/lib/X11R5 \
4541 /usr/lib/X11R4 \
4542 \
4543 /usr/local/X11/lib \
4544 /usr/local/X11R6/lib \
4545 /usr/local/X11R5/lib \
4546 /usr/local/X11R4/lib \
4547 \
4548 /usr/local/lib/X11 \
4549 /usr/local/lib/X11R6 \
4550 /usr/local/lib/X11R5 \
4551 /usr/local/lib/X11R4 \
4552 \
4553 /usr/X386/lib \
4554 /usr/x386/lib \
4555 /usr/XFree86/lib/X11 \
4556 \
4557 /usr/lib \
4558 /usr/local/lib \
4559 /usr/unsupported/lib \
4560 /usr/athena/lib \
4561 /usr/local/x11r5/lib \
4562 /usr/lpp/Xamples/lib \
4563 /lib/usr/lib/X11 \
4564 \
4565 /usr/openwin/lib \
4566 /usr/openwin/share/lib \
4567 ; \
4568 do
4569 for ac_extension in a so sl; do
4570 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4571 ac_x_libraries=$ac_dir
4572 break 2
4573 fi
4574 done
4575 done
4576 fi
4577 rm -f conftest*
4578 fi # $ac_x_libraries = NO
4579
4580 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4581 # Didn't find X anywhere. Cache the known absence of X.
4582 ac_cv_have_x="have_x=no"
4583 else
4584 # Record where we found X for the cache.
4585 ac_cv_have_x="have_x=yes \
4586 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4587 fi
4588 fi
4589 fi
4590 eval "$ac_cv_have_x"
4591 fi # $with_x != no
4592
4593 if test "$have_x" != yes; then
4594 echo "$ac_t""$have_x" 1>&6
4595 no_x=yes
4596 else
4597 # If each of the values was on the command line, it overrides each guess.
4598 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4599 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4600 # Update the cache value to reflect the command line values.
4601 ac_cv_have_x="have_x=yes \
4602 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4603 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4604 fi
4605
4606 not_really_there=""
4607 if test "$no_x" = ""; then
4608 if test "$x_includes" = ""; then
4609 cat > conftest.$ac_ext <<EOF
4610 #line 4613 "configure"
4611 #include "confdefs.h"
4612 #include <X11/XIntrinsic.h>
4613 EOF
4614 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4615 { (eval echo configure:4618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4616 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4617 if test -z "$ac_err"; then
4618 :
4619 else
4620 echo "$ac_err" >&5
4621 echo "configure: failed program was:" >&5
4622 cat conftest.$ac_ext >&5
4623 rm -rf conftest*
4624 not_really_there="yes"
4625 fi
4626 rm -f conftest*
4627 else
4628 if test ! -r $x_includes/X11/Intrinsic.h; then
4629 not_really_there="yes"
4630 fi
4631 fi
4632 fi
4633 if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
4634 echo $ac_n "checking for X11 header files""... $ac_c" 1>&6
4635 echo "configure:4638: checking for X11 header files" >&5
4636 XINCLUDES="# no special path needed"
4637 cat > conftest.$ac_ext <<EOF
4638 #line 4641 "configure"
4639 #include "confdefs.h"
4640 #include <X11/Intrinsic.h>
4641 EOF
4642 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4643 { (eval echo configure:4646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4644 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4645 if test -z "$ac_err"; then
4646 :
4647 else
4648 echo "$ac_err" >&5
4649 echo "configure: failed program was:" >&5
4650 cat conftest.$ac_ext >&5
4651 rm -rf conftest*
4652 XINCLUDES="nope"
4653 fi
4654 rm -f conftest*
4655 if test "$XINCLUDES" = nope; then
4656 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"
4657 for i in $dirs ; do
4658 if test -r $i/X11/Intrinsic.h; then
4659 echo "$ac_t""$i" 1>&6
4660 XINCLUDES=" -I$i"
4661 break
4662 fi
4663 done
4664 fi
4665 else
4666 if test "$x_includes" != ""; then
4667 XINCLUDES=-I$x_includes
4668 else
4669 XINCLUDES="# no special path needed"
4670 fi
4671 fi
4672 if test "$XINCLUDES" = nope; then
4673 echo "$ac_t""couldn't find any!" 1>&6
4674 XINCLUDES="# no include files found"
4675 fi
4676
4677 if test "$no_x" = yes; then
4678 echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6
4679 echo "configure:4682: checking for X11 libraries" >&5
4680 XLIBSW=nope
4681 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"
4682 for i in $dirs ; do
4683 if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
4684 echo "$ac_t""$i" 1>&6
4685 XLIBSW="-L$i -lX11"
4686 x_libraries="$i"
4687 break
4688 fi
4689 done
4690 else
4691 if test "$x_libraries" = ""; then
4692 XLIBSW=-lX11
4693 else
4694 XLIBSW="-L$x_libraries -lX11"
4695 fi
4696 fi
4697 if test "$XLIBSW" = nope ; then
4698 echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
4699 echo "configure:4702: checking for XCreateWindow in -lXwindow" >&5
4700 ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'`
4701 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4702 echo $ac_n "(cached) $ac_c" 1>&6
4703 else
4704 ac_save_LIBS="$LIBS"
4705 LIBS="-lXwindow $LIBS"
4706 cat > conftest.$ac_ext <<EOF
4707 #line 4710 "configure"
4708 #include "confdefs.h"
4709 /* Override any gcc2 internal prototype to avoid an error. */
4710 /* We use char because int might match the return type of a gcc2
4711 builtin and then its argument prototype would still apply. */
4712 char XCreateWindow();
4713
4714 int main() {
4715 XCreateWindow()
4716 ; return 0; }
4717 EOF
4718 if { (eval echo configure:4721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4719 rm -rf conftest*
4720 eval "ac_cv_lib_$ac_lib_var=yes"
4721 else
4722 echo "configure: failed program was:" >&5
4723 cat conftest.$ac_ext >&5
4724 rm -rf conftest*
4725 eval "ac_cv_lib_$ac_lib_var=no"
4726 fi
4727 rm -f conftest*
4728 LIBS="$ac_save_LIBS"
4729
4730 fi
4731 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4732 echo "$ac_t""yes" 1>&6
4733 XLIBSW=-lXwindow
4734 else
4735 echo "$ac_t""no" 1>&6
4736 fi
4737
4738 fi
4739 if test "$XLIBSW" = nope ; then
4740 echo "$ac_t""couldn't find any! Using -lX11." 1>&6
4741 XLIBSW=-lX11
4742 fi
4743
4744 #--------------------------------------------------------------------
4745 # Various manipulations on the search path used at runtime to
4746 # find shared libraries:
4747 # 1. If the X library binaries are in a non-standard directory,
4748 # add the X library location into that search path.
4749 # 2. On systems such as AIX and Ultrix that use "-L" as the
4750 # search path option, colons cannot be used to separate
4751 # directories from each other. Change colons to " -L".
4752 # 3. Create two sets of search flags, one for use in cc lines
4753 # and the other for when the linker is invoked directly. In
4754 # the second case, '-Wl,' must be stripped off and commas must
4755 # be replaced by spaces.
4756 #--------------------------------------------------------------------
4757
4758 #
4759 # CYGNUS LOCAL: statically link on Solaris, HPUX & SunOS so that
4760 # we don't have problems with people not having libraries
4761 # installed or not having LD_LIBRARY_PATH set.
4762 #
4763
4764 case "$host" in
4765 #
4766 # gdb linked statically w/ Solaris iff GCC and GNU ld are used,
4767 # otherwise dynamic
4768 #
4769 sparc-sun-solaris2*)
4770 sol_xlibsw=
4771 if test "x$GCC" = "xyes" ; then
4772 # This is probably the simplest way to test for GNU ld.
4773 # It only works with relatively recent versions of GNU
4774 # ld.
4775 gld_text=`$CC -Wl,--version 2>&1 | sed 1q`
4776 case "$gld_text" in
4777 GNU* | *BFD*)
4778 # Why do we link against libX11 twice? Because the
4779 # Openwin X11 and Xext libraries are seriously broken.
4780 sol_xlibsw="-Wl,-Bstatic $XLIBSW -lXext -lX11 -Wl,-Bdynamic"
4781 ;;
4782 esac
4783 fi
4784 if test -z "$sol_xlibsw"; then
4785 if test "x$x_libraries" != "x"; then
4786 XLIBSW="$XLIBSW -R$x_libraries"
4787 fi
4788 else
4789 XLIBSW=$sol_xlibsw
4790 suppress_enable_shared=yes
4791 fi
4792 ;;
4793 #
4794 # gdb linked statically w/ SunOS or HPUX
4795 #
4796 m68k-hp-hpux*|hppa*-hp-hpux*|sparc-sun-sunos*)
4797 if test "x$x_libraries" != "x" ;
4798 then
4799 XLIBSW="$x_libraries/libX11.a"
4800 else
4801 XLIBSW="/usr/lib/libX11.a"
4802 fi
4803 suppress_enable_shared=yes
4804 ;;
4805 #
4806 # default is to link dynamically
4807 #
4808 *)
4809 ;;
4810 esac
4811 #
4812 # END CYGNUS LOCAL
4813
4814
4815 #--------------------------------------------------------------------
4816 # Check for the existence of various libraries. The order here
4817 # is important, so that then end up in the right order in the
4818 # command line generated by make. The -lsocket and -lnsl libraries
4819 # require a couple of special tricks:
4820 # 1. Use "connect" and "accept" to check for -lsocket, and
4821 # "gethostbyname" to check for -lnsl.
4822 # 2. Use each function name only once: can't redo a check because
4823 # autoconf caches the results of the last check and won't redo it.
4824 # 3. Use -lnsl and -lsocket only if they supply procedures that
4825 # aren't already present in the normal libraries. This is because
4826 # IRIX 5.2 has libraries, but they aren't needed and they're
4827 # bogus: they goof up name resolution if used.
4828 # 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
4829 # To get around this problem, check for both libraries together
4830 # if -lsocket doesn't work by itself.
4831 #--------------------------------------------------------------------
4832
4833 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
4834 echo "configure:4837: checking for main in -lXbsd" >&5
4835 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
4836 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4837 echo $ac_n "(cached) $ac_c" 1>&6
4838 else
4839 ac_save_LIBS="$LIBS"
4840 LIBS="-lXbsd $LIBS"
4841 cat > conftest.$ac_ext <<EOF
4842 #line 4845 "configure"
4843 #include "confdefs.h"
4844
4845 int main() {
4846 main()
4847 ; return 0; }
4848 EOF
4849 if { (eval echo configure:4852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4850 rm -rf conftest*
4851 eval "ac_cv_lib_$ac_lib_var=yes"
4852 else
4853 echo "configure: failed program was:" >&5
4854 cat conftest.$ac_ext >&5
4855 rm -rf conftest*
4856 eval "ac_cv_lib_$ac_lib_var=no"
4857 fi
4858 rm -f conftest*
4859 LIBS="$ac_save_LIBS"
4860
4861 fi
4862 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4863 echo "$ac_t""yes" 1>&6
4864 SOCKLIBSW="$SOCKLIBSW -lXbsd"
4865 else
4866 echo "$ac_t""no" 1>&6
4867 fi
4868
4869
4870 # CYGNUS LOCAL: Store any socket library(ies) in the cache, and don't
4871 # mess up the cache values of the functions we check for.
4872 echo $ac_n "checking for socket libraries""... $ac_c" 1>&6
4873 echo "configure:4876: checking for socket libraries" >&5
4874 if eval "test \"`echo '$''{'sim_cv_lib_sockets'+set}'`\" = set"; then
4875 echo $ac_n "(cached) $ac_c" 1>&6
4876 else
4877 sim_cv_lib_sockets=
4878 sim_checkBoth=0
4879 unset ac_cv_func_connect
4880 echo $ac_n "checking for connect""... $ac_c" 1>&6
4881 echo "configure:4884: checking for connect" >&5
4882 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
4883 echo $ac_n "(cached) $ac_c" 1>&6
4884 else
4885 cat > conftest.$ac_ext <<EOF
4886 #line 4889 "configure"
4887 #include "confdefs.h"
4888 /* System header to define __stub macros and hopefully few prototypes,
4889 which can conflict with char connect(); below. */
4890 #include <assert.h>
4891 /* Override any gcc2 internal prototype to avoid an error. */
4892 /* We use char because int might match the return type of a gcc2
4893 builtin and then its argument prototype would still apply. */
4894 char connect();
4895
4896 int main() {
4897
4898 /* The GNU C library defines this for functions which it implements
4899 to always fail with ENOSYS. Some functions are actually named
4900 something starting with __ and the normal name is an alias. */
4901 #if defined (__stub_connect) || defined (__stub___connect)
4902 choke me
4903 #else
4904 connect();
4905 #endif
4906
4907 ; return 0; }
4908 EOF
4909 if { (eval echo configure:4912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4910 rm -rf conftest*
4911 eval "ac_cv_func_connect=yes"
4912 else
4913 echo "configure: failed program was:" >&5
4914 cat conftest.$ac_ext >&5
4915 rm -rf conftest*
4916 eval "ac_cv_func_connect=no"
4917 fi
4918 rm -f conftest*
4919 fi
4920
4921 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
4922 echo "$ac_t""yes" 1>&6
4923 sim_checkSocket=0
4924 else
4925 echo "$ac_t""no" 1>&6
4926 sim_checkSocket=1
4927 fi
4928
4929 if test "$sim_checkSocket" = 1; then
4930 unset ac_cv_func_connect
4931 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4932 echo "configure:4935: checking for main in -lsocket" >&5
4933 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
4934 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4935 echo $ac_n "(cached) $ac_c" 1>&6
4936 else
4937 ac_save_LIBS="$LIBS"
4938 LIBS="-lsocket $LIBS"
4939 cat > conftest.$ac_ext <<EOF
4940 #line 4943 "configure"
4941 #include "confdefs.h"
4942
4943 int main() {
4944 main()
4945 ; return 0; }
4946 EOF
4947 if { (eval echo configure:4950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4948 rm -rf conftest*
4949 eval "ac_cv_lib_$ac_lib_var=yes"
4950 else
4951 echo "configure: failed program was:" >&5
4952 cat conftest.$ac_ext >&5
4953 rm -rf conftest*
4954 eval "ac_cv_lib_$ac_lib_var=no"
4955 fi
4956 rm -f conftest*
4957 LIBS="$ac_save_LIBS"
4958
4959 fi
4960 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4961 echo "$ac_t""yes" 1>&6
4962 sim_cv_lib_sockets="-lsocket"
4963 else
4964 echo "$ac_t""no" 1>&6
4965 sim_checkBoth=1
4966 fi
4967
4968 fi
4969 if test "$sim_checkBoth" = 1; then
4970 sim_oldLibs=$SOCKLIBSW
4971 SOCKLIBSW="$SOCKLIBSW -lsocket -lnsl"
4972 unset ac_cv_func_accept
4973 echo $ac_n "checking for accept""... $ac_c" 1>&6
4974 echo "configure:4977: checking for accept" >&5
4975 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
4976 echo $ac_n "(cached) $ac_c" 1>&6
4977 else
4978 cat > conftest.$ac_ext <<EOF
4979 #line 4982 "configure"
4980 #include "confdefs.h"
4981 /* System header to define __stub macros and hopefully few prototypes,
4982 which can conflict with char accept(); below. */
4983 #include <assert.h>
4984 /* Override any gcc2 internal prototype to avoid an error. */
4985 /* We use char because int might match the return type of a gcc2
4986 builtin and then its argument prototype would still apply. */
4987 char accept();
4988
4989 int main() {
4990
4991 /* The GNU C library defines this for functions which it implements
4992 to always fail with ENOSYS. Some functions are actually named
4993 something starting with __ and the normal name is an alias. */
4994 #if defined (__stub_accept) || defined (__stub___accept)
4995 choke me
4996 #else
4997 accept();
4998 #endif
4999
5000 ; return 0; }
5001 EOF
5002 if { (eval echo configure:5005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5003 rm -rf conftest*
5004 eval "ac_cv_func_accept=yes"
5005 else
5006 echo "configure: failed program was:" >&5
5007 cat conftest.$ac_ext >&5
5008 rm -rf conftest*
5009 eval "ac_cv_func_accept=no"
5010 fi
5011 rm -f conftest*
5012 fi
5013
5014 if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
5015 echo "$ac_t""yes" 1>&6
5016 sim_checkNsl=0
5017 sim_cv_lib_sockets="-lsocket -lnsl"
5018 else
5019 echo "$ac_t""no" 1>&6
5020 fi
5021
5022 unset ac_cv_func_accept
5023 SOCKLIBSW=$sim_oldLibs
5024 fi
5025 unset ac_cv_func_gethostbyname
5026 sim_oldLibs=$SOCKLIBSW
5027 SOCKLIBSW="$SOCKLIBSW $sim_cv_lib_sockets"
5028 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5029 echo "configure:5032: checking for gethostbyname" >&5
5030 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
5031 echo $ac_n "(cached) $ac_c" 1>&6
5032 else
5033 cat > conftest.$ac_ext <<EOF
5034 #line 5037 "configure"
5035 #include "confdefs.h"
5036 /* System header to define __stub macros and hopefully few prototypes,
5037 which can conflict with char gethostbyname(); below. */
5038 #include <assert.h>
5039 /* Override any gcc2 internal prototype to avoid an error. */
5040 /* We use char because int might match the return type of a gcc2
5041 builtin and then its argument prototype would still apply. */
5042 char gethostbyname();
5043
5044 int main() {
5045
5046 /* The GNU C library defines this for functions which it implements
5047 to always fail with ENOSYS. Some functions are actually named
5048 something starting with __ and the normal name is an alias. */
5049 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5050 choke me
5051 #else
5052 gethostbyname();
5053 #endif
5054
5055 ; return 0; }
5056 EOF
5057 if { (eval echo configure:5060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5058 rm -rf conftest*
5059 eval "ac_cv_func_gethostbyname=yes"
5060 else
5061 echo "configure: failed program was:" >&5
5062 cat conftest.$ac_ext >&5
5063 rm -rf conftest*
5064 eval "ac_cv_func_gethostbyname=no"
5065 fi
5066 rm -f conftest*
5067 fi
5068
5069 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5070 echo "$ac_t""yes" 1>&6
5071 :
5072 else
5073 echo "$ac_t""no" 1>&6
5074 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5075 echo "configure:5078: checking for main in -lnsl" >&5
5076 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
5077 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5078 echo $ac_n "(cached) $ac_c" 1>&6
5079 else
5080 ac_save_LIBS="$LIBS"
5081 LIBS="-lnsl $LIBS"
5082 cat > conftest.$ac_ext <<EOF
5083 #line 5086 "configure"
5084 #include "confdefs.h"
5085
5086 int main() {
5087 main()
5088 ; return 0; }
5089 EOF
5090 if { (eval echo configure:5093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5091 rm -rf conftest*
5092 eval "ac_cv_lib_$ac_lib_var=yes"
5093 else
5094 echo "configure: failed program was:" >&5
5095 cat conftest.$ac_ext >&5
5096 rm -rf conftest*
5097 eval "ac_cv_lib_$ac_lib_var=no"
5098 fi
5099 rm -f conftest*
5100 LIBS="$ac_save_LIBS"
5101
5102 fi
5103 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5104 echo "$ac_t""yes" 1>&6
5105 sim_cv_lib_sockets="$sim_cv_lib_sockets -lnsl"
5106 else
5107 echo "$ac_t""no" 1>&6
5108 fi
5109
5110 fi
5111
5112 unset ac_cv_func_gethostbyname
5113 SOCKLIBSW=$sim_oldSOCKLIBSW
5114
5115 fi
5116
5117 echo "$ac_t""$sim_cv_lib_sockets" 1>&6
5118 test -z "$sim_cv_lib_sockets" || SOCKLIBSW="$SOCKLIBSW $sim_cv_lib_sockets"
5119
5120 mips_extra_libs="-L${withval}/lib -lgpu2 -lm $XLIBSW $SOCKLIBSW"
5121 cat > simConfig.sh << --EOF--
5122 mips_extra_libs="$mips_extra_libs"
5123 --EOF--
5124
5125 else
5126 { echo "configure: error: "Directory ${withval} does not exist."" 1>&2; exit 1; };
5127 fi
5128 fi
5129
5130
5131 # Enable target accurate FP library
5132 # Check whether --with-sim-funit or --without-sim-funit was given.
5133 if test "${with_sim_funit+set}" = set; then
5134 withval="$with_sim_funit"
5135 if test -d "${withval}"
5136 then
5137 SIM_SUBTARGET="${SIM_SUBTARGET} -DSKY_FUNIT -I${withval}/include"
5138 mips_extra_libs="${mips_extra_libs} -L${withval}/lib -lfunit"
5139 else
5140 { echo "configure: error: "Directory ${withval} does not exist."" 1>&2; exit 1; };
5141 fi
5142 fi
5143 # end-sanitize-sky
5144
5145
5146 for ac_hdr in string.h strings.h stdlib.h stdlib.h
5147 do
5148 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5149 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5150 echo "configure:5153: checking for $ac_hdr" >&5
5151 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5152 echo $ac_n "(cached) $ac_c" 1>&6
5153 else
5154 cat > conftest.$ac_ext <<EOF
5155 #line 5158 "configure"
5156 #include "confdefs.h"
5157 #include <$ac_hdr>
5158 EOF
5159 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5160 { (eval echo configure:5163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5161 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5162 if test -z "$ac_err"; then
5163 rm -rf conftest*
5164 eval "ac_cv_header_$ac_safe=yes"
5165 else
5166 echo "$ac_err" >&5
5167 echo "configure: failed program was:" >&5
5168 cat conftest.$ac_ext >&5
5169 rm -rf conftest*
5170 eval "ac_cv_header_$ac_safe=no"
5171 fi
5172 rm -f conftest*
5173 fi
5174 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5175 echo "$ac_t""yes" 1>&6
5176 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5177 cat >> confdefs.h <<EOF
5178 #define $ac_tr_hdr 1
5179 EOF
5180
5181 else
5182 echo "$ac_t""no" 1>&6
5183 fi
5184 done
5185
5186 echo $ac_n "checking for fabs in -lm""... $ac_c" 1>&6
5187 echo "configure:5190: checking for fabs in -lm" >&5
5188 ac_lib_var=`echo m'_'fabs | sed 'y%./+-%__p_%'`
5189 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5190 echo $ac_n "(cached) $ac_c" 1>&6
5191 else
5192 ac_save_LIBS="$LIBS"
5193 LIBS="-lm $LIBS"
5194 cat > conftest.$ac_ext <<EOF
5195 #line 5198 "configure"
5196 #include "confdefs.h"
5197 /* Override any gcc2 internal prototype to avoid an error. */
5198 /* We use char because int might match the return type of a gcc2
5199 builtin and then its argument prototype would still apply. */
5200 char fabs();
5201
5202 int main() {
5203 fabs()
5204 ; return 0; }
5205 EOF
5206 if { (eval echo configure:5209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5207 rm -rf conftest*
5208 eval "ac_cv_lib_$ac_lib_var=yes"
5209 else
5210 echo "configure: failed program was:" >&5
5211 cat conftest.$ac_ext >&5
5212 rm -rf conftest*
5213 eval "ac_cv_lib_$ac_lib_var=no"
5214 fi
5215 rm -f conftest*
5216 LIBS="$ac_save_LIBS"
5217
5218 fi
5219 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5220 echo "$ac_t""yes" 1>&6
5221 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5222 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5223 cat >> confdefs.h <<EOF
5224 #define $ac_tr_lib 1
5225 EOF
5226
5227 LIBS="-lm $LIBS"
5228
5229 else
5230 echo "$ac_t""no" 1>&6
5231 fi
5232
5233 for ac_func in aint anint sqrt
5234 do
5235 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5236 echo "configure:5239: checking for $ac_func" >&5
5237 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5238 echo $ac_n "(cached) $ac_c" 1>&6
5239 else
5240 cat > conftest.$ac_ext <<EOF
5241 #line 5244 "configure"
5242 #include "confdefs.h"
5243 /* System header to define __stub macros and hopefully few prototypes,
5244 which can conflict with char $ac_func(); below. */
5245 #include <assert.h>
5246 /* Override any gcc2 internal prototype to avoid an error. */
5247 /* We use char because int might match the return type of a gcc2
5248 builtin and then its argument prototype would still apply. */
5249 char $ac_func();
5250
5251 int main() {
5252
5253 /* The GNU C library defines this for functions which it implements
5254 to always fail with ENOSYS. Some functions are actually named
5255 something starting with __ and the normal name is an alias. */
5256 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5257 choke me
5258 #else
5259 $ac_func();
5260 #endif
5261
5262 ; return 0; }
5263 EOF
5264 if { (eval echo configure:5267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5265 rm -rf conftest*
5266 eval "ac_cv_func_$ac_func=yes"
5267 else
5268 echo "configure: failed program was:" >&5
5269 cat conftest.$ac_ext >&5
5270 rm -rf conftest*
5271 eval "ac_cv_func_$ac_func=no"
5272 fi
5273 rm -f conftest*
5274 fi
5275
5276 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5277 echo "$ac_t""yes" 1>&6
5278 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5279 cat >> confdefs.h <<EOF
5280 #define $ac_tr_func 1
5281 EOF
5282
5283 else
5284 echo "$ac_t""no" 1>&6
5285 fi
5286 done
5287
5288
5289
5290
5291 trap '' 1 2 15
5292 cat > confcache <<\EOF
5293 # This file is a shell script that caches the results of configure
5294 # tests run on this system so they can be shared between configure
5295 # scripts and configure runs. It is not useful on other systems.
5296 # If it contains results you don't want to keep, you may remove or edit it.
5297 #
5298 # By default, configure uses ./config.cache as the cache file,
5299 # creating it if it does not exist already. You can give configure
5300 # the --cache-file=FILE option to use a different cache file; that is
5301 # what configure does when it calls configure scripts in
5302 # subdirectories, so they share the cache.
5303 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5304 # config.status only pays attention to the cache file if you give it the
5305 # --recheck option to rerun configure.
5306 #
5307 EOF
5308 # The following way of writing the cache mishandles newlines in values,
5309 # but we know of no workaround that is simple, portable, and efficient.
5310 # So, don't put newlines in cache variables' values.
5311 # Ultrix sh set writes to stderr and can't be redirected directly,
5312 # and sets the high bit in the cache file unless we assign to the vars.
5313 (set) 2>&1 |
5314 case `(ac_space=' '; set) 2>&1 | grep ac_space` in
5315 *ac_space=\ *)
5316 # `set' does not quote correctly, so add quotes (double-quote substitution
5317 # turns \\\\ into \\, and sed turns \\ into \).
5318 sed -n \
5319 -e "s/'/'\\\\''/g" \
5320 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5321 ;;
5322 *)
5323 # `set' quotes correctly as required by POSIX, so do not add quotes.
5324 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5325 ;;
5326 esac >> confcache
5327 if cmp -s $cache_file confcache; then
5328 :
5329 else
5330 if test -w $cache_file; then
5331 echo "updating cache $cache_file"
5332 cat confcache > $cache_file
5333 else
5334 echo "not updating unwritable cache $cache_file"
5335 fi
5336 fi
5337 rm -f confcache
5338
5339 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5340
5341 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5342 # Let make expand exec_prefix.
5343 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5344
5345 # Any assignment to VPATH causes Sun make to only execute
5346 # the first set of double-colon rules, so remove it if not needed.
5347 # If there is a colon in the path, we need to keep it.
5348 if test "x$srcdir" = x.; then
5349 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5350 fi
5351
5352 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5353
5354 DEFS=-DHAVE_CONFIG_H
5355
5356 # Without the "./", some shells look in PATH for config.status.
5357 : ${CONFIG_STATUS=./config.status}
5358
5359 echo creating $CONFIG_STATUS
5360 rm -f $CONFIG_STATUS
5361 cat > $CONFIG_STATUS <<EOF
5362 #! /bin/sh
5363 # Generated automatically by configure.
5364 # Run this file to recreate the current configuration.
5365 # This directory was configured as follows,
5366 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5367 #
5368 # $0 $ac_configure_args
5369 #
5370 # Compiler output produced by configure, useful for debugging
5371 # configure, is in ./config.log if it exists.
5372
5373 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5374 for ac_option
5375 do
5376 case "\$ac_option" in
5377 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5378 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5379 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5380 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5381 echo "$CONFIG_STATUS generated by autoconf version 2.12.2"
5382 exit 0 ;;
5383 -help | --help | --hel | --he | --h)
5384 echo "\$ac_cs_usage"; exit 0 ;;
5385 *) echo "\$ac_cs_usage"; exit 1 ;;
5386 esac
5387 done
5388
5389 ac_given_srcdir=$srcdir
5390 ac_given_INSTALL="$INSTALL"
5391
5392 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
5393 EOF
5394 cat >> $CONFIG_STATUS <<EOF
5395
5396 # Protect against being on the right side of a sed subst in config.status.
5397 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5398 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5399 $ac_vpsub
5400 $extrasub
5401 s%@sim_environment@%$sim_environment%g
5402 s%@sim_alignment@%$sim_alignment%g
5403 s%@sim_assert@%$sim_assert%g
5404 s%@sim_bitsize@%$sim_bitsize%g
5405 s%@sim_endian@%$sim_endian%g
5406 s%@sim_hostendian@%$sim_hostendian%g
5407 s%@sim_float@%$sim_float%g
5408 s%@sim_scache@%$sim_scache%g
5409 s%@sim_default_model@%$sim_default_model%g
5410 s%@sim_hw_cflags@%$sim_hw_cflags%g
5411 s%@sim_hw_objs@%$sim_hw_objs%g
5412 s%@sim_hw@%$sim_hw%g
5413 s%@sim_inline@%$sim_inline%g
5414 s%@sim_packages@%$sim_packages%g
5415 s%@sim_regparm@%$sim_regparm%g
5416 s%@sim_reserved_bits@%$sim_reserved_bits%g
5417 s%@sim_smp@%$sim_smp%g
5418 s%@sim_stdcall@%$sim_stdcall%g
5419 s%@sim_xor_endian@%$sim_xor_endian%g
5420 s%@build_warnings@%$build_warnings%g
5421 s%@SHELL@%$SHELL%g
5422 s%@CFLAGS@%$CFLAGS%g
5423 s%@CPPFLAGS@%$CPPFLAGS%g
5424 s%@CXXFLAGS@%$CXXFLAGS%g
5425 s%@DEFS@%$DEFS%g
5426 s%@LDFLAGS@%$LDFLAGS%g
5427 s%@LIBS@%$LIBS%g
5428 s%@exec_prefix@%$exec_prefix%g
5429 s%@prefix@%$prefix%g
5430 s%@program_transform_name@%$program_transform_name%g
5431 s%@bindir@%$bindir%g
5432 s%@sbindir@%$sbindir%g
5433 s%@libexecdir@%$libexecdir%g
5434 s%@datadir@%$datadir%g
5435 s%@sysconfdir@%$sysconfdir%g
5436 s%@sharedstatedir@%$sharedstatedir%g
5437 s%@localstatedir@%$localstatedir%g
5438 s%@libdir@%$libdir%g
5439 s%@includedir@%$includedir%g
5440 s%@oldincludedir@%$oldincludedir%g
5441 s%@infodir@%$infodir%g
5442 s%@mandir@%$mandir%g
5443 s%@host@%$host%g
5444 s%@host_alias@%$host_alias%g
5445 s%@host_cpu@%$host_cpu%g
5446 s%@host_vendor@%$host_vendor%g
5447 s%@host_os@%$host_os%g
5448 s%@target@%$target%g
5449 s%@target_alias@%$target_alias%g
5450 s%@target_cpu@%$target_cpu%g
5451 s%@target_vendor@%$target_vendor%g
5452 s%@target_os@%$target_os%g
5453 s%@build@%$build%g
5454 s%@build_alias@%$build_alias%g
5455 s%@build_cpu@%$build_cpu%g
5456 s%@build_vendor@%$build_vendor%g
5457 s%@build_os@%$build_os%g
5458 s%@CC@%$CC%g
5459 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5460 s%@INSTALL_DATA@%$INSTALL_DATA%g
5461 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
5462 s%@HDEFINES@%$HDEFINES%g
5463 s%@AR@%$AR%g
5464 s%@RANLIB@%$RANLIB%g
5465 s%@SET_MAKE@%$SET_MAKE%g
5466 s%@CPP@%$CPP%g
5467 s%@ALLOCA@%$ALLOCA%g
5468 s%@USE_NLS@%$USE_NLS%g
5469 s%@MSGFMT@%$MSGFMT%g
5470 s%@GMSGFMT@%$GMSGFMT%g
5471 s%@XGETTEXT@%$XGETTEXT%g
5472 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
5473 s%@CATALOGS@%$CATALOGS%g
5474 s%@CATOBJEXT@%$CATOBJEXT%g
5475 s%@DATADIRNAME@%$DATADIRNAME%g
5476 s%@GMOFILES@%$GMOFILES%g
5477 s%@INSTOBJEXT@%$INSTOBJEXT%g
5478 s%@INTLDEPS@%$INTLDEPS%g
5479 s%@INTLLIBS@%$INTLLIBS%g
5480 s%@INTLOBJS@%$INTLOBJS%g
5481 s%@POFILES@%$POFILES%g
5482 s%@POSUB@%$POSUB%g
5483 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
5484 s%@GT_NO@%$GT_NO%g
5485 s%@GT_YES@%$GT_YES%g
5486 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
5487 s%@l@%$l%g
5488 s%@MAINT@%$MAINT%g
5489 s%@sim_bswap@%$sim_bswap%g
5490 s%@sim_cflags@%$sim_cflags%g
5491 s%@sim_debug@%$sim_debug%g
5492 s%@sim_stdio@%$sim_stdio%g
5493 s%@sim_trace@%$sim_trace%g
5494 s%@sim_profile@%$sim_profile%g
5495 s%@EXEEXT@%$EXEEXT%g
5496 s%@SIM_SUBTARGET@%$SIM_SUBTARGET%g
5497 s%@sim_igen_flags@%$sim_igen_flags%g
5498 s%@sim_m16_flags@%$sim_m16_flags%g
5499 s%@sim_gen@%$sim_gen%g
5500 s%@mips_extra_objs@%$mips_extra_objs%g
5501 s%@mips_igen_engine@%$mips_igen_engine%g
5502 s%@mips_extra_libs@%$mips_extra_libs%g
5503
5504 CEOF
5505 EOF
5506
5507 cat >> $CONFIG_STATUS <<\EOF
5508
5509 # Split the substitutions into bite-sized pieces for seds with
5510 # small command number limits, like on Digital OSF/1 and HP-UX.
5511 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5512 ac_file=1 # Number of current file.
5513 ac_beg=1 # First line for current file.
5514 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5515 ac_more_lines=:
5516 ac_sed_cmds=""
5517 while $ac_more_lines; do
5518 if test $ac_beg -gt 1; then
5519 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5520 else
5521 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5522 fi
5523 if test ! -s conftest.s$ac_file; then
5524 ac_more_lines=false
5525 rm -f conftest.s$ac_file
5526 else
5527 if test -z "$ac_sed_cmds"; then
5528 ac_sed_cmds="sed -f conftest.s$ac_file"
5529 else
5530 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5531 fi
5532 ac_file=`expr $ac_file + 1`
5533 ac_beg=$ac_end
5534 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5535 fi
5536 done
5537 if test -z "$ac_sed_cmds"; then
5538 ac_sed_cmds=cat
5539 fi
5540 EOF
5541
5542 cat >> $CONFIG_STATUS <<EOF
5543
5544 CONFIG_FILES=\${CONFIG_FILES-"Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in"}
5545 EOF
5546 cat >> $CONFIG_STATUS <<\EOF
5547 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5548 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5549 case "$ac_file" in
5550 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5551 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5552 *) ac_file_in="${ac_file}.in" ;;
5553 esac
5554
5555 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5556
5557 # Remove last slash and all that follows it. Not all systems have dirname.
5558 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5559 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5560 # The file is in a subdirectory.
5561 test ! -d "$ac_dir" && mkdir "$ac_dir"
5562 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5563 # A "../" for each directory in $ac_dir_suffix.
5564 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5565 else
5566 ac_dir_suffix= ac_dots=
5567 fi
5568
5569 case "$ac_given_srcdir" in
5570 .) srcdir=.
5571 if test -z "$ac_dots"; then top_srcdir=.
5572 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5573 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5574 *) # Relative path.
5575 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5576 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5577 esac
5578
5579 case "$ac_given_INSTALL" in
5580 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5581 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5582 esac
5583
5584 echo creating "$ac_file"
5585 rm -f "$ac_file"
5586 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5587 case "$ac_file" in
5588 *Makefile*) ac_comsub="1i\\
5589 # $configure_input" ;;
5590 *) ac_comsub= ;;
5591 esac
5592
5593 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5594 sed -e "$ac_comsub
5595 s%@configure_input@%$configure_input%g
5596 s%@srcdir@%$srcdir%g
5597 s%@top_srcdir@%$top_srcdir%g
5598 s%@INSTALL@%$INSTALL%g
5599 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5600 fi; done
5601 rm -f conftest.s*
5602
5603 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5604 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5605 #
5606 # ac_d sets the value in "#define NAME VALUE" lines.
5607 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5608 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5609 ac_dC='\3'
5610 ac_dD='%g'
5611 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5612 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5613 ac_uB='\([ ]\)%\1#\2define\3'
5614 ac_uC=' '
5615 ac_uD='\4%g'
5616 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5617 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5618 ac_eB='$%\1#\2define\3'
5619 ac_eC=' '
5620 ac_eD='%g'
5621
5622 if test "${CONFIG_HEADERS+set}" != set; then
5623 EOF
5624 cat >> $CONFIG_STATUS <<EOF
5625 CONFIG_HEADERS="config.h:config.in"
5626 EOF
5627 cat >> $CONFIG_STATUS <<\EOF
5628 fi
5629 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5630 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5631 case "$ac_file" in
5632 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5633 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5634 *) ac_file_in="${ac_file}.in" ;;
5635 esac
5636
5637 echo creating $ac_file
5638
5639 rm -f conftest.frag conftest.in conftest.out
5640 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5641 cat $ac_file_inputs > conftest.in
5642
5643 EOF
5644
5645 # Transform confdefs.h into a sed script conftest.vals that substitutes
5646 # the proper values into config.h.in to produce config.h. And first:
5647 # Protect against being on the right side of a sed subst in config.status.
5648 # Protect against being in an unquoted here document in config.status.
5649 rm -f conftest.vals
5650 cat > conftest.hdr <<\EOF
5651 s/[\\&%]/\\&/g
5652 s%[\\$`]%\\&%g
5653 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5654 s%ac_d%ac_u%gp
5655 s%ac_u%ac_e%gp
5656 EOF
5657 sed -n -f conftest.hdr confdefs.h > conftest.vals
5658 rm -f conftest.hdr
5659
5660 # This sed command replaces #undef with comments. This is necessary, for
5661 # example, in the case of _POSIX_SOURCE, which is predefined and required
5662 # on some systems where configure will not decide to define it.
5663 cat >> conftest.vals <<\EOF
5664 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5665 EOF
5666
5667 # Break up conftest.vals because some shells have a limit on
5668 # the size of here documents, and old seds have small limits too.
5669
5670 rm -f conftest.tail
5671 while :
5672 do
5673 ac_lines=`grep -c . conftest.vals`
5674 # grep -c gives empty output for an empty file on some AIX systems.
5675 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5676 # Write a limited-size here document to conftest.frag.
5677 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5678 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5679 echo 'CEOF
5680 sed -f conftest.frag conftest.in > conftest.out
5681 rm -f conftest.in
5682 mv conftest.out conftest.in
5683 ' >> $CONFIG_STATUS
5684 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5685 rm -f conftest.vals
5686 mv conftest.tail conftest.vals
5687 done
5688 rm -f conftest.vals
5689
5690 cat >> $CONFIG_STATUS <<\EOF
5691 rm -f conftest.frag conftest.h
5692 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5693 cat conftest.in >> conftest.h
5694 rm -f conftest.in
5695 if cmp -s $ac_file conftest.h 2>/dev/null; then
5696 echo "$ac_file is unchanged"
5697 rm -f conftest.h
5698 else
5699 # Remove last slash and all that follows it. Not all systems have dirname.
5700 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5701 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5702 # The file is in a subdirectory.
5703 test ! -d "$ac_dir" && mkdir "$ac_dir"
5704 fi
5705 rm -f $ac_file
5706 mv conftest.h $ac_file
5707 fi
5708 fi; done
5709
5710 EOF
5711
5712 cat >> $CONFIG_STATUS <<EOF
5713 ac_sources="$sim_link_files"
5714 ac_dests="$sim_link_links"
5715 EOF
5716
5717 cat >> $CONFIG_STATUS <<\EOF
5718 srcdir=$ac_given_srcdir
5719 while test -n "$ac_sources"; do
5720 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
5721 set $ac_sources; ac_source=$1; shift; ac_sources=$*
5722
5723 echo "linking $srcdir/$ac_source to $ac_dest"
5724
5725 if test ! -r $srcdir/$ac_source; then
5726 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
5727 fi
5728 rm -f $ac_dest
5729
5730 # Make relative symlinks.
5731 # Remove last slash and all that follows it. Not all systems have dirname.
5732 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
5733 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
5734 # The dest file is in a subdirectory.
5735 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
5736 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
5737 # A "../" for each directory in $ac_dest_dir_suffix.
5738 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
5739 else
5740 ac_dest_dir_suffix= ac_dots=
5741 fi
5742
5743 case "$srcdir" in
5744 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
5745 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
5746 esac
5747
5748 # Make a symlink if possible; otherwise try a hard link.
5749 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
5750 ln $srcdir/$ac_source $ac_dest; then :
5751 else
5752 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
5753 fi
5754 done
5755 EOF
5756 cat >> $CONFIG_STATUS <<EOF
5757
5758 EOF
5759 cat >> $CONFIG_STATUS <<\EOF
5760 case "x$CONFIG_FILES" in
5761 xMakefile*)
5762 echo "Merging Makefile.sim+Make-common.sim into Makefile ..."
5763 rm -f Makesim1.tmp Makesim2.tmp Makefile
5764 sed -n -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ p' <Make-common.sim >Makesim1.tmp
5765 sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >Makesim2.tmp
5766 sed -e '/^## COMMON_PRE_/ r Makesim1.tmp' \
5767 -e '/^## COMMON_POST_/ r Makesim2.tmp' \
5768 <Makefile.sim >Makefile
5769 rm -f Makefile.sim Make-common.sim Makesim1.tmp Makesim2.tmp
5770 ;;
5771 esac
5772 case "x$CONFIG_HEADERS" in xconfig.h:config.in) echo > stamp-h ;; esac
5773
5774 exit 0
5775 EOF
5776 chmod +x $CONFIG_STATUS
5777 rm -fr confdefs* $ac_clean_files
5778 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5779
5780