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