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