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