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