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