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