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