OSDN Git Service

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