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