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