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