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