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