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