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