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