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