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