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