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