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