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