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