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