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