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