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