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