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