8c931d20cfd6f2ad393fc19c6a094c256d917b46
[fw/sdcc] / sim / ucsim / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.
4 #
5 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
6 # Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Avoid depending upon Character Ranges.
11 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14 as_cr_digits='0123456789'
15 as_cr_alnum=$as_cr_Letters$as_cr_digits
16
17 # Sed expression to map a string onto a valid variable name.
18 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19
20 # Sed expression to map a string onto a valid CPP name.
21 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
22
23 # Be Bourne compatible
24 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25   emulate sh
26   NULLCMD=:
27 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28   set -o posix
29 fi
30
31 # Name of the executable.
32 as_me=`echo "$0" |sed 's,.*[\\/],,'`
33
34 if expr a : '\(a\)' >/dev/null 2>&1; then
35   as_expr=expr
36 else
37   as_expr=false
38 fi
39
40 rm -f conf$$ conf$$.exe conf$$.file
41 echo >conf$$.file
42 if ln -s conf$$.file conf$$ 2>/dev/null; then
43   # We could just check for DJGPP; but this test a) works b) is more generic
44   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45   if test -f conf$$.exe; then
46     # Don't use ln at all; we don't have any links
47     as_ln_s='cp -p'
48   else
49     as_ln_s='ln -s'
50   fi
51 elif ln conf$$.file conf$$ 2>/dev/null; then
52   as_ln_s=ln
53 else
54   as_ln_s='cp -p'
55 fi
56 rm -f conf$$ conf$$.exe conf$$.file
57
58 as_executable_p="test -f"
59
60 # Support unset when possible.
61 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
62   as_unset=unset
63 else
64   as_unset=false
65 fi
66
67 # NLS nuisances.
68 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
76
77 # IFS
78 # We need space, tab and new line, in precisely that order.
79 as_nl='
80 '
81 IFS="   $as_nl"
82
83 # CDPATH.
84 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
85
86 # Name of the host.
87 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88 # so uname gets run too.
89 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
90
91 exec 6>&1
92
93 #
94 # Initializations.
95 #
96 ac_default_prefix=/usr/local
97 cross_compiling=no
98 subdirs=
99 MFLAGS= MAKEFLAGS=
100 SHELL=${CONFIG_SHELL-/bin/sh}
101
102 # Maximum number of lines to put in a shell here document.
103 # This variable seems obsolete.  It should probably be removed, and
104 # only ac_max_sed_lines should be used.
105 : ${ac_max_here_lines=38}
106
107 ac_unique_file=".version"
108 # Factoring default headers for most tests.
109 ac_includes_default="\
110 #include <stdio.h>
111 #if HAVE_SYS_TYPES_H
112 # include <sys/types.h>
113 #endif
114 #if HAVE_SYS_STAT_H
115 # include <sys/stat.h>
116 #endif
117 #if STDC_HEADERS
118 # include <stdlib.h>
119 # include <stddef.h>
120 #else
121 # if HAVE_STDLIB_H
122 #  include <stdlib.h>
123 # endif
124 #endif
125 #if HAVE_STRING_H
126 # if !STDC_HEADERS && HAVE_MEMORY_H
127 #  include <memory.h>
128 # endif
129 # include <string.h>
130 #endif
131 #if HAVE_STRINGS_H
132 # include <strings.h>
133 #endif
134 #if HAVE_INTTYPES_H
135 # include <inttypes.h>
136 #else
137 # if HAVE_STDINT_H
138 #  include <stdint.h>
139 # endif
140 #endif
141 #if HAVE_UNISTD_H
142 # include <unistd.h>
143 #endif"
144
145 # Initialize some variables set by options.
146 ac_init_help=
147 ac_init_version=false
148 # The variables have the same names as the options, with
149 # dashes changed to underlines.
150 cache_file=/dev/null
151 exec_prefix=NONE
152 no_create=
153 no_recursion=
154 prefix=NONE
155 program_prefix=NONE
156 program_suffix=NONE
157 program_transform_name=s,x,x,
158 silent=
159 site=
160 srcdir=
161 verbose=
162 x_includes=NONE
163 x_libraries=NONE
164
165 # Installation directory options.
166 # These are left unexpanded so users can "make install exec_prefix=/foo"
167 # and all the variables that are supposed to be based on exec_prefix
168 # by default will actually change.
169 # Use braces instead of parens because sh, perl, etc. also accept them.
170 bindir='${exec_prefix}/bin'
171 sbindir='${exec_prefix}/sbin'
172 libexecdir='${exec_prefix}/libexec'
173 datadir='${prefix}/share'
174 sysconfdir='${prefix}/etc'
175 sharedstatedir='${prefix}/com'
176 localstatedir='${prefix}/var'
177 libdir='${exec_prefix}/lib'
178 includedir='${prefix}/include'
179 oldincludedir='/usr/include'
180 infodir='${prefix}/info'
181 mandir='${prefix}/man'
182
183 # Identity of this package.
184 PACKAGE_NAME=
185 PACKAGE_TARNAME=
186 PACKAGE_VERSION=
187 PACKAGE_STRING=
188 PACKAGE_BUGREPORT=
189
190 ac_prev=
191 for ac_option
192 do
193   # If the previous option needs an argument, assign it.
194   if test -n "$ac_prev"; then
195     eval "$ac_prev=\$ac_option"
196     ac_prev=
197     continue
198   fi
199
200   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
201
202   # Accept the important Cygnus configure options, so we can diagnose typos.
203
204   case $ac_option in
205
206   -bindir | --bindir | --bindi | --bind | --bin | --bi)
207     ac_prev=bindir ;;
208   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
209     bindir=$ac_optarg ;;
210
211   -build | --build | --buil | --bui | --bu)
212     ac_prev=build_alias ;;
213   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
214     build_alias=$ac_optarg ;;
215
216   -cache-file | --cache-file | --cache-fil | --cache-fi \
217   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
218     ac_prev=cache_file ;;
219   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
220   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
221     cache_file=$ac_optarg ;;
222
223   --config-cache | -C)
224     cache_file=config.cache ;;
225
226   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
227     ac_prev=datadir ;;
228   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
229   | --da=*)
230     datadir=$ac_optarg ;;
231
232   -disable-* | --disable-*)
233     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
234     # Reject names that are not valid shell variable names.
235     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
236       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
237    { (exit 1); exit 1; }; }
238     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
239     eval "enable_$ac_feature=no" ;;
240
241   -enable-* | --enable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     case $ac_option in
249       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
250       *) ac_optarg=yes ;;
251     esac
252     eval "enable_$ac_feature='$ac_optarg'" ;;
253
254   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
255   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
256   | --exec | --exe | --ex)
257     ac_prev=exec_prefix ;;
258   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
259   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
260   | --exec=* | --exe=* | --ex=*)
261     exec_prefix=$ac_optarg ;;
262
263   -gas | --gas | --ga | --g)
264     # Obsolete; use --with-gas.
265     with_gas=yes ;;
266
267   -help | --help | --hel | --he | -h)
268     ac_init_help=long ;;
269   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
270     ac_init_help=recursive ;;
271   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
272     ac_init_help=short ;;
273
274   -host | --host | --hos | --ho)
275     ac_prev=host_alias ;;
276   -host=* | --host=* | --hos=* | --ho=*)
277     host_alias=$ac_optarg ;;
278
279   -includedir | --includedir | --includedi | --included | --include \
280   | --includ | --inclu | --incl | --inc)
281     ac_prev=includedir ;;
282   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
283   | --includ=* | --inclu=* | --incl=* | --inc=*)
284     includedir=$ac_optarg ;;
285
286   -infodir | --infodir | --infodi | --infod | --info | --inf)
287     ac_prev=infodir ;;
288   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
289     infodir=$ac_optarg ;;
290
291   -libdir | --libdir | --libdi | --libd)
292     ac_prev=libdir ;;
293   -libdir=* | --libdir=* | --libdi=* | --libd=*)
294     libdir=$ac_optarg ;;
295
296   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
297   | --libexe | --libex | --libe)
298     ac_prev=libexecdir ;;
299   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
300   | --libexe=* | --libex=* | --libe=*)
301     libexecdir=$ac_optarg ;;
302
303   -localstatedir | --localstatedir | --localstatedi | --localstated \
304   | --localstate | --localstat | --localsta | --localst \
305   | --locals | --local | --loca | --loc | --lo)
306     ac_prev=localstatedir ;;
307   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
308   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
309   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
310     localstatedir=$ac_optarg ;;
311
312   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
313     ac_prev=mandir ;;
314   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
315     mandir=$ac_optarg ;;
316
317   -nfp | --nfp | --nf)
318     # Obsolete; use --without-fp.
319     with_fp=no ;;
320
321   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
322   | --no-cr | --no-c)
323     no_create=yes ;;
324
325   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
326   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
327     no_recursion=yes ;;
328
329   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
330   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
331   | --oldin | --oldi | --old | --ol | --o)
332     ac_prev=oldincludedir ;;
333   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
334   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
335   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
336     oldincludedir=$ac_optarg ;;
337
338   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
339     ac_prev=prefix ;;
340   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
341     prefix=$ac_optarg ;;
342
343   -program-prefix | --program-prefix | --program-prefi | --program-pref \
344   | --program-pre | --program-pr | --program-p)
345     ac_prev=program_prefix ;;
346   -program-prefix=* | --program-prefix=* | --program-prefi=* \
347   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
348     program_prefix=$ac_optarg ;;
349
350   -program-suffix | --program-suffix | --program-suffi | --program-suff \
351   | --program-suf | --program-su | --program-s)
352     ac_prev=program_suffix ;;
353   -program-suffix=* | --program-suffix=* | --program-suffi=* \
354   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
355     program_suffix=$ac_optarg ;;
356
357   -program-transform-name | --program-transform-name \
358   | --program-transform-nam | --program-transform-na \
359   | --program-transform-n | --program-transform- \
360   | --program-transform | --program-transfor \
361   | --program-transfo | --program-transf \
362   | --program-trans | --program-tran \
363   | --progr-tra | --program-tr | --program-t)
364     ac_prev=program_transform_name ;;
365   -program-transform-name=* | --program-transform-name=* \
366   | --program-transform-nam=* | --program-transform-na=* \
367   | --program-transform-n=* | --program-transform-=* \
368   | --program-transform=* | --program-transfor=* \
369   | --program-transfo=* | --program-transf=* \
370   | --program-trans=* | --program-tran=* \
371   | --progr-tra=* | --program-tr=* | --program-t=*)
372     program_transform_name=$ac_optarg ;;
373
374   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
375   | -silent | --silent | --silen | --sile | --sil)
376     silent=yes ;;
377
378   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
379     ac_prev=sbindir ;;
380   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
381   | --sbi=* | --sb=*)
382     sbindir=$ac_optarg ;;
383
384   -sharedstatedir | --sharedstatedir | --sharedstatedi \
385   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
386   | --sharedst | --shareds | --shared | --share | --shar \
387   | --sha | --sh)
388     ac_prev=sharedstatedir ;;
389   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
390   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
391   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
392   | --sha=* | --sh=*)
393     sharedstatedir=$ac_optarg ;;
394
395   -site | --site | --sit)
396     ac_prev=site ;;
397   -site=* | --site=* | --sit=*)
398     site=$ac_optarg ;;
399
400   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
401     ac_prev=srcdir ;;
402   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
403     srcdir=$ac_optarg ;;
404
405   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
406   | --syscon | --sysco | --sysc | --sys | --sy)
407     ac_prev=sysconfdir ;;
408   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
409   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
410     sysconfdir=$ac_optarg ;;
411
412   -target | --target | --targe | --targ | --tar | --ta | --t)
413     ac_prev=target_alias ;;
414   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
415     target_alias=$ac_optarg ;;
416
417   -v | -verbose | --verbose | --verbos | --verbo | --verb)
418     verbose=yes ;;
419
420   -version | --version | --versio | --versi | --vers | -V)
421     ac_init_version=: ;;
422
423   -with-* | --with-*)
424     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
425     # Reject names that are not valid shell variable names.
426     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
427       { echo "$as_me: error: invalid package name: $ac_package" >&2
428    { (exit 1); exit 1; }; }
429     ac_package=`echo $ac_package| sed 's/-/_/g'`
430     case $ac_option in
431       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
432       *) ac_optarg=yes ;;
433     esac
434     eval "with_$ac_package='$ac_optarg'" ;;
435
436   -without-* | --without-*)
437     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
438     # Reject names that are not valid shell variable names.
439     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
440       { echo "$as_me: error: invalid package name: $ac_package" >&2
441    { (exit 1); exit 1; }; }
442     ac_package=`echo $ac_package | sed 's/-/_/g'`
443     eval "with_$ac_package=no" ;;
444
445   --x)
446     # Obsolete; use --with-x.
447     with_x=yes ;;
448
449   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
450   | --x-incl | --x-inc | --x-in | --x-i)
451     ac_prev=x_includes ;;
452   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
453   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
454     x_includes=$ac_optarg ;;
455
456   -x-libraries | --x-libraries | --x-librarie | --x-librari \
457   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
458     ac_prev=x_libraries ;;
459   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
460   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
461     x_libraries=$ac_optarg ;;
462
463   -*) { echo "$as_me: error: unrecognized option: $ac_option
464 Try \`$0 --help' for more information." >&2
465    { (exit 1); exit 1; }; }
466     ;;
467
468   *=*)
469     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
470     # Reject names that are not valid shell variable names.
471     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
472       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
473    { (exit 1); exit 1; }; }
474     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
475     eval "$ac_envvar='$ac_optarg'"
476     export $ac_envvar ;;
477
478   *)
479     # FIXME: should be removed in autoconf 3.0.
480     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
481     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
482       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
483     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
484     ;;
485
486   esac
487 done
488
489 if test -n "$ac_prev"; then
490   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
491   { echo "$as_me: error: missing argument to $ac_option" >&2
492    { (exit 1); exit 1; }; }
493 fi
494
495 # Be sure to have absolute paths.
496 for ac_var in exec_prefix prefix
497 do
498   eval ac_val=$`echo $ac_var`
499   case $ac_val in
500     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
501     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
502    { (exit 1); exit 1; }; };;
503   esac
504 done
505
506 # Be sure to have absolute paths.
507 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
508               localstatedir libdir includedir oldincludedir infodir mandir
509 do
510   eval ac_val=$`echo $ac_var`
511   case $ac_val in
512     [\\/$]* | ?:[\\/]* ) ;;
513     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
514    { (exit 1); exit 1; }; };;
515   esac
516 done
517
518 # There might be people who depend on the old broken behavior: `$host'
519 # used to hold the argument of --host etc.
520 build=$build_alias
521 host=$host_alias
522 target=$target_alias
523
524 # FIXME: should be removed in autoconf 3.0.
525 if test "x$host_alias" != x; then
526   if test "x$build_alias" = x; then
527     cross_compiling=maybe
528     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
529     If a cross compiler is detected then cross compile mode will be used." >&2
530   elif test "x$build_alias" != "x$host_alias"; then
531     cross_compiling=yes
532   fi
533 fi
534
535 ac_tool_prefix=
536 test -n "$host_alias" && ac_tool_prefix=$host_alias-
537
538 test "$silent" = yes && exec 6>/dev/null
539
540 # Find the source files, if location was not specified.
541 if test -z "$srcdir"; then
542   ac_srcdir_defaulted=yes
543   # Try the directory containing this script, then its parent.
544   ac_prog=$0
545   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
546   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
547   srcdir=$ac_confdir
548   if test ! -r $srcdir/$ac_unique_file; then
549     srcdir=..
550   fi
551 else
552   ac_srcdir_defaulted=no
553 fi
554 if test ! -r $srcdir/$ac_unique_file; then
555   if test "$ac_srcdir_defaulted" = yes; then
556     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
557    { (exit 1); exit 1; }; }
558   else
559     { echo "$as_me: error: cannot find sources in $srcdir" >&2
560    { (exit 1); exit 1; }; }
561   fi
562 fi
563 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
564 ac_env_build_alias_set=${build_alias+set}
565 ac_env_build_alias_value=$build_alias
566 ac_cv_env_build_alias_set=${build_alias+set}
567 ac_cv_env_build_alias_value=$build_alias
568 ac_env_host_alias_set=${host_alias+set}
569 ac_env_host_alias_value=$host_alias
570 ac_cv_env_host_alias_set=${host_alias+set}
571 ac_cv_env_host_alias_value=$host_alias
572 ac_env_target_alias_set=${target_alias+set}
573 ac_env_target_alias_value=$target_alias
574 ac_cv_env_target_alias_set=${target_alias+set}
575 ac_cv_env_target_alias_value=$target_alias
576 ac_env_CXX_set=${CXX+set}
577 ac_env_CXX_value=$CXX
578 ac_cv_env_CXX_set=${CXX+set}
579 ac_cv_env_CXX_value=$CXX
580 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
581 ac_env_CXXFLAGS_value=$CXXFLAGS
582 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
583 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
584 ac_env_LDFLAGS_set=${LDFLAGS+set}
585 ac_env_LDFLAGS_value=$LDFLAGS
586 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
587 ac_cv_env_LDFLAGS_value=$LDFLAGS
588 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
589 ac_env_CPPFLAGS_value=$CPPFLAGS
590 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
591 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
592 ac_env_CXXCPP_set=${CXXCPP+set}
593 ac_env_CXXCPP_value=$CXXCPP
594 ac_cv_env_CXXCPP_set=${CXXCPP+set}
595 ac_cv_env_CXXCPP_value=$CXXCPP
596
597 #
598 # Report the --help message.
599 #
600 if test "$ac_init_help" = "long"; then
601   # Omit some internal or obsolete options to make the list less imposing.
602   # This message is too long to be a string in the A/UX 3.1 sh.
603   cat <<EOF
604 \`configure' configures this package to adapt to many kinds of systems.
605
606 Usage: $0 [OPTION]... [VAR=VALUE]...
607
608 To assign environment variables (e.g., CC, CFLAGS...), specify them as
609 VAR=VALUE.  See below for descriptions of some of the useful variables.
610
611 Defaults for the options are specified in brackets.
612
613 Configuration:
614   -h, --help              display this help and exit
615       --help=short        display options specific to this package
616       --help=recursive    display the short help of all the included packages
617   -V, --version           display version information and exit
618   -q, --quiet, --silent   do not print \`checking...' messages
619       --cache-file=FILE   cache test results in FILE [disabled]
620   -C, --config-cache      alias for \`--cache-file=config.cache'
621   -n, --no-create         do not create output files
622       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
623
624 EOF
625
626   cat <<EOF
627 Installation directories:
628   --prefix=PREFIX         install architecture-independent files in PREFIX
629                           [$ac_default_prefix]
630   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
631                           [PREFIX]
632
633 By default, \`make install' will install all the files in
634 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
635 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
636 for instance \`--prefix=\$HOME'.
637
638 For better control, use the options below.
639
640 Fine tuning of the installation directories:
641   --bindir=DIR           user executables [EPREFIX/bin]
642   --sbindir=DIR          system admin executables [EPREFIX/sbin]
643   --libexecdir=DIR       program executables [EPREFIX/libexec]
644   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
645   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
646   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
647   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
648   --libdir=DIR           object code libraries [EPREFIX/lib]
649   --includedir=DIR       C header files [PREFIX/include]
650   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
651   --infodir=DIR          info documentation [PREFIX/info]
652   --mandir=DIR           man documentation [PREFIX/man]
653 EOF
654
655   cat <<\EOF
656 EOF
657 fi
658
659 if test -n "$ac_init_help"; then
660
661   cat <<\EOF
662
663 Some influential environment variables:
664   CXX         C++ compiler command
665   CXXFLAGS    C++ compiler flags
666   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
667               nonstandard directory <lib dir>
668   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
669               headers in a nonstandard directory <include dir>
670   CXXCPP      C++ preprocessor
671
672 Use these variables to override the choices made by `configure' or to help
673 it to find libraries and programs with nonstandard names/locations.
674
675 EOF
676 fi
677
678 if test "$ac_init_help" = "recursive"; then
679   # If there are subdirs, report their specific --help.
680   ac_popdir=`pwd`
681   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
682     cd $ac_subdir
683     # A "../" for each directory in /$ac_subdir.
684     ac_dots=`echo $ac_subdir |
685              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
686
687     case $srcdir in
688     .) # No --srcdir option.  We are building in place.
689       ac_sub_srcdir=$srcdir ;;
690     [\\/]* | ?:[\\/]* ) # Absolute path.
691       ac_sub_srcdir=$srcdir/$ac_subdir ;;
692     *) # Relative path.
693       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
694     esac
695
696     # Check for guested configure; otherwise get Cygnus style configure.
697     if test -f $ac_sub_srcdir/configure.gnu; then
698       echo
699       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
700     elif test -f $ac_sub_srcdir/configure; then
701       echo
702       $SHELL $ac_sub_srcdir/configure  --help=recursive
703     elif test -f $ac_sub_srcdir/configure.ac ||
704            test -f $ac_sub_srcdir/configure.in; then
705       echo
706       $ac_configure --help
707     else
708       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
709     fi
710     cd $ac_popdir
711   done
712 fi
713
714 test -n "$ac_init_help" && exit 0
715 if $ac_init_version; then
716   cat <<\EOF
717
718 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
719 Free Software Foundation, Inc.
720 This configure script is free software; the Free Software Foundation
721 gives unlimited permission to copy, distribute and modify it.
722 EOF
723   exit 0
724 fi
725 exec 5>config.log
726 cat >&5 <<EOF
727 This file contains any messages produced by compilers while
728 running configure, to aid debugging if configure makes a mistake.
729
730 It was created by $as_me, which was
731 generated by GNU Autoconf 2.52.  Invocation command line was
732
733   $ $0 $@
734
735 EOF
736 {
737 cat <<_ASUNAME
738 ## ---------- ##
739 ## Platform.  ##
740 ## ---------- ##
741
742 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
743 uname -m = `(uname -m) 2>/dev/null || echo unknown`
744 uname -r = `(uname -r) 2>/dev/null || echo unknown`
745 uname -s = `(uname -s) 2>/dev/null || echo unknown`
746 uname -v = `(uname -v) 2>/dev/null || echo unknown`
747
748 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
749 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
750
751 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
752 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
753 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
754 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
755 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
756 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
757 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
758
759 PATH = $PATH
760
761 _ASUNAME
762 } >&5
763
764 cat >&5 <<EOF
765 ## ------------ ##
766 ## Core tests.  ##
767 ## ------------ ##
768
769 EOF
770
771 # Keep a trace of the command line.
772 # Strip out --no-create and --no-recursion so they do not pile up.
773 # Also quote any args containing shell meta-characters.
774 ac_configure_args=
775 ac_sep=
776 for ac_arg
777 do
778   case $ac_arg in
779   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
780   | --no-cr | --no-c) ;;
781   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
782   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
783   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
784     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
785     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
786     ac_sep=" " ;;
787   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
788      ac_sep=" " ;;
789   esac
790   # Get rid of the leading space.
791 done
792
793 # When interrupted or exit'd, cleanup temporary files, and complete
794 # config.log.  We remove comments because anyway the quotes in there
795 # would cause problems or look ugly.
796 trap 'exit_status=$?
797   # Save into config.log some information that might help in debugging.
798   echo >&5
799   echo "## ----------------- ##" >&5
800   echo "## Cache variables.  ##" >&5
801   echo "## ----------------- ##" >&5
802   echo >&5
803   # The following way of writing the cache mishandles newlines in values,
804 {
805   (set) 2>&1 |
806     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
807     *ac_space=\ *)
808       sed -n \
809         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
810           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
811       ;;
812     *)
813       sed -n \
814         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
815       ;;
816     esac;
817 } >&5
818   sed "/^$/d" confdefs.h >conftest.log
819   if test -s conftest.log; then
820     echo >&5
821     echo "## ------------ ##" >&5
822     echo "## confdefs.h.  ##" >&5
823     echo "## ------------ ##" >&5
824     echo >&5
825     cat conftest.log >&5
826   fi
827   (echo; echo) >&5
828   test "$ac_signal" != 0 &&
829     echo "$as_me: caught signal $ac_signal" >&5
830   echo "$as_me: exit $exit_status" >&5
831   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
832     exit $exit_status
833      ' 0
834 for ac_signal in 1 2 13 15; do
835   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
836 done
837 ac_signal=0
838
839 # confdefs.h avoids OS command line length limits that DEFS can exceed.
840 rm -rf conftest* confdefs.h
841 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
842 echo >confdefs.h
843
844 # Let the site file select an alternate cache file if it wants to.
845 # Prefer explicitly selected file to automatically selected ones.
846 if test -z "$CONFIG_SITE"; then
847   if test "x$prefix" != xNONE; then
848     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
849   else
850     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
851   fi
852 fi
853 for ac_site_file in $CONFIG_SITE; do
854   if test -r "$ac_site_file"; then
855     { echo "$as_me:855: loading site script $ac_site_file" >&5
856 echo "$as_me: loading site script $ac_site_file" >&6;}
857     cat "$ac_site_file" >&5
858     . "$ac_site_file"
859   fi
860 done
861
862 if test -r "$cache_file"; then
863   # Some versions of bash will fail to source /dev/null (special
864   # files actually), so we avoid doing that.
865   if test -f "$cache_file"; then
866     { echo "$as_me:866: loading cache $cache_file" >&5
867 echo "$as_me: loading cache $cache_file" >&6;}
868     case $cache_file in
869       [\\/]* | ?:[\\/]* ) . $cache_file;;
870       *)                      . ./$cache_file;;
871     esac
872   fi
873 else
874   { echo "$as_me:874: creating cache $cache_file" >&5
875 echo "$as_me: creating cache $cache_file" >&6;}
876   >$cache_file
877 fi
878
879 # Check that the precious variables saved in the cache have kept the same
880 # value.
881 ac_cache_corrupted=false
882 for ac_var in `(set) 2>&1 |
883                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
884   eval ac_old_set=\$ac_cv_env_${ac_var}_set
885   eval ac_new_set=\$ac_env_${ac_var}_set
886   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
887   eval ac_new_val="\$ac_env_${ac_var}_value"
888   case $ac_old_set,$ac_new_set in
889     set,)
890       { echo "$as_me:890: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
891 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
892       ac_cache_corrupted=: ;;
893     ,set)
894       { echo "$as_me:894: error: \`$ac_var' was not set in the previous run" >&5
895 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
896       ac_cache_corrupted=: ;;
897     ,);;
898     *)
899       if test "x$ac_old_val" != "x$ac_new_val"; then
900         { echo "$as_me:900: error: \`$ac_var' has changed since the previous run:" >&5
901 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
902         { echo "$as_me:902:   former value:  $ac_old_val" >&5
903 echo "$as_me:   former value:  $ac_old_val" >&2;}
904         { echo "$as_me:904:   current value: $ac_new_val" >&5
905 echo "$as_me:   current value: $ac_new_val" >&2;}
906         ac_cache_corrupted=:
907       fi;;
908   esac
909   # Pass precious variables to config.status.  It doesn't matter if
910   # we pass some twice (in addition to the command line arguments).
911   if test "$ac_new_set" = set; then
912     case $ac_new_val in
913     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
914       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
915       ac_configure_args="$ac_configure_args '$ac_arg'"
916       ;;
917     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
918        ;;
919     esac
920   fi
921 done
922 if $ac_cache_corrupted; then
923   { echo "$as_me:923: error: changes in the environment can compromise the build" >&5
924 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
925   { { echo "$as_me:925: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
926 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
927    { (exit 1); exit 1; }; }
928 fi
929
930 ac_ext=c
931 ac_cpp='$CPP $CPPFLAGS'
932 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
933 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
934 ac_compiler_gnu=$ac_cv_c_compiler_gnu
935
936 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
937   *c*,-n*) ECHO_N= ECHO_C='
938 ' ECHO_T='      ' ;;
939   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
940   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
941 esac
942 echo "#! $SHELL" >conftest.sh
943 echo  "exit 0"   >>conftest.sh
944 chmod +x conftest.sh
945 if { (echo "$as_me:945: PATH=\".;.\"; conftest.sh") >&5
946   (PATH=".;."; conftest.sh) 2>&5
947   ac_status=$?
948   echo "$as_me:948: \$? = $ac_status" >&5
949   (exit $ac_status); }; then
950   ac_path_separator=';'
951 else
952   ac_path_separator=:
953 fi
954 PATH_SEPARATOR="$ac_path_separator"
955 rm -f conftest.sh
956
957 ac_config_headers="$ac_config_headers ddconfig.h:ddconfig_in.h"
958
959 for ac_prog in mawk gawk nawk awk
960 do
961   # Extract the first word of "$ac_prog", so it can be a program name with args.
962 set dummy $ac_prog; ac_word=$2
963 echo "$as_me:963: checking for $ac_word" >&5
964 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
965 if test "${ac_cv_prog_AWK+set}" = set; then
966   echo $ECHO_N "(cached) $ECHO_C" >&6
967 else
968   if test -n "$AWK"; then
969   ac_cv_prog_AWK="$AWK" # Let the user override the test.
970 else
971   ac_save_IFS=$IFS; IFS=$ac_path_separator
972 ac_dummy="$PATH"
973 for ac_dir in $ac_dummy; do
974   IFS=$ac_save_IFS
975   test -z "$ac_dir" && ac_dir=.
976   $as_executable_p "$ac_dir/$ac_word" || continue
977 ac_cv_prog_AWK="$ac_prog"
978 echo "$as_me:978: found $ac_dir/$ac_word" >&5
979 break
980 done
981
982 fi
983 fi
984 AWK=$ac_cv_prog_AWK
985 if test -n "$AWK"; then
986   echo "$as_me:986: result: $AWK" >&5
987 echo "${ECHO_T}$AWK" >&6
988 else
989   echo "$as_me:989: result: no" >&5
990 echo "${ECHO_T}no" >&6
991 fi
992
993   test -n "$AWK" && break
994 done
995
996 echo "$as_me:996: checking version of the package" >&5
997 echo $ECHO_N "checking version of the package... $ECHO_C" >&6
998 if test -f .version; then
999   VERSION=`cat .version`
1000   echo "$as_me:1000: result: $VERSION" >&5
1001 echo "${ECHO_T}$VERSION" >&6
1002 else
1003   VERSION="0.0.0"
1004   echo "$as_me:1004: result: unknown using 0.0.0" >&5
1005 echo "${ECHO_T}unknown using 0.0.0" >&6
1006 fi
1007 VERSIONHI=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $1}'`
1008 VERSIONLO=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $2}'`
1009 VERSIONP=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $3}'`
1010
1011 cat >>confdefs.h <<EOF
1012 #define VERSIONSTR "${VERSION}"
1013 EOF
1014
1015 cat >>confdefs.h <<EOF
1016 #define VERSIONHI $VERSIONHI
1017 EOF
1018
1019 cat >>confdefs.h <<EOF
1020 #define VERSIONLO $VERSIONLO
1021 EOF
1022
1023 cat >>confdefs.h <<EOF
1024 #define VERSIONP $VERSIONP
1025 EOF
1026
1027 # Required programs
1028 #-------------------
1029 ac_ext=cc
1030 ac_cpp='$CXXCPP $CPPFLAGS'
1031 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1032 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1033 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1034 if test -n "$ac_tool_prefix"; then
1035   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
1036   do
1037     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1038 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1039 echo "$as_me:1039: checking for $ac_word" >&5
1040 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1041 if test "${ac_cv_prog_CXX+set}" = set; then
1042   echo $ECHO_N "(cached) $ECHO_C" >&6
1043 else
1044   if test -n "$CXX"; then
1045   ac_cv_prog_CXX="$CXX" # Let the user override the test.
1046 else
1047   ac_save_IFS=$IFS; IFS=$ac_path_separator
1048 ac_dummy="$PATH"
1049 for ac_dir in $ac_dummy; do
1050   IFS=$ac_save_IFS
1051   test -z "$ac_dir" && ac_dir=.
1052   $as_executable_p "$ac_dir/$ac_word" || continue
1053 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
1054 echo "$as_me:1054: found $ac_dir/$ac_word" >&5
1055 break
1056 done
1057
1058 fi
1059 fi
1060 CXX=$ac_cv_prog_CXX
1061 if test -n "$CXX"; then
1062   echo "$as_me:1062: result: $CXX" >&5
1063 echo "${ECHO_T}$CXX" >&6
1064 else
1065   echo "$as_me:1065: result: no" >&5
1066 echo "${ECHO_T}no" >&6
1067 fi
1068
1069     test -n "$CXX" && break
1070   done
1071 fi
1072 if test -z "$CXX"; then
1073   ac_ct_CXX=$CXX
1074   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
1075 do
1076   # Extract the first word of "$ac_prog", so it can be a program name with args.
1077 set dummy $ac_prog; ac_word=$2
1078 echo "$as_me:1078: checking for $ac_word" >&5
1079 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1080 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
1081   echo $ECHO_N "(cached) $ECHO_C" >&6
1082 else
1083   if test -n "$ac_ct_CXX"; then
1084   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
1085 else
1086   ac_save_IFS=$IFS; IFS=$ac_path_separator
1087 ac_dummy="$PATH"
1088 for ac_dir in $ac_dummy; do
1089   IFS=$ac_save_IFS
1090   test -z "$ac_dir" && ac_dir=.
1091   $as_executable_p "$ac_dir/$ac_word" || continue
1092 ac_cv_prog_ac_ct_CXX="$ac_prog"
1093 echo "$as_me:1093: found $ac_dir/$ac_word" >&5
1094 break
1095 done
1096
1097 fi
1098 fi
1099 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
1100 if test -n "$ac_ct_CXX"; then
1101   echo "$as_me:1101: result: $ac_ct_CXX" >&5
1102 echo "${ECHO_T}$ac_ct_CXX" >&6
1103 else
1104   echo "$as_me:1104: result: no" >&5
1105 echo "${ECHO_T}no" >&6
1106 fi
1107
1108   test -n "$ac_ct_CXX" && break
1109 done
1110 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
1111
1112   CXX=$ac_ct_CXX
1113 fi
1114
1115 # Provide some information about the compiler.
1116 echo "$as_me:1116:" \
1117      "checking for C++ compiler version" >&5
1118 ac_compiler=`set X $ac_compile; echo $2`
1119 { (eval echo "$as_me:1119: \"$ac_compiler --version </dev/null >&5\"") >&5
1120   (eval $ac_compiler --version </dev/null >&5) 2>&5
1121   ac_status=$?
1122   echo "$as_me:1122: \$? = $ac_status" >&5
1123   (exit $ac_status); }
1124 { (eval echo "$as_me:1124: \"$ac_compiler -v </dev/null >&5\"") >&5
1125   (eval $ac_compiler -v </dev/null >&5) 2>&5
1126   ac_status=$?
1127   echo "$as_me:1127: \$? = $ac_status" >&5
1128   (exit $ac_status); }
1129 { (eval echo "$as_me:1129: \"$ac_compiler -V </dev/null >&5\"") >&5
1130   (eval $ac_compiler -V </dev/null >&5) 2>&5
1131   ac_status=$?
1132   echo "$as_me:1132: \$? = $ac_status" >&5
1133   (exit $ac_status); }
1134
1135 cat >conftest.$ac_ext <<_ACEOF
1136 #line 1136 "configure"
1137 #include "confdefs.h"
1138
1139 int
1140 main ()
1141 {
1142
1143   ;
1144   return 0;
1145 }
1146 _ACEOF
1147 ac_clean_files_save=$ac_clean_files
1148 ac_clean_files="$ac_clean_files a.out a.exe"
1149 # Try to create an executable without -o first, disregard a.out.
1150 # It will help us diagnose broken compilers, and finding out an intuition
1151 # of exeext.
1152 echo "$as_me:1152: checking for C++ compiler default output" >&5
1153 echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1154 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1155 if { (eval echo "$as_me:1155: \"$ac_link_default\"") >&5
1156   (eval $ac_link_default) 2>&5
1157   ac_status=$?
1158   echo "$as_me:1158: \$? = $ac_status" >&5
1159   (exit $ac_status); }; then
1160   # Find the output, starting from the most likely.  This scheme is
1161 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1162 # resort.
1163 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1164                 ls a.out conftest 2>/dev/null;
1165                 ls a.* conftest.* 2>/dev/null`; do
1166   case $ac_file in
1167     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1168     a.out ) # We found the default executable, but exeext='' is most
1169             # certainly right.
1170             break;;
1171     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1172           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1173           export ac_cv_exeext
1174           break;;
1175     * ) break;;
1176   esac
1177 done
1178 else
1179   echo "$as_me: failed program was:" >&5
1180 cat conftest.$ac_ext >&5
1181 { { echo "$as_me:1181: error: C++ compiler cannot create executables" >&5
1182 echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1183    { (exit 77); exit 77; }; }
1184 fi
1185
1186 ac_exeext=$ac_cv_exeext
1187 echo "$as_me:1187: result: $ac_file" >&5
1188 echo "${ECHO_T}$ac_file" >&6
1189
1190 # Check the compiler produces executables we can run.  If not, either
1191 # the compiler is broken, or we cross compile.
1192 echo "$as_me:1192: checking whether the C++ compiler works" >&5
1193 echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1194 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1195 # If not cross compiling, check that we can run a simple program.
1196 if test "$cross_compiling" != yes; then
1197   if { ac_try='./$ac_file'
1198   { (eval echo "$as_me:1198: \"$ac_try\"") >&5
1199   (eval $ac_try) 2>&5
1200   ac_status=$?
1201   echo "$as_me:1201: \$? = $ac_status" >&5
1202   (exit $ac_status); }; }; then
1203     cross_compiling=no
1204   else
1205     if test "$cross_compiling" = maybe; then
1206         cross_compiling=yes
1207     else
1208         { { echo "$as_me:1208: error: cannot run C++ compiled programs.
1209 If you meant to cross compile, use \`--host'." >&5
1210 echo "$as_me: error: cannot run C++ compiled programs.
1211 If you meant to cross compile, use \`--host'." >&2;}
1212    { (exit 1); exit 1; }; }
1213     fi
1214   fi
1215 fi
1216 echo "$as_me:1216: result: yes" >&5
1217 echo "${ECHO_T}yes" >&6
1218
1219 rm -f a.out a.exe conftest$ac_cv_exeext
1220 ac_clean_files=$ac_clean_files_save
1221 # Check the compiler produces executables we can run.  If not, either
1222 # the compiler is broken, or we cross compile.
1223 echo "$as_me:1223: checking whether we are cross compiling" >&5
1224 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1225 echo "$as_me:1225: result: $cross_compiling" >&5
1226 echo "${ECHO_T}$cross_compiling" >&6
1227
1228 echo "$as_me:1228: checking for executable suffix" >&5
1229 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1230 if { (eval echo "$as_me:1230: \"$ac_link\"") >&5
1231   (eval $ac_link) 2>&5
1232   ac_status=$?
1233   echo "$as_me:1233: \$? = $ac_status" >&5
1234   (exit $ac_status); }; then
1235   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1236 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1237 # work properly (i.e., refer to `conftest.exe'), while it won't with
1238 # `rm'.
1239 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1240   case $ac_file in
1241     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1242     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1243           export ac_cv_exeext
1244           break;;
1245     * ) break;;
1246   esac
1247 done
1248 else
1249   { { echo "$as_me:1249: error: cannot compute EXEEXT: cannot compile and link" >&5
1250 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1251    { (exit 1); exit 1; }; }
1252 fi
1253
1254 rm -f conftest$ac_cv_exeext
1255 echo "$as_me:1255: result: $ac_cv_exeext" >&5
1256 echo "${ECHO_T}$ac_cv_exeext" >&6
1257
1258 rm -f conftest.$ac_ext
1259 EXEEXT=$ac_cv_exeext
1260 ac_exeext=$EXEEXT
1261 echo "$as_me:1261: checking for object suffix" >&5
1262 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1263 if test "${ac_cv_objext+set}" = set; then
1264   echo $ECHO_N "(cached) $ECHO_C" >&6
1265 else
1266   cat >conftest.$ac_ext <<_ACEOF
1267 #line 1267 "configure"
1268 #include "confdefs.h"
1269
1270 int
1271 main ()
1272 {
1273
1274   ;
1275   return 0;
1276 }
1277 _ACEOF
1278 rm -f conftest.o conftest.obj
1279 if { (eval echo "$as_me:1279: \"$ac_compile\"") >&5
1280   (eval $ac_compile) 2>&5
1281   ac_status=$?
1282   echo "$as_me:1282: \$? = $ac_status" >&5
1283   (exit $ac_status); }; then
1284   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1285   case $ac_file in
1286     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1287     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1288        break;;
1289   esac
1290 done
1291 else
1292   echo "$as_me: failed program was:" >&5
1293 cat conftest.$ac_ext >&5
1294 { { echo "$as_me:1294: error: cannot compute OBJEXT: cannot compile" >&5
1295 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1296    { (exit 1); exit 1; }; }
1297 fi
1298
1299 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1300 fi
1301 echo "$as_me:1301: result: $ac_cv_objext" >&5
1302 echo "${ECHO_T}$ac_cv_objext" >&6
1303 OBJEXT=$ac_cv_objext
1304 ac_objext=$OBJEXT
1305 echo "$as_me:1305: checking whether we are using the GNU C++ compiler" >&5
1306 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
1307 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
1308   echo $ECHO_N "(cached) $ECHO_C" >&6
1309 else
1310   cat >conftest.$ac_ext <<_ACEOF
1311 #line 1311 "configure"
1312 #include "confdefs.h"
1313
1314 int
1315 main ()
1316 {
1317 #ifndef __GNUC__
1318        choke me
1319 #endif
1320
1321   ;
1322   return 0;
1323 }
1324 _ACEOF
1325 rm -f conftest.$ac_objext
1326 if { (eval echo "$as_me:1326: \"$ac_compile\"") >&5
1327   (eval $ac_compile) 2>&5
1328   ac_status=$?
1329   echo "$as_me:1329: \$? = $ac_status" >&5
1330   (exit $ac_status); } &&
1331          { ac_try='test -s conftest.$ac_objext'
1332   { (eval echo "$as_me:1332: \"$ac_try\"") >&5
1333   (eval $ac_try) 2>&5
1334   ac_status=$?
1335   echo "$as_me:1335: \$? = $ac_status" >&5
1336   (exit $ac_status); }; }; then
1337   ac_compiler_gnu=yes
1338 else
1339   echo "$as_me: failed program was:" >&5
1340 cat conftest.$ac_ext >&5
1341 ac_compiler_gnu=no
1342 fi
1343 rm -f conftest.$ac_objext conftest.$ac_ext
1344 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
1345
1346 fi
1347 echo "$as_me:1347: result: $ac_cv_cxx_compiler_gnu" >&5
1348 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
1349 GXX=`test $ac_compiler_gnu = yes && echo yes`
1350 ac_test_CXXFLAGS=${CXXFLAGS+set}
1351 ac_save_CXXFLAGS=$CXXFLAGS
1352 CXXFLAGS="-g"
1353 echo "$as_me:1353: checking whether $CXX accepts -g" >&5
1354 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
1355 if test "${ac_cv_prog_cxx_g+set}" = set; then
1356   echo $ECHO_N "(cached) $ECHO_C" >&6
1357 else
1358   cat >conftest.$ac_ext <<_ACEOF
1359 #line 1359 "configure"
1360 #include "confdefs.h"
1361
1362 int
1363 main ()
1364 {
1365
1366   ;
1367   return 0;
1368 }
1369 _ACEOF
1370 rm -f conftest.$ac_objext
1371 if { (eval echo "$as_me:1371: \"$ac_compile\"") >&5
1372   (eval $ac_compile) 2>&5
1373   ac_status=$?
1374   echo "$as_me:1374: \$? = $ac_status" >&5
1375   (exit $ac_status); } &&
1376          { ac_try='test -s conftest.$ac_objext'
1377   { (eval echo "$as_me:1377: \"$ac_try\"") >&5
1378   (eval $ac_try) 2>&5
1379   ac_status=$?
1380   echo "$as_me:1380: \$? = $ac_status" >&5
1381   (exit $ac_status); }; }; then
1382   ac_cv_prog_cxx_g=yes
1383 else
1384   echo "$as_me: failed program was:" >&5
1385 cat conftest.$ac_ext >&5
1386 ac_cv_prog_cxx_g=no
1387 fi
1388 rm -f conftest.$ac_objext conftest.$ac_ext
1389 fi
1390 echo "$as_me:1390: result: $ac_cv_prog_cxx_g" >&5
1391 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
1392 if test "$ac_test_CXXFLAGS" = set; then
1393   CXXFLAGS=$ac_save_CXXFLAGS
1394 elif test $ac_cv_prog_cxx_g = yes; then
1395   if test "$GXX" = yes; then
1396     CXXFLAGS="-g -O2"
1397   else
1398     CXXFLAGS="-g"
1399   fi
1400 else
1401   if test "$GXX" = yes; then
1402     CXXFLAGS="-O2"
1403   else
1404     CXXFLAGS=
1405   fi
1406 fi
1407 for ac_declaration in \
1408    ''\
1409    '#include <stdlib.h>' \
1410    'extern "C" void std::exit (int) throw (); using std::exit;' \
1411    'extern "C" void std::exit (int); using std::exit;' \
1412    'extern "C" void exit (int) throw ();' \
1413    'extern "C" void exit (int);' \
1414    'void exit (int);'
1415 do
1416   cat >conftest.$ac_ext <<_ACEOF
1417 #line 1417 "configure"
1418 #include "confdefs.h"
1419 #include <stdlib.h>
1420 $ac_declaration
1421 int
1422 main ()
1423 {
1424 exit (42);
1425   ;
1426   return 0;
1427 }
1428 _ACEOF
1429 rm -f conftest.$ac_objext
1430 if { (eval echo "$as_me:1430: \"$ac_compile\"") >&5
1431   (eval $ac_compile) 2>&5
1432   ac_status=$?
1433   echo "$as_me:1433: \$? = $ac_status" >&5
1434   (exit $ac_status); } &&
1435          { ac_try='test -s conftest.$ac_objext'
1436   { (eval echo "$as_me:1436: \"$ac_try\"") >&5
1437   (eval $ac_try) 2>&5
1438   ac_status=$?
1439   echo "$as_me:1439: \$? = $ac_status" >&5
1440   (exit $ac_status); }; }; then
1441   :
1442 else
1443   echo "$as_me: failed program was:" >&5
1444 cat conftest.$ac_ext >&5
1445 continue
1446 fi
1447 rm -f conftest.$ac_objext conftest.$ac_ext
1448   cat >conftest.$ac_ext <<_ACEOF
1449 #line 1449 "configure"
1450 #include "confdefs.h"
1451 $ac_declaration
1452 int
1453 main ()
1454 {
1455 exit (42);
1456   ;
1457   return 0;
1458 }
1459 _ACEOF
1460 rm -f conftest.$ac_objext
1461 if { (eval echo "$as_me:1461: \"$ac_compile\"") >&5
1462   (eval $ac_compile) 2>&5
1463   ac_status=$?
1464   echo "$as_me:1464: \$? = $ac_status" >&5
1465   (exit $ac_status); } &&
1466          { ac_try='test -s conftest.$ac_objext'
1467   { (eval echo "$as_me:1467: \"$ac_try\"") >&5
1468   (eval $ac_try) 2>&5
1469   ac_status=$?
1470   echo "$as_me:1470: \$? = $ac_status" >&5
1471   (exit $ac_status); }; }; then
1472   break
1473 else
1474   echo "$as_me: failed program was:" >&5
1475 cat conftest.$ac_ext >&5
1476 fi
1477 rm -f conftest.$ac_objext conftest.$ac_ext
1478 done
1479 rm -f conftest*
1480 if test -n "$ac_declaration"; then
1481   echo '#ifdef __cplusplus' >>confdefs.h
1482   echo $ac_declaration      >>confdefs.h
1483   echo '#endif'             >>confdefs.h
1484 fi
1485
1486 ac_ext=c
1487 ac_cpp='$CPP $CPPFLAGS'
1488 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1489 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1490 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1491
1492 ac_ext=cc
1493 ac_cpp='$CXXCPP $CPPFLAGS'
1494 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1495 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1496 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1497 echo "$as_me:1497: checking how to run the C++ preprocessor" >&5
1498 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
1499 if test -z "$CXXCPP"; then
1500   if test "${ac_cv_prog_CXXCPP+set}" = set; then
1501   echo $ECHO_N "(cached) $ECHO_C" >&6
1502 else
1503       # Double quotes because CXXCPP needs to be expanded
1504     for CXXCPP in "$CXX -E" "/lib/cpp"
1505     do
1506       ac_preproc_ok=false
1507 for ac_cxx_preproc_warn_flag in '' yes
1508 do
1509   # Use a header file that comes with gcc, so configuring glibc
1510   # with a fresh cross-compiler works.
1511   # On the NeXT, cc -E runs the code through the compiler's parser,
1512   # not just through cpp. "Syntax error" is here to catch this case.
1513   cat >conftest.$ac_ext <<_ACEOF
1514 #line 1514 "configure"
1515 #include "confdefs.h"
1516 #include <assert.h>
1517                      Syntax error
1518 _ACEOF
1519 if { (eval echo "$as_me:1519: \"$ac_cpp conftest.$ac_ext\"") >&5
1520   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1521   ac_status=$?
1522   egrep -v '^ *\+' conftest.er1 >conftest.err
1523   rm -f conftest.er1
1524   cat conftest.err >&5
1525   echo "$as_me:1525: \$? = $ac_status" >&5
1526   (exit $ac_status); } >/dev/null; then
1527   if test -s conftest.err; then
1528     ac_cpp_err=$ac_cxx_preproc_warn_flag
1529   else
1530     ac_cpp_err=
1531   fi
1532 else
1533   ac_cpp_err=yes
1534 fi
1535 if test -z "$ac_cpp_err"; then
1536   :
1537 else
1538   echo "$as_me: failed program was:" >&5
1539   cat conftest.$ac_ext >&5
1540   # Broken: fails on valid input.
1541 continue
1542 fi
1543 rm -f conftest.err conftest.$ac_ext
1544
1545   # OK, works on sane cases.  Now check whether non-existent headers
1546   # can be detected and how.
1547   cat >conftest.$ac_ext <<_ACEOF
1548 #line 1548 "configure"
1549 #include "confdefs.h"
1550 #include <ac_nonexistent.h>
1551 _ACEOF
1552 if { (eval echo "$as_me:1552: \"$ac_cpp conftest.$ac_ext\"") >&5
1553   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1554   ac_status=$?
1555   egrep -v '^ *\+' conftest.er1 >conftest.err
1556   rm -f conftest.er1
1557   cat conftest.err >&5
1558   echo "$as_me:1558: \$? = $ac_status" >&5
1559   (exit $ac_status); } >/dev/null; then
1560   if test -s conftest.err; then
1561     ac_cpp_err=$ac_cxx_preproc_warn_flag
1562   else
1563     ac_cpp_err=
1564   fi
1565 else
1566   ac_cpp_err=yes
1567 fi
1568 if test -z "$ac_cpp_err"; then
1569   # Broken: success on invalid input.
1570 continue
1571 else
1572   echo "$as_me: failed program was:" >&5
1573   cat conftest.$ac_ext >&5
1574   # Passes both tests.
1575 ac_preproc_ok=:
1576 break
1577 fi
1578 rm -f conftest.err conftest.$ac_ext
1579
1580 done
1581 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1582 rm -f conftest.err conftest.$ac_ext
1583 if $ac_preproc_ok; then
1584   break
1585 fi
1586
1587     done
1588     ac_cv_prog_CXXCPP=$CXXCPP
1589
1590 fi
1591   CXXCPP=$ac_cv_prog_CXXCPP
1592 else
1593   ac_cv_prog_CXXCPP=$CXXCPP
1594 fi
1595 echo "$as_me:1595: result: $CXXCPP" >&5
1596 echo "${ECHO_T}$CXXCPP" >&6
1597 ac_preproc_ok=false
1598 for ac_cxx_preproc_warn_flag in '' yes
1599 do
1600   # Use a header file that comes with gcc, so configuring glibc
1601   # with a fresh cross-compiler works.
1602   # On the NeXT, cc -E runs the code through the compiler's parser,
1603   # not just through cpp. "Syntax error" is here to catch this case.
1604   cat >conftest.$ac_ext <<_ACEOF
1605 #line 1605 "configure"
1606 #include "confdefs.h"
1607 #include <assert.h>
1608                      Syntax error
1609 _ACEOF
1610 if { (eval echo "$as_me:1610: \"$ac_cpp conftest.$ac_ext\"") >&5
1611   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1612   ac_status=$?
1613   egrep -v '^ *\+' conftest.er1 >conftest.err
1614   rm -f conftest.er1
1615   cat conftest.err >&5
1616   echo "$as_me:1616: \$? = $ac_status" >&5
1617   (exit $ac_status); } >/dev/null; then
1618   if test -s conftest.err; then
1619     ac_cpp_err=$ac_cxx_preproc_warn_flag
1620   else
1621     ac_cpp_err=
1622   fi
1623 else
1624   ac_cpp_err=yes
1625 fi
1626 if test -z "$ac_cpp_err"; then
1627   :
1628 else
1629   echo "$as_me: failed program was:" >&5
1630   cat conftest.$ac_ext >&5
1631   # Broken: fails on valid input.
1632 continue
1633 fi
1634 rm -f conftest.err conftest.$ac_ext
1635
1636   # OK, works on sane cases.  Now check whether non-existent headers
1637   # can be detected and how.
1638   cat >conftest.$ac_ext <<_ACEOF
1639 #line 1639 "configure"
1640 #include "confdefs.h"
1641 #include <ac_nonexistent.h>
1642 _ACEOF
1643 if { (eval echo "$as_me:1643: \"$ac_cpp conftest.$ac_ext\"") >&5
1644   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1645   ac_status=$?
1646   egrep -v '^ *\+' conftest.er1 >conftest.err
1647   rm -f conftest.er1
1648   cat conftest.err >&5
1649   echo "$as_me:1649: \$? = $ac_status" >&5
1650   (exit $ac_status); } >/dev/null; then
1651   if test -s conftest.err; then
1652     ac_cpp_err=$ac_cxx_preproc_warn_flag
1653   else
1654     ac_cpp_err=
1655   fi
1656 else
1657   ac_cpp_err=yes
1658 fi
1659 if test -z "$ac_cpp_err"; then
1660   # Broken: success on invalid input.
1661 continue
1662 else
1663   echo "$as_me: failed program was:" >&5
1664   cat conftest.$ac_ext >&5
1665   # Passes both tests.
1666 ac_preproc_ok=:
1667 break
1668 fi
1669 rm -f conftest.err conftest.$ac_ext
1670
1671 done
1672 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1673 rm -f conftest.err conftest.$ac_ext
1674 if $ac_preproc_ok; then
1675   :
1676 else
1677   { { echo "$as_me:1677: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
1678 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
1679    { (exit 1); exit 1; }; }
1680 fi
1681
1682 ac_ext=c
1683 ac_cpp='$CPP $CPPFLAGS'
1684 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1685 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1686 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1687
1688 ac_aux_dir=
1689 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1690   if test -f $ac_dir/install-sh; then
1691     ac_aux_dir=$ac_dir
1692     ac_install_sh="$ac_aux_dir/install-sh -c"
1693     break
1694   elif test -f $ac_dir/install.sh; then
1695     ac_aux_dir=$ac_dir
1696     ac_install_sh="$ac_aux_dir/install.sh -c"
1697     break
1698   elif test -f $ac_dir/shtool; then
1699     ac_aux_dir=$ac_dir
1700     ac_install_sh="$ac_aux_dir/shtool install -c"
1701     break
1702   fi
1703 done
1704 if test -z "$ac_aux_dir"; then
1705   { { echo "$as_me:1705: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1706 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1707    { (exit 1); exit 1; }; }
1708 fi
1709 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1710 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1711 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1712
1713 # Find a good install program.  We prefer a C program (faster),
1714 # so one script is as good as another.  But avoid the broken or
1715 # incompatible versions:
1716 # SysV /etc/install, /usr/sbin/install
1717 # SunOS /usr/etc/install
1718 # IRIX /sbin/install
1719 # AIX /bin/install
1720 # AmigaOS /C/install, which installs bootblocks on floppy discs
1721 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1722 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1723 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1724 # ./install, which can be erroneously created by make from ./install.sh.
1725 echo "$as_me:1725: checking for a BSD compatible install" >&5
1726 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
1727 if test -z "$INSTALL"; then
1728 if test "${ac_cv_path_install+set}" = set; then
1729   echo $ECHO_N "(cached) $ECHO_C" >&6
1730 else
1731     ac_save_IFS=$IFS; IFS=$ac_path_separator
1732   for ac_dir in $PATH; do
1733     IFS=$ac_save_IFS
1734     # Account for people who put trailing slashes in PATH elements.
1735     case $ac_dir/ in
1736     / | ./ | .// | /cC/* \
1737     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
1738     | /usr/ucb/* ) ;;
1739     *)
1740       # OSF1 and SCO ODT 3.0 have their own names for install.
1741       # Don't use installbsd from OSF since it installs stuff as root
1742       # by default.
1743       for ac_prog in ginstall scoinst install; do
1744         if $as_executable_p "$ac_dir/$ac_prog"; then
1745           if test $ac_prog = install &&
1746             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
1747             # AIX install.  It has an incompatible calling convention.
1748             :
1749           elif test $ac_prog = install &&
1750             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
1751             # program-specific install script used by HP pwplus--don't use.
1752             :
1753           else
1754             ac_cv_path_install="$ac_dir/$ac_prog -c"
1755             break 2
1756           fi
1757         fi
1758       done
1759       ;;
1760     esac
1761   done
1762
1763 fi
1764   if test "${ac_cv_path_install+set}" = set; then
1765     INSTALL=$ac_cv_path_install
1766   else
1767     # As a last resort, use the slow shell script.  We don't cache a
1768     # path for INSTALL within a source directory, because that will
1769     # break other packages using the cache if that directory is
1770     # removed, or if the path is relative.
1771     INSTALL=$ac_install_sh
1772   fi
1773 fi
1774 echo "$as_me:1774: result: $INSTALL" >&5
1775 echo "${ECHO_T}$INSTALL" >&6
1776
1777 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1778 # It thinks the first close brace ends the variable substitution.
1779 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1780
1781 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1782
1783 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1784
1785 if test -n "$ac_tool_prefix"; then
1786   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1787 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1788 echo "$as_me:1788: checking for $ac_word" >&5
1789 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1790 if test "${ac_cv_prog_RANLIB+set}" = set; then
1791   echo $ECHO_N "(cached) $ECHO_C" >&6
1792 else
1793   if test -n "$RANLIB"; then
1794   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1795 else
1796   ac_save_IFS=$IFS; IFS=$ac_path_separator
1797 ac_dummy="$PATH"
1798 for ac_dir in $ac_dummy; do
1799   IFS=$ac_save_IFS
1800   test -z "$ac_dir" && ac_dir=.
1801   $as_executable_p "$ac_dir/$ac_word" || continue
1802 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1803 echo "$as_me:1803: found $ac_dir/$ac_word" >&5
1804 break
1805 done
1806
1807 fi
1808 fi
1809 RANLIB=$ac_cv_prog_RANLIB
1810 if test -n "$RANLIB"; then
1811   echo "$as_me:1811: result: $RANLIB" >&5
1812 echo "${ECHO_T}$RANLIB" >&6
1813 else
1814   echo "$as_me:1814: result: no" >&5
1815 echo "${ECHO_T}no" >&6
1816 fi
1817
1818 fi
1819 if test -z "$ac_cv_prog_RANLIB"; then
1820   ac_ct_RANLIB=$RANLIB
1821   # Extract the first word of "ranlib", so it can be a program name with args.
1822 set dummy ranlib; ac_word=$2
1823 echo "$as_me:1823: checking for $ac_word" >&5
1824 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1825 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
1826   echo $ECHO_N "(cached) $ECHO_C" >&6
1827 else
1828   if test -n "$ac_ct_RANLIB"; then
1829   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
1830 else
1831   ac_save_IFS=$IFS; IFS=$ac_path_separator
1832 ac_dummy="$PATH"
1833 for ac_dir in $ac_dummy; do
1834   IFS=$ac_save_IFS
1835   test -z "$ac_dir" && ac_dir=.
1836   $as_executable_p "$ac_dir/$ac_word" || continue
1837 ac_cv_prog_ac_ct_RANLIB="ranlib"
1838 echo "$as_me:1838: found $ac_dir/$ac_word" >&5
1839 break
1840 done
1841
1842   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
1843 fi
1844 fi
1845 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
1846 if test -n "$ac_ct_RANLIB"; then
1847   echo "$as_me:1847: result: $ac_ct_RANLIB" >&5
1848 echo "${ECHO_T}$ac_ct_RANLIB" >&6
1849 else
1850   echo "$as_me:1850: result: no" >&5
1851 echo "${ECHO_T}no" >&6
1852 fi
1853
1854   RANLIB=$ac_ct_RANLIB
1855 else
1856   RANLIB="$ac_cv_prog_RANLIB"
1857 fi
1858
1859 ac_ext=cc
1860 ac_cpp='$CXXCPP $CPPFLAGS'
1861 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1862 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1863 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1864
1865 # Checking for header files.
1866 # ===========================================================================
1867
1868 if test -d /stuff/include; then
1869   CPPFLAGS="$CPPFLAGS -I/stuff/include"
1870 fi
1871
1872 echo "$as_me:1872: checking for ANSI C header files" >&5
1873 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
1874 if test "${ac_cv_header_stdc+set}" = set; then
1875   echo $ECHO_N "(cached) $ECHO_C" >&6
1876 else
1877   cat >conftest.$ac_ext <<_ACEOF
1878 #line 1878 "configure"
1879 #include "confdefs.h"
1880 #include <stdlib.h>
1881 #include <stdarg.h>
1882 #include <string.h>
1883 #include <float.h>
1884
1885 _ACEOF
1886 if { (eval echo "$as_me:1886: \"$ac_cpp conftest.$ac_ext\"") >&5
1887   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1888   ac_status=$?
1889   egrep -v '^ *\+' conftest.er1 >conftest.err
1890   rm -f conftest.er1
1891   cat conftest.err >&5
1892   echo "$as_me:1892: \$? = $ac_status" >&5
1893   (exit $ac_status); } >/dev/null; then
1894   if test -s conftest.err; then
1895     ac_cpp_err=$ac_cxx_preproc_warn_flag
1896   else
1897     ac_cpp_err=
1898   fi
1899 else
1900   ac_cpp_err=yes
1901 fi
1902 if test -z "$ac_cpp_err"; then
1903   ac_cv_header_stdc=yes
1904 else
1905   echo "$as_me: failed program was:" >&5
1906   cat conftest.$ac_ext >&5
1907   ac_cv_header_stdc=no
1908 fi
1909 rm -f conftest.err conftest.$ac_ext
1910
1911 if test $ac_cv_header_stdc = yes; then
1912   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1913   cat >conftest.$ac_ext <<_ACEOF
1914 #line 1914 "configure"
1915 #include "confdefs.h"
1916 #include <string.h>
1917
1918 _ACEOF
1919 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1920   egrep "memchr" >/dev/null 2>&1; then
1921   :
1922 else
1923   ac_cv_header_stdc=no
1924 fi
1925 rm -f conftest*
1926
1927 fi
1928
1929 if test $ac_cv_header_stdc = yes; then
1930   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1931   cat >conftest.$ac_ext <<_ACEOF
1932 #line 1932 "configure"
1933 #include "confdefs.h"
1934 #include <stdlib.h>
1935
1936 _ACEOF
1937 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1938   egrep "free" >/dev/null 2>&1; then
1939   :
1940 else
1941   ac_cv_header_stdc=no
1942 fi
1943 rm -f conftest*
1944
1945 fi
1946
1947 if test $ac_cv_header_stdc = yes; then
1948   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1949   if test "$cross_compiling" = yes; then
1950   :
1951 else
1952   cat >conftest.$ac_ext <<_ACEOF
1953 #line 1953 "configure"
1954 #include "confdefs.h"
1955 #include <ctype.h>
1956 #if ((' ' & 0x0FF) == 0x020)
1957 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1958 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1959 #else
1960 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
1961                      || ('j' <= (c) && (c) <= 'r') \
1962                      || ('s' <= (c) && (c) <= 'z'))
1963 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
1964 #endif
1965
1966 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1967 int
1968 main ()
1969 {
1970   int i;
1971   for (i = 0; i < 256; i++)
1972     if (XOR (islower (i), ISLOWER (i))
1973         || toupper (i) != TOUPPER (i))
1974       exit(2);
1975   exit (0);
1976 }
1977 _ACEOF
1978 rm -f conftest$ac_exeext
1979 if { (eval echo "$as_me:1979: \"$ac_link\"") >&5
1980   (eval $ac_link) 2>&5
1981   ac_status=$?
1982   echo "$as_me:1982: \$? = $ac_status" >&5
1983   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
1984   { (eval echo "$as_me:1984: \"$ac_try\"") >&5
1985   (eval $ac_try) 2>&5
1986   ac_status=$?
1987   echo "$as_me:1987: \$? = $ac_status" >&5
1988   (exit $ac_status); }; }; then
1989   :
1990 else
1991   echo "$as_me: program exited with status $ac_status" >&5
1992 echo "$as_me: failed program was:" >&5
1993 cat conftest.$ac_ext >&5
1994 ac_cv_header_stdc=no
1995 fi
1996 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
1997 fi
1998 fi
1999 fi
2000 echo "$as_me:2000: result: $ac_cv_header_stdc" >&5
2001 echo "${ECHO_T}$ac_cv_header_stdc" >&6
2002 if test $ac_cv_header_stdc = yes; then
2003
2004 cat >>confdefs.h <<\EOF
2005 #define STDC_HEADERS 1
2006 EOF
2007
2008 fi
2009
2010 for ac_header in getopt.h
2011 do
2012 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2013 echo "$as_me:2013: checking for $ac_header" >&5
2014 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2015 if eval "test \"\${$as_ac_Header+set}\" = set"; then
2016   echo $ECHO_N "(cached) $ECHO_C" >&6
2017 else
2018   cat >conftest.$ac_ext <<_ACEOF
2019 #line 2019 "configure"
2020 #include "confdefs.h"
2021 #include <$ac_header>
2022 _ACEOF
2023 if { (eval echo "$as_me:2023: \"$ac_cpp conftest.$ac_ext\"") >&5
2024   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2025   ac_status=$?
2026   egrep -v '^ *\+' conftest.er1 >conftest.err
2027   rm -f conftest.er1
2028   cat conftest.err >&5
2029   echo "$as_me:2029: \$? = $ac_status" >&5
2030   (exit $ac_status); } >/dev/null; then
2031   if test -s conftest.err; then
2032     ac_cpp_err=$ac_cxx_preproc_warn_flag
2033   else
2034     ac_cpp_err=
2035   fi
2036 else
2037   ac_cpp_err=yes
2038 fi
2039 if test -z "$ac_cpp_err"; then
2040   eval "$as_ac_Header=yes"
2041 else
2042   echo "$as_me: failed program was:" >&5
2043   cat conftest.$ac_ext >&5
2044   eval "$as_ac_Header=no"
2045 fi
2046 rm -f conftest.err conftest.$ac_ext
2047 fi
2048 echo "$as_me:2048: result: `eval echo '${'$as_ac_Header'}'`" >&5
2049 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2050 if test `eval echo '${'$as_ac_Header'}'` = yes; then
2051   cat >>confdefs.h <<EOF
2052 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2053 EOF
2054
2055 fi
2056 done
2057
2058 for ac_header in unistd.h
2059 do
2060 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2061 echo "$as_me:2061: checking for $ac_header" >&5
2062 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2063 if eval "test \"\${$as_ac_Header+set}\" = set"; then
2064   echo $ECHO_N "(cached) $ECHO_C" >&6
2065 else
2066   cat >conftest.$ac_ext <<_ACEOF
2067 #line 2067 "configure"
2068 #include "confdefs.h"
2069 #include <$ac_header>
2070 _ACEOF
2071 if { (eval echo "$as_me:2071: \"$ac_cpp conftest.$ac_ext\"") >&5
2072   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2073   ac_status=$?
2074   egrep -v '^ *\+' conftest.er1 >conftest.err
2075   rm -f conftest.er1
2076   cat conftest.err >&5
2077   echo "$as_me:2077: \$? = $ac_status" >&5
2078   (exit $ac_status); } >/dev/null; then
2079   if test -s conftest.err; then
2080     ac_cpp_err=$ac_cxx_preproc_warn_flag
2081   else
2082     ac_cpp_err=
2083   fi
2084 else
2085   ac_cpp_err=yes
2086 fi
2087 if test -z "$ac_cpp_err"; then
2088   eval "$as_ac_Header=yes"
2089 else
2090   echo "$as_me: failed program was:" >&5
2091   cat conftest.$ac_ext >&5
2092   eval "$as_ac_Header=no"
2093 fi
2094 rm -f conftest.err conftest.$ac_ext
2095 fi
2096 echo "$as_me:2096: result: `eval echo '${'$as_ac_Header'}'`" >&5
2097 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2098 if test `eval echo '${'$as_ac_Header'}'` = yes; then
2099   cat >>confdefs.h <<EOF
2100 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2101 EOF
2102
2103 fi
2104 done
2105
2106 echo "$as_me:2106: checking for sys/socket.h" >&5
2107 echo $ECHO_N "checking for sys/socket.h... $ECHO_C" >&6
2108 if test "${ac_cv_header_sys_socket_h+set}" = set; then
2109   echo $ECHO_N "(cached) $ECHO_C" >&6
2110 else
2111   cat >conftest.$ac_ext <<_ACEOF
2112 #line 2112 "configure"
2113 #include "confdefs.h"
2114 #include <sys/socket.h>
2115 _ACEOF
2116 if { (eval echo "$as_me:2116: \"$ac_cpp conftest.$ac_ext\"") >&5
2117   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2118   ac_status=$?
2119   egrep -v '^ *\+' conftest.er1 >conftest.err
2120   rm -f conftest.er1
2121   cat conftest.err >&5
2122   echo "$as_me:2122: \$? = $ac_status" >&5
2123   (exit $ac_status); } >/dev/null; then
2124   if test -s conftest.err; then
2125     ac_cpp_err=$ac_cxx_preproc_warn_flag
2126   else
2127     ac_cpp_err=
2128   fi
2129 else
2130   ac_cpp_err=yes
2131 fi
2132 if test -z "$ac_cpp_err"; then
2133   ac_cv_header_sys_socket_h=yes
2134 else
2135   echo "$as_me: failed program was:" >&5
2136   cat conftest.$ac_ext >&5
2137   ac_cv_header_sys_socket_h=no
2138 fi
2139 rm -f conftest.err conftest.$ac_ext
2140 fi
2141 echo "$as_me:2141: result: $ac_cv_header_sys_socket_h" >&5
2142 echo "${ECHO_T}$ac_cv_header_sys_socket_h" >&6
2143 if test $ac_cv_header_sys_socket_h = yes; then
2144   cat >>confdefs.h <<\EOF
2145 #define SOCKET_AVAIL 1
2146 EOF
2147
2148     cat >>confdefs.h <<\EOF
2149 #define HAVE_SYS_SOCKET_H 1
2150 EOF
2151
2152     cat >conftest.$ac_ext <<_ACEOF
2153 #line 2153 "configure"
2154 #include "confdefs.h"
2155 #include <sys/socket.h>
2156
2157 _ACEOF
2158 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2159   egrep "socklen_t" >/dev/null 2>&1; then
2160   cat >>confdefs.h <<EOF
2161 #define SOCKLEN_T socklen_t
2162 EOF
2163
2164 else
2165   cat >>confdefs.h <<EOF
2166 #define SOCKLEN_T uint
2167 EOF
2168
2169 fi
2170 rm -f conftest*
2171
2172 fi
2173
2174 echo "$as_me:2174: checking for dlfcn.h" >&5
2175 echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
2176 if test "${ac_cv_header_dlfcn_h+set}" = set; then
2177   echo $ECHO_N "(cached) $ECHO_C" >&6
2178 else
2179   cat >conftest.$ac_ext <<_ACEOF
2180 #line 2180 "configure"
2181 #include "confdefs.h"
2182 #include <dlfcn.h>
2183 _ACEOF
2184 if { (eval echo "$as_me:2184: \"$ac_cpp conftest.$ac_ext\"") >&5
2185   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2186   ac_status=$?
2187   egrep -v '^ *\+' conftest.er1 >conftest.err
2188   rm -f conftest.er1
2189   cat conftest.err >&5
2190   echo "$as_me:2190: \$? = $ac_status" >&5
2191   (exit $ac_status); } >/dev/null; then
2192   if test -s conftest.err; then
2193     ac_cpp_err=$ac_cxx_preproc_warn_flag
2194   else
2195     ac_cpp_err=
2196   fi
2197 else
2198   ac_cpp_err=yes
2199 fi
2200 if test -z "$ac_cpp_err"; then
2201   ac_cv_header_dlfcn_h=yes
2202 else
2203   echo "$as_me: failed program was:" >&5
2204   cat conftest.$ac_ext >&5
2205   ac_cv_header_dlfcn_h=no
2206 fi
2207 rm -f conftest.err conftest.$ac_ext
2208 fi
2209 echo "$as_me:2209: result: $ac_cv_header_dlfcn_h" >&5
2210 echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
2211
2212 ac_header_dirent=no
2213 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
2214   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
2215 echo "$as_me:2215: checking for $ac_hdr that defines DIR" >&5
2216 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
2217 if eval "test \"\${$as_ac_Header+set}\" = set"; then
2218   echo $ECHO_N "(cached) $ECHO_C" >&6
2219 else
2220   cat >conftest.$ac_ext <<_ACEOF
2221 #line 2221 "configure"
2222 #include "confdefs.h"
2223 #include <sys/types.h>
2224 #include <$ac_hdr>
2225
2226 int
2227 main ()
2228 {
2229 if ((DIR *) 0)
2230 return 0;
2231   ;
2232   return 0;
2233 }
2234 _ACEOF
2235 rm -f conftest.$ac_objext
2236 if { (eval echo "$as_me:2236: \"$ac_compile\"") >&5
2237   (eval $ac_compile) 2>&5
2238   ac_status=$?
2239   echo "$as_me:2239: \$? = $ac_status" >&5
2240   (exit $ac_status); } &&
2241          { ac_try='test -s conftest.$ac_objext'
2242   { (eval echo "$as_me:2242: \"$ac_try\"") >&5
2243   (eval $ac_try) 2>&5
2244   ac_status=$?
2245   echo "$as_me:2245: \$? = $ac_status" >&5
2246   (exit $ac_status); }; }; then
2247   eval "$as_ac_Header=yes"
2248 else
2249   echo "$as_me: failed program was:" >&5
2250 cat conftest.$ac_ext >&5
2251 eval "$as_ac_Header=no"
2252 fi
2253 rm -f conftest.$ac_objext conftest.$ac_ext
2254 fi
2255 echo "$as_me:2255: result: `eval echo '${'$as_ac_Header'}'`" >&5
2256 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2257 if test `eval echo '${'$as_ac_Header'}'` = yes; then
2258   cat >>confdefs.h <<EOF
2259 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
2260 EOF
2261
2262 ac_header_dirent=$ac_hdr; break
2263 fi
2264
2265 done
2266 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2267 if test $ac_header_dirent = dirent.h; then
2268   echo "$as_me:2268: checking for opendir in -ldir" >&5
2269 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
2270 if test "${ac_cv_lib_dir_opendir+set}" = set; then
2271   echo $ECHO_N "(cached) $ECHO_C" >&6
2272 else
2273   ac_check_lib_save_LIBS=$LIBS
2274 LIBS="-ldir  $LIBS"
2275 cat >conftest.$ac_ext <<_ACEOF
2276 #line 2276 "configure"
2277 #include "confdefs.h"
2278
2279 /* Override any gcc2 internal prototype to avoid an error.  */
2280 #ifdef __cplusplus
2281 extern "C"
2282 #endif
2283 /* We use char because int might match the return type of a gcc2
2284    builtin and then its argument prototype would still apply.  */
2285 char opendir ();
2286 int
2287 main ()
2288 {
2289 opendir ();
2290   ;
2291   return 0;
2292 }
2293 _ACEOF
2294 rm -f conftest.$ac_objext conftest$ac_exeext
2295 if { (eval echo "$as_me:2295: \"$ac_link\"") >&5
2296   (eval $ac_link) 2>&5
2297   ac_status=$?
2298   echo "$as_me:2298: \$? = $ac_status" >&5
2299   (exit $ac_status); } &&
2300          { ac_try='test -s conftest$ac_exeext'
2301   { (eval echo "$as_me:2301: \"$ac_try\"") >&5
2302   (eval $ac_try) 2>&5
2303   ac_status=$?
2304   echo "$as_me:2304: \$? = $ac_status" >&5
2305   (exit $ac_status); }; }; then
2306   ac_cv_lib_dir_opendir=yes
2307 else
2308   echo "$as_me: failed program was:" >&5
2309 cat conftest.$ac_ext >&5
2310 ac_cv_lib_dir_opendir=no
2311 fi
2312 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2313 LIBS=$ac_check_lib_save_LIBS
2314 fi
2315 echo "$as_me:2315: result: $ac_cv_lib_dir_opendir" >&5
2316 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
2317 if test $ac_cv_lib_dir_opendir = yes; then
2318   LIBS="$LIBS -ldir"
2319 fi
2320
2321 else
2322   echo "$as_me:2322: checking for opendir in -lx" >&5
2323 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
2324 if test "${ac_cv_lib_x_opendir+set}" = set; then
2325   echo $ECHO_N "(cached) $ECHO_C" >&6
2326 else
2327   ac_check_lib_save_LIBS=$LIBS
2328 LIBS="-lx  $LIBS"
2329 cat >conftest.$ac_ext <<_ACEOF
2330 #line 2330 "configure"
2331 #include "confdefs.h"
2332
2333 /* Override any gcc2 internal prototype to avoid an error.  */
2334 #ifdef __cplusplus
2335 extern "C"
2336 #endif
2337 /* We use char because int might match the return type of a gcc2
2338    builtin and then its argument prototype would still apply.  */
2339 char opendir ();
2340 int
2341 main ()
2342 {
2343 opendir ();
2344   ;
2345   return 0;
2346 }
2347 _ACEOF
2348 rm -f conftest.$ac_objext conftest$ac_exeext
2349 if { (eval echo "$as_me:2349: \"$ac_link\"") >&5
2350   (eval $ac_link) 2>&5
2351   ac_status=$?
2352   echo "$as_me:2352: \$? = $ac_status" >&5
2353   (exit $ac_status); } &&
2354          { ac_try='test -s conftest$ac_exeext'
2355   { (eval echo "$as_me:2355: \"$ac_try\"") >&5
2356   (eval $ac_try) 2>&5
2357   ac_status=$?
2358   echo "$as_me:2358: \$? = $ac_status" >&5
2359   (exit $ac_status); }; }; then
2360   ac_cv_lib_x_opendir=yes
2361 else
2362   echo "$as_me: failed program was:" >&5
2363 cat conftest.$ac_ext >&5
2364 ac_cv_lib_x_opendir=no
2365 fi
2366 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2367 LIBS=$ac_check_lib_save_LIBS
2368 fi
2369 echo "$as_me:2369: result: $ac_cv_lib_x_opendir" >&5
2370 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
2371 if test $ac_cv_lib_x_opendir = yes; then
2372   LIBS="$LIBS -lx"
2373 fi
2374
2375 fi
2376
2377 # This must be after CXXCPP
2378
2379 echo "$as_me:2379: checking which header file defines FD_ macros" >&5
2380 echo $ECHO_N "checking which header file defines FD_ macros... $ECHO_C" >&6
2381 if test "${ucsim_cv_fd+set}" = set; then
2382   echo $ECHO_N "(cached) $ECHO_C" >&6
2383 else
2384   ucsim_cv_fd="unknown"
2385 cat >conftest.$ac_ext <<_ACEOF
2386 #line 2386 "configure"
2387 #include "confdefs.h"
2388
2389 #include <sys/time.h>
2390 #ifdef FD_ZERO
2391 yes
2392 #endif
2393 _ACEOF
2394 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2395   egrep "yes" >/dev/null 2>&1; then
2396   ucsim_cv_fd="<sys/time.h>"
2397 fi
2398 rm -f conftest*
2399
2400 cat >conftest.$ac_ext <<_ACEOF
2401 #line 2401 "configure"
2402 #include "confdefs.h"
2403
2404 #include <sys/types.h>
2405 #ifdef FD_ZERO
2406 yes
2407 #endif
2408 _ACEOF
2409 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2410   egrep "yes" >/dev/null 2>&1; then
2411   ucsim_cv_fd="<sys/types.h>"
2412 fi
2413 rm -f conftest*
2414
2415 cat >conftest.$ac_ext <<_ACEOF
2416 #line 2416 "configure"
2417 #include "confdefs.h"
2418
2419 #include <sys/select.h>
2420 #ifdef FD_ZERO
2421 yes
2422 #endif
2423 _ACEOF
2424 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2425   egrep "yes" >/dev/null 2>&1; then
2426   ucsim_cv_fd="<sys/types.h>"
2427 fi
2428 rm -f conftest*
2429
2430 fi
2431 echo "$as_me:2431: result: $ucsim_cv_fd" >&5
2432 echo "${ECHO_T}$ucsim_cv_fd" >&6
2433
2434 cat >>confdefs.h <<\EOF
2435 #define FD_HEADER_OK 0
2436 EOF
2437
2438 if echo $ucsim_cv_fd|grep time >/dev/null 2>&1; then
2439 cat >>confdefs.h <<\EOF
2440 #define FD_NEED_TIME_H 1
2441 EOF
2442
2443 cat >>confdefs.h <<\EOF
2444 #define FD_HEADER_OK 1
2445 EOF
2446
2447 else
2448 cat >>confdefs.h <<\EOF
2449 #define FD_NEED_TIME_H 0
2450 EOF
2451
2452 fi
2453 if echo $ucsim_cv_fd|grep types >/dev/null 2>&1; then
2454 cat >>confdefs.h <<\EOF
2455 #define FD_NEED_TYPES_H 1
2456 EOF
2457
2458 cat >>confdefs.h <<\EOF
2459 #define FD_HEADER_OK 1
2460 EOF
2461
2462 else
2463 cat >>confdefs.h <<\EOF
2464 #define FD_NEED_TYPES_H 0
2465 EOF
2466
2467 fi
2468 if echo $ucsim_cv_fd|grep select >/dev/null 2>&1; then
2469 cat >>confdefs.h <<\EOF
2470 #define FD_NEED_SELECT_H 1
2471 EOF
2472
2473 cat >>confdefs.h <<\EOF
2474 #define FD_HEADER_OK 1
2475 EOF
2476
2477 else
2478 cat >>confdefs.h <<\EOF
2479 #define FD_NEED_SELECT_H 0
2480 EOF
2481
2482 fi
2483
2484 cat >>confdefs.h <<EOF
2485 #define HEADER_FD ${ucsim_cv_fd}
2486 EOF
2487
2488 # Checking for functions/libs
2489 # ===========================================================================
2490
2491 echo "$as_me:2491: checking for socket in -lsocket" >&5
2492 echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
2493 if test "${ac_cv_lib_socket_socket+set}" = set; then
2494   echo $ECHO_N "(cached) $ECHO_C" >&6
2495 else
2496   ac_check_lib_save_LIBS=$LIBS
2497 LIBS="-lsocket  $LIBS"
2498 cat >conftest.$ac_ext <<_ACEOF
2499 #line 2499 "configure"
2500 #include "confdefs.h"
2501
2502 /* Override any gcc2 internal prototype to avoid an error.  */
2503 #ifdef __cplusplus
2504 extern "C"
2505 #endif
2506 /* We use char because int might match the return type of a gcc2
2507    builtin and then its argument prototype would still apply.  */
2508 char socket ();
2509 int
2510 main ()
2511 {
2512 socket ();
2513   ;
2514   return 0;
2515 }
2516 _ACEOF
2517 rm -f conftest.$ac_objext conftest$ac_exeext
2518 if { (eval echo "$as_me:2518: \"$ac_link\"") >&5
2519   (eval $ac_link) 2>&5
2520   ac_status=$?
2521   echo "$as_me:2521: \$? = $ac_status" >&5
2522   (exit $ac_status); } &&
2523          { ac_try='test -s conftest$ac_exeext'
2524   { (eval echo "$as_me:2524: \"$ac_try\"") >&5
2525   (eval $ac_try) 2>&5
2526   ac_status=$?
2527   echo "$as_me:2527: \$? = $ac_status" >&5
2528   (exit $ac_status); }; }; then
2529   ac_cv_lib_socket_socket=yes
2530 else
2531   echo "$as_me: failed program was:" >&5
2532 cat conftest.$ac_ext >&5
2533 ac_cv_lib_socket_socket=no
2534 fi
2535 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2536 LIBS=$ac_check_lib_save_LIBS
2537 fi
2538 echo "$as_me:2538: result: $ac_cv_lib_socket_socket" >&5
2539 echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
2540 if test $ac_cv_lib_socket_socket = yes; then
2541   cat >>confdefs.h <<EOF
2542 #define HAVE_LIBSOCKET 1
2543 EOF
2544
2545   LIBS="-lsocket $LIBS"
2546
2547 fi
2548
2549 echo "$as_me:2549: checking for xdr_short in -lnsl" >&5
2550 echo $ECHO_N "checking for xdr_short in -lnsl... $ECHO_C" >&6
2551 if test "${ac_cv_lib_nsl_xdr_short+set}" = set; then
2552   echo $ECHO_N "(cached) $ECHO_C" >&6
2553 else
2554   ac_check_lib_save_LIBS=$LIBS
2555 LIBS="-lnsl  $LIBS"
2556 cat >conftest.$ac_ext <<_ACEOF
2557 #line 2557 "configure"
2558 #include "confdefs.h"
2559
2560 /* Override any gcc2 internal prototype to avoid an error.  */
2561 #ifdef __cplusplus
2562 extern "C"
2563 #endif
2564 /* We use char because int might match the return type of a gcc2
2565    builtin and then its argument prototype would still apply.  */
2566 char xdr_short ();
2567 int
2568 main ()
2569 {
2570 xdr_short ();
2571   ;
2572   return 0;
2573 }
2574 _ACEOF
2575 rm -f conftest.$ac_objext conftest$ac_exeext
2576 if { (eval echo "$as_me:2576: \"$ac_link\"") >&5
2577   (eval $ac_link) 2>&5
2578   ac_status=$?
2579   echo "$as_me:2579: \$? = $ac_status" >&5
2580   (exit $ac_status); } &&
2581          { ac_try='test -s conftest$ac_exeext'
2582   { (eval echo "$as_me:2582: \"$ac_try\"") >&5
2583   (eval $ac_try) 2>&5
2584   ac_status=$?
2585   echo "$as_me:2585: \$? = $ac_status" >&5
2586   (exit $ac_status); }; }; then
2587   ac_cv_lib_nsl_xdr_short=yes
2588 else
2589   echo "$as_me: failed program was:" >&5
2590 cat conftest.$ac_ext >&5
2591 ac_cv_lib_nsl_xdr_short=no
2592 fi
2593 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2594 LIBS=$ac_check_lib_save_LIBS
2595 fi
2596 echo "$as_me:2596: result: $ac_cv_lib_nsl_xdr_short" >&5
2597 echo "${ECHO_T}$ac_cv_lib_nsl_xdr_short" >&6
2598 if test $ac_cv_lib_nsl_xdr_short = yes; then
2599   cat >>confdefs.h <<EOF
2600 #define HAVE_LIBNSL 1
2601 EOF
2602
2603   LIBS="-lnsl $LIBS"
2604
2605 fi
2606
2607 echo "$as_me:2607: checking for dlopen in -ldl" >&5
2608 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
2609 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
2610   echo $ECHO_N "(cached) $ECHO_C" >&6
2611 else
2612   ac_check_lib_save_LIBS=$LIBS
2613 LIBS="-ldl  $LIBS"
2614 cat >conftest.$ac_ext <<_ACEOF
2615 #line 2615 "configure"
2616 #include "confdefs.h"
2617
2618 /* Override any gcc2 internal prototype to avoid an error.  */
2619 #ifdef __cplusplus
2620 extern "C"
2621 #endif
2622 /* We use char because int might match the return type of a gcc2
2623    builtin and then its argument prototype would still apply.  */
2624 char dlopen ();
2625 int
2626 main ()
2627 {
2628 dlopen ();
2629   ;
2630   return 0;
2631 }
2632 _ACEOF
2633 rm -f conftest.$ac_objext conftest$ac_exeext
2634 if { (eval echo "$as_me:2634: \"$ac_link\"") >&5
2635   (eval $ac_link) 2>&5
2636   ac_status=$?
2637   echo "$as_me:2637: \$? = $ac_status" >&5
2638   (exit $ac_status); } &&
2639          { ac_try='test -s conftest$ac_exeext'
2640   { (eval echo "$as_me:2640: \"$ac_try\"") >&5
2641   (eval $ac_try) 2>&5
2642   ac_status=$?
2643   echo "$as_me:2643: \$? = $ac_status" >&5
2644   (exit $ac_status); }; }; then
2645   ac_cv_lib_dl_dlopen=yes
2646 else
2647   echo "$as_me: failed program was:" >&5
2648 cat conftest.$ac_ext >&5
2649 ac_cv_lib_dl_dlopen=no
2650 fi
2651 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2652 LIBS=$ac_check_lib_save_LIBS
2653 fi
2654 echo "$as_me:2654: result: $ac_cv_lib_dl_dlopen" >&5
2655 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
2656 if test $ac_cv_lib_dl_dlopen = yes; then
2657   dl_ok="yes"
2658 DL="-ldl"
2659 else
2660   dl_ok="no"
2661 DL=""
2662 fi
2663
2664 echo "$as_me:2664: checking for panel_above in -lpanel" >&5
2665 echo $ECHO_N "checking for panel_above in -lpanel... $ECHO_C" >&6
2666 if test "${ac_cv_lib_panel_panel_above+set}" = set; then
2667   echo $ECHO_N "(cached) $ECHO_C" >&6
2668 else
2669   ac_check_lib_save_LIBS=$LIBS
2670 LIBS="-lpanel -lcurses $LIBS"
2671 cat >conftest.$ac_ext <<_ACEOF
2672 #line 2672 "configure"
2673 #include "confdefs.h"
2674
2675 /* Override any gcc2 internal prototype to avoid an error.  */
2676 #ifdef __cplusplus
2677 extern "C"
2678 #endif
2679 /* We use char because int might match the return type of a gcc2
2680    builtin and then its argument prototype would still apply.  */
2681 char panel_above ();
2682 int
2683 main ()
2684 {
2685 panel_above ();
2686   ;
2687   return 0;
2688 }
2689 _ACEOF
2690 rm -f conftest.$ac_objext conftest$ac_exeext
2691 if { (eval echo "$as_me:2691: \"$ac_link\"") >&5
2692   (eval $ac_link) 2>&5
2693   ac_status=$?
2694   echo "$as_me:2694: \$? = $ac_status" >&5
2695   (exit $ac_status); } &&
2696          { ac_try='test -s conftest$ac_exeext'
2697   { (eval echo "$as_me:2697: \"$ac_try\"") >&5
2698   (eval $ac_try) 2>&5
2699   ac_status=$?
2700   echo "$as_me:2700: \$? = $ac_status" >&5
2701   (exit $ac_status); }; }; then
2702   ac_cv_lib_panel_panel_above=yes
2703 else
2704   echo "$as_me: failed program was:" >&5
2705 cat conftest.$ac_ext >&5
2706 ac_cv_lib_panel_panel_above=no
2707 fi
2708 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2709 LIBS=$ac_check_lib_save_LIBS
2710 fi
2711 echo "$as_me:2711: result: $ac_cv_lib_panel_panel_above" >&5
2712 echo "${ECHO_T}$ac_cv_lib_panel_panel_above" >&6
2713 if test $ac_cv_lib_panel_panel_above = yes; then
2714   panel_ok="yes"
2715 curses_ok="yes"
2716 CURSES_LIBS="-lpanel -lcurses"
2717
2718 else
2719   panel_ok="no"
2720 echo "$as_me:2720: checking for nl in -lcurses" >&5
2721 echo $ECHO_N "checking for nl in -lcurses... $ECHO_C" >&6
2722 if test "${ac_cv_lib_curses_nl+set}" = set; then
2723   echo $ECHO_N "(cached) $ECHO_C" >&6
2724 else
2725   ac_check_lib_save_LIBS=$LIBS
2726 LIBS="-lcurses  $LIBS"
2727 cat >conftest.$ac_ext <<_ACEOF
2728 #line 2728 "configure"
2729 #include "confdefs.h"
2730
2731 /* Override any gcc2 internal prototype to avoid an error.  */
2732 #ifdef __cplusplus
2733 extern "C"
2734 #endif
2735 /* We use char because int might match the return type of a gcc2
2736    builtin and then its argument prototype would still apply.  */
2737 char nl ();
2738 int
2739 main ()
2740 {
2741 nl ();
2742   ;
2743   return 0;
2744 }
2745 _ACEOF
2746 rm -f conftest.$ac_objext conftest$ac_exeext
2747 if { (eval echo "$as_me:2747: \"$ac_link\"") >&5
2748   (eval $ac_link) 2>&5
2749   ac_status=$?
2750   echo "$as_me:2750: \$? = $ac_status" >&5
2751   (exit $ac_status); } &&
2752          { ac_try='test -s conftest$ac_exeext'
2753   { (eval echo "$as_me:2753: \"$ac_try\"") >&5
2754   (eval $ac_try) 2>&5
2755   ac_status=$?
2756   echo "$as_me:2756: \$? = $ac_status" >&5
2757   (exit $ac_status); }; }; then
2758   ac_cv_lib_curses_nl=yes
2759 else
2760   echo "$as_me: failed program was:" >&5
2761 cat conftest.$ac_ext >&5
2762 ac_cv_lib_curses_nl=no
2763 fi
2764 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2765 LIBS=$ac_check_lib_save_LIBS
2766 fi
2767 echo "$as_me:2767: result: $ac_cv_lib_curses_nl" >&5
2768 echo "${ECHO_T}$ac_cv_lib_curses_nl" >&6
2769 if test $ac_cv_lib_curses_nl = yes; then
2770   curses_ok="yes"
2771 CURSES_LIBS="-lcurses"
2772
2773 else
2774   ncurses_ok="no"
2775 fi
2776
2777 fi
2778
2779 for ac_func in vprintf
2780 do
2781 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
2782 echo "$as_me:2782: checking for $ac_func" >&5
2783 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
2784 if eval "test \"\${$as_ac_var+set}\" = set"; then
2785   echo $ECHO_N "(cached) $ECHO_C" >&6
2786 else
2787   cat >conftest.$ac_ext <<_ACEOF
2788 #line 2788 "configure"
2789 #include "confdefs.h"
2790 /* System header to define __stub macros and hopefully few prototypes,
2791     which can conflict with char $ac_func (); below.  */
2792 #include <assert.h>
2793 /* Override any gcc2 internal prototype to avoid an error.  */
2794 #ifdef __cplusplus
2795 extern "C"
2796 #endif
2797 /* We use char because int might match the return type of a gcc2
2798    builtin and then its argument prototype would still apply.  */
2799 char $ac_func ();
2800 char (*f) ();
2801
2802 int
2803 main ()
2804 {
2805 /* The GNU C library defines this for functions which it implements
2806     to always fail with ENOSYS.  Some functions are actually named
2807     something starting with __ and the normal name is an alias.  */
2808 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2809 choke me
2810 #else
2811 f = $ac_func;
2812 #endif
2813
2814   ;
2815   return 0;
2816 }
2817 _ACEOF
2818 rm -f conftest.$ac_objext conftest$ac_exeext
2819 if { (eval echo "$as_me:2819: \"$ac_link\"") >&5
2820   (eval $ac_link) 2>&5
2821   ac_status=$?
2822   echo "$as_me:2822: \$? = $ac_status" >&5
2823   (exit $ac_status); } &&
2824          { ac_try='test -s conftest$ac_exeext'
2825   { (eval echo "$as_me:2825: \"$ac_try\"") >&5
2826   (eval $ac_try) 2>&5
2827   ac_status=$?
2828   echo "$as_me:2828: \$? = $ac_status" >&5
2829   (exit $ac_status); }; }; then
2830   eval "$as_ac_var=yes"
2831 else
2832   echo "$as_me: failed program was:" >&5
2833 cat conftest.$ac_ext >&5
2834 eval "$as_ac_var=no"
2835 fi
2836 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2837 fi
2838 echo "$as_me:2838: result: `eval echo '${'$as_ac_var'}'`" >&5
2839 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
2840 if test `eval echo '${'$as_ac_var'}'` = yes; then
2841   cat >>confdefs.h <<EOF
2842 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
2843 EOF
2844
2845 echo "$as_me:2845: checking for _doprnt" >&5
2846 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
2847 if test "${ac_cv_func__doprnt+set}" = set; then
2848   echo $ECHO_N "(cached) $ECHO_C" >&6
2849 else
2850   cat >conftest.$ac_ext <<_ACEOF
2851 #line 2851 "configure"
2852 #include "confdefs.h"
2853 /* System header to define __stub macros and hopefully few prototypes,
2854     which can conflict with char _doprnt (); below.  */
2855 #include <assert.h>
2856 /* Override any gcc2 internal prototype to avoid an error.  */
2857 #ifdef __cplusplus
2858 extern "C"
2859 #endif
2860 /* We use char because int might match the return type of a gcc2
2861    builtin and then its argument prototype would still apply.  */
2862 char _doprnt ();
2863 char (*f) ();
2864
2865 int
2866 main ()
2867 {
2868 /* The GNU C library defines this for functions which it implements
2869     to always fail with ENOSYS.  Some functions are actually named
2870     something starting with __ and the normal name is an alias.  */
2871 #if defined (__stub__doprnt) || defined (__stub____doprnt)
2872 choke me
2873 #else
2874 f = _doprnt;
2875 #endif
2876
2877   ;
2878   return 0;
2879 }
2880 _ACEOF
2881 rm -f conftest.$ac_objext conftest$ac_exeext
2882 if { (eval echo "$as_me:2882: \"$ac_link\"") >&5
2883   (eval $ac_link) 2>&5
2884   ac_status=$?
2885   echo "$as_me:2885: \$? = $ac_status" >&5
2886   (exit $ac_status); } &&
2887          { ac_try='test -s conftest$ac_exeext'
2888   { (eval echo "$as_me:2888: \"$ac_try\"") >&5
2889   (eval $ac_try) 2>&5
2890   ac_status=$?
2891   echo "$as_me:2891: \$? = $ac_status" >&5
2892   (exit $ac_status); }; }; then
2893   ac_cv_func__doprnt=yes
2894 else
2895   echo "$as_me: failed program was:" >&5
2896 cat conftest.$ac_ext >&5
2897 ac_cv_func__doprnt=no
2898 fi
2899 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2900 fi
2901 echo "$as_me:2901: result: $ac_cv_func__doprnt" >&5
2902 echo "${ECHO_T}$ac_cv_func__doprnt" >&6
2903 if test $ac_cv_func__doprnt = yes; then
2904
2905 cat >>confdefs.h <<\EOF
2906 #define HAVE_DOPRNT 1
2907 EOF
2908
2909 fi
2910
2911 fi
2912 done
2913
2914 for ac_func in vsnprintf vasprintf
2915 do
2916 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
2917 echo "$as_me:2917: checking for $ac_func" >&5
2918 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
2919 if eval "test \"\${$as_ac_var+set}\" = set"; then
2920   echo $ECHO_N "(cached) $ECHO_C" >&6
2921 else
2922   cat >conftest.$ac_ext <<_ACEOF
2923 #line 2923 "configure"
2924 #include "confdefs.h"
2925 /* System header to define __stub macros and hopefully few prototypes,
2926     which can conflict with char $ac_func (); below.  */
2927 #include <assert.h>
2928 /* Override any gcc2 internal prototype to avoid an error.  */
2929 #ifdef __cplusplus
2930 extern "C"
2931 #endif
2932 /* We use char because int might match the return type of a gcc2
2933    builtin and then its argument prototype would still apply.  */
2934 char $ac_func ();
2935 char (*f) ();
2936
2937 int
2938 main ()
2939 {
2940 /* The GNU C library defines this for functions which it implements
2941     to always fail with ENOSYS.  Some functions are actually named
2942     something starting with __ and the normal name is an alias.  */
2943 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2944 choke me
2945 #else
2946 f = $ac_func;
2947 #endif
2948
2949   ;
2950   return 0;
2951 }
2952 _ACEOF
2953 rm -f conftest.$ac_objext conftest$ac_exeext
2954 if { (eval echo "$as_me:2954: \"$ac_link\"") >&5
2955   (eval $ac_link) 2>&5
2956   ac_status=$?
2957   echo "$as_me:2957: \$? = $ac_status" >&5
2958   (exit $ac_status); } &&
2959          { ac_try='test -s conftest$ac_exeext'
2960   { (eval echo "$as_me:2960: \"$ac_try\"") >&5
2961   (eval $ac_try) 2>&5
2962   ac_status=$?
2963   echo "$as_me:2963: \$? = $ac_status" >&5
2964   (exit $ac_status); }; }; then
2965   eval "$as_ac_var=yes"
2966 else
2967   echo "$as_me: failed program was:" >&5
2968 cat conftest.$ac_ext >&5
2969 eval "$as_ac_var=no"
2970 fi
2971 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2972 fi
2973 echo "$as_me:2973: result: `eval echo '${'$as_ac_var'}'`" >&5
2974 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
2975 if test `eval echo '${'$as_ac_var'}'` = yes; then
2976   cat >>confdefs.h <<EOF
2977 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
2978 EOF
2979
2980 fi
2981 done
2982
2983 for ac_func in strlen strcpy strcat strstr strcmp strerror strtok strdup
2984 do
2985 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
2986 echo "$as_me:2986: checking for $ac_func" >&5
2987 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
2988 if eval "test \"\${$as_ac_var+set}\" = set"; then
2989   echo $ECHO_N "(cached) $ECHO_C" >&6
2990 else
2991   cat >conftest.$ac_ext <<_ACEOF
2992 #line 2992 "configure"
2993 #include "confdefs.h"
2994 /* System header to define __stub macros and hopefully few prototypes,
2995     which can conflict with char $ac_func (); below.  */
2996 #include <assert.h>
2997 /* Override any gcc2 internal prototype to avoid an error.  */
2998 #ifdef __cplusplus
2999 extern "C"
3000 #endif
3001 /* We use char because int might match the return type of a gcc2
3002    builtin and then its argument prototype would still apply.  */
3003 char $ac_func ();
3004 char (*f) ();
3005
3006 int
3007 main ()
3008 {
3009 /* The GNU C library defines this for functions which it implements
3010     to always fail with ENOSYS.  Some functions are actually named
3011     something starting with __ and the normal name is an alias.  */
3012 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3013 choke me
3014 #else
3015 f = $ac_func;
3016 #endif
3017
3018   ;
3019   return 0;
3020 }
3021 _ACEOF
3022 rm -f conftest.$ac_objext conftest$ac_exeext
3023 if { (eval echo "$as_me:3023: \"$ac_link\"") >&5
3024   (eval $ac_link) 2>&5
3025   ac_status=$?
3026   echo "$as_me:3026: \$? = $ac_status" >&5
3027   (exit $ac_status); } &&
3028          { ac_try='test -s conftest$ac_exeext'
3029   { (eval echo "$as_me:3029: \"$ac_try\"") >&5
3030   (eval $ac_try) 2>&5
3031   ac_status=$?
3032   echo "$as_me:3032: \$? = $ac_status" >&5
3033   (exit $ac_status); }; }; then
3034   eval "$as_ac_var=yes"
3035 else
3036   echo "$as_me: failed program was:" >&5
3037 cat conftest.$ac_ext >&5
3038 eval "$as_ac_var=no"
3039 fi
3040 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3041 fi
3042 echo "$as_me:3042: result: `eval echo '${'$as_ac_var'}'`" >&5
3043 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
3044 if test `eval echo '${'$as_ac_var'}'` = yes; then
3045   cat >>confdefs.h <<EOF
3046 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3047 EOF
3048
3049 fi
3050 done
3051
3052 for ac_func in strchr memcpy
3053 do
3054 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3055 echo "$as_me:3055: checking for $ac_func" >&5
3056 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3057 if eval "test \"\${$as_ac_var+set}\" = set"; then
3058   echo $ECHO_N "(cached) $ECHO_C" >&6
3059 else
3060   cat >conftest.$ac_ext <<_ACEOF
3061 #line 3061 "configure"
3062 #include "confdefs.h"
3063 /* System header to define __stub macros and hopefully few prototypes,
3064     which can conflict with char $ac_func (); below.  */
3065 #include <assert.h>
3066 /* Override any gcc2 internal prototype to avoid an error.  */
3067 #ifdef __cplusplus
3068 extern "C"
3069 #endif
3070 /* We use char because int might match the return type of a gcc2
3071    builtin and then its argument prototype would still apply.  */
3072 char $ac_func ();
3073 char (*f) ();
3074
3075 int
3076 main ()
3077 {
3078 /* The GNU C library defines this for functions which it implements
3079     to always fail with ENOSYS.  Some functions are actually named
3080     something starting with __ and the normal name is an alias.  */
3081 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3082 choke me
3083 #else
3084 f = $ac_func;
3085 #endif
3086
3087   ;
3088   return 0;
3089 }
3090 _ACEOF
3091 rm -f conftest.$ac_objext conftest$ac_exeext
3092 if { (eval echo "$as_me:3092: \"$ac_link\"") >&5
3093   (eval $ac_link) 2>&5
3094   ac_status=$?
3095   echo "$as_me:3095: \$? = $ac_status" >&5
3096   (exit $ac_status); } &&
3097          { ac_try='test -s conftest$ac_exeext'
3098   { (eval echo "$as_me:3098: \"$ac_try\"") >&5
3099   (eval $ac_try) 2>&5
3100   ac_status=$?
3101   echo "$as_me:3101: \$? = $ac_status" >&5
3102   (exit $ac_status); }; }; then
3103   eval "$as_ac_var=yes"
3104 else
3105   echo "$as_me: failed program was:" >&5
3106 cat conftest.$ac_ext >&5
3107 eval "$as_ac_var=no"
3108 fi
3109 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3110 fi
3111 echo "$as_me:3111: result: `eval echo '${'$as_ac_var'}'`" >&5
3112 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
3113 if test `eval echo '${'$as_ac_var'}'` = yes; then
3114   cat >>confdefs.h <<EOF
3115 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3116 EOF
3117
3118 fi
3119 done
3120
3121 for ac_func in fgets
3122 do
3123 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3124 echo "$as_me:3124: checking for $ac_func" >&5
3125 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3126 if eval "test \"\${$as_ac_var+set}\" = set"; then
3127   echo $ECHO_N "(cached) $ECHO_C" >&6
3128 else
3129   cat >conftest.$ac_ext <<_ACEOF
3130 #line 3130 "configure"
3131 #include "confdefs.h"
3132 /* System header to define __stub macros and hopefully few prototypes,
3133     which can conflict with char $ac_func (); below.  */
3134 #include <assert.h>
3135 /* Override any gcc2 internal prototype to avoid an error.  */
3136 #ifdef __cplusplus
3137 extern "C"
3138 #endif
3139 /* We use char because int might match the return type of a gcc2
3140    builtin and then its argument prototype would still apply.  */
3141 char $ac_func ();
3142 char (*f) ();
3143
3144 int
3145 main ()
3146 {
3147 /* The GNU C library defines this for functions which it implements
3148     to always fail with ENOSYS.  Some functions are actually named
3149     something starting with __ and the normal name is an alias.  */
3150 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3151 choke me
3152 #else
3153 f = $ac_func;
3154 #endif
3155
3156   ;
3157   return 0;
3158 }
3159 _ACEOF
3160 rm -f conftest.$ac_objext conftest$ac_exeext
3161 if { (eval echo "$as_me:3161: \"$ac_link\"") >&5
3162   (eval $ac_link) 2>&5
3163   ac_status=$?
3164   echo "$as_me:3164: \$? = $ac_status" >&5
3165   (exit $ac_status); } &&
3166          { ac_try='test -s conftest$ac_exeext'
3167   { (eval echo "$as_me:3167: \"$ac_try\"") >&5
3168   (eval $ac_try) 2>&5
3169   ac_status=$?
3170   echo "$as_me:3170: \$? = $ac_status" >&5
3171   (exit $ac_status); }; }; then
3172   eval "$as_ac_var=yes"
3173 else
3174   echo "$as_me: failed program was:" >&5
3175 cat conftest.$ac_ext >&5
3176 eval "$as_ac_var=no"
3177 fi
3178 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3179 fi
3180 echo "$as_me:3180: result: `eval echo '${'$as_ac_var'}'`" >&5
3181 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
3182 if test `eval echo '${'$as_ac_var'}'` = yes; then
3183   cat >>confdefs.h <<EOF
3184 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3185 EOF
3186
3187 fi
3188 done
3189
3190 for ac_func in yylex
3191 do
3192 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3193 echo "$as_me:3193: checking for $ac_func" >&5
3194 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3195 if eval "test \"\${$as_ac_var+set}\" = set"; then
3196   echo $ECHO_N "(cached) $ECHO_C" >&6
3197 else
3198   cat >conftest.$ac_ext <<_ACEOF
3199 #line 3199 "configure"
3200 #include "confdefs.h"
3201 /* System header to define __stub macros and hopefully few prototypes,
3202     which can conflict with char $ac_func (); below.  */
3203 #include <assert.h>
3204 /* Override any gcc2 internal prototype to avoid an error.  */
3205 #ifdef __cplusplus
3206 extern "C"
3207 #endif
3208 /* We use char because int might match the return type of a gcc2
3209    builtin and then its argument prototype would still apply.  */
3210 char $ac_func ();
3211 char (*f) ();
3212
3213 int
3214 main ()
3215 {
3216 /* The GNU C library defines this for functions which it implements
3217     to always fail with ENOSYS.  Some functions are actually named
3218     something starting with __ and the normal name is an alias.  */
3219 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3220 choke me
3221 #else
3222 f = $ac_func;
3223 #endif
3224
3225   ;
3226   return 0;
3227 }
3228 _ACEOF
3229 rm -f conftest.$ac_objext conftest$ac_exeext
3230 if { (eval echo "$as_me:3230: \"$ac_link\"") >&5
3231   (eval $ac_link) 2>&5
3232   ac_status=$?
3233   echo "$as_me:3233: \$? = $ac_status" >&5
3234   (exit $ac_status); } &&
3235          { ac_try='test -s conftest$ac_exeext'
3236   { (eval echo "$as_me:3236: \"$ac_try\"") >&5
3237   (eval $ac_try) 2>&5
3238   ac_status=$?
3239   echo "$as_me:3239: \$? = $ac_status" >&5
3240   (exit $ac_status); }; }; then
3241   eval "$as_ac_var=yes"
3242 else
3243   echo "$as_me: failed program was:" >&5
3244 cat conftest.$ac_ext >&5
3245 eval "$as_ac_var=no"
3246 fi
3247 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3248 fi
3249 echo "$as_me:3249: result: `eval echo '${'$as_ac_var'}'`" >&5
3250 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
3251 if test `eval echo '${'$as_ac_var'}'` = yes; then
3252   cat >>confdefs.h <<EOF
3253 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3254 EOF
3255
3256 fi
3257 done
3258
3259 echo "$as_me:3259: checking whether scanf knows %a" >&5
3260 echo $ECHO_N "checking whether scanf knows %a... $ECHO_C" >&6
3261 if test "${ucsim_cv_scanf_a+set}" = set; then
3262   echo $ECHO_N "(cached) $ECHO_C" >&6
3263 else
3264   echo "a b" >conftest.data
3265 if test "$cross_compiling" = yes; then
3266   ucsim_cv_scanf_a="unknown"
3267 else
3268   cat >conftest.$ac_ext <<_ACEOF
3269 #line 3269 "configure"
3270 #include "confdefs.h"
3271
3272 #include <stdio.h>
3273 void main(void)
3274 {
3275   FILE *f;
3276   char *a;
3277   int  i;
3278   if ((f= fopen("conftest.data", "r")) == NULL)
3279     exit(1);
3280   i= fscanf(f, " %a[a-z] ", &a);
3281   fclose(f);
3282   if (i == 0)
3283     exit(2);
3284   if (i == 1)
3285     exit(0);
3286   exit(3);
3287 }
3288 _ACEOF
3289 rm -f conftest$ac_exeext
3290 if { (eval echo "$as_me:3290: \"$ac_link\"") >&5
3291   (eval $ac_link) 2>&5
3292   ac_status=$?
3293   echo "$as_me:3293: \$? = $ac_status" >&5
3294   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3295   { (eval echo "$as_me:3295: \"$ac_try\"") >&5
3296   (eval $ac_try) 2>&5
3297   ac_status=$?
3298   echo "$as_me:3298: \$? = $ac_status" >&5
3299   (exit $ac_status); }; }; then
3300   ucsim_cv_scanf_a="yes"
3301 else
3302   echo "$as_me: program exited with status $ac_status" >&5
3303 echo "$as_me: failed program was:" >&5
3304 cat conftest.$ac_ext >&5
3305 ucsim_cv_scanf_a="no"
3306 fi
3307 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3308 fi
3309
3310 fi
3311 echo "$as_me:3311: result: $ucsim_cv_scanf_a" >&5
3312 echo "${ECHO_T}$ucsim_cv_scanf_a" >&6
3313 if test "$ucsim_cv_scanf_a" = "yes"; then
3314   cat >>confdefs.h <<\EOF
3315 #define SCANF_A 1
3316 EOF
3317
3318 fi
3319
3320 echo "$as_me:3320: checking whether getcwd is GNUish" >&5
3321 echo $ECHO_N "checking whether getcwd is GNUish... $ECHO_C" >&6
3322 if test "${ucsim_cv_getcwd+set}" = set; then
3323   echo $ECHO_N "(cached) $ECHO_C" >&6
3324 else
3325   if test "$cross_compiling" = yes; then
3326   ucsim_cv_getcwd="unknown"
3327 else
3328   cat >conftest.$ac_ext <<_ACEOF
3329 #line 3329 "configure"
3330 #include "confdefs.h"
3331
3332 #include <unistd.h>
3333 void main(void)
3334 {
3335   if ((getcwd(NULL, 0)) == NULL)
3336     exit(1);
3337   exit(0);
3338 }
3339 _ACEOF
3340 rm -f conftest$ac_exeext
3341 if { (eval echo "$as_me:3341: \"$ac_link\"") >&5
3342   (eval $ac_link) 2>&5
3343   ac_status=$?
3344   echo "$as_me:3344: \$? = $ac_status" >&5
3345   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3346   { (eval echo "$as_me:3346: \"$ac_try\"") >&5
3347   (eval $ac_try) 2>&5
3348   ac_status=$?
3349   echo "$as_me:3349: \$? = $ac_status" >&5
3350   (exit $ac_status); }; }; then
3351   ucsim_cv_getcwd="yes"
3352 else
3353   echo "$as_me: program exited with status $ac_status" >&5
3354 echo "$as_me: failed program was:" >&5
3355 cat conftest.$ac_ext >&5
3356 ucsim_cv_getcwd="no"
3357 fi
3358 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3359 fi
3360
3361 fi
3362 echo "$as_me:3362: result: $ucsim_cv_getcwd" >&5
3363 echo "${ECHO_T}$ucsim_cv_getcwd" >&6
3364 if test "$ucsim_cv_getcwd" = "yes"; then
3365   cat >>confdefs.h <<\EOF
3366 #define GNU_GETCWD 1
3367 EOF
3368
3369 fi
3370
3371 #'
3372
3373 echo "$as_me:3373: checking for type of length pointer parameter of accept" >&5
3374 echo $ECHO_N "checking for type of length pointer parameter of accept... $ECHO_C" >&6
3375 if test "${ucsim_cv_accept_length_type+set}" = set; then
3376   echo $ECHO_N "(cached) $ECHO_C" >&6
3377 else
3378   ac_save_CPPFLAGS="$CPPFLAGS"
3379     ucsim_cv_accept_length_type=no
3380     for ac_val in int size_t socklen_t; do
3381       CPPFLAGS="$ac_save_CPPFLAGS -DACCEPT_SOCKLEN_T=$ac_val"
3382       cat >conftest.$ac_ext <<_ACEOF
3383 #line 3383 "configure"
3384 #include "confdefs.h"
3385 #include <sys/types.h>
3386 #include <sys/socket.h>
3387 int
3388 main ()
3389 {
3390 struct sockaddr a; $ac_val len; accept (0, &a, &len);
3391   ;
3392   return 0;
3393 }
3394 _ACEOF
3395 rm -f conftest.$ac_objext
3396 if { (eval echo "$as_me:3396: \"$ac_compile\"") >&5
3397   (eval $ac_compile) 2>&5
3398   ac_status=$?
3399   echo "$as_me:3399: \$? = $ac_status" >&5
3400   (exit $ac_status); } &&
3401          { ac_try='test -s conftest.$ac_objext'
3402   { (eval echo "$as_me:3402: \"$ac_try\"") >&5
3403   (eval $ac_try) 2>&5
3404   ac_status=$?
3405   echo "$as_me:3405: \$? = $ac_status" >&5
3406   (exit $ac_status); }; }; then
3407   ucsim_cv_accept_length_type=$ac_val; break
3408 else
3409   echo "$as_me: failed program was:" >&5
3410 cat conftest.$ac_ext >&5
3411 fi
3412 rm -f conftest.$ac_objext conftest.$ac_ext
3413     done
3414     CPPFLAGS="$ac_save_CPPFLAGS"
3415 fi
3416 echo "$as_me:3416: result: $ucsim_cv_accept_length_type" >&5
3417 echo "${ECHO_T}$ucsim_cv_accept_length_type" >&6
3418
3419   if test $ucsim_cv_accept_length_type != no; then
3420
3421 cat >>confdefs.h <<EOF
3422 #define ACCEPT_SOCKLEN_T $ucsim_cv_accept_length_type
3423 EOF
3424
3425   fi
3426
3427 # Macro definitions
3428 ###################
3429
3430 # DD_COPT macro checks if the compiler specified as the 1st parameter
3431 # supports option specified as the 2nd parameter
3432 # For example: DD_COPT(CXX, fPIC)
3433
3434 # Checking characteristics of compilers and other programs
3435 # --------------------------------------------------------
3436
3437 # Cross compiling overrides
3438 if test "$CC" = "i586-mingw32msvc-gcc"; then
3439   ac_cv_c_bigendian=no
3440   ac_cv_sizeof_char=1
3441   ac_cv_sizeof_short=2
3442   ac_cv_sizeof_int=4
3443   ac_cv_sizeof_long=4
3444   ac_cv_sizeof_long_long=4
3445 fi
3446
3447 echo "$as_me:3447: checking whether byte ordering is bigendian" >&5
3448 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
3449 if test "${ac_cv_c_bigendian+set}" = set; then
3450   echo $ECHO_N "(cached) $ECHO_C" >&6
3451 else
3452   ac_cv_c_bigendian=unknown
3453 # See if sys/param.h defines the BYTE_ORDER macro.
3454 cat >conftest.$ac_ext <<_ACEOF
3455 #line 3455 "configure"
3456 #include "confdefs.h"
3457 #include <sys/types.h>
3458 #include <sys/param.h>
3459
3460 int
3461 main ()
3462 {
3463 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3464  bogus endian macros
3465 #endif
3466
3467   ;
3468   return 0;
3469 }
3470 _ACEOF
3471 rm -f conftest.$ac_objext
3472 if { (eval echo "$as_me:3472: \"$ac_compile\"") >&5
3473   (eval $ac_compile) 2>&5
3474   ac_status=$?
3475   echo "$as_me:3475: \$? = $ac_status" >&5
3476   (exit $ac_status); } &&
3477          { ac_try='test -s conftest.$ac_objext'
3478   { (eval echo "$as_me:3478: \"$ac_try\"") >&5
3479   (eval $ac_try) 2>&5
3480   ac_status=$?
3481   echo "$as_me:3481: \$? = $ac_status" >&5
3482   (exit $ac_status); }; }; then
3483   # It does; now see whether it defined to BIG_ENDIAN or not.
3484 cat >conftest.$ac_ext <<_ACEOF
3485 #line 3485 "configure"
3486 #include "confdefs.h"
3487 #include <sys/types.h>
3488 #include <sys/param.h>
3489
3490 int
3491 main ()
3492 {
3493 #if BYTE_ORDER != BIG_ENDIAN
3494  not big endian
3495 #endif
3496
3497   ;
3498   return 0;
3499 }
3500 _ACEOF
3501 rm -f conftest.$ac_objext
3502 if { (eval echo "$as_me:3502: \"$ac_compile\"") >&5
3503   (eval $ac_compile) 2>&5
3504   ac_status=$?
3505   echo "$as_me:3505: \$? = $ac_status" >&5
3506   (exit $ac_status); } &&
3507          { ac_try='test -s conftest.$ac_objext'
3508   { (eval echo "$as_me:3508: \"$ac_try\"") >&5
3509   (eval $ac_try) 2>&5
3510   ac_status=$?
3511   echo "$as_me:3511: \$? = $ac_status" >&5
3512   (exit $ac_status); }; }; then
3513   ac_cv_c_bigendian=yes
3514 else
3515   echo "$as_me: failed program was:" >&5
3516 cat conftest.$ac_ext >&5
3517 ac_cv_c_bigendian=no
3518 fi
3519 rm -f conftest.$ac_objext conftest.$ac_ext
3520 else
3521   echo "$as_me: failed program was:" >&5
3522 cat conftest.$ac_ext >&5
3523 fi
3524 rm -f conftest.$ac_objext conftest.$ac_ext
3525 if test $ac_cv_c_bigendian = unknown; then
3526 if test "$cross_compiling" = yes; then
3527   { { echo "$as_me:3527: error: cannot run test program while cross compiling" >&5
3528 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
3529    { (exit 1); exit 1; }; }
3530 else
3531   cat >conftest.$ac_ext <<_ACEOF
3532 #line 3532 "configure"
3533 #include "confdefs.h"
3534 int
3535 main ()
3536 {
3537   /* Are we little or big endian?  From Harbison&Steele.  */
3538   union
3539   {
3540     long l;
3541     char c[sizeof (long)];
3542   } u;
3543   u.l = 1;
3544   exit (u.c[sizeof (long) - 1] == 1);
3545 }
3546 _ACEOF
3547 rm -f conftest$ac_exeext
3548 if { (eval echo "$as_me:3548: \"$ac_link\"") >&5
3549   (eval $ac_link) 2>&5
3550   ac_status=$?
3551   echo "$as_me:3551: \$? = $ac_status" >&5
3552   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3553   { (eval echo "$as_me:3553: \"$ac_try\"") >&5
3554   (eval $ac_try) 2>&5
3555   ac_status=$?
3556   echo "$as_me:3556: \$? = $ac_status" >&5
3557   (exit $ac_status); }; }; then
3558   ac_cv_c_bigendian=no
3559 else
3560   echo "$as_me: program exited with status $ac_status" >&5
3561 echo "$as_me: failed program was:" >&5
3562 cat conftest.$ac_ext >&5
3563 ac_cv_c_bigendian=yes
3564 fi
3565 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3566 fi
3567 fi
3568 fi
3569 echo "$as_me:3569: result: $ac_cv_c_bigendian" >&5
3570 echo "${ECHO_T}$ac_cv_c_bigendian" >&6
3571 if test $ac_cv_c_bigendian = yes; then
3572
3573 cat >>confdefs.h <<\EOF
3574 #define WORDS_BIGENDIAN 1
3575 EOF
3576
3577 fi
3578
3579 echo "$as_me:3579: checking whether preprocessor accepts -MM or -M" >&5
3580 echo $ECHO_N "checking whether preprocessor accepts -MM or -M... $ECHO_C" >&6
3581 if test "${ucsim_cv_MM+set}" = set; then
3582   echo $ECHO_N "(cached) $ECHO_C" >&6
3583 else
3584   echo "#include <stdio.h>" >_test_.c
3585 echo "" >>_test_.c
3586 $CXXCPP -v -MM _test_.c 1>&5 2>&5
3587 if test "$?" = "0"; then
3588   ucsim_cv_MM="-MM"
3589 else
3590   ucsim_cv_MM="-M"
3591 fi
3592 rm -f _test_.*
3593 fi
3594 echo "$as_me:3594: result: $ucsim_cv_MM" >&5
3595 echo "${ECHO_T}$ucsim_cv_MM" >&6
3596 M_OR_MM=$ucsim_cv_MM
3597
3598 # This is the first time when CFLAGS are set/modified!!
3599
3600 echo "$as_me:3600: checking whether $CXX accepts -ggdb" >&5
3601 echo $ECHO_N "checking whether $CXX accepts -ggdb... $ECHO_C" >&6
3602 if test "${ucsim_cv_CXXggdb+set}" = set; then
3603   echo $ECHO_N "(cached) $ECHO_C" >&6
3604 else
3605   cat >_test_.c <<EOF
3606 #include <stdio.h>
3607 void main(void) {}
3608 EOF
3609 $CXX -v -ggdb -c _test_.c 1>&5 2>&5
3610 if test "$?" = "0"; then
3611   ucsim_cv_CXXggdb="yes"
3612 else
3613   ucsim_cv_CXXggdb="no"
3614 fi
3615 rm -f _test_.* a.out
3616 fi
3617 echo "$as_me:3617: result: $ucsim_cv_CXXggdb" >&5
3618 echo "${ECHO_T}$ucsim_cv_CXXggdb" >&6
3619
3620 if test "$ucsim_cv_CXXggdb" = "yes"; then
3621     if test "$CXXFLAGS"x = x ;then
3622         CXXFLAGS="-ggdb -O"
3623     else
3624         CXXFLAGS="$CXXFLAGS -ggdb"
3625     fi
3626 fi
3627
3628 echo "$as_me:3628: checking whether $CXX accepts -pipe" >&5
3629 echo $ECHO_N "checking whether $CXX accepts -pipe... $ECHO_C" >&6
3630 if test "${ucsim_cv_CXXpipe+set}" = set; then
3631   echo $ECHO_N "(cached) $ECHO_C" >&6
3632 else
3633   cat >_test_.c <<EOF
3634 #include <stdio.h>
3635 void main(void) {}
3636 EOF
3637 $CXX -v -pipe -c _test_.c 1>&5 2>&5
3638 if test "$?" = "0"; then
3639   ucsim_cv_CXXpipe="yes"
3640 else
3641   ucsim_cv_CXXpipe="no"
3642 fi
3643 rm -f _test_.* a.out
3644 fi
3645 echo "$as_me:3645: result: $ucsim_cv_CXXpipe" >&5
3646 echo "${ECHO_T}$ucsim_cv_CXXpipe" >&6
3647
3648 if test "$ucsim_cv_CXXpipe" = "yes"; then
3649   CXXFLAGS="$CXXFLAGS -pipe"
3650 fi
3651
3652 PICOPT=""
3653 SHAREDLIB="no"
3654
3655 echo "$as_me:3655: checking whether $CXX accepts -fPIC" >&5
3656 echo $ECHO_N "checking whether $CXX accepts -fPIC... $ECHO_C" >&6
3657 if test "${ucsim_cv_CXXfPIC+set}" = set; then
3658   echo $ECHO_N "(cached) $ECHO_C" >&6
3659 else
3660   cat >_test_.c <<EOF
3661 #include <stdio.h>
3662 void main(void) {}
3663 EOF
3664 $CXX -v -fPIC -c _test_.c 1>&5 2>&5
3665 if test "$?" = "0"; then
3666   ucsim_cv_CXXfPIC="yes"
3667 else
3668   ucsim_cv_CXXfPIC="no"
3669 fi
3670 rm -f _test_.* a.out
3671 fi
3672 echo "$as_me:3672: result: $ucsim_cv_CXXfPIC" >&5
3673 echo "${ECHO_T}$ucsim_cv_CXXfPIC" >&6
3674
3675 if test "$ucsim_cv_CXXfPIC" = "yes"; then
3676     PICOPT="-fPIC"
3677 else
3678
3679 echo "$as_me:3679: checking whether $CXX accepts -fpic" >&5
3680 echo $ECHO_N "checking whether $CXX accepts -fpic... $ECHO_C" >&6
3681 if test "${ucsim_cv_CXXfpic+set}" = set; then
3682   echo $ECHO_N "(cached) $ECHO_C" >&6
3683 else
3684   cat >_test_.c <<EOF
3685 #include <stdio.h>
3686 void main(void) {}
3687 EOF
3688 $CXX -v -fpic -c _test_.c 1>&5 2>&5
3689 if test "$?" = "0"; then
3690   ucsim_cv_CXXfpic="yes"
3691 else
3692   ucsim_cv_CXXfpic="no"
3693 fi
3694 rm -f _test_.* a.out
3695 fi
3696 echo "$as_me:3696: result: $ucsim_cv_CXXfpic" >&5
3697 echo "${ECHO_T}$ucsim_cv_CXXfpic" >&6
3698
3699     if test "$ucsim_cv_CXXfpic" = "yes"; then
3700         PICOPT="-fpic"
3701     fi
3702 fi
3703 if test "$PICOPT"x != "x"; then
3704     SHAREDLIB="yes"
3705 fi
3706 # If this is Cygwin neither use Position Independant Code
3707 # nor build .so
3708 # Quick + dirty by Bernhard
3709 if $CXX -v 2>&1 | grep -i cygwin 1>&5 2>&5; then
3710     PICOPT=""
3711     SHAREDLIB="no"
3712 fi
3713
3714 # Checks for typedefs, structures, and compiler characteristics.
3715 # ===========================================================================
3716
3717 echo "$as_me:3717: checking return type of signal handlers" >&5
3718 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
3719 if test "${ac_cv_type_signal+set}" = set; then
3720   echo $ECHO_N "(cached) $ECHO_C" >&6
3721 else
3722   cat >conftest.$ac_ext <<_ACEOF
3723 #line 3723 "configure"
3724 #include "confdefs.h"
3725 #include <sys/types.h>
3726 #include <signal.h>
3727 #ifdef signal
3728 # undef signal
3729 #endif
3730 #ifdef __cplusplus
3731 extern "C" void (*signal (int, void (*)(int)))(int);
3732 #else
3733 void (*signal ()) ();
3734 #endif
3735
3736 int
3737 main ()
3738 {
3739 int i;
3740   ;
3741   return 0;
3742 }
3743 _ACEOF
3744 rm -f conftest.$ac_objext
3745 if { (eval echo "$as_me:3745: \"$ac_compile\"") >&5
3746   (eval $ac_compile) 2>&5
3747   ac_status=$?
3748   echo "$as_me:3748: \$? = $ac_status" >&5
3749   (exit $ac_status); } &&
3750          { ac_try='test -s conftest.$ac_objext'
3751   { (eval echo "$as_me:3751: \"$ac_try\"") >&5
3752   (eval $ac_try) 2>&5
3753   ac_status=$?
3754   echo "$as_me:3754: \$? = $ac_status" >&5
3755   (exit $ac_status); }; }; then
3756   ac_cv_type_signal=void
3757 else
3758   echo "$as_me: failed program was:" >&5
3759 cat conftest.$ac_ext >&5
3760 ac_cv_type_signal=int
3761 fi
3762 rm -f conftest.$ac_objext conftest.$ac_ext
3763 fi
3764 echo "$as_me:3764: result: $ac_cv_type_signal" >&5
3765 echo "${ECHO_T}$ac_cv_type_signal" >&6
3766
3767 cat >>confdefs.h <<EOF
3768 #define RETSIGTYPE $ac_cv_type_signal
3769 EOF
3770
3771 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3772
3773 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3774                   inttypes.h stdint.h unistd.h
3775 do
3776 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3777 echo "$as_me:3777: checking for $ac_header" >&5
3778 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3779 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3780   echo $ECHO_N "(cached) $ECHO_C" >&6
3781 else
3782   cat >conftest.$ac_ext <<_ACEOF
3783 #line 3783 "configure"
3784 #include "confdefs.h"
3785 $ac_includes_default
3786 #include <$ac_header>
3787 _ACEOF
3788 rm -f conftest.$ac_objext
3789 if { (eval echo "$as_me:3789: \"$ac_compile\"") >&5
3790   (eval $ac_compile) 2>&5
3791   ac_status=$?
3792   echo "$as_me:3792: \$? = $ac_status" >&5
3793   (exit $ac_status); } &&
3794          { ac_try='test -s conftest.$ac_objext'
3795   { (eval echo "$as_me:3795: \"$ac_try\"") >&5
3796   (eval $ac_try) 2>&5
3797   ac_status=$?
3798   echo "$as_me:3798: \$? = $ac_status" >&5
3799   (exit $ac_status); }; }; then
3800   eval "$as_ac_Header=yes"
3801 else
3802   echo "$as_me: failed program was:" >&5
3803 cat conftest.$ac_ext >&5
3804 eval "$as_ac_Header=no"
3805 fi
3806 rm -f conftest.$ac_objext conftest.$ac_ext
3807 fi
3808 echo "$as_me:3808: result: `eval echo '${'$as_ac_Header'}'`" >&5
3809 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3810 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3811   cat >>confdefs.h <<EOF
3812 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3813 EOF
3814
3815 fi
3816 done
3817
3818 echo "$as_me:3818: checking for char" >&5
3819 echo $ECHO_N "checking for char... $ECHO_C" >&6
3820 if test "${ac_cv_type_char+set}" = set; then
3821   echo $ECHO_N "(cached) $ECHO_C" >&6
3822 else
3823   cat >conftest.$ac_ext <<_ACEOF
3824 #line 3824 "configure"
3825 #include "confdefs.h"
3826 $ac_includes_default
3827 int
3828 main ()
3829 {
3830 if ((char *) 0)
3831   return 0;
3832 if (sizeof (char))
3833   return 0;
3834   ;
3835   return 0;
3836 }
3837 _ACEOF
3838 rm -f conftest.$ac_objext
3839 if { (eval echo "$as_me:3839: \"$ac_compile\"") >&5
3840   (eval $ac_compile) 2>&5
3841   ac_status=$?
3842   echo "$as_me:3842: \$? = $ac_status" >&5
3843   (exit $ac_status); } &&
3844          { ac_try='test -s conftest.$ac_objext'
3845   { (eval echo "$as_me:3845: \"$ac_try\"") >&5
3846   (eval $ac_try) 2>&5
3847   ac_status=$?
3848   echo "$as_me:3848: \$? = $ac_status" >&5
3849   (exit $ac_status); }; }; then
3850   ac_cv_type_char=yes
3851 else
3852   echo "$as_me: failed program was:" >&5
3853 cat conftest.$ac_ext >&5
3854 ac_cv_type_char=no
3855 fi
3856 rm -f conftest.$ac_objext conftest.$ac_ext
3857 fi
3858 echo "$as_me:3858: result: $ac_cv_type_char" >&5
3859 echo "${ECHO_T}$ac_cv_type_char" >&6
3860
3861 echo "$as_me:3861: checking size of char" >&5
3862 echo $ECHO_N "checking size of char... $ECHO_C" >&6
3863 if test "${ac_cv_sizeof_char+set}" = set; then
3864   echo $ECHO_N "(cached) $ECHO_C" >&6
3865 else
3866   if test "$ac_cv_type_char" = yes; then
3867   if test "$cross_compiling" = yes; then
3868   # Depending upon the size, compute the lo and hi bounds.
3869 cat >conftest.$ac_ext <<_ACEOF
3870 #line 3870 "configure"
3871 #include "confdefs.h"
3872 $ac_includes_default
3873 int
3874 main ()
3875 {
3876 int _array_ [1 - 2 * !((sizeof (char)) >= 0)]
3877   ;
3878   return 0;
3879 }
3880 _ACEOF
3881 rm -f conftest.$ac_objext
3882 if { (eval echo "$as_me:3882: \"$ac_compile\"") >&5
3883   (eval $ac_compile) 2>&5
3884   ac_status=$?
3885   echo "$as_me:3885: \$? = $ac_status" >&5
3886   (exit $ac_status); } &&
3887          { ac_try='test -s conftest.$ac_objext'
3888   { (eval echo "$as_me:3888: \"$ac_try\"") >&5
3889   (eval $ac_try) 2>&5
3890   ac_status=$?
3891   echo "$as_me:3891: \$? = $ac_status" >&5
3892   (exit $ac_status); }; }; then
3893   ac_lo=0 ac_mid=0
3894   while :; do
3895     cat >conftest.$ac_ext <<_ACEOF
3896 #line 3896 "configure"
3897 #include "confdefs.h"
3898 $ac_includes_default
3899 int
3900 main ()
3901 {
3902 int _array_ [1 - 2 * !((sizeof (char)) <= $ac_mid)]
3903   ;
3904   return 0;
3905 }
3906 _ACEOF
3907 rm -f conftest.$ac_objext
3908 if { (eval echo "$as_me:3908: \"$ac_compile\"") >&5
3909   (eval $ac_compile) 2>&5
3910   ac_status=$?
3911   echo "$as_me:3911: \$? = $ac_status" >&5
3912   (exit $ac_status); } &&
3913          { ac_try='test -s conftest.$ac_objext'
3914   { (eval echo "$as_me:3914: \"$ac_try\"") >&5
3915   (eval $ac_try) 2>&5
3916   ac_status=$?
3917   echo "$as_me:3917: \$? = $ac_status" >&5
3918   (exit $ac_status); }; }; then
3919   ac_hi=$ac_mid; break
3920 else
3921   echo "$as_me: failed program was:" >&5
3922 cat conftest.$ac_ext >&5
3923 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
3924 fi
3925 rm -f conftest.$ac_objext conftest.$ac_ext
3926   done
3927 else
3928   echo "$as_me: failed program was:" >&5
3929 cat conftest.$ac_ext >&5
3930 ac_hi=-1 ac_mid=-1
3931   while :; do
3932     cat >conftest.$ac_ext <<_ACEOF
3933 #line 3933 "configure"
3934 #include "confdefs.h"
3935 $ac_includes_default
3936 int
3937 main ()
3938 {
3939 int _array_ [1 - 2 * !((sizeof (char)) >= $ac_mid)]
3940   ;
3941   return 0;
3942 }
3943 _ACEOF
3944 rm -f conftest.$ac_objext
3945 if { (eval echo "$as_me:3945: \"$ac_compile\"") >&5
3946   (eval $ac_compile) 2>&5
3947   ac_status=$?
3948   echo "$as_me:3948: \$? = $ac_status" >&5
3949   (exit $ac_status); } &&
3950          { ac_try='test -s conftest.$ac_objext'
3951   { (eval echo "$as_me:3951: \"$ac_try\"") >&5
3952   (eval $ac_try) 2>&5
3953   ac_status=$?
3954   echo "$as_me:3954: \$? = $ac_status" >&5
3955   (exit $ac_status); }; }; then
3956   ac_lo=$ac_mid; break
3957 else
3958   echo "$as_me: failed program was:" >&5
3959 cat conftest.$ac_ext >&5
3960 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
3961 fi
3962 rm -f conftest.$ac_objext conftest.$ac_ext
3963   done
3964 fi
3965 rm -f conftest.$ac_objext conftest.$ac_ext
3966 # Binary search between lo and hi bounds.
3967 while test "x$ac_lo" != "x$ac_hi"; do
3968   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
3969   cat >conftest.$ac_ext <<_ACEOF
3970 #line 3970 "configure"
3971 #include "confdefs.h"
3972 $ac_includes_default
3973 int
3974 main ()
3975 {
3976 int _array_ [1 - 2 * !((sizeof (char)) <= $ac_mid)]
3977   ;
3978   return 0;
3979 }
3980 _ACEOF
3981 rm -f conftest.$ac_objext
3982 if { (eval echo "$as_me:3982: \"$ac_compile\"") >&5
3983   (eval $ac_compile) 2>&5
3984   ac_status=$?
3985   echo "$as_me:3985: \$? = $ac_status" >&5
3986   (exit $ac_status); } &&
3987          { ac_try='test -s conftest.$ac_objext'
3988   { (eval echo "$as_me:3988: \"$ac_try\"") >&5
3989   (eval $ac_try) 2>&5
3990   ac_status=$?
3991   echo "$as_me:3991: \$? = $ac_status" >&5
3992   (exit $ac_status); }; }; then
3993   ac_hi=$ac_mid
3994 else
3995   echo "$as_me: failed program was:" >&5
3996 cat conftest.$ac_ext >&5
3997 ac_lo=`expr $ac_mid + 1`
3998 fi
3999 rm -f conftest.$ac_objext conftest.$ac_ext
4000 done
4001 ac_cv_sizeof_char=$ac_lo
4002 else
4003   if test "$cross_compiling" = yes; then
4004   { { echo "$as_me:4004: error: cannot run test program while cross compiling" >&5
4005 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4006    { (exit 1); exit 1; }; }
4007 else
4008   cat >conftest.$ac_ext <<_ACEOF
4009 #line 4009 "configure"
4010 #include "confdefs.h"
4011 $ac_includes_default
4012 int
4013 main ()
4014 {
4015 FILE *f = fopen ("conftest.val", "w");
4016 if (!f)
4017   exit (1);
4018 fprintf (f, "%d", (sizeof (char)));
4019 fclose (f);
4020   ;
4021   return 0;
4022 }
4023 _ACEOF
4024 rm -f conftest$ac_exeext
4025 if { (eval echo "$as_me:4025: \"$ac_link\"") >&5
4026   (eval $ac_link) 2>&5
4027   ac_status=$?
4028   echo "$as_me:4028: \$? = $ac_status" >&5
4029   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4030   { (eval echo "$as_me:4030: \"$ac_try\"") >&5
4031   (eval $ac_try) 2>&5
4032   ac_status=$?
4033   echo "$as_me:4033: \$? = $ac_status" >&5
4034   (exit $ac_status); }; }; then
4035   ac_cv_sizeof_char=`cat conftest.val`
4036 else
4037   echo "$as_me: program exited with status $ac_status" >&5
4038 echo "$as_me: failed program was:" >&5
4039 cat conftest.$ac_ext >&5
4040 fi
4041 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4042 fi
4043 fi
4044 rm -f conftest.val
4045 else
4046   ac_cv_sizeof_char=0
4047 fi
4048 fi
4049 echo "$as_me:4049: result: $ac_cv_sizeof_char" >&5
4050 echo "${ECHO_T}$ac_cv_sizeof_char" >&6
4051 cat >>confdefs.h <<EOF
4052 #define SIZEOF_CHAR $ac_cv_sizeof_char
4053 EOF
4054
4055 echo "$as_me:4055: checking for short" >&5
4056 echo $ECHO_N "checking for short... $ECHO_C" >&6
4057 if test "${ac_cv_type_short+set}" = set; then
4058   echo $ECHO_N "(cached) $ECHO_C" >&6
4059 else
4060   cat >conftest.$ac_ext <<_ACEOF
4061 #line 4061 "configure"
4062 #include "confdefs.h"
4063 $ac_includes_default
4064 int
4065 main ()
4066 {
4067 if ((short *) 0)
4068   return 0;
4069 if (sizeof (short))
4070   return 0;
4071   ;
4072   return 0;
4073 }
4074 _ACEOF
4075 rm -f conftest.$ac_objext
4076 if { (eval echo "$as_me:4076: \"$ac_compile\"") >&5
4077   (eval $ac_compile) 2>&5
4078   ac_status=$?
4079   echo "$as_me:4079: \$? = $ac_status" >&5
4080   (exit $ac_status); } &&
4081          { ac_try='test -s conftest.$ac_objext'
4082   { (eval echo "$as_me:4082: \"$ac_try\"") >&5
4083   (eval $ac_try) 2>&5
4084   ac_status=$?
4085   echo "$as_me:4085: \$? = $ac_status" >&5
4086   (exit $ac_status); }; }; then
4087   ac_cv_type_short=yes
4088 else
4089   echo "$as_me: failed program was:" >&5
4090 cat conftest.$ac_ext >&5
4091 ac_cv_type_short=no
4092 fi
4093 rm -f conftest.$ac_objext conftest.$ac_ext
4094 fi
4095 echo "$as_me:4095: result: $ac_cv_type_short" >&5
4096 echo "${ECHO_T}$ac_cv_type_short" >&6
4097
4098 echo "$as_me:4098: checking size of short" >&5
4099 echo $ECHO_N "checking size of short... $ECHO_C" >&6
4100 if test "${ac_cv_sizeof_short+set}" = set; then
4101   echo $ECHO_N "(cached) $ECHO_C" >&6
4102 else
4103   if test "$ac_cv_type_short" = yes; then
4104   if test "$cross_compiling" = yes; then
4105   # Depending upon the size, compute the lo and hi bounds.
4106 cat >conftest.$ac_ext <<_ACEOF
4107 #line 4107 "configure"
4108 #include "confdefs.h"
4109 $ac_includes_default
4110 int
4111 main ()
4112 {
4113 int _array_ [1 - 2 * !((sizeof (short)) >= 0)]
4114   ;
4115   return 0;
4116 }
4117 _ACEOF
4118 rm -f conftest.$ac_objext
4119 if { (eval echo "$as_me:4119: \"$ac_compile\"") >&5
4120   (eval $ac_compile) 2>&5
4121   ac_status=$?
4122   echo "$as_me:4122: \$? = $ac_status" >&5
4123   (exit $ac_status); } &&
4124          { ac_try='test -s conftest.$ac_objext'
4125   { (eval echo "$as_me:4125: \"$ac_try\"") >&5
4126   (eval $ac_try) 2>&5
4127   ac_status=$?
4128   echo "$as_me:4128: \$? = $ac_status" >&5
4129   (exit $ac_status); }; }; then
4130   ac_lo=0 ac_mid=0
4131   while :; do
4132     cat >conftest.$ac_ext <<_ACEOF
4133 #line 4133 "configure"
4134 #include "confdefs.h"
4135 $ac_includes_default
4136 int
4137 main ()
4138 {
4139 int _array_ [1 - 2 * !((sizeof (short)) <= $ac_mid)]
4140   ;
4141   return 0;
4142 }
4143 _ACEOF
4144 rm -f conftest.$ac_objext
4145 if { (eval echo "$as_me:4145: \"$ac_compile\"") >&5
4146   (eval $ac_compile) 2>&5
4147   ac_status=$?
4148   echo "$as_me:4148: \$? = $ac_status" >&5
4149   (exit $ac_status); } &&
4150          { ac_try='test -s conftest.$ac_objext'
4151   { (eval echo "$as_me:4151: \"$ac_try\"") >&5
4152   (eval $ac_try) 2>&5
4153   ac_status=$?
4154   echo "$as_me:4154: \$? = $ac_status" >&5
4155   (exit $ac_status); }; }; then
4156   ac_hi=$ac_mid; break
4157 else
4158   echo "$as_me: failed program was:" >&5
4159 cat conftest.$ac_ext >&5
4160 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
4161 fi
4162 rm -f conftest.$ac_objext conftest.$ac_ext
4163   done
4164 else
4165   echo "$as_me: failed program was:" >&5
4166 cat conftest.$ac_ext >&5
4167 ac_hi=-1 ac_mid=-1
4168   while :; do
4169     cat >conftest.$ac_ext <<_ACEOF
4170 #line 4170 "configure"
4171 #include "confdefs.h"
4172 $ac_includes_default
4173 int
4174 main ()
4175 {
4176 int _array_ [1 - 2 * !((sizeof (short)) >= $ac_mid)]
4177   ;
4178   return 0;
4179 }
4180 _ACEOF
4181 rm -f conftest.$ac_objext
4182 if { (eval echo "$as_me:4182: \"$ac_compile\"") >&5
4183   (eval $ac_compile) 2>&5
4184   ac_status=$?
4185   echo "$as_me:4185: \$? = $ac_status" >&5
4186   (exit $ac_status); } &&
4187          { ac_try='test -s conftest.$ac_objext'
4188   { (eval echo "$as_me:4188: \"$ac_try\"") >&5
4189   (eval $ac_try) 2>&5
4190   ac_status=$?
4191   echo "$as_me:4191: \$? = $ac_status" >&5
4192   (exit $ac_status); }; }; then
4193   ac_lo=$ac_mid; break
4194 else
4195   echo "$as_me: failed program was:" >&5
4196 cat conftest.$ac_ext >&5
4197 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
4198 fi
4199 rm -f conftest.$ac_objext conftest.$ac_ext
4200   done
4201 fi
4202 rm -f conftest.$ac_objext conftest.$ac_ext
4203 # Binary search between lo and hi bounds.
4204 while test "x$ac_lo" != "x$ac_hi"; do
4205   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4206   cat >conftest.$ac_ext <<_ACEOF
4207 #line 4207 "configure"
4208 #include "confdefs.h"
4209 $ac_includes_default
4210 int
4211 main ()
4212 {
4213 int _array_ [1 - 2 * !((sizeof (short)) <= $ac_mid)]
4214   ;
4215   return 0;
4216 }
4217 _ACEOF
4218 rm -f conftest.$ac_objext
4219 if { (eval echo "$as_me:4219: \"$ac_compile\"") >&5
4220   (eval $ac_compile) 2>&5
4221   ac_status=$?
4222   echo "$as_me:4222: \$? = $ac_status" >&5
4223   (exit $ac_status); } &&
4224          { ac_try='test -s conftest.$ac_objext'
4225   { (eval echo "$as_me:4225: \"$ac_try\"") >&5
4226   (eval $ac_try) 2>&5
4227   ac_status=$?
4228   echo "$as_me:4228: \$? = $ac_status" >&5
4229   (exit $ac_status); }; }; then
4230   ac_hi=$ac_mid
4231 else
4232   echo "$as_me: failed program was:" >&5
4233 cat conftest.$ac_ext >&5
4234 ac_lo=`expr $ac_mid + 1`
4235 fi
4236 rm -f conftest.$ac_objext conftest.$ac_ext
4237 done
4238 ac_cv_sizeof_short=$ac_lo
4239 else
4240   if test "$cross_compiling" = yes; then
4241   { { echo "$as_me:4241: error: cannot run test program while cross compiling" >&5
4242 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4243    { (exit 1); exit 1; }; }
4244 else
4245   cat >conftest.$ac_ext <<_ACEOF
4246 #line 4246 "configure"
4247 #include "confdefs.h"
4248 $ac_includes_default
4249 int
4250 main ()
4251 {
4252 FILE *f = fopen ("conftest.val", "w");
4253 if (!f)
4254   exit (1);
4255 fprintf (f, "%d", (sizeof (short)));
4256 fclose (f);
4257   ;
4258   return 0;
4259 }
4260 _ACEOF
4261 rm -f conftest$ac_exeext
4262 if { (eval echo "$as_me:4262: \"$ac_link\"") >&5
4263   (eval $ac_link) 2>&5
4264   ac_status=$?
4265   echo "$as_me:4265: \$? = $ac_status" >&5
4266   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4267   { (eval echo "$as_me:4267: \"$ac_try\"") >&5
4268   (eval $ac_try) 2>&5
4269   ac_status=$?
4270   echo "$as_me:4270: \$? = $ac_status" >&5
4271   (exit $ac_status); }; }; then
4272   ac_cv_sizeof_short=`cat conftest.val`
4273 else
4274   echo "$as_me: program exited with status $ac_status" >&5
4275 echo "$as_me: failed program was:" >&5
4276 cat conftest.$ac_ext >&5
4277 fi
4278 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4279 fi
4280 fi
4281 rm -f conftest.val
4282 else
4283   ac_cv_sizeof_short=0
4284 fi
4285 fi
4286 echo "$as_me:4286: result: $ac_cv_sizeof_short" >&5
4287 echo "${ECHO_T}$ac_cv_sizeof_short" >&6
4288 cat >>confdefs.h <<EOF
4289 #define SIZEOF_SHORT $ac_cv_sizeof_short
4290 EOF
4291
4292 echo "$as_me:4292: checking for int" >&5
4293 echo $ECHO_N "checking for int... $ECHO_C" >&6
4294 if test "${ac_cv_type_int+set}" = set; then
4295   echo $ECHO_N "(cached) $ECHO_C" >&6
4296 else
4297   cat >conftest.$ac_ext <<_ACEOF
4298 #line 4298 "configure"
4299 #include "confdefs.h"
4300 $ac_includes_default
4301 int
4302 main ()
4303 {
4304 if ((int *) 0)
4305   return 0;
4306 if (sizeof (int))
4307   return 0;
4308   ;
4309   return 0;
4310 }
4311 _ACEOF
4312 rm -f conftest.$ac_objext
4313 if { (eval echo "$as_me:4313: \"$ac_compile\"") >&5
4314   (eval $ac_compile) 2>&5
4315   ac_status=$?
4316   echo "$as_me:4316: \$? = $ac_status" >&5
4317   (exit $ac_status); } &&
4318          { ac_try='test -s conftest.$ac_objext'
4319   { (eval echo "$as_me:4319: \"$ac_try\"") >&5
4320   (eval $ac_try) 2>&5
4321   ac_status=$?
4322   echo "$as_me:4322: \$? = $ac_status" >&5
4323   (exit $ac_status); }; }; then
4324   ac_cv_type_int=yes
4325 else
4326   echo "$as_me: failed program was:" >&5
4327 cat conftest.$ac_ext >&5
4328 ac_cv_type_int=no
4329 fi
4330 rm -f conftest.$ac_objext conftest.$ac_ext
4331 fi
4332 echo "$as_me:4332: result: $ac_cv_type_int" >&5
4333 echo "${ECHO_T}$ac_cv_type_int" >&6
4334
4335 echo "$as_me:4335: checking size of int" >&5
4336 echo $ECHO_N "checking size of int... $ECHO_C" >&6
4337 if test "${ac_cv_sizeof_int+set}" = set; then
4338   echo $ECHO_N "(cached) $ECHO_C" >&6
4339 else
4340   if test "$ac_cv_type_int" = yes; then
4341   if test "$cross_compiling" = yes; then
4342   # Depending upon the size, compute the lo and hi bounds.
4343 cat >conftest.$ac_ext <<_ACEOF
4344 #line 4344 "configure"
4345 #include "confdefs.h"
4346 $ac_includes_default
4347 int
4348 main ()
4349 {
4350 int _array_ [1 - 2 * !((sizeof (int)) >= 0)]
4351   ;
4352   return 0;
4353 }
4354 _ACEOF
4355 rm -f conftest.$ac_objext
4356 if { (eval echo "$as_me:4356: \"$ac_compile\"") >&5
4357   (eval $ac_compile) 2>&5
4358   ac_status=$?
4359   echo "$as_me:4359: \$? = $ac_status" >&5
4360   (exit $ac_status); } &&
4361          { ac_try='test -s conftest.$ac_objext'
4362   { (eval echo "$as_me:4362: \"$ac_try\"") >&5
4363   (eval $ac_try) 2>&5
4364   ac_status=$?
4365   echo "$as_me:4365: \$? = $ac_status" >&5
4366   (exit $ac_status); }; }; then
4367   ac_lo=0 ac_mid=0
4368   while :; do
4369     cat >conftest.$ac_ext <<_ACEOF
4370 #line 4370 "configure"
4371 #include "confdefs.h"
4372 $ac_includes_default
4373 int
4374 main ()
4375 {
4376 int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)]
4377   ;
4378   return 0;
4379 }
4380 _ACEOF
4381 rm -f conftest.$ac_objext
4382 if { (eval echo "$as_me:4382: \"$ac_compile\"") >&5
4383   (eval $ac_compile) 2>&5
4384   ac_status=$?
4385   echo "$as_me:4385: \$? = $ac_status" >&5
4386   (exit $ac_status); } &&
4387          { ac_try='test -s conftest.$ac_objext'
4388   { (eval echo "$as_me:4388: \"$ac_try\"") >&5
4389   (eval $ac_try) 2>&5
4390   ac_status=$?
4391   echo "$as_me:4391: \$? = $ac_status" >&5
4392   (exit $ac_status); }; }; then
4393   ac_hi=$ac_mid; break
4394 else
4395   echo "$as_me: failed program was:" >&5
4396 cat conftest.$ac_ext >&5
4397 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
4398 fi
4399 rm -f conftest.$ac_objext conftest.$ac_ext
4400   done
4401 else
4402   echo "$as_me: failed program was:" >&5
4403 cat conftest.$ac_ext >&5
4404 ac_hi=-1 ac_mid=-1
4405   while :; do
4406     cat >conftest.$ac_ext <<_ACEOF
4407 #line 4407 "configure"
4408 #include "confdefs.h"
4409 $ac_includes_default
4410 int
4411 main ()
4412 {
4413 int _array_ [1 - 2 * !((sizeof (int)) >= $ac_mid)]
4414   ;
4415   return 0;
4416 }
4417 _ACEOF
4418 rm -f conftest.$ac_objext
4419 if { (eval echo "$as_me:4419: \"$ac_compile\"") >&5
4420   (eval $ac_compile) 2>&5
4421   ac_status=$?
4422   echo "$as_me:4422: \$? = $ac_status" >&5
4423   (exit $ac_status); } &&
4424          { ac_try='test -s conftest.$ac_objext'
4425   { (eval echo "$as_me:4425: \"$ac_try\"") >&5
4426   (eval $ac_try) 2>&5
4427   ac_status=$?
4428   echo "$as_me:4428: \$? = $ac_status" >&5
4429   (exit $ac_status); }; }; then
4430   ac_lo=$ac_mid; break
4431 else
4432   echo "$as_me: failed program was:" >&5
4433 cat conftest.$ac_ext >&5
4434 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
4435 fi
4436 rm -f conftest.$ac_objext conftest.$ac_ext
4437   done
4438 fi
4439 rm -f conftest.$ac_objext conftest.$ac_ext
4440 # Binary search between lo and hi bounds.
4441 while test "x$ac_lo" != "x$ac_hi"; do
4442   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4443   cat >conftest.$ac_ext <<_ACEOF
4444 #line 4444 "configure"
4445 #include "confdefs.h"
4446 $ac_includes_default
4447 int
4448 main ()
4449 {
4450 int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)]
4451   ;
4452   return 0;
4453 }
4454 _ACEOF
4455 rm -f conftest.$ac_objext
4456 if { (eval echo "$as_me:4456: \"$ac_compile\"") >&5
4457   (eval $ac_compile) 2>&5
4458   ac_status=$?
4459   echo "$as_me:4459: \$? = $ac_status" >&5
4460   (exit $ac_status); } &&
4461          { ac_try='test -s conftest.$ac_objext'
4462   { (eval echo "$as_me:4462: \"$ac_try\"") >&5
4463   (eval $ac_try) 2>&5
4464   ac_status=$?
4465   echo "$as_me:4465: \$? = $ac_status" >&5
4466   (exit $ac_status); }; }; then
4467   ac_hi=$ac_mid
4468 else
4469   echo "$as_me: failed program was:" >&5
4470 cat conftest.$ac_ext >&5
4471 ac_lo=`expr $ac_mid + 1`
4472 fi
4473 rm -f conftest.$ac_objext conftest.$ac_ext
4474 done
4475 ac_cv_sizeof_int=$ac_lo
4476 else
4477   if test "$cross_compiling" = yes; then
4478   { { echo "$as_me:4478: error: cannot run test program while cross compiling" >&5
4479 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4480    { (exit 1); exit 1; }; }
4481 else
4482   cat >conftest.$ac_ext <<_ACEOF
4483 #line 4483 "configure"
4484 #include "confdefs.h"
4485 $ac_includes_default
4486 int
4487 main ()
4488 {
4489 FILE *f = fopen ("conftest.val", "w");
4490 if (!f)
4491   exit (1);
4492 fprintf (f, "%d", (sizeof (int)));
4493 fclose (f);
4494   ;
4495   return 0;
4496 }
4497 _ACEOF
4498 rm -f conftest$ac_exeext
4499 if { (eval echo "$as_me:4499: \"$ac_link\"") >&5
4500   (eval $ac_link) 2>&5
4501   ac_status=$?
4502   echo "$as_me:4502: \$? = $ac_status" >&5
4503   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4504   { (eval echo "$as_me:4504: \"$ac_try\"") >&5
4505   (eval $ac_try) 2>&5
4506   ac_status=$?
4507   echo "$as_me:4507: \$? = $ac_status" >&5
4508   (exit $ac_status); }; }; then
4509   ac_cv_sizeof_int=`cat conftest.val`
4510 else
4511   echo "$as_me: program exited with status $ac_status" >&5
4512 echo "$as_me: failed program was:" >&5
4513 cat conftest.$ac_ext >&5
4514 fi
4515 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4516 fi
4517 fi
4518 rm -f conftest.val
4519 else
4520   ac_cv_sizeof_int=0
4521 fi
4522 fi
4523 echo "$as_me:4523: result: $ac_cv_sizeof_int" >&5
4524 echo "${ECHO_T}$ac_cv_sizeof_int" >&6
4525 cat >>confdefs.h <<EOF
4526 #define SIZEOF_INT $ac_cv_sizeof_int
4527 EOF
4528
4529 echo "$as_me:4529: checking for long" >&5
4530 echo $ECHO_N "checking for long... $ECHO_C" >&6
4531 if test "${ac_cv_type_long+set}" = set; then
4532   echo $ECHO_N "(cached) $ECHO_C" >&6
4533 else
4534   cat >conftest.$ac_ext <<_ACEOF
4535 #line 4535 "configure"
4536 #include "confdefs.h"
4537 $ac_includes_default
4538 int
4539 main ()
4540 {
4541 if ((long *) 0)
4542   return 0;
4543 if (sizeof (long))
4544   return 0;
4545   ;
4546   return 0;
4547 }
4548 _ACEOF
4549 rm -f conftest.$ac_objext
4550 if { (eval echo "$as_me:4550: \"$ac_compile\"") >&5
4551   (eval $ac_compile) 2>&5
4552   ac_status=$?
4553   echo "$as_me:4553: \$? = $ac_status" >&5
4554   (exit $ac_status); } &&
4555          { ac_try='test -s conftest.$ac_objext'
4556   { (eval echo "$as_me:4556: \"$ac_try\"") >&5
4557   (eval $ac_try) 2>&5
4558   ac_status=$?
4559   echo "$as_me:4559: \$? = $ac_status" >&5
4560   (exit $ac_status); }; }; then
4561   ac_cv_type_long=yes
4562 else
4563   echo "$as_me: failed program was:" >&5
4564 cat conftest.$ac_ext >&5
4565 ac_cv_type_long=no
4566 fi
4567 rm -f conftest.$ac_objext conftest.$ac_ext
4568 fi
4569 echo "$as_me:4569: result: $ac_cv_type_long" >&5
4570 echo "${ECHO_T}$ac_cv_type_long" >&6
4571
4572 echo "$as_me:4572: checking size of long" >&5
4573 echo $ECHO_N "checking size of long... $ECHO_C" >&6
4574 if test "${ac_cv_sizeof_long+set}" = set; then
4575   echo $ECHO_N "(cached) $ECHO_C" >&6
4576 else
4577   if test "$ac_cv_type_long" = yes; then
4578   if test "$cross_compiling" = yes; then
4579   # Depending upon the size, compute the lo and hi bounds.
4580 cat >conftest.$ac_ext <<_ACEOF
4581 #line 4581 "configure"
4582 #include "confdefs.h"
4583 $ac_includes_default
4584 int
4585 main ()
4586 {
4587 int _array_ [1 - 2 * !((sizeof (long)) >= 0)]
4588   ;
4589   return 0;
4590 }
4591 _ACEOF
4592 rm -f conftest.$ac_objext
4593 if { (eval echo "$as_me:4593: \"$ac_compile\"") >&5
4594   (eval $ac_compile) 2>&5
4595   ac_status=$?
4596   echo "$as_me:4596: \$? = $ac_status" >&5
4597   (exit $ac_status); } &&
4598          { ac_try='test -s conftest.$ac_objext'
4599   { (eval echo "$as_me:4599: \"$ac_try\"") >&5
4600   (eval $ac_try) 2>&5
4601   ac_status=$?
4602   echo "$as_me:4602: \$? = $ac_status" >&5
4603   (exit $ac_status); }; }; then
4604   ac_lo=0 ac_mid=0
4605   while :; do
4606     cat >conftest.$ac_ext <<_ACEOF
4607 #line 4607 "configure"
4608 #include "confdefs.h"
4609 $ac_includes_default
4610 int
4611 main ()
4612 {
4613 int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)]
4614   ;
4615   return 0;
4616 }
4617 _ACEOF
4618 rm -f conftest.$ac_objext
4619 if { (eval echo "$as_me:4619: \"$ac_compile\"") >&5
4620   (eval $ac_compile) 2>&5
4621   ac_status=$?
4622   echo "$as_me:4622: \$? = $ac_status" >&5
4623   (exit $ac_status); } &&
4624          { ac_try='test -s conftest.$ac_objext'
4625   { (eval echo "$as_me:4625: \"$ac_try\"") >&5
4626   (eval $ac_try) 2>&5
4627   ac_status=$?
4628   echo "$as_me:4628: \$? = $ac_status" >&5
4629   (exit $ac_status); }; }; then
4630   ac_hi=$ac_mid; break
4631 else
4632   echo "$as_me: failed program was:" >&5
4633 cat conftest.$ac_ext >&5
4634 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
4635 fi
4636 rm -f conftest.$ac_objext conftest.$ac_ext
4637   done
4638 else
4639   echo "$as_me: failed program was:" >&5
4640 cat conftest.$ac_ext >&5
4641 ac_hi=-1 ac_mid=-1
4642   while :; do
4643     cat >conftest.$ac_ext <<_ACEOF
4644 #line 4644 "configure"
4645 #include "confdefs.h"
4646 $ac_includes_default
4647 int
4648 main ()
4649 {
4650 int _array_ [1 - 2 * !((sizeof (long)) >= $ac_mid)]
4651   ;
4652   return 0;
4653 }
4654 _ACEOF
4655 rm -f conftest.$ac_objext
4656 if { (eval echo "$as_me:4656: \"$ac_compile\"") >&5
4657   (eval $ac_compile) 2>&5
4658   ac_status=$?
4659   echo "$as_me:4659: \$? = $ac_status" >&5
4660   (exit $ac_status); } &&
4661          { ac_try='test -s conftest.$ac_objext'
4662   { (eval echo "$as_me:4662: \"$ac_try\"") >&5
4663   (eval $ac_try) 2>&5
4664   ac_status=$?
4665   echo "$as_me:4665: \$? = $ac_status" >&5
4666   (exit $ac_status); }; }; then
4667   ac_lo=$ac_mid; break
4668 else
4669   echo "$as_me: failed program was:" >&5
4670 cat conftest.$ac_ext >&5
4671 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
4672 fi
4673 rm -f conftest.$ac_objext conftest.$ac_ext
4674   done
4675 fi
4676 rm -f conftest.$ac_objext conftest.$ac_ext
4677 # Binary search between lo and hi bounds.
4678 while test "x$ac_lo" != "x$ac_hi"; do
4679   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4680   cat >conftest.$ac_ext <<_ACEOF
4681 #line 4681 "configure"
4682 #include "confdefs.h"
4683 $ac_includes_default
4684 int
4685 main ()
4686 {
4687 int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)]
4688   ;
4689   return 0;
4690 }
4691 _ACEOF
4692 rm -f conftest.$ac_objext
4693 if { (eval echo "$as_me:4693: \"$ac_compile\"") >&5
4694   (eval $ac_compile) 2>&5
4695   ac_status=$?
4696   echo "$as_me:4696: \$? = $ac_status" >&5
4697   (exit $ac_status); } &&
4698          { ac_try='test -s conftest.$ac_objext'
4699   { (eval echo "$as_me:4699: \"$ac_try\"") >&5
4700   (eval $ac_try) 2>&5
4701   ac_status=$?
4702   echo "$as_me:4702: \$? = $ac_status" >&5
4703   (exit $ac_status); }; }; then
4704   ac_hi=$ac_mid
4705 else
4706   echo "$as_me: failed program was:" >&5
4707 cat conftest.$ac_ext >&5
4708 ac_lo=`expr $ac_mid + 1`
4709 fi
4710 rm -f conftest.$ac_objext conftest.$ac_ext
4711 done
4712 ac_cv_sizeof_long=$ac_lo
4713 else
4714   if test "$cross_compiling" = yes; then
4715   { { echo "$as_me:4715: error: cannot run test program while cross compiling" >&5
4716 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4717    { (exit 1); exit 1; }; }
4718 else
4719   cat >conftest.$ac_ext <<_ACEOF
4720 #line 4720 "configure"
4721 #include "confdefs.h"
4722 $ac_includes_default
4723 int
4724 main ()
4725 {
4726 FILE *f = fopen ("conftest.val", "w");
4727 if (!f)
4728   exit (1);
4729 fprintf (f, "%d", (sizeof (long)));
4730 fclose (f);
4731   ;
4732   return 0;
4733 }
4734 _ACEOF
4735 rm -f conftest$ac_exeext
4736 if { (eval echo "$as_me:4736: \"$ac_link\"") >&5
4737   (eval $ac_link) 2>&5
4738   ac_status=$?
4739   echo "$as_me:4739: \$? = $ac_status" >&5
4740   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4741   { (eval echo "$as_me:4741: \"$ac_try\"") >&5
4742   (eval $ac_try) 2>&5
4743   ac_status=$?
4744   echo "$as_me:4744: \$? = $ac_status" >&5
4745   (exit $ac_status); }; }; then
4746   ac_cv_sizeof_long=`cat conftest.val`
4747 else
4748   echo "$as_me: program exited with status $ac_status" >&5
4749 echo "$as_me: failed program was:" >&5
4750 cat conftest.$ac_ext >&5
4751 fi
4752 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4753 fi
4754 fi
4755 rm -f conftest.val
4756 else
4757   ac_cv_sizeof_long=0
4758 fi
4759 fi
4760 echo "$as_me:4760: result: $ac_cv_sizeof_long" >&5
4761 echo "${ECHO_T}$ac_cv_sizeof_long" >&6
4762 cat >>confdefs.h <<EOF
4763 #define SIZEOF_LONG $ac_cv_sizeof_long
4764 EOF
4765
4766 echo "$as_me:4766: checking for long long" >&5
4767 echo $ECHO_N "checking for long long... $ECHO_C" >&6
4768 if test "${ac_cv_type_long_long+set}" = set; then
4769   echo $ECHO_N "(cached) $ECHO_C" >&6
4770 else
4771   cat >conftest.$ac_ext <<_ACEOF
4772 #line 4772 "configure"
4773 #include "confdefs.h"
4774 $ac_includes_default
4775 int
4776 main ()
4777 {
4778 if ((long long *) 0)
4779   return 0;
4780 if (sizeof (long long))
4781   return 0;
4782   ;
4783   return 0;
4784 }
4785 _ACEOF
4786 rm -f conftest.$ac_objext
4787 if { (eval echo "$as_me:4787: \"$ac_compile\"") >&5
4788   (eval $ac_compile) 2>&5
4789   ac_status=$?
4790   echo "$as_me:4790: \$? = $ac_status" >&5
4791   (exit $ac_status); } &&
4792          { ac_try='test -s conftest.$ac_objext'
4793   { (eval echo "$as_me:4793: \"$ac_try\"") >&5
4794   (eval $ac_try) 2>&5
4795   ac_status=$?
4796   echo "$as_me:4796: \$? = $ac_status" >&5
4797   (exit $ac_status); }; }; then
4798   ac_cv_type_long_long=yes
4799 else
4800   echo "$as_me: failed program was:" >&5
4801 cat conftest.$ac_ext >&5
4802 ac_cv_type_long_long=no
4803 fi
4804 rm -f conftest.$ac_objext conftest.$ac_ext
4805 fi
4806 echo "$as_me:4806: result: $ac_cv_type_long_long" >&5
4807 echo "${ECHO_T}$ac_cv_type_long_long" >&6
4808
4809 echo "$as_me:4809: checking size of long long" >&5
4810 echo $ECHO_N "checking size of long long... $ECHO_C" >&6
4811 if test "${ac_cv_sizeof_long_long+set}" = set; then
4812   echo $ECHO_N "(cached) $ECHO_C" >&6
4813 else
4814   if test "$ac_cv_type_long_long" = yes; then
4815   if test "$cross_compiling" = yes; then
4816   # Depending upon the size, compute the lo and hi bounds.
4817 cat >conftest.$ac_ext <<_ACEOF
4818 #line 4818 "configure"
4819 #include "confdefs.h"
4820 $ac_includes_default
4821 int
4822 main ()
4823 {
4824 int _array_ [1 - 2 * !((sizeof (long long)) >= 0)]
4825   ;
4826   return 0;
4827 }
4828 _ACEOF
4829 rm -f conftest.$ac_objext
4830 if { (eval echo "$as_me:4830: \"$ac_compile\"") >&5
4831   (eval $ac_compile) 2>&5
4832   ac_status=$?
4833   echo "$as_me:4833: \$? = $ac_status" >&5
4834   (exit $ac_status); } &&
4835          { ac_try='test -s conftest.$ac_objext'
4836   { (eval echo "$as_me:4836: \"$ac_try\"") >&5
4837   (eval $ac_try) 2>&5
4838   ac_status=$?
4839   echo "$as_me:4839: \$? = $ac_status" >&5
4840   (exit $ac_status); }; }; then
4841   ac_lo=0 ac_mid=0
4842   while :; do
4843     cat >conftest.$ac_ext <<_ACEOF
4844 #line 4844 "configure"
4845 #include "confdefs.h"
4846 $ac_includes_default
4847 int
4848 main ()
4849 {
4850 int _array_ [1 - 2 * !((sizeof (long long)) <= $ac_mid)]
4851   ;
4852   return 0;
4853 }
4854 _ACEOF
4855 rm -f conftest.$ac_objext
4856 if { (eval echo "$as_me:4856: \"$ac_compile\"") >&5
4857   (eval $ac_compile) 2>&5
4858   ac_status=$?
4859   echo "$as_me:4859: \$? = $ac_status" >&5
4860   (exit $ac_status); } &&
4861          { ac_try='test -s conftest.$ac_objext'
4862   { (eval echo "$as_me:4862: \"$ac_try\"") >&5
4863   (eval $ac_try) 2>&5
4864   ac_status=$?
4865   echo "$as_me:4865: \$? = $ac_status" >&5
4866   (exit $ac_status); }; }; then
4867   ac_hi=$ac_mid; break
4868 else
4869   echo "$as_me: failed program was:" >&5
4870 cat conftest.$ac_ext >&5
4871 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
4872 fi
4873 rm -f conftest.$ac_objext conftest.$ac_ext
4874   done
4875 else
4876   echo "$as_me: failed program was:" >&5
4877 cat conftest.$ac_ext >&5
4878 ac_hi=-1 ac_mid=-1
4879   while :; do
4880     cat >conftest.$ac_ext <<_ACEOF
4881 #line 4881 "configure"
4882 #include "confdefs.h"
4883 $ac_includes_default
4884 int
4885 main ()
4886 {
4887 int _array_ [1 - 2 * !((sizeof (long long)) >= $ac_mid)]
4888   ;
4889   return 0;
4890 }
4891 _ACEOF
4892 rm -f conftest.$ac_objext
4893 if { (eval echo "$as_me:4893: \"$ac_compile\"") >&5
4894   (eval $ac_compile) 2>&5
4895   ac_status=$?
4896   echo "$as_me:4896: \$? = $ac_status" >&5
4897   (exit $ac_status); } &&
4898          { ac_try='test -s conftest.$ac_objext'
4899   { (eval echo "$as_me:4899: \"$ac_try\"") >&5
4900   (eval $ac_try) 2>&5
4901   ac_status=$?
4902   echo "$as_me:4902: \$? = $ac_status" >&5
4903   (exit $ac_status); }; }; then
4904   ac_lo=$ac_mid; break
4905 else
4906   echo "$as_me: failed program was:" >&5
4907 cat conftest.$ac_ext >&5
4908 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
4909 fi
4910 rm -f conftest.$ac_objext conftest.$ac_ext
4911   done
4912 fi
4913 rm -f conftest.$ac_objext conftest.$ac_ext
4914 # Binary search between lo and hi bounds.
4915 while test "x$ac_lo" != "x$ac_hi"; do
4916   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4917   cat >conftest.$ac_ext <<_ACEOF
4918 #line 4918 "configure"
4919 #include "confdefs.h"
4920 $ac_includes_default
4921 int
4922 main ()
4923 {
4924 int _array_ [1 - 2 * !((sizeof (long long)) <= $ac_mid)]
4925   ;
4926   return 0;
4927 }
4928 _ACEOF
4929 rm -f conftest.$ac_objext
4930 if { (eval echo "$as_me:4930: \"$ac_compile\"") >&5
4931   (eval $ac_compile) 2>&5
4932   ac_status=$?
4933   echo "$as_me:4933: \$? = $ac_status" >&5
4934   (exit $ac_status); } &&
4935          { ac_try='test -s conftest.$ac_objext'
4936   { (eval echo "$as_me:4936: \"$ac_try\"") >&5
4937   (eval $ac_try) 2>&5
4938   ac_status=$?
4939   echo "$as_me:4939: \$? = $ac_status" >&5
4940   (exit $ac_status); }; }; then
4941   ac_hi=$ac_mid
4942 else
4943   echo "$as_me: failed program was:" >&5
4944 cat conftest.$ac_ext >&5
4945 ac_lo=`expr $ac_mid + 1`
4946 fi
4947 rm -f conftest.$ac_objext conftest.$ac_ext
4948 done
4949 ac_cv_sizeof_long_long=$ac_lo
4950 else
4951   if test "$cross_compiling" = yes; then
4952   { { echo "$as_me:4952: error: cannot run test program while cross compiling" >&5
4953 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4954    { (exit 1); exit 1; }; }
4955 else
4956   cat >conftest.$ac_ext <<_ACEOF
4957 #line 4957 "configure"
4958 #include "confdefs.h"
4959 $ac_includes_default
4960 int
4961 main ()
4962 {
4963 FILE *f = fopen ("conftest.val", "w");
4964 if (!f)
4965   exit (1);
4966 fprintf (f, "%d", (sizeof (long long)));
4967 fclose (f);
4968   ;
4969   return 0;
4970 }
4971 _ACEOF
4972 rm -f conftest$ac_exeext
4973 if { (eval echo "$as_me:4973: \"$ac_link\"") >&5
4974   (eval $ac_link) 2>&5
4975   ac_status=$?
4976   echo "$as_me:4976: \$? = $ac_status" >&5
4977   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4978   { (eval echo "$as_me:4978: \"$ac_try\"") >&5
4979   (eval $ac_try) 2>&5
4980   ac_status=$?
4981   echo "$as_me:4981: \$? = $ac_status" >&5
4982   (exit $ac_status); }; }; then
4983   ac_cv_sizeof_long_long=`cat conftest.val`
4984 else
4985   echo "$as_me: program exited with status $ac_status" >&5
4986 echo "$as_me: failed program was:" >&5
4987 cat conftest.$ac_ext >&5
4988 fi
4989 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4990 fi
4991 fi
4992 rm -f conftest.val
4993 else
4994   ac_cv_sizeof_long_long=0
4995 fi
4996 fi
4997 echo "$as_me:4997: result: $ac_cv_sizeof_long_long" >&5
4998 echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
4999 cat >>confdefs.h <<EOF
5000 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
5001 EOF
5002
5003 type_name()
5004 {
5005     if expr "$ac_cv_sizeof_char" '>=' "$1" >/dev/null; then
5006         echo "char"
5007         exit
5008     fi
5009     if expr "$ac_cv_sizeof_short" '>=' "$1" >/dev/null; then
5010         echo "short"
5011         exit
5012     fi
5013     if expr "$ac_cv_sizeof_int" '>=' "$1" >/dev/null; then
5014         echo "int"
5015         exit
5016     fi
5017     if expr "$ac_cv_sizeof_long" '>=' "$1" >/dev/null; then
5018         echo "long"
5019         exit
5020     fi
5021     if expr "$ac_cv_sizeof_long_long" '>=' "$1" >/dev/null; then
5022         echo "long long"
5023         exit
5024     fi
5025     echo "long long"
5026 }
5027
5028 echo "$as_me:5028: checking type name for byte" >&5
5029 echo $ECHO_N "checking type name for byte... $ECHO_C" >&6
5030 TYPE_BYTE=`type_name 1`
5031 echo "$as_me:5031: result: $TYPE_BYTE" >&5
5032 echo "${ECHO_T}$TYPE_BYTE" >&6
5033 echo "$as_me:5033: checking type name for word" >&5
5034 echo $ECHO_N "checking type name for word... $ECHO_C" >&6
5035 TYPE_WORD=`type_name 2`
5036 echo "$as_me:5036: result: $TYPE_WORD" >&5
5037 echo "${ECHO_T}$TYPE_WORD" >&6
5038 echo "$as_me:5038: checking type name for dword" >&5
5039 echo $ECHO_N "checking type name for dword... $ECHO_C" >&6
5040 TYPE_DWORD=`type_name 4`
5041 echo "$as_me:5041: result: $TYPE_DWORD" >&5
5042 echo "${ECHO_T}$TYPE_DWORD" >&6
5043 cat >>confdefs.h <<EOF
5044 #define TYPE_BYTE $TYPE_BYTE
5045 EOF
5046
5047 cat >>confdefs.h <<EOF
5048 #define TYPE_WORD $TYPE_WORD
5049 EOF
5050
5051 cat >>confdefs.h <<EOF
5052 #define TYPE_DWORD $TYPE_DWORD
5053 EOF
5054
5055 # Generating output files
5056 # ===========================================================================
5057
5058 ac_config_files="$ac_config_files main.mk:main_in.mk sim.src/Makefile cmd.src/Makefile s51.src/Makefile avr.src/Makefile z80.src/Makefile gui.src/Makefile gui.src/serio.src/Makefile doc/Makefile"
5059 cat >confcache <<\_ACEOF
5060 # This file is a shell script that caches the results of configure
5061 # tests run on this system so they can be shared between configure
5062 # scripts and configure runs, see configure's option --config-cache.
5063 # It is not useful on other systems.  If it contains results you don't
5064 # want to keep, you may remove or edit it.
5065 #
5066 # config.status only pays attention to the cache file if you give it
5067 # the --recheck option to rerun configure.
5068 #
5069 # `ac_cv_env_foo' variables (set or unset) will be overriden when
5070 # loading this file, other *unset* `ac_cv_foo' will be assigned the
5071 # following values.
5072
5073 _ACEOF
5074
5075 # The following way of writing the cache mishandles newlines in values,
5076 # but we know of no workaround that is simple, portable, and efficient.
5077 # So, don't put newlines in cache variables' values.
5078 # Ultrix sh set writes to stderr and can't be redirected directly,
5079 # and sets the high bit in the cache file unless we assign to the vars.
5080 {
5081   (set) 2>&1 |
5082     case `(ac_space=' '; set | grep ac_space) 2>&1` in
5083     *ac_space=\ *)
5084       # `set' does not quote correctly, so add quotes (double-quote
5085       # substitution turns \\\\ into \\, and sed turns \\ into \).
5086       sed -n \
5087         "s/'/'\\\\''/g;
5088           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
5089       ;;
5090     *)
5091       # `set' quotes correctly as required by POSIX, so do not add quotes.
5092       sed -n \
5093         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
5094       ;;
5095     esac;
5096 } |
5097   sed '
5098      t clear
5099      : clear
5100      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
5101      t end
5102      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
5103      : end' >>confcache
5104 if cmp -s $cache_file confcache; then :; else
5105   if test -w $cache_file; then
5106     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
5107     cat confcache >$cache_file
5108   else
5109     echo "not updating unwritable cache $cache_file"
5110   fi
5111 fi
5112 rm -f confcache
5113
5114 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5115 # Let make expand exec_prefix.
5116 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5117
5118 # VPATH may cause trouble with some makes, so we remove $(srcdir),
5119 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
5120 # trailing colons and then remove the whole line if VPATH becomes empty
5121 # (actually we leave an empty line to preserve line numbers).
5122 if test "x$srcdir" = x.; then
5123   ac_vpsub='/^[         ]*VPATH[        ]*=/{
5124 s/:*\$(srcdir):*/:/;
5125 s/:*\${srcdir}:*/:/;
5126 s/:*@srcdir@:*/:/;
5127 s/^\([^=]*=[    ]*\):*/\1/;
5128 s/:*$//;
5129 s/^[^=]*=[      ]*$//;
5130 }'
5131 fi
5132
5133 DEFS=-DHAVE_CONFIG_H
5134
5135 : ${CONFIG_STATUS=./config.status}
5136 ac_clean_files_save=$ac_clean_files
5137 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
5138 { echo "$as_me:5138: creating $CONFIG_STATUS" >&5
5139 echo "$as_me: creating $CONFIG_STATUS" >&6;}
5140 cat >$CONFIG_STATUS <<_ACEOF
5141 #! $SHELL
5142 # Generated automatically by configure.
5143 # Run this file to recreate the current configuration.
5144 # Compiler output produced by configure, useful for debugging
5145 # configure, is in config.log if it exists.
5146
5147 debug=false
5148 SHELL=\${CONFIG_SHELL-$SHELL}
5149 ac_cs_invocation="\$0 \$@"
5150
5151 _ACEOF
5152
5153 cat >>$CONFIG_STATUS <<\_ACEOF
5154 # Be Bourne compatible
5155 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
5156   emulate sh
5157   NULLCMD=:
5158 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
5159   set -o posix
5160 fi
5161
5162 # Name of the executable.
5163 as_me=`echo "$0" |sed 's,.*[\\/],,'`
5164
5165 if expr a : '\(a\)' >/dev/null 2>&1; then
5166   as_expr=expr
5167 else
5168   as_expr=false
5169 fi
5170
5171 rm -f conf$$ conf$$.exe conf$$.file
5172 echo >conf$$.file
5173 if ln -s conf$$.file conf$$ 2>/dev/null; then
5174   # We could just check for DJGPP; but this test a) works b) is more generic
5175   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
5176   if test -f conf$$.exe; then
5177     # Don't use ln at all; we don't have any links
5178     as_ln_s='cp -p'
5179   else
5180     as_ln_s='ln -s'
5181   fi
5182 elif ln conf$$.file conf$$ 2>/dev/null; then
5183   as_ln_s=ln
5184 else
5185   as_ln_s='cp -p'
5186 fi
5187 rm -f conf$$ conf$$.exe conf$$.file
5188
5189 as_executable_p="test -f"
5190
5191 # Support unset when possible.
5192 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
5193   as_unset=unset
5194 else
5195   as_unset=false
5196 fi
5197
5198 # NLS nuisances.
5199 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
5200 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
5201 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
5202 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
5203 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
5204 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
5205 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
5206 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
5207
5208 # IFS
5209 # We need space, tab and new line, in precisely that order.
5210 as_nl='
5211 '
5212 IFS="   $as_nl"
5213
5214 # CDPATH.
5215 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
5216
5217 exec 6>&1
5218
5219 _ACEOF
5220
5221 # Files that config.status was made for.
5222 if test -n "$ac_config_files"; then
5223   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
5224 fi
5225
5226 if test -n "$ac_config_headers"; then
5227   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
5228 fi
5229
5230 if test -n "$ac_config_links"; then
5231   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
5232 fi
5233
5234 if test -n "$ac_config_commands"; then
5235   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
5236 fi
5237
5238 cat >>$CONFIG_STATUS <<\EOF
5239
5240 ac_cs_usage="\
5241 \`$as_me' instantiates files from templates according to the
5242 current configuration.
5243
5244 Usage: $0 [OPTIONS] [FILE]...
5245
5246   -h, --help       print this help, then exit
5247   -V, --version    print version number, then exit
5248   -d, --debug      don't remove temporary files
5249       --recheck    update $as_me by reconfiguring in the same conditions
5250   --file=FILE[:TEMPLATE]
5251                    instantiate the configuration file FILE
5252   --header=FILE[:TEMPLATE]
5253                    instantiate the configuration header FILE
5254
5255 Configuration files:
5256 $config_files
5257
5258 Configuration headers:
5259 $config_headers
5260
5261 Report bugs to <bug-autoconf@gnu.org>."
5262 EOF
5263
5264 cat >>$CONFIG_STATUS <<EOF
5265 ac_cs_version="\\
5266 config.status
5267 configured by $0, generated by GNU Autoconf 2.52,
5268   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
5269
5270 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
5271 Free Software Foundation, Inc.
5272 This config.status script is free software; the Free Software Foundation
5273 gives unlimited permission to copy, distribute and modify it."
5274 srcdir=$srcdir
5275 INSTALL="$INSTALL"
5276 EOF
5277
5278 cat >>$CONFIG_STATUS <<\EOF
5279 # If no file are specified by the user, then we need to provide default
5280 # value.  By we need to know if files were specified by the user.
5281 ac_need_defaults=:
5282 while test $# != 0
5283 do
5284   case $1 in
5285   --*=*)
5286     ac_option=`expr "x$1" : 'x\([^=]*\)='`
5287     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
5288     shift
5289     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
5290     shift
5291     ;;
5292   -*);;
5293   *) # This is not an option, so the user has probably given explicit
5294      # arguments.
5295      ac_need_defaults=false;;
5296   esac
5297
5298   case $1 in
5299   # Handling of the options.
5300 EOF
5301 cat >>$CONFIG_STATUS <<EOF
5302   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5303     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
5304     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
5305 EOF
5306 cat >>$CONFIG_STATUS <<\EOF
5307   --version | --vers* | -V )
5308     echo "$ac_cs_version"; exit 0 ;;
5309   --he | --h)
5310     # Conflict between --help and --header
5311     { { echo "$as_me:5311: error: ambiguous option: $1
5312 Try \`$0 --help' for more information." >&5
5313 echo "$as_me: error: ambiguous option: $1
5314 Try \`$0 --help' for more information." >&2;}
5315    { (exit 1); exit 1; }; };;
5316   --help | --hel | -h )
5317     echo "$ac_cs_usage"; exit 0 ;;
5318   --debug | --d* | -d )
5319     debug=: ;;
5320   --file | --fil | --fi | --f )
5321     shift
5322     CONFIG_FILES="$CONFIG_FILES $1"
5323     ac_need_defaults=false;;
5324   --header | --heade | --head | --hea )
5325     shift
5326     CONFIG_HEADERS="$CONFIG_HEADERS $1"
5327     ac_need_defaults=false;;
5328
5329   # This is an error.
5330   -*) { { echo "$as_me:5330: error: unrecognized option: $1
5331 Try \`$0 --help' for more information." >&5
5332 echo "$as_me: error: unrecognized option: $1
5333 Try \`$0 --help' for more information." >&2;}
5334    { (exit 1); exit 1; }; } ;;
5335
5336   *) ac_config_targets="$ac_config_targets $1" ;;
5337
5338   esac
5339   shift
5340 done
5341
5342 exec 5>>config.log
5343 cat >&5 << _ACEOF
5344
5345 ## ----------------------- ##
5346 ## Running config.status.  ##
5347 ## ----------------------- ##
5348
5349 This file was extended by $as_me 2.52, executed with
5350   CONFIG_FILES    = $CONFIG_FILES
5351   CONFIG_HEADERS  = $CONFIG_HEADERS
5352   CONFIG_LINKS    = $CONFIG_LINKS
5353   CONFIG_COMMANDS = $CONFIG_COMMANDS
5354   > $ac_cs_invocation
5355 on `(hostname || uname -n) 2>/dev/null | sed 1q`
5356
5357 _ACEOF
5358 EOF
5359
5360 cat >>$CONFIG_STATUS <<\EOF
5361 for ac_config_target in $ac_config_targets
5362 do
5363   case "$ac_config_target" in
5364   # Handling of arguments.
5365   "main.mk" ) CONFIG_FILES="$CONFIG_FILES main.mk:main_in.mk" ;;
5366   "sim.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES sim.src/Makefile" ;;
5367   "cmd.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES cmd.src/Makefile" ;;
5368   "s51.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES s51.src/Makefile" ;;
5369   "avr.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES avr.src/Makefile" ;;
5370   "z80.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES z80.src/Makefile" ;;
5371   "gui.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES gui.src/Makefile" ;;
5372   "gui.src/serio.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES gui.src/serio.src/Makefile" ;;
5373   "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
5374   "ddconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ddconfig.h:ddconfig_in.h" ;;
5375   *) { { echo "$as_me:5375: error: invalid argument: $ac_config_target" >&5
5376 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
5377    { (exit 1); exit 1; }; };;
5378   esac
5379 done
5380
5381 # If the user did not use the arguments to specify the items to instantiate,
5382 # then the envvar interface is used.  Set only those that are not.
5383 # We use the long form for the default assignment because of an extremely
5384 # bizarre bug on SunOS 4.1.3.
5385 if $ac_need_defaults; then
5386   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
5387   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
5388 fi
5389
5390 # Create a temporary directory, and hook for its removal unless debugging.
5391 $debug ||
5392 {
5393   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
5394   trap '{ (exit 1); exit 1; }' 1 2 13 15
5395 }
5396
5397 # Create a (secure) tmp directory for tmp files.
5398 : ${TMPDIR=/tmp}
5399 {
5400   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
5401   test -n "$tmp" && test -d "$tmp"
5402 }  ||
5403 {
5404   tmp=$TMPDIR/cs$$-$RANDOM
5405   (umask 077 && mkdir $tmp)
5406 } ||
5407 {
5408    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
5409    { (exit 1); exit 1; }
5410 }
5411
5412 EOF
5413
5414 cat >>$CONFIG_STATUS <<EOF
5415
5416 #
5417 # CONFIG_FILES section.
5418 #
5419
5420 # No need to generate the scripts if there are no CONFIG_FILES.
5421 # This happens for instance when ./config.status config.h
5422 if test -n "\$CONFIG_FILES"; then
5423   # Protect against being on the right side of a sed subst in config.status.
5424   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
5425    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
5426 s,@SHELL@,$SHELL,;t t
5427 s,@exec_prefix@,$exec_prefix,;t t
5428 s,@prefix@,$prefix,;t t
5429 s,@program_transform_name@,$program_transform_name,;t t
5430 s,@bindir@,$bindir,;t t
5431 s,@sbindir@,$sbindir,;t t
5432 s,@libexecdir@,$libexecdir,;t t
5433 s,@datadir@,$datadir,;t t
5434 s,@sysconfdir@,$sysconfdir,;t t
5435 s,@sharedstatedir@,$sharedstatedir,;t t
5436 s,@localstatedir@,$localstatedir,;t t
5437 s,@libdir@,$libdir,;t t
5438 s,@includedir@,$includedir,;t t
5439 s,@oldincludedir@,$oldincludedir,;t t
5440 s,@infodir@,$infodir,;t t
5441 s,@mandir@,$mandir,;t t
5442 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
5443 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
5444 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
5445 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
5446 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
5447 s,@build_alias@,$build_alias,;t t
5448 s,@host_alias@,$host_alias,;t t
5449 s,@target_alias@,$target_alias,;t t
5450 s,@ECHO_C@,$ECHO_C,;t t
5451 s,@ECHO_N@,$ECHO_N,;t t
5452 s,@ECHO_T@,$ECHO_T,;t t
5453 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
5454 s,@DEFS@,$DEFS,;t t
5455 s,@LIBS@,$LIBS,;t t
5456 s,@AWK@,$AWK,;t t
5457 s,@VERSION@,$VERSION,;t t
5458 s,@VERSIONHI@,$VERSIONHI,;t t
5459 s,@VERSIONLO@,$VERSIONLO,;t t
5460 s,@VERSIONP@,$VERSIONP,;t t
5461 s,@CXX@,$CXX,;t t
5462 s,@CXXFLAGS@,$CXXFLAGS,;t t
5463 s,@LDFLAGS@,$LDFLAGS,;t t
5464 s,@CPPFLAGS@,$CPPFLAGS,;t t
5465 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
5466 s,@EXEEXT@,$EXEEXT,;t t
5467 s,@OBJEXT@,$OBJEXT,;t t
5468 s,@CXXCPP@,$CXXCPP,;t t
5469 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
5470 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
5471 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
5472 s,@RANLIB@,$RANLIB,;t t
5473 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
5474 s,@dl_ok@,$dl_ok,;t t
5475 s,@DL@,$DL,;t t
5476 s,@panel_ok@,$panel_ok,;t t
5477 s,@curses_ok@,$curses_ok,;t t
5478 s,@CURSES_LIBS@,$CURSES_LIBS,;t t
5479 s,@M_OR_MM@,$M_OR_MM,;t t
5480 s,@SHAREDLIB@,$SHAREDLIB,;t t
5481 s,@PICOPT@,$PICOPT,;t t
5482 CEOF
5483
5484 EOF
5485
5486   cat >>$CONFIG_STATUS <<\EOF
5487   # Split the substitutions into bite-sized pieces for seds with
5488   # small command number limits, like on Digital OSF/1 and HP-UX.
5489   ac_max_sed_lines=48
5490   ac_sed_frag=1 # Number of current file.
5491   ac_beg=1 # First line for current file.
5492   ac_end=$ac_max_sed_lines # Line after last line for current file.
5493   ac_more_lines=:
5494   ac_sed_cmds=
5495   while $ac_more_lines; do
5496     if test $ac_beg -gt 1; then
5497       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
5498     else
5499       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
5500     fi
5501     if test ! -s $tmp/subs.frag; then
5502       ac_more_lines=false
5503     else
5504       # The purpose of the label and of the branching condition is to
5505       # speed up the sed processing (if there are no `@' at all, there
5506       # is no need to browse any of the substitutions).
5507       # These are the two extra sed commands mentioned above.
5508       (echo ':t
5509   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
5510       if test -z "$ac_sed_cmds"; then
5511         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
5512       else
5513         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
5514       fi
5515       ac_sed_frag=`expr $ac_sed_frag + 1`
5516       ac_beg=$ac_end
5517       ac_end=`expr $ac_end + $ac_max_sed_lines`
5518     fi
5519   done
5520   if test -z "$ac_sed_cmds"; then
5521     ac_sed_cmds=cat
5522   fi
5523 fi # test -n "$CONFIG_FILES"
5524
5525 EOF
5526 cat >>$CONFIG_STATUS <<\EOF
5527 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
5528   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5529   case $ac_file in
5530   - | *:- | *:-:* ) # input from stdin
5531         cat >$tmp/stdin
5532         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
5533         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
5534   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
5535         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
5536   * )   ac_file_in=$ac_file.in ;;
5537   esac
5538
5539   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
5540   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
5541          X"$ac_file" : 'X\(//\)[^/]' \| \
5542          X"$ac_file" : 'X\(//\)$' \| \
5543          X"$ac_file" : 'X\(/\)' \| \
5544          .     : '\(.\)' 2>/dev/null ||
5545 echo X"$ac_file" |
5546     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
5547           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
5548           /^X\(\/\/\)$/{ s//\1/; q; }
5549           /^X\(\/\).*/{ s//\1/; q; }
5550           s/.*/./; q'`
5551   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5552     { case "$ac_dir" in
5553   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
5554   *)                      as_incr_dir=.;;
5555 esac
5556 as_dummy="$ac_dir"
5557 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
5558   case $as_mkdir_dir in
5559     # Skip DOS drivespec
5560     ?:) as_incr_dir=$as_mkdir_dir ;;
5561     *)
5562       as_incr_dir=$as_incr_dir/$as_mkdir_dir
5563       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
5564     ;;
5565   esac
5566 done; }
5567
5568     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
5569     # A "../" for each directory in $ac_dir_suffix.
5570     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
5571   else
5572     ac_dir_suffix= ac_dots=
5573   fi
5574
5575   case $srcdir in
5576   .)  ac_srcdir=.
5577       if test -z "$ac_dots"; then
5578          ac_top_srcdir=.
5579       else
5580          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
5581       fi ;;
5582   [\\/]* | ?:[\\/]* )
5583       ac_srcdir=$srcdir$ac_dir_suffix;
5584       ac_top_srcdir=$srcdir ;;
5585   *) # Relative path.
5586     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
5587     ac_top_srcdir=$ac_dots$srcdir ;;
5588   esac
5589
5590   case $INSTALL in
5591   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
5592   *) ac_INSTALL=$ac_dots$INSTALL ;;
5593   esac
5594
5595   if test x"$ac_file" != x-; then
5596     { echo "$as_me:5596: creating $ac_file" >&5
5597 echo "$as_me: creating $ac_file" >&6;}
5598     rm -f "$ac_file"
5599   fi
5600   # Let's still pretend it is `configure' which instantiates (i.e., don't
5601   # use $as_me), people would be surprised to read:
5602   #    /* config.h.  Generated automatically by config.status.  */
5603   configure_input="Generated automatically from `echo $ac_file_in |
5604                                                  sed 's,.*/,,'` by configure."
5605
5606   # First look for the input files in the build tree, otherwise in the
5607   # src tree.
5608   ac_file_inputs=`IFS=:
5609     for f in $ac_file_in; do
5610       case $f in
5611       -) echo $tmp/stdin ;;
5612       [\\/$]*)
5613          # Absolute (can't be DOS-style, as IFS=:)
5614          test -f "$f" || { { echo "$as_me:5614: error: cannot find input file: $f" >&5
5615 echo "$as_me: error: cannot find input file: $f" >&2;}
5616    { (exit 1); exit 1; }; }
5617          echo $f;;
5618       *) # Relative
5619          if test -f "$f"; then
5620            # Build tree
5621            echo $f
5622          elif test -f "$srcdir/$f"; then
5623            # Source tree
5624            echo $srcdir/$f
5625          else
5626            # /dev/null tree
5627            { { echo "$as_me:5627: error: cannot find input file: $f" >&5
5628 echo "$as_me: error: cannot find input file: $f" >&2;}
5629    { (exit 1); exit 1; }; }
5630          fi;;
5631       esac
5632     done` || { (exit 1); exit 1; }
5633 EOF
5634 cat >>$CONFIG_STATUS <<EOF
5635   sed "$ac_vpsub
5636 $extrasub
5637 EOF
5638 cat >>$CONFIG_STATUS <<\EOF
5639 :t
5640 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
5641 s,@configure_input@,$configure_input,;t t
5642 s,@srcdir@,$ac_srcdir,;t t
5643 s,@top_srcdir@,$ac_top_srcdir,;t t
5644 s,@INSTALL@,$ac_INSTALL,;t t
5645 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
5646   rm -f $tmp/stdin
5647   if test x"$ac_file" != x-; then
5648     mv $tmp/out $ac_file
5649   else
5650     cat $tmp/out
5651     rm -f $tmp/out
5652   fi
5653
5654 done
5655 EOF
5656 cat >>$CONFIG_STATUS <<\EOF
5657
5658 #
5659 # CONFIG_HEADER section.
5660 #
5661
5662 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5663 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5664 #
5665 # ac_d sets the value in "#define NAME VALUE" lines.
5666 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5667 ac_dB='[        ].*$,\1#\2'
5668 ac_dC=' '
5669 ac_dD=',;t'
5670 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5671 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5672 ac_uB='$,\1#\2define\3'
5673 ac_uC=' '
5674 ac_uD=',;t'
5675
5676 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
5677   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5678   case $ac_file in
5679   - | *:- | *:-:* ) # input from stdin
5680         cat >$tmp/stdin
5681         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
5682         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
5683   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
5684         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
5685   * )   ac_file_in=$ac_file.in ;;
5686   esac
5687
5688   test x"$ac_file" != x- && { echo "$as_me:5688: creating $ac_file" >&5
5689 echo "$as_me: creating $ac_file" >&6;}
5690
5691   # First look for the input files in the build tree, otherwise in the
5692   # src tree.
5693   ac_file_inputs=`IFS=:
5694     for f in $ac_file_in; do
5695       case $f in
5696       -) echo $tmp/stdin ;;
5697       [\\/$]*)
5698          # Absolute (can't be DOS-style, as IFS=:)
5699          test -f "$f" || { { echo "$as_me:5699: error: cannot find input file: $f" >&5
5700 echo "$as_me: error: cannot find input file: $f" >&2;}
5701    { (exit 1); exit 1; }; }
5702          echo $f;;
5703       *) # Relative
5704          if test -f "$f"; then
5705            # Build tree
5706            echo $f
5707          elif test -f "$srcdir/$f"; then
5708            # Source tree
5709            echo $srcdir/$f
5710          else
5711            # /dev/null tree
5712            { { echo "$as_me:5712: error: cannot find input file: $f" >&5
5713 echo "$as_me: error: cannot find input file: $f" >&2;}
5714    { (exit 1); exit 1; }; }
5715          fi;;
5716       esac
5717     done` || { (exit 1); exit 1; }
5718   # Remove the trailing spaces.
5719   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
5720
5721 EOF
5722
5723 # Transform confdefs.h into two sed scripts, `conftest.defines' and
5724 # `conftest.undefs', that substitutes the proper values into
5725 # config.h.in to produce config.h.  The first handles `#define'
5726 # templates, and the second `#undef' templates.
5727 # And first: Protect against being on the right side of a sed subst in
5728 # config.status.  Protect against being in an unquoted here document
5729 # in config.status.
5730 rm -f conftest.defines conftest.undefs
5731 # Using a here document instead of a string reduces the quoting nightmare.
5732 # Putting comments in sed scripts is not portable.
5733 #
5734 # `end' is used to avoid that the second main sed command (meant for
5735 # 0-ary CPP macros) applies to n-ary macro definitions.
5736 # See the Autoconf documentation for `clear'.
5737 cat >confdef2sed.sed <<\EOF
5738 s/[\\&,]/\\&/g
5739 s,[\\$`],\\&,g
5740 t clear
5741 : clear
5742 s,^[    ]*#[    ]*define[       ][      ]*\(\([^        (][^    (]*\)([^)]*)\)[         ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
5743 t end
5744 s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
5745 : end
5746 EOF
5747 # If some macros were called several times there might be several times
5748 # the same #defines, which is useless.  Nevertheless, we may not want to
5749 # sort them, since we want the *last* AC-DEFINE to be honored.
5750 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
5751 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
5752 rm -f confdef2sed.sed
5753
5754 # This sed command replaces #undef with comments.  This is necessary, for
5755 # example, in the case of _POSIX_SOURCE, which is predefined and required
5756 # on some systems where configure will not decide to define it.
5757 cat >>conftest.undefs <<\EOF
5758 s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
5759 EOF
5760
5761 # Break up conftest.defines because some shells have a limit on the size
5762 # of here documents, and old seds have small limits too (100 cmds).
5763 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
5764 echo '  if egrep "^[    ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
5765 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
5766 echo '  :' >>$CONFIG_STATUS
5767 rm -f conftest.tail
5768 while grep . conftest.defines >/dev/null
5769 do
5770   # Write a limited-size here document to $tmp/defines.sed.
5771   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
5772   # Speed up: don't consider the non `#define' lines.
5773   echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
5774   # Work around the forget-to-reset-the-flag bug.
5775   echo 't clr' >>$CONFIG_STATUS
5776   echo ': clr' >>$CONFIG_STATUS
5777   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
5778   echo 'CEOF
5779   sed -f $tmp/defines.sed $tmp/in >$tmp/out
5780   rm -f $tmp/in
5781   mv $tmp/out $tmp/in
5782 ' >>$CONFIG_STATUS
5783   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
5784   rm -f conftest.defines
5785   mv conftest.tail conftest.defines
5786 done
5787 rm -f conftest.defines
5788 echo '  fi # egrep' >>$CONFIG_STATUS
5789 echo >>$CONFIG_STATUS
5790
5791 # Break up conftest.undefs because some shells have a limit on the size
5792 # of here documents, and old seds have small limits too (100 cmds).
5793 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
5794 rm -f conftest.tail
5795 while grep . conftest.undefs >/dev/null
5796 do
5797   # Write a limited-size here document to $tmp/undefs.sed.
5798   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
5799   # Speed up: don't consider the non `#undef'
5800   echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
5801   # Work around the forget-to-reset-the-flag bug.
5802   echo 't clr' >>$CONFIG_STATUS
5803   echo ': clr' >>$CONFIG_STATUS
5804   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
5805   echo 'CEOF
5806   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
5807   rm -f $tmp/in
5808   mv $tmp/out $tmp/in
5809 ' >>$CONFIG_STATUS
5810   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
5811   rm -f conftest.undefs
5812   mv conftest.tail conftest.undefs
5813 done
5814 rm -f conftest.undefs
5815
5816 cat >>$CONFIG_STATUS <<\EOF
5817   # Let's still pretend it is `configure' which instantiates (i.e., don't
5818   # use $as_me), people would be surprised to read:
5819   #    /* config.h.  Generated automatically by config.status.  */
5820   if test x"$ac_file" = x-; then
5821     echo "/* Generated automatically by configure.  */" >$tmp/config.h
5822   else
5823     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
5824   fi
5825   cat $tmp/in >>$tmp/config.h
5826   rm -f $tmp/in
5827   if test x"$ac_file" != x-; then
5828     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
5829       { echo "$as_me:5829: $ac_file is unchanged" >&5
5830 echo "$as_me: $ac_file is unchanged" >&6;}
5831     else
5832       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
5833          X"$ac_file" : 'X\(//\)[^/]' \| \
5834          X"$ac_file" : 'X\(//\)$' \| \
5835          X"$ac_file" : 'X\(/\)' \| \
5836          .     : '\(.\)' 2>/dev/null ||
5837 echo X"$ac_file" |
5838     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
5839           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
5840           /^X\(\/\/\)$/{ s//\1/; q; }
5841           /^X\(\/\).*/{ s//\1/; q; }
5842           s/.*/./; q'`
5843       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5844         { case "$ac_dir" in
5845   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
5846   *)                      as_incr_dir=.;;
5847 esac
5848 as_dummy="$ac_dir"
5849 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
5850   case $as_mkdir_dir in
5851     # Skip DOS drivespec
5852     ?:) as_incr_dir=$as_mkdir_dir ;;
5853     *)
5854       as_incr_dir=$as_incr_dir/$as_mkdir_dir
5855       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
5856     ;;
5857   esac
5858 done; }
5859
5860       fi
5861       rm -f $ac_file
5862       mv $tmp/config.h $ac_file
5863     fi
5864   else
5865     cat $tmp/config.h
5866     rm -f $tmp/config.h
5867   fi
5868 done
5869 EOF
5870
5871 cat >>$CONFIG_STATUS <<\EOF
5872
5873 { (exit 0); exit 0; }
5874 EOF
5875 chmod +x $CONFIG_STATUS
5876 ac_clean_files=$ac_clean_files_save
5877
5878 # configure is writing to config.log, and then calls config.status.
5879 # config.status does its own redirection, appending to config.log.
5880 # Unfortunately, on DOS this fails, as config.log is still kept open
5881 # by configure, so config.status won't be able to write to it; its
5882 # output is simply discarded.  So we exec the FD to /dev/null,
5883 # effectively closing config.log, so it can be properly (re)opened and
5884 # appended to by config.status.  When coming back to configure, we
5885 # need to make the FD available again.
5886 if test "$no_create" != yes; then
5887   ac_cs_success=:
5888   exec 5>/dev/null
5889   $SHELL $CONFIG_STATUS || ac_cs_success=false
5890   exec 5>>config.log
5891   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
5892   # would make configure fail if this is the last instruction.
5893   $ac_cs_success || { (exit 1); exit 1; }
5894 fi
5895
5896 #gui.src/portmon.src/Makefile
5897
5898 # End of configure/configure.in