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