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