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