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