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