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