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