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