* src/configure.in: check for endianess (even while cross-compiling)
[fw/sdcc] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.54.
4 #
5 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
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 ## M4sh Initialization.  ##
11 ## --------------------- ##
12
13 # Be Bourne compatible
14 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15   emulate sh
16   NULLCMD=:
17   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18   # is contrary to our usage.  Disable this feature.
19   alias -g '${1+"$@"}'='"$@"'
20 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21   set -o posix
22 fi
23
24 # Support unset when possible.
25 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26   as_unset=unset
27 else
28   as_unset=false
29 fi
30
31
32 # Work around bugs in pre-3.0 UWIN ksh.
33 $as_unset ENV MAIL MAILPATH
34 PS1='$ '
35 PS2='> '
36 PS4='+ '
37
38 # NLS nuisances.
39 for as_var in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME
40 do
41   if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
42     eval $as_var=C; export $as_var
43   else
44     $as_unset $as_var
45   fi
46 done
47
48 # Required to use basename.
49 if expr a : '\(a\)' >/dev/null 2>&1; then
50   as_expr=expr
51 else
52   as_expr=false
53 fi
54
55 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
56   as_basename=basename
57 else
58   as_basename=false
59 fi
60
61
62 # Name of the executable.
63 as_me=`$as_basename "$0" ||
64 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
65          X"$0" : 'X\(//\)$' \| \
66          X"$0" : 'X\(/\)$' \| \
67          .     : '\(.\)' 2>/dev/null ||
68 echo X/"$0" |
69     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
70           /^X\/\(\/\/\)$/{ s//\1/; q; }
71           /^X\/\(\/\).*/{ s//\1/; q; }
72           s/.*/./; q'`
73
74
75 # PATH needs CR, and LINENO needs CR and PATH.
76 # Avoid depending upon Character Ranges.
77 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
78 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
79 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
80 as_cr_digits='0123456789'
81 as_cr_alnum=$as_cr_Letters$as_cr_digits
82
83 # The user is always right.
84 if test "${PATH_SEPARATOR+set}" != set; then
85   echo "#! /bin/sh" >conftest.sh
86   echo  "exit 0"   >>conftest.sh
87   chmod +x conftest.sh
88   if (PATH="/nonexistent;."; conftest.sh) >/dev/null 2>&1; then
89     PATH_SEPARATOR=';'
90   else
91     PATH_SEPARATOR=:
92   fi
93   rm -f conftest.sh
94 fi
95
96
97   as_lineno_1=$LINENO
98   as_lineno_2=$LINENO
99   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
100   test "x$as_lineno_1" != "x$as_lineno_2" &&
101   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
102   # Find who we are.  Look in the path if we contain no path at all
103   # relative or not.
104   case $0 in
105     *[\\/]* ) as_myself=$0 ;;
106     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
107 for as_dir in $PATH
108 do
109   IFS=$as_save_IFS
110   test -z "$as_dir" && as_dir=.
111   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
112 done
113
114        ;;
115   esac
116   # We did not find ourselves, most probably we were run as `sh COMMAND'
117   # in which case we are not to be found in the path.
118   if test "x$as_myself" = x; then
119     as_myself=$0
120   fi
121   if test ! -f "$as_myself"; then
122     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
123    { (exit 1); exit 1; }; }
124   fi
125   case $CONFIG_SHELL in
126   '')
127     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
128 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
129 do
130   IFS=$as_save_IFS
131   test -z "$as_dir" && as_dir=.
132   for as_base in sh bash ksh sh5; do
133          case $as_dir in
134          /*)
135            if ("$as_dir/$as_base" -c '
136   as_lineno_1=$LINENO
137   as_lineno_2=$LINENO
138   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
139   test "x$as_lineno_1" != "x$as_lineno_2" &&
140   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
141              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
142              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
143              CONFIG_SHELL=$as_dir/$as_base
144              export CONFIG_SHELL
145              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
146            fi;;
147          esac
148        done
149 done
150 ;;
151   esac
152
153   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
154   # uniformly replaced by the line number.  The first 'sed' inserts a
155   # line-number line before each line; the second 'sed' does the real
156   # work.  The second script uses 'N' to pair each line-number line
157   # with the numbered line, and appends trailing '-' during
158   # substitution so that $LINENO is not a special case at line end.
159   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
160   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
161   sed '=' <$as_myself |
162     sed '
163       N
164       s,$,-,
165       : loop
166       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
167       t loop
168       s,-$,,
169       s,^['$as_cr_digits']*\n,,
170     ' >$as_me.lineno &&
171   chmod +x $as_me.lineno ||
172     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
173    { (exit 1); exit 1; }; }
174
175   # Don't try to exec as it changes $[0], causing all sort of problems
176   # (the dirname of $[0] is not the place where we might find the
177   # original and so on.  Autoconf is especially sensible to this).
178   . ./$as_me.lineno
179   # Exit status is that of the last command.
180   exit
181 }
182
183
184 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
185   *c*,-n*) ECHO_N= ECHO_C='
186 ' ECHO_T='      ' ;;
187   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
188   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
189 esac
190
191 if expr a : '\(a\)' >/dev/null 2>&1; then
192   as_expr=expr
193 else
194   as_expr=false
195 fi
196
197 rm -f conf$$ conf$$.exe conf$$.file
198 echo >conf$$.file
199 if ln -s conf$$.file conf$$ 2>/dev/null; then
200   # We could just check for DJGPP; but this test a) works b) is more generic
201   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
202   if test -f conf$$.exe; then
203     # Don't use ln at all; we don't have any links
204     as_ln_s='cp -p'
205   else
206     as_ln_s='ln -s'
207   fi
208 elif ln conf$$.file conf$$ 2>/dev/null; then
209   as_ln_s=ln
210 else
211   as_ln_s='cp -p'
212 fi
213 rm -f conf$$ conf$$.exe conf$$.file
214
215 if mkdir -p . 2>/dev/null; then
216   as_mkdir_p=:
217 else
218   as_mkdir_p=false
219 fi
220
221 as_executable_p="test -f"
222
223 # Sed expression to map a string onto a valid CPP name.
224 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
225
226 # Sed expression to map a string onto a valid variable name.
227 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
228
229
230 # IFS
231 # We need space, tab and new line, in precisely that order.
232 as_nl='
233 '
234 IFS="   $as_nl"
235
236 # CDPATH.
237 $as_unset CDPATH
238
239
240 # Name of the host.
241 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
242 # so uname gets run too.
243 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
244
245 exec 6>&1
246
247 #
248 # Initializations.
249 #
250 ac_default_prefix=/usr/local
251 ac_config_libobj_dir=.
252 cross_compiling=no
253 subdirs=
254 MFLAGS=
255 MAKEFLAGS=
256 SHELL=${CONFIG_SHELL-/bin/sh}
257
258 # Maximum number of lines to put in a shell here document.
259 # This variable seems obsolete.  It should probably be removed, and
260 # only ac_max_sed_lines should be used.
261 : ${ac_max_here_lines=38}
262
263 # Identity of this package.
264 PACKAGE_NAME=
265 PACKAGE_TARNAME=
266 PACKAGE_VERSION=
267 PACKAGE_STRING=
268 PACKAGE_BUGREPORT=
269
270 ac_unique_file="Makefile"
271 # Factoring default headers for most tests.
272 ac_includes_default="\
273 #include <stdio.h>
274 #if HAVE_SYS_TYPES_H
275 # include <sys/types.h>
276 #endif
277 #if HAVE_SYS_STAT_H
278 # include <sys/stat.h>
279 #endif
280 #if STDC_HEADERS
281 # include <stdlib.h>
282 # include <stddef.h>
283 #else
284 # if HAVE_STDLIB_H
285 #  include <stdlib.h>
286 # endif
287 #endif
288 #if HAVE_STRING_H
289 # if !STDC_HEADERS && HAVE_MEMORY_H
290 #  include <memory.h>
291 # endif
292 # include <string.h>
293 #endif
294 #if HAVE_STRINGS_H
295 # include <strings.h>
296 #endif
297 #if HAVE_INTTYPES_H
298 # include <inttypes.h>
299 #else
300 # if HAVE_STDINT_H
301 #  include <stdint.h>
302 # endif
303 #endif
304 #if HAVE_UNISTD_H
305 # include <unistd.h>
306 #endif"
307
308 ac_subdirs_all="$ac_subdirs_all support/cpp2"
309 ac_subdirs_all="$ac_subdirs_all packihx"
310 ac_subdirs_all="$ac_subdirs_all sim/ucsim"
311 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS AWK VERSION VERSIONHI VERSIONLO VERSIONP CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB LEX LEXLIB LEX_OUTPUT_ROOT YACC AUTOCONF STRIP AS CP EGREP M_OR_MM sdcc_datadir OPT_ENABLE_UCSIM OPT_ENABLE_DEVICE_LIB_BUILD OPT_ENABLE_PACKIHX subdirs LIBOBJS LTLIBOBJS'
312 ac_subst_files=''
313
314 # Initialize some variables set by options.
315 ac_init_help=
316 ac_init_version=false
317 # The variables have the same names as the options, with
318 # dashes changed to underlines.
319 cache_file=/dev/null
320 exec_prefix=NONE
321 no_create=
322 no_recursion=
323 prefix=NONE
324 program_prefix=NONE
325 program_suffix=NONE
326 program_transform_name=s,x,x,
327 silent=
328 site=
329 srcdir=
330 verbose=
331 x_includes=NONE
332 x_libraries=NONE
333
334 # Installation directory options.
335 # These are left unexpanded so users can "make install exec_prefix=/foo"
336 # and all the variables that are supposed to be based on exec_prefix
337 # by default will actually change.
338 # Use braces instead of parens because sh, perl, etc. also accept them.
339 bindir='${exec_prefix}/bin'
340 sbindir='${exec_prefix}/sbin'
341 libexecdir='${exec_prefix}/libexec'
342 datadir='${prefix}/share'
343 sysconfdir='${prefix}/etc'
344 sharedstatedir='${prefix}/com'
345 localstatedir='${prefix}/var'
346 libdir='${exec_prefix}/lib'
347 includedir='${prefix}/include'
348 oldincludedir='/usr/include'
349 infodir='${prefix}/info'
350 mandir='${prefix}/man'
351
352 ac_prev=
353 for ac_option
354 do
355   # If the previous option needs an argument, assign it.
356   if test -n "$ac_prev"; then
357     eval "$ac_prev=\$ac_option"
358     ac_prev=
359     continue
360   fi
361
362   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
363
364   # Accept the important Cygnus configure options, so we can diagnose typos.
365
366   case $ac_option in
367
368   -bindir | --bindir | --bindi | --bind | --bin | --bi)
369     ac_prev=bindir ;;
370   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
371     bindir=$ac_optarg ;;
372
373   -build | --build | --buil | --bui | --bu)
374     ac_prev=build_alias ;;
375   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
376     build_alias=$ac_optarg ;;
377
378   -cache-file | --cache-file | --cache-fil | --cache-fi \
379   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
380     ac_prev=cache_file ;;
381   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
382   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
383     cache_file=$ac_optarg ;;
384
385   --config-cache | -C)
386     cache_file=config.cache ;;
387
388   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
389     ac_prev=datadir ;;
390   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
391   | --da=*)
392     datadir=$ac_optarg ;;
393
394   -disable-* | --disable-*)
395     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
396     # Reject names that are not valid shell variable names.
397     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
398       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
399    { (exit 1); exit 1; }; }
400     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
401     eval "enable_$ac_feature=no" ;;
402
403   -enable-* | --enable-*)
404     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
405     # Reject names that are not valid shell variable names.
406     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
407       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
408    { (exit 1); exit 1; }; }
409     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
410     case $ac_option in
411       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
412       *) ac_optarg=yes ;;
413     esac
414     eval "enable_$ac_feature='$ac_optarg'" ;;
415
416   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
417   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
418   | --exec | --exe | --ex)
419     ac_prev=exec_prefix ;;
420   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
421   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
422   | --exec=* | --exe=* | --ex=*)
423     exec_prefix=$ac_optarg ;;
424
425   -gas | --gas | --ga | --g)
426     # Obsolete; use --with-gas.
427     with_gas=yes ;;
428
429   -help | --help | --hel | --he | -h)
430     ac_init_help=long ;;
431   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
432     ac_init_help=recursive ;;
433   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
434     ac_init_help=short ;;
435
436   -host | --host | --hos | --ho)
437     ac_prev=host_alias ;;
438   -host=* | --host=* | --hos=* | --ho=*)
439     host_alias=$ac_optarg ;;
440
441   -includedir | --includedir | --includedi | --included | --include \
442   | --includ | --inclu | --incl | --inc)
443     ac_prev=includedir ;;
444   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
445   | --includ=* | --inclu=* | --incl=* | --inc=*)
446     includedir=$ac_optarg ;;
447
448   -infodir | --infodir | --infodi | --infod | --info | --inf)
449     ac_prev=infodir ;;
450   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
451     infodir=$ac_optarg ;;
452
453   -libdir | --libdir | --libdi | --libd)
454     ac_prev=libdir ;;
455   -libdir=* | --libdir=* | --libdi=* | --libd=*)
456     libdir=$ac_optarg ;;
457
458   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
459   | --libexe | --libex | --libe)
460     ac_prev=libexecdir ;;
461   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
462   | --libexe=* | --libex=* | --libe=*)
463     libexecdir=$ac_optarg ;;
464
465   -localstatedir | --localstatedir | --localstatedi | --localstated \
466   | --localstate | --localstat | --localsta | --localst \
467   | --locals | --local | --loca | --loc | --lo)
468     ac_prev=localstatedir ;;
469   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
470   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
471   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
472     localstatedir=$ac_optarg ;;
473
474   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
475     ac_prev=mandir ;;
476   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
477     mandir=$ac_optarg ;;
478
479   -nfp | --nfp | --nf)
480     # Obsolete; use --without-fp.
481     with_fp=no ;;
482
483   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
484   | --no-cr | --no-c | -n)
485     no_create=yes ;;
486
487   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
488   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
489     no_recursion=yes ;;
490
491   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
492   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
493   | --oldin | --oldi | --old | --ol | --o)
494     ac_prev=oldincludedir ;;
495   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
496   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
497   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
498     oldincludedir=$ac_optarg ;;
499
500   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
501     ac_prev=prefix ;;
502   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503     prefix=$ac_optarg ;;
504
505   -program-prefix | --program-prefix | --program-prefi | --program-pref \
506   | --program-pre | --program-pr | --program-p)
507     ac_prev=program_prefix ;;
508   -program-prefix=* | --program-prefix=* | --program-prefi=* \
509   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
510     program_prefix=$ac_optarg ;;
511
512   -program-suffix | --program-suffix | --program-suffi | --program-suff \
513   | --program-suf | --program-su | --program-s)
514     ac_prev=program_suffix ;;
515   -program-suffix=* | --program-suffix=* | --program-suffi=* \
516   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
517     program_suffix=$ac_optarg ;;
518
519   -program-transform-name | --program-transform-name \
520   | --program-transform-nam | --program-transform-na \
521   | --program-transform-n | --program-transform- \
522   | --program-transform | --program-transfor \
523   | --program-transfo | --program-transf \
524   | --program-trans | --program-tran \
525   | --progr-tra | --program-tr | --program-t)
526     ac_prev=program_transform_name ;;
527   -program-transform-name=* | --program-transform-name=* \
528   | --program-transform-nam=* | --program-transform-na=* \
529   | --program-transform-n=* | --program-transform-=* \
530   | --program-transform=* | --program-transfor=* \
531   | --program-transfo=* | --program-transf=* \
532   | --program-trans=* | --program-tran=* \
533   | --progr-tra=* | --program-tr=* | --program-t=*)
534     program_transform_name=$ac_optarg ;;
535
536   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
537   | -silent | --silent | --silen | --sile | --sil)
538     silent=yes ;;
539
540   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
541     ac_prev=sbindir ;;
542   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
543   | --sbi=* | --sb=*)
544     sbindir=$ac_optarg ;;
545
546   -sharedstatedir | --sharedstatedir | --sharedstatedi \
547   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
548   | --sharedst | --shareds | --shared | --share | --shar \
549   | --sha | --sh)
550     ac_prev=sharedstatedir ;;
551   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
552   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
553   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
554   | --sha=* | --sh=*)
555     sharedstatedir=$ac_optarg ;;
556
557   -site | --site | --sit)
558     ac_prev=site ;;
559   -site=* | --site=* | --sit=*)
560     site=$ac_optarg ;;
561
562   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
563     ac_prev=srcdir ;;
564   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
565     srcdir=$ac_optarg ;;
566
567   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
568   | --syscon | --sysco | --sysc | --sys | --sy)
569     ac_prev=sysconfdir ;;
570   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
571   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
572     sysconfdir=$ac_optarg ;;
573
574   -target | --target | --targe | --targ | --tar | --ta | --t)
575     ac_prev=target_alias ;;
576   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
577     target_alias=$ac_optarg ;;
578
579   -v | -verbose | --verbose | --verbos | --verbo | --verb)
580     verbose=yes ;;
581
582   -version | --version | --versio | --versi | --vers | -V)
583     ac_init_version=: ;;
584
585   -with-* | --with-*)
586     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
587     # Reject names that are not valid shell variable names.
588     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
589       { echo "$as_me: error: invalid package name: $ac_package" >&2
590    { (exit 1); exit 1; }; }
591     ac_package=`echo $ac_package| sed 's/-/_/g'`
592     case $ac_option in
593       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
594       *) ac_optarg=yes ;;
595     esac
596     eval "with_$ac_package='$ac_optarg'" ;;
597
598   -without-* | --without-*)
599     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
600     # Reject names that are not valid shell variable names.
601     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
602       { echo "$as_me: error: invalid package name: $ac_package" >&2
603    { (exit 1); exit 1; }; }
604     ac_package=`echo $ac_package | sed 's/-/_/g'`
605     eval "with_$ac_package=no" ;;
606
607   --x)
608     # Obsolete; use --with-x.
609     with_x=yes ;;
610
611   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
612   | --x-incl | --x-inc | --x-in | --x-i)
613     ac_prev=x_includes ;;
614   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
615   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
616     x_includes=$ac_optarg ;;
617
618   -x-libraries | --x-libraries | --x-librarie | --x-librari \
619   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
620     ac_prev=x_libraries ;;
621   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
622   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
623     x_libraries=$ac_optarg ;;
624
625   -*) { echo "$as_me: error: unrecognized option: $ac_option
626 Try \`$0 --help' for more information." >&2
627    { (exit 1); exit 1; }; }
628     ;;
629
630   *=*)
631     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
632     # Reject names that are not valid shell variable names.
633     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
634       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
635    { (exit 1); exit 1; }; }
636     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
637     eval "$ac_envvar='$ac_optarg'"
638     export $ac_envvar ;;
639
640   *)
641     # FIXME: should be removed in autoconf 3.0.
642     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
643     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
644       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
645     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
646     ;;
647
648   esac
649 done
650
651 if test -n "$ac_prev"; then
652   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
653   { echo "$as_me: error: missing argument to $ac_option" >&2
654    { (exit 1); exit 1; }; }
655 fi
656
657 # Be sure to have absolute paths.
658 for ac_var in exec_prefix prefix
659 do
660   eval ac_val=$`echo $ac_var`
661   case $ac_val in
662     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
663     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
664    { (exit 1); exit 1; }; };;
665   esac
666 done
667
668 # Be sure to have absolute paths.
669 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
670               localstatedir libdir includedir oldincludedir infodir mandir
671 do
672   eval ac_val=$`echo $ac_var`
673   case $ac_val in
674     [\\/$]* | ?:[\\/]* ) ;;
675     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
676    { (exit 1); exit 1; }; };;
677   esac
678 done
679
680 # There might be people who depend on the old broken behavior: `$host'
681 # used to hold the argument of --host etc.
682 # FIXME: To remove some day.
683 build=$build_alias
684 host=$host_alias
685 target=$target_alias
686
687 # FIXME: To remove some day.
688 if test "x$host_alias" != x; then
689   if test "x$build_alias" = x; then
690     cross_compiling=maybe
691     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
692     If a cross compiler is detected then cross compile mode will be used." >&2
693   elif test "x$build_alias" != "x$host_alias"; then
694     cross_compiling=yes
695   fi
696 fi
697
698 ac_tool_prefix=
699 test -n "$host_alias" && ac_tool_prefix=$host_alias-
700
701 test "$silent" = yes && exec 6>/dev/null
702
703
704 # Find the source files, if location was not specified.
705 if test -z "$srcdir"; then
706   ac_srcdir_defaulted=yes
707   # Try the directory containing this script, then its parent.
708   ac_confdir=`(dirname "$0") 2>/dev/null ||
709 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
710          X"$0" : 'X\(//\)[^/]' \| \
711          X"$0" : 'X\(//\)$' \| \
712          X"$0" : 'X\(/\)' \| \
713          .     : '\(.\)' 2>/dev/null ||
714 echo X"$0" |
715     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
716           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
717           /^X\(\/\/\)$/{ s//\1/; q; }
718           /^X\(\/\).*/{ s//\1/; q; }
719           s/.*/./; q'`
720   srcdir=$ac_confdir
721   if test ! -r $srcdir/$ac_unique_file; then
722     srcdir=..
723   fi
724 else
725   ac_srcdir_defaulted=no
726 fi
727 if test ! -r $srcdir/$ac_unique_file; then
728   if test "$ac_srcdir_defaulted" = yes; then
729     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
730    { (exit 1); exit 1; }; }
731   else
732     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
733    { (exit 1); exit 1; }; }
734   fi
735 fi
736 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
737   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
738    { (exit 1); exit 1; }; }
739 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
740 ac_env_build_alias_set=${build_alias+set}
741 ac_env_build_alias_value=$build_alias
742 ac_cv_env_build_alias_set=${build_alias+set}
743 ac_cv_env_build_alias_value=$build_alias
744 ac_env_host_alias_set=${host_alias+set}
745 ac_env_host_alias_value=$host_alias
746 ac_cv_env_host_alias_set=${host_alias+set}
747 ac_cv_env_host_alias_value=$host_alias
748 ac_env_target_alias_set=${target_alias+set}
749 ac_env_target_alias_value=$target_alias
750 ac_cv_env_target_alias_set=${target_alias+set}
751 ac_cv_env_target_alias_value=$target_alias
752 ac_env_CC_set=${CC+set}
753 ac_env_CC_value=$CC
754 ac_cv_env_CC_set=${CC+set}
755 ac_cv_env_CC_value=$CC
756 ac_env_CFLAGS_set=${CFLAGS+set}
757 ac_env_CFLAGS_value=$CFLAGS
758 ac_cv_env_CFLAGS_set=${CFLAGS+set}
759 ac_cv_env_CFLAGS_value=$CFLAGS
760 ac_env_LDFLAGS_set=${LDFLAGS+set}
761 ac_env_LDFLAGS_value=$LDFLAGS
762 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
763 ac_cv_env_LDFLAGS_value=$LDFLAGS
764 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
765 ac_env_CPPFLAGS_value=$CPPFLAGS
766 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
767 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
768 ac_env_CXX_set=${CXX+set}
769 ac_env_CXX_value=$CXX
770 ac_cv_env_CXX_set=${CXX+set}
771 ac_cv_env_CXX_value=$CXX
772 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
773 ac_env_CXXFLAGS_value=$CXXFLAGS
774 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
775 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
776 ac_env_CPP_set=${CPP+set}
777 ac_env_CPP_value=$CPP
778 ac_cv_env_CPP_set=${CPP+set}
779 ac_cv_env_CPP_value=$CPP
780
781 #
782 # Report the --help message.
783 #
784 if test "$ac_init_help" = "long"; then
785   # Omit some internal or obsolete options to make the list less imposing.
786   # This message is too long to be a string in the A/UX 3.1 sh.
787   cat <<_ACEOF
788 \`configure' configures this package to adapt to many kinds of systems.
789
790 Usage: $0 [OPTION]... [VAR=VALUE]...
791
792 To assign environment variables (e.g., CC, CFLAGS...), specify them as
793 VAR=VALUE.  See below for descriptions of some of the useful variables.
794
795 Defaults for the options are specified in brackets.
796
797 Configuration:
798   -h, --help              display this help and exit
799       --help=short        display options specific to this package
800       --help=recursive    display the short help of all the included packages
801   -V, --version           display version information and exit
802   -q, --quiet, --silent   do not print \`checking...' messages
803       --cache-file=FILE   cache test results in FILE [disabled]
804   -C, --config-cache      alias for \`--cache-file=config.cache'
805   -n, --no-create         do not create output files
806       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
807
808 _ACEOF
809
810   cat <<_ACEOF
811 Installation directories:
812   --prefix=PREFIX         install architecture-independent files in PREFIX
813                           [$ac_default_prefix]
814   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
815                           [PREFIX]
816
817 By default, \`make install' will install all the files in
818 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
819 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
820 for instance \`--prefix=\$HOME'.
821
822 For better control, use the options below.
823
824 Fine tuning of the installation directories:
825   --bindir=DIR           user executables [EPREFIX/bin]
826   --sbindir=DIR          system admin executables [EPREFIX/sbin]
827   --libexecdir=DIR       program executables [EPREFIX/libexec]
828   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
829   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
830   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
831   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
832   --libdir=DIR           object code libraries [EPREFIX/lib]
833   --includedir=DIR       C header files [PREFIX/include]
834   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
835   --infodir=DIR          info documentation [PREFIX/info]
836   --mandir=DIR           man documentation [PREFIX/man]
837 _ACEOF
838
839   cat <<\_ACEOF
840
841 Program names:
842   --program-prefix=PREFIX            prepend PREFIX to installed program names
843   --program-suffix=SUFFIX            append SUFFIX to installed program names
844   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
845 _ACEOF
846 fi
847
848 if test -n "$ac_init_help"; then
849
850   cat <<\_ACEOF
851
852 Optional Features:
853   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
854   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
855   --disable-mcs51-port    Excludes the Intel mcs51 port
856   --disable-gbz80-port    Excludes the Gameboy gbz80 port
857   --disable-z80-port      Excludes the z80 port
858   --disable-avr-port      Excludes the AVR port
859   --disable-ds390-port    Excludes the DS390 port
860   --disable-pic-port      Excludes the PIC port
861   --disable-xa51-port Excludes the XA51 port
862   --disable-ucsim         Disables configuring and building of ucsim
863   --disable-device-lib-build Disables automatically building device libraries
864   --disable-packihx       Disables building packihx
865   --enable-libgc          Use the Bohem memory allocator.  Lower runtime footprint.
866
867 Some influential environment variables:
868   CC          C compiler command
869   CFLAGS      C compiler flags
870   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
871               nonstandard directory <lib dir>
872   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
873               headers in a nonstandard directory <include dir>
874   CXX         C++ compiler command
875   CXXFLAGS    C++ compiler flags
876   CPP         C preprocessor
877
878 Use these variables to override the choices made by `configure' or to help
879 it to find libraries and programs with nonstandard names/locations.
880
881 _ACEOF
882 fi
883
884 if test "$ac_init_help" = "recursive"; then
885   # If there are subdirs, report their specific --help.
886   ac_popdir=`pwd`
887   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
888     test -d $ac_dir || continue
889     ac_builddir=.
890
891 if test "$ac_dir" != .; then
892   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
893   # A "../" for each directory in $ac_dir_suffix.
894   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
895 else
896   ac_dir_suffix= ac_top_builddir=
897 fi
898
899 case $srcdir in
900   .)  # No --srcdir option.  We are building in place.
901     ac_srcdir=.
902     if test -z "$ac_top_builddir"; then
903        ac_top_srcdir=.
904     else
905        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
906     fi ;;
907   [\\/]* | ?:[\\/]* )  # Absolute path.
908     ac_srcdir=$srcdir$ac_dir_suffix;
909     ac_top_srcdir=$srcdir ;;
910   *) # Relative path.
911     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
912     ac_top_srcdir=$ac_top_builddir$srcdir ;;
913 esac
914 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
915 # absolute.
916 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
917 ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
918 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
919 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
920
921     cd $ac_dir
922     # Check for guested configure; otherwise get Cygnus style configure.
923     if test -f $ac_srcdir/configure.gnu; then
924       echo
925       $SHELL $ac_srcdir/configure.gnu  --help=recursive
926     elif test -f $ac_srcdir/configure; then
927       echo
928       $SHELL $ac_srcdir/configure  --help=recursive
929     elif test -f $ac_srcdir/configure.ac ||
930            test -f $ac_srcdir/configure.in; then
931       echo
932       $ac_configure --help
933     else
934       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
935     fi
936     cd $ac_popdir
937   done
938 fi
939
940 test -n "$ac_init_help" && exit 0
941 if $ac_init_version; then
942   cat <<\_ACEOF
943
944 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
945 Free Software Foundation, Inc.
946 This configure script is free software; the Free Software Foundation
947 gives unlimited permission to copy, distribute and modify it.
948 _ACEOF
949   exit 0
950 fi
951 exec 5>config.log
952 cat >&5 <<_ACEOF
953 This file contains any messages produced by compilers while
954 running configure, to aid debugging if configure makes a mistake.
955
956 It was created by $as_me, which was
957 generated by GNU Autoconf 2.54.  Invocation command line was
958
959   $ $0 $@
960
961 _ACEOF
962 {
963 cat <<_ASUNAME
964 ## --------- ##
965 ## Platform. ##
966 ## --------- ##
967
968 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
969 uname -m = `(uname -m) 2>/dev/null || echo unknown`
970 uname -r = `(uname -r) 2>/dev/null || echo unknown`
971 uname -s = `(uname -s) 2>/dev/null || echo unknown`
972 uname -v = `(uname -v) 2>/dev/null || echo unknown`
973
974 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
975 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
976
977 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
978 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
979 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
980 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
981 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
982 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
983 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
984
985 _ASUNAME
986
987 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
988 for as_dir in $PATH
989 do
990   IFS=$as_save_IFS
991   test -z "$as_dir" && as_dir=.
992   echo "PATH: $as_dir"
993 done
994
995 } >&5
996
997 cat >&5 <<_ACEOF
998
999
1000 ## ----------- ##
1001 ## Core tests. ##
1002 ## ----------- ##
1003
1004 _ACEOF
1005
1006
1007 # Keep a trace of the command line.
1008 # Strip out --no-create and --no-recursion so they do not pile up.
1009 # Also quote any args containing shell meta-characters.
1010 ac_configure_args=
1011 ac_sep=
1012 for ac_arg
1013 do
1014   case $ac_arg in
1015   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1016   | --no-cr | --no-c | -n ) continue ;;
1017   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1018   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1019     continue ;;
1020   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1021     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1022   esac
1023   ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1024   # Get rid of the leading space.
1025   ac_sep=" "
1026 done
1027
1028 # When interrupted or exit'd, cleanup temporary files, and complete
1029 # config.log.  We remove comments because anyway the quotes in there
1030 # would cause problems or look ugly.
1031 # WARNING: Be sure not to use single quotes in there, as some shells,
1032 # such as our DU 5.0 friend, will then `close' the trap.
1033 trap 'exit_status=$?
1034   # Save into config.log some information that might help in debugging.
1035   {
1036     echo
1037
1038     cat <<\_ASBOX
1039 ## ---------------- ##
1040 ## Cache variables. ##
1041 ## ---------------- ##
1042 _ASBOX
1043     echo
1044     # The following way of writing the cache mishandles newlines in values,
1045 {
1046   (set) 2>&1 |
1047     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1048     *ac_space=\ *)
1049       sed -n \
1050         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1051           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1052       ;;
1053     *)
1054       sed -n \
1055         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1056       ;;
1057     esac;
1058 }
1059     echo
1060
1061     cat <<\_ASBOX
1062 ## ----------------- ##
1063 ## Output variables. ##
1064 ## ----------------- ##
1065 _ASBOX
1066     echo
1067     for ac_var in $ac_subst_vars
1068     do
1069       eval ac_val=$`echo $ac_var`
1070       echo "$ac_var='"'"'$ac_val'"'"'"
1071     done | sort
1072     echo
1073
1074     if test -n "$ac_subst_files"; then
1075       cat <<\_ASBOX
1076 ## ------------- ##
1077 ## Output files. ##
1078 ## ------------- ##
1079 _ASBOX
1080       echo
1081       for ac_var in $ac_subst_files
1082       do
1083         eval ac_val=$`echo $ac_var`
1084         echo "$ac_var='"'"'$ac_val'"'"'"
1085       done | sort
1086       echo
1087     fi
1088
1089     if test -s confdefs.h; then
1090       cat <<\_ASBOX
1091 ## ----------- ##
1092 ## confdefs.h. ##
1093 ## ----------- ##
1094 _ASBOX
1095       echo
1096       sed "/^$/d" confdefs.h | sort
1097       echo
1098     fi
1099     test "$ac_signal" != 0 &&
1100       echo "$as_me: caught signal $ac_signal"
1101     echo "$as_me: exit $exit_status"
1102   } >&5
1103   rm -f core core.* *.core &&
1104   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1105     exit $exit_status
1106      ' 0
1107 for ac_signal in 1 2 13 15; do
1108   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1109 done
1110 ac_signal=0
1111
1112 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1113 rm -rf conftest* confdefs.h
1114 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1115 echo >confdefs.h
1116
1117 # Predefined preprocessor variables.
1118
1119 cat >>confdefs.h <<_ACEOF
1120 #define PACKAGE_NAME "$PACKAGE_NAME"
1121 _ACEOF
1122
1123
1124 cat >>confdefs.h <<_ACEOF
1125 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1126 _ACEOF
1127
1128
1129 cat >>confdefs.h <<_ACEOF
1130 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1131 _ACEOF
1132
1133
1134 cat >>confdefs.h <<_ACEOF
1135 #define PACKAGE_STRING "$PACKAGE_STRING"
1136 _ACEOF
1137
1138
1139 cat >>confdefs.h <<_ACEOF
1140 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1141 _ACEOF
1142
1143
1144 # Let the site file select an alternate cache file if it wants to.
1145 # Prefer explicitly selected file to automatically selected ones.
1146 if test -z "$CONFIG_SITE"; then
1147   if test "x$prefix" != xNONE; then
1148     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1149   else
1150     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1151   fi
1152 fi
1153 for ac_site_file in $CONFIG_SITE; do
1154   if test -r "$ac_site_file"; then
1155     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1156 echo "$as_me: loading site script $ac_site_file" >&6;}
1157     sed 's/^/| /' "$ac_site_file" >&5
1158     . "$ac_site_file"
1159   fi
1160 done
1161
1162 if test -r "$cache_file"; then
1163   # Some versions of bash will fail to source /dev/null (special
1164   # files actually), so we avoid doing that.
1165   if test -f "$cache_file"; then
1166     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1167 echo "$as_me: loading cache $cache_file" >&6;}
1168     case $cache_file in
1169       [\\/]* | ?:[\\/]* ) . $cache_file;;
1170       *)                      . ./$cache_file;;
1171     esac
1172   fi
1173 else
1174   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1175 echo "$as_me: creating cache $cache_file" >&6;}
1176   >$cache_file
1177 fi
1178
1179 # Check that the precious variables saved in the cache have kept the same
1180 # value.
1181 ac_cache_corrupted=false
1182 for ac_var in `(set) 2>&1 |
1183                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1184   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1185   eval ac_new_set=\$ac_env_${ac_var}_set
1186   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1187   eval ac_new_val="\$ac_env_${ac_var}_value"
1188   case $ac_old_set,$ac_new_set in
1189     set,)
1190       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1191 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1192       ac_cache_corrupted=: ;;
1193     ,set)
1194       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1195 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1196       ac_cache_corrupted=: ;;
1197     ,);;
1198     *)
1199       if test "x$ac_old_val" != "x$ac_new_val"; then
1200         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1201 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1202         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1203 echo "$as_me:   former value:  $ac_old_val" >&2;}
1204         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1205 echo "$as_me:   current value: $ac_new_val" >&2;}
1206         ac_cache_corrupted=:
1207       fi;;
1208   esac
1209   # Pass precious variables to config.status.
1210   if test "$ac_new_set" = set; then
1211     case $ac_new_val in
1212     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1213       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1214     *) ac_arg=$ac_var=$ac_new_val ;;
1215     esac
1216     case " $ac_configure_args " in
1217       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1218       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1219     esac
1220   fi
1221 done
1222 if $ac_cache_corrupted; then
1223   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1224 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1225   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1226 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1227    { (exit 1); exit 1; }; }
1228 fi
1229
1230 ac_ext=c
1231 ac_cpp='$CPP $CPPFLAGS'
1232 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1233 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1234 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254           ac_config_headers="$ac_config_headers sdccconf.h:sdccconf_in.h"
1255
1256
1257 for ac_prog in gawk mawk nawk awk
1258 do
1259   # Extract the first word of "$ac_prog", so it can be a program name with args.
1260 set dummy $ac_prog; ac_word=$2
1261 echo "$as_me:$LINENO: checking for $ac_word" >&5
1262 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1263 if test "${ac_cv_prog_AWK+set}" = set; then
1264   echo $ECHO_N "(cached) $ECHO_C" >&6
1265 else
1266   if test -n "$AWK"; then
1267   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1268 else
1269 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1270 for as_dir in $PATH
1271 do
1272   IFS=$as_save_IFS
1273   test -z "$as_dir" && as_dir=.
1274   for ac_exec_ext in '' $ac_executable_extensions; do
1275   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1276     ac_cv_prog_AWK="$ac_prog"
1277     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1278     break 2
1279   fi
1280 done
1281 done
1282
1283 fi
1284 fi
1285 AWK=$ac_cv_prog_AWK
1286 if test -n "$AWK"; then
1287   echo "$as_me:$LINENO: result: $AWK" >&5
1288 echo "${ECHO_T}$AWK" >&6
1289 else
1290   echo "$as_me:$LINENO: result: no" >&5
1291 echo "${ECHO_T}no" >&6
1292 fi
1293
1294   test -n "$AWK" && break
1295 done
1296
1297
1298 echo "$as_me:$LINENO: checking version of the package" >&5
1299 echo $ECHO_N "checking version of the package... $ECHO_C" >&6
1300 if test -f .version; then
1301   VERSION=`cat .version`
1302 elif test -f ../.version; then
1303   VERSION=`cat ../.version`
1304 else
1305   VERSION="0.0.0"
1306 fi
1307 VERSIONHI=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $1}'`
1308 VERSIONLO=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $2}'`
1309 VERSIONP=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $3}'`
1310 # Assume no special extension
1311 EXEEXT=`echo $EXEEXT`
1312
1313 echo "$as_me:$LINENO: result: ${VERSION}" >&5
1314 echo "${ECHO_T}${VERSION}" >&6
1315
1316
1317
1318
1319 cat >>confdefs.h <<_ACEOF
1320 #define SDCC_VERSION_LO ${VERSIONLO}
1321 _ACEOF
1322
1323 cat >>confdefs.h <<_ACEOF
1324 #define SDCC_VERSION_HI ${VERSIONHI}
1325 _ACEOF
1326
1327 cat >>confdefs.h <<_ACEOF
1328 #define SDCC_VERSION_P ${VERSIONP}
1329 _ACEOF
1330
1331 cat >>confdefs.h <<_ACEOF
1332 #define SDCC_VERSION_STR "${VERSION}"
1333 _ACEOF
1334
1335 test "$program_prefix" != NONE &&
1336   program_transform_name="s,^,$program_prefix,;$program_transform_name"
1337 # Use a double $ so make ignores it.
1338 test "$program_suffix" != NONE &&
1339   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1340 # Double any \ or $.  echo might interpret backslashes.
1341 # By default was `s,x,x', remove it if useless.
1342 cat <<\_ACEOF >conftest.sed
1343 s/[\\$]/&&/g;s/;s,x,x,$//
1344 _ACEOF
1345 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1346 rm conftest.sed
1347
1348 sdcc_cv_version=$VERSION
1349 sdcc_cv_versionhi=$VERSIONHI
1350 sdcc_cv_versionlo=$VERSIONLO
1351 sdcc_cv_versionp=$VERSIONP
1352
1353 # Required programs
1354 #-------------------
1355 ac_ext=c
1356 ac_cpp='$CPP $CPPFLAGS'
1357 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1358 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1359 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1360 if test -n "$ac_tool_prefix"; then
1361   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1362 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1363 echo "$as_me:$LINENO: checking for $ac_word" >&5
1364 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1365 if test "${ac_cv_prog_CC+set}" = set; then
1366   echo $ECHO_N "(cached) $ECHO_C" >&6
1367 else
1368   if test -n "$CC"; then
1369   ac_cv_prog_CC="$CC" # Let the user override the test.
1370 else
1371 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1372 for as_dir in $PATH
1373 do
1374   IFS=$as_save_IFS
1375   test -z "$as_dir" && as_dir=.
1376   for ac_exec_ext in '' $ac_executable_extensions; do
1377   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1378     ac_cv_prog_CC="${ac_tool_prefix}gcc"
1379     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1380     break 2
1381   fi
1382 done
1383 done
1384
1385 fi
1386 fi
1387 CC=$ac_cv_prog_CC
1388 if test -n "$CC"; then
1389   echo "$as_me:$LINENO: result: $CC" >&5
1390 echo "${ECHO_T}$CC" >&6
1391 else
1392   echo "$as_me:$LINENO: result: no" >&5
1393 echo "${ECHO_T}no" >&6
1394 fi
1395
1396 fi
1397 if test -z "$ac_cv_prog_CC"; then
1398   ac_ct_CC=$CC
1399   # Extract the first word of "gcc", so it can be a program name with args.
1400 set dummy gcc; ac_word=$2
1401 echo "$as_me:$LINENO: checking for $ac_word" >&5
1402 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1403 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1404   echo $ECHO_N "(cached) $ECHO_C" >&6
1405 else
1406   if test -n "$ac_ct_CC"; then
1407   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1408 else
1409 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1410 for as_dir in $PATH
1411 do
1412   IFS=$as_save_IFS
1413   test -z "$as_dir" && as_dir=.
1414   for ac_exec_ext in '' $ac_executable_extensions; do
1415   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1416     ac_cv_prog_ac_ct_CC="gcc"
1417     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1418     break 2
1419   fi
1420 done
1421 done
1422
1423 fi
1424 fi
1425 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1426 if test -n "$ac_ct_CC"; then
1427   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1428 echo "${ECHO_T}$ac_ct_CC" >&6
1429 else
1430   echo "$as_me:$LINENO: result: no" >&5
1431 echo "${ECHO_T}no" >&6
1432 fi
1433
1434   CC=$ac_ct_CC
1435 else
1436   CC="$ac_cv_prog_CC"
1437 fi
1438
1439 if test -z "$CC"; then
1440   if test -n "$ac_tool_prefix"; then
1441   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1442 set dummy ${ac_tool_prefix}cc; ac_word=$2
1443 echo "$as_me:$LINENO: checking for $ac_word" >&5
1444 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1445 if test "${ac_cv_prog_CC+set}" = set; then
1446   echo $ECHO_N "(cached) $ECHO_C" >&6
1447 else
1448   if test -n "$CC"; then
1449   ac_cv_prog_CC="$CC" # Let the user override the test.
1450 else
1451 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1452 for as_dir in $PATH
1453 do
1454   IFS=$as_save_IFS
1455   test -z "$as_dir" && as_dir=.
1456   for ac_exec_ext in '' $ac_executable_extensions; do
1457   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1458     ac_cv_prog_CC="${ac_tool_prefix}cc"
1459     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1460     break 2
1461   fi
1462 done
1463 done
1464
1465 fi
1466 fi
1467 CC=$ac_cv_prog_CC
1468 if test -n "$CC"; then
1469   echo "$as_me:$LINENO: result: $CC" >&5
1470 echo "${ECHO_T}$CC" >&6
1471 else
1472   echo "$as_me:$LINENO: result: no" >&5
1473 echo "${ECHO_T}no" >&6
1474 fi
1475
1476 fi
1477 if test -z "$ac_cv_prog_CC"; then
1478   ac_ct_CC=$CC
1479   # Extract the first word of "cc", so it can be a program name with args.
1480 set dummy cc; ac_word=$2
1481 echo "$as_me:$LINENO: checking for $ac_word" >&5
1482 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1483 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1484   echo $ECHO_N "(cached) $ECHO_C" >&6
1485 else
1486   if test -n "$ac_ct_CC"; then
1487   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1488 else
1489 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1490 for as_dir in $PATH
1491 do
1492   IFS=$as_save_IFS
1493   test -z "$as_dir" && as_dir=.
1494   for ac_exec_ext in '' $ac_executable_extensions; do
1495   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1496     ac_cv_prog_ac_ct_CC="cc"
1497     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1498     break 2
1499   fi
1500 done
1501 done
1502
1503 fi
1504 fi
1505 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1506 if test -n "$ac_ct_CC"; then
1507   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1508 echo "${ECHO_T}$ac_ct_CC" >&6
1509 else
1510   echo "$as_me:$LINENO: result: no" >&5
1511 echo "${ECHO_T}no" >&6
1512 fi
1513
1514   CC=$ac_ct_CC
1515 else
1516   CC="$ac_cv_prog_CC"
1517 fi
1518
1519 fi
1520 if test -z "$CC"; then
1521   # Extract the first word of "cc", so it can be a program name with args.
1522 set dummy cc; ac_word=$2
1523 echo "$as_me:$LINENO: checking for $ac_word" >&5
1524 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1525 if test "${ac_cv_prog_CC+set}" = set; then
1526   echo $ECHO_N "(cached) $ECHO_C" >&6
1527 else
1528   if test -n "$CC"; then
1529   ac_cv_prog_CC="$CC" # Let the user override the test.
1530 else
1531   ac_prog_rejected=no
1532 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1533 for as_dir in $PATH
1534 do
1535   IFS=$as_save_IFS
1536   test -z "$as_dir" && as_dir=.
1537   for ac_exec_ext in '' $ac_executable_extensions; do
1538   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1539     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1540        ac_prog_rejected=yes
1541        continue
1542      fi
1543     ac_cv_prog_CC="cc"
1544     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1545     break 2
1546   fi
1547 done
1548 done
1549
1550 if test $ac_prog_rejected = yes; then
1551   # We found a bogon in the path, so make sure we never use it.
1552   set dummy $ac_cv_prog_CC
1553   shift
1554   if test $# != 0; then
1555     # We chose a different compiler from the bogus one.
1556     # However, it has the same basename, so the bogon will be chosen
1557     # first if we set CC to just the basename; use the full file name.
1558     shift
1559     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
1560   fi
1561 fi
1562 fi
1563 fi
1564 CC=$ac_cv_prog_CC
1565 if test -n "$CC"; then
1566   echo "$as_me:$LINENO: result: $CC" >&5
1567 echo "${ECHO_T}$CC" >&6
1568 else
1569   echo "$as_me:$LINENO: result: no" >&5
1570 echo "${ECHO_T}no" >&6
1571 fi
1572
1573 fi
1574 if test -z "$CC"; then
1575   if test -n "$ac_tool_prefix"; then
1576   for ac_prog in cl
1577   do
1578     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1579 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1580 echo "$as_me:$LINENO: checking for $ac_word" >&5
1581 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1582 if test "${ac_cv_prog_CC+set}" = set; then
1583   echo $ECHO_N "(cached) $ECHO_C" >&6
1584 else
1585   if test -n "$CC"; then
1586   ac_cv_prog_CC="$CC" # Let the user override the test.
1587 else
1588 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1589 for as_dir in $PATH
1590 do
1591   IFS=$as_save_IFS
1592   test -z "$as_dir" && as_dir=.
1593   for ac_exec_ext in '' $ac_executable_extensions; do
1594   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1595     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1596     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1597     break 2
1598   fi
1599 done
1600 done
1601
1602 fi
1603 fi
1604 CC=$ac_cv_prog_CC
1605 if test -n "$CC"; then
1606   echo "$as_me:$LINENO: result: $CC" >&5
1607 echo "${ECHO_T}$CC" >&6
1608 else
1609   echo "$as_me:$LINENO: result: no" >&5
1610 echo "${ECHO_T}no" >&6
1611 fi
1612
1613     test -n "$CC" && break
1614   done
1615 fi
1616 if test -z "$CC"; then
1617   ac_ct_CC=$CC
1618   for ac_prog in cl
1619 do
1620   # Extract the first word of "$ac_prog", so it can be a program name with args.
1621 set dummy $ac_prog; ac_word=$2
1622 echo "$as_me:$LINENO: checking for $ac_word" >&5
1623 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1624 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1625   echo $ECHO_N "(cached) $ECHO_C" >&6
1626 else
1627   if test -n "$ac_ct_CC"; then
1628   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1629 else
1630 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1631 for as_dir in $PATH
1632 do
1633   IFS=$as_save_IFS
1634   test -z "$as_dir" && as_dir=.
1635   for ac_exec_ext in '' $ac_executable_extensions; do
1636   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1637     ac_cv_prog_ac_ct_CC="$ac_prog"
1638     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1639     break 2
1640   fi
1641 done
1642 done
1643
1644 fi
1645 fi
1646 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1647 if test -n "$ac_ct_CC"; then
1648   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1649 echo "${ECHO_T}$ac_ct_CC" >&6
1650 else
1651   echo "$as_me:$LINENO: result: no" >&5
1652 echo "${ECHO_T}no" >&6
1653 fi
1654
1655   test -n "$ac_ct_CC" && break
1656 done
1657
1658   CC=$ac_ct_CC
1659 fi
1660
1661 fi
1662
1663
1664 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1665 echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1666    { (exit 1); exit 1; }; }
1667
1668 # Provide some information about the compiler.
1669 echo "$as_me:$LINENO:" \
1670      "checking for C compiler version" >&5
1671 ac_compiler=`set X $ac_compile; echo $2`
1672 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1673   (eval $ac_compiler --version </dev/null >&5) 2>&5
1674   ac_status=$?
1675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1676   (exit $ac_status); }
1677 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1678   (eval $ac_compiler -v </dev/null >&5) 2>&5
1679   ac_status=$?
1680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1681   (exit $ac_status); }
1682 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1683   (eval $ac_compiler -V </dev/null >&5) 2>&5
1684   ac_status=$?
1685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1686   (exit $ac_status); }
1687
1688 cat >conftest.$ac_ext <<_ACEOF
1689 #line $LINENO "configure"
1690 #include "confdefs.h"
1691
1692 int
1693 main ()
1694 {
1695
1696   ;
1697   return 0;
1698 }
1699 _ACEOF
1700 ac_clean_files_save=$ac_clean_files
1701 ac_clean_files="$ac_clean_files a.out a.exe"
1702 # Try to create an executable without -o first, disregard a.out.
1703 # It will help us diagnose broken compilers, and finding out an intuition
1704 # of exeext.
1705 echo "$as_me:$LINENO: checking for C compiler default output" >&5
1706 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1707 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1708 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1709   (eval $ac_link_default) 2>&5
1710   ac_status=$?
1711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1712   (exit $ac_status); }; then
1713   # Find the output, starting from the most likely.  This scheme is
1714 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1715 # resort.
1716
1717 # Be careful to initialize this variable, since it used to be cached.
1718 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1719 ac_cv_exeext=
1720 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.*; do
1721   test -f "$ac_file" || continue
1722   case $ac_file in
1723     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
1724     a.out ) # We found the default executable, but exeext='' is most
1725             # certainly right.
1726             break;;
1727     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1728           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1729           export ac_cv_exeext
1730           break;;
1731     * ) break;;
1732   esac
1733 done
1734 else
1735   echo "$as_me: failed program was:" >&5
1736 cat conftest.$ac_ext >&5
1737 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
1738 check \`config.log' for details." >&5
1739 echo "$as_me: error: C compiler cannot create executables
1740 check \`config.log' for details." >&2;}
1741    { (exit 77); exit 77; }; }
1742 fi
1743
1744 ac_exeext=$ac_cv_exeext
1745 echo "$as_me:$LINENO: result: $ac_file" >&5
1746 echo "${ECHO_T}$ac_file" >&6
1747
1748 # Check the compiler produces executables we can run.  If not, either
1749 # the compiler is broken, or we cross compile.
1750 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1751 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1752 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1753 # If not cross compiling, check that we can run a simple program.
1754 if test "$cross_compiling" != yes; then
1755   if { ac_try='./$ac_file'
1756   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1757   (eval $ac_try) 2>&5
1758   ac_status=$?
1759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1760   (exit $ac_status); }; }; then
1761     cross_compiling=no
1762   else
1763     if test "$cross_compiling" = maybe; then
1764         cross_compiling=yes
1765     else
1766         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
1767 If you meant to cross compile, use \`--host'." >&5
1768 echo "$as_me: error: cannot run C compiled programs.
1769 If you meant to cross compile, use \`--host'." >&2;}
1770    { (exit 1); exit 1; }; }
1771     fi
1772   fi
1773 fi
1774 echo "$as_me:$LINENO: result: yes" >&5
1775 echo "${ECHO_T}yes" >&6
1776
1777 rm -f a.out a.exe conftest$ac_cv_exeext
1778 ac_clean_files=$ac_clean_files_save
1779 # Check the compiler produces executables we can run.  If not, either
1780 # the compiler is broken, or we cross compile.
1781 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1782 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1783 echo "$as_me:$LINENO: result: $cross_compiling" >&5
1784 echo "${ECHO_T}$cross_compiling" >&6
1785
1786 echo "$as_me:$LINENO: checking for suffix of executables" >&5
1787 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1788 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1789   (eval $ac_link) 2>&5
1790   ac_status=$?
1791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1792   (exit $ac_status); }; then
1793   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1794 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1795 # work properly (i.e., refer to `conftest.exe'), while it won't with
1796 # `rm'.
1797 for ac_file in conftest.exe conftest conftest.*; do
1798   test -f "$ac_file" || continue
1799   case $ac_file in
1800     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
1801     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1802           export ac_cv_exeext
1803           break;;
1804     * ) break;;
1805   esac
1806 done
1807 else
1808   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1809 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1810    { (exit 1); exit 1; }; }
1811 fi
1812
1813 rm -f conftest$ac_cv_exeext
1814 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1815 echo "${ECHO_T}$ac_cv_exeext" >&6
1816
1817 rm -f conftest.$ac_ext
1818 EXEEXT=$ac_cv_exeext
1819 ac_exeext=$EXEEXT
1820 echo "$as_me:$LINENO: checking for suffix of object files" >&5
1821 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
1822 if test "${ac_cv_objext+set}" = set; then
1823   echo $ECHO_N "(cached) $ECHO_C" >&6
1824 else
1825   cat >conftest.$ac_ext <<_ACEOF
1826 #line $LINENO "configure"
1827 #include "confdefs.h"
1828
1829 int
1830 main ()
1831 {
1832
1833   ;
1834   return 0;
1835 }
1836 _ACEOF
1837 rm -f conftest.o conftest.obj
1838 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1839   (eval $ac_compile) 2>&5
1840   ac_status=$?
1841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1842   (exit $ac_status); }; then
1843   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1844   case $ac_file in
1845     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
1846     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1847        break;;
1848   esac
1849 done
1850 else
1851   echo "$as_me: failed program was:" >&5
1852 cat conftest.$ac_ext >&5
1853 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
1854 echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
1855    { (exit 1); exit 1; }; }
1856 fi
1857
1858 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1859 fi
1860 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
1861 echo "${ECHO_T}$ac_cv_objext" >&6
1862 OBJEXT=$ac_cv_objext
1863 ac_objext=$OBJEXT
1864 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
1865 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1866 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1867   echo $ECHO_N "(cached) $ECHO_C" >&6
1868 else
1869   cat >conftest.$ac_ext <<_ACEOF
1870 #line $LINENO "configure"
1871 #include "confdefs.h"
1872
1873 int
1874 main ()
1875 {
1876 #ifndef __GNUC__
1877        choke me
1878 #endif
1879
1880   ;
1881   return 0;
1882 }
1883 _ACEOF
1884 rm -f conftest.$ac_objext
1885 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1886   (eval $ac_compile) 2>&5
1887   ac_status=$?
1888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1889   (exit $ac_status); } &&
1890          { ac_try='test -s conftest.$ac_objext'
1891   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1892   (eval $ac_try) 2>&5
1893   ac_status=$?
1894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1895   (exit $ac_status); }; }; then
1896   ac_compiler_gnu=yes
1897 else
1898   echo "$as_me: failed program was:" >&5
1899 cat conftest.$ac_ext >&5
1900 ac_compiler_gnu=no
1901 fi
1902 rm -f conftest.$ac_objext conftest.$ac_ext
1903 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1904
1905 fi
1906 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
1907 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1908 GCC=`test $ac_compiler_gnu = yes && echo yes`
1909 ac_test_CFLAGS=${CFLAGS+set}
1910 ac_save_CFLAGS=$CFLAGS
1911 CFLAGS="-g"
1912 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
1913 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1914 if test "${ac_cv_prog_cc_g+set}" = set; then
1915   echo $ECHO_N "(cached) $ECHO_C" >&6
1916 else
1917   cat >conftest.$ac_ext <<_ACEOF
1918 #line $LINENO "configure"
1919 #include "confdefs.h"
1920
1921 int
1922 main ()
1923 {
1924
1925   ;
1926   return 0;
1927 }
1928 _ACEOF
1929 rm -f conftest.$ac_objext
1930 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1931   (eval $ac_compile) 2>&5
1932   ac_status=$?
1933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1934   (exit $ac_status); } &&
1935          { ac_try='test -s conftest.$ac_objext'
1936   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1937   (eval $ac_try) 2>&5
1938   ac_status=$?
1939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1940   (exit $ac_status); }; }; then
1941   ac_cv_prog_cc_g=yes
1942 else
1943   echo "$as_me: failed program was:" >&5
1944 cat conftest.$ac_ext >&5
1945 ac_cv_prog_cc_g=no
1946 fi
1947 rm -f conftest.$ac_objext conftest.$ac_ext
1948 fi
1949 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
1950 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1951 if test "$ac_test_CFLAGS" = set; then
1952   CFLAGS=$ac_save_CFLAGS
1953 elif test $ac_cv_prog_cc_g = yes; then
1954   if test "$GCC" = yes; then
1955     CFLAGS="-g -O2"
1956   else
1957     CFLAGS="-g"
1958   fi
1959 else
1960   if test "$GCC" = yes; then
1961     CFLAGS="-O2"
1962   else
1963     CFLAGS=
1964   fi
1965 fi
1966 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
1967 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1968 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1969   echo $ECHO_N "(cached) $ECHO_C" >&6
1970 else
1971   ac_cv_prog_cc_stdc=no
1972 ac_save_CC=$CC
1973 cat >conftest.$ac_ext <<_ACEOF
1974 #line $LINENO "configure"
1975 #include "confdefs.h"
1976 #include <stdarg.h>
1977 #include <stdio.h>
1978 #include <sys/types.h>
1979 #include <sys/stat.h>
1980 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1981 struct buf { int x; };
1982 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1983 static char *e (p, i)
1984      char **p;
1985      int i;
1986 {
1987   return p[i];
1988 }
1989 static char *f (char * (*g) (char **, int), char **p, ...)
1990 {
1991   char *s;
1992   va_list v;
1993   va_start (v,p);
1994   s = g (p, va_arg (v,int));
1995   va_end (v);
1996   return s;
1997 }
1998 int test (int i, double x);
1999 struct s1 {int (*f) (int a);};
2000 struct s2 {int (*f) (double a);};
2001 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2002 int argc;
2003 char **argv;
2004 int
2005 main ()
2006 {
2007 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2008   ;
2009   return 0;
2010 }
2011 _ACEOF
2012 # Don't try gcc -ansi; that turns off useful extensions and
2013 # breaks some systems' header files.
2014 # AIX                   -qlanglvl=ansi
2015 # Ultrix and OSF/1      -std1
2016 # HP-UX 10.20 and later -Ae
2017 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2018 # SVR4                  -Xc -D__EXTENSIONS__
2019 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2020 do
2021   CC="$ac_save_CC $ac_arg"
2022   rm -f conftest.$ac_objext
2023 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2024   (eval $ac_compile) 2>&5
2025   ac_status=$?
2026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2027   (exit $ac_status); } &&
2028          { ac_try='test -s conftest.$ac_objext'
2029   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2030   (eval $ac_try) 2>&5
2031   ac_status=$?
2032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2033   (exit $ac_status); }; }; then
2034   ac_cv_prog_cc_stdc=$ac_arg
2035 break
2036 else
2037   echo "$as_me: failed program was:" >&5
2038 cat conftest.$ac_ext >&5
2039 fi
2040 rm -f conftest.$ac_objext
2041 done
2042 rm -f conftest.$ac_ext conftest.$ac_objext
2043 CC=$ac_save_CC
2044
2045 fi
2046
2047 case "x$ac_cv_prog_cc_stdc" in
2048   x|xno)
2049     echo "$as_me:$LINENO: result: none needed" >&5
2050 echo "${ECHO_T}none needed" >&6 ;;
2051   *)
2052     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2053 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2054     CC="$CC $ac_cv_prog_cc_stdc" ;;
2055 esac
2056
2057 # Some people use a C++ compiler to compile C.  Since we use `exit',
2058 # in C++ we need to declare it.  In case someone uses the same compiler
2059 # for both compiling C and C++ we need to have the C++ compiler decide
2060 # the declaration of exit, since it's the most demanding environment.
2061 cat >conftest.$ac_ext <<_ACEOF
2062 #ifndef __cplusplus
2063   choke me
2064 #endif
2065 _ACEOF
2066 rm -f conftest.$ac_objext
2067 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2068   (eval $ac_compile) 2>&5
2069   ac_status=$?
2070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2071   (exit $ac_status); } &&
2072          { ac_try='test -s conftest.$ac_objext'
2073   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2074   (eval $ac_try) 2>&5
2075   ac_status=$?
2076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2077   (exit $ac_status); }; }; then
2078   for ac_declaration in \
2079    ''\
2080    '#include <stdlib.h>' \
2081    'extern "C" void std::exit (int) throw (); using std::exit;' \
2082    'extern "C" void std::exit (int); using std::exit;' \
2083    'extern "C" void exit (int) throw ();' \
2084    'extern "C" void exit (int);' \
2085    'void exit (int);'
2086 do
2087   cat >conftest.$ac_ext <<_ACEOF
2088 #line $LINENO "configure"
2089 #include "confdefs.h"
2090 #include <stdlib.h>
2091 $ac_declaration
2092 int
2093 main ()
2094 {
2095 exit (42);
2096   ;
2097   return 0;
2098 }
2099 _ACEOF
2100 rm -f conftest.$ac_objext
2101 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2102   (eval $ac_compile) 2>&5
2103   ac_status=$?
2104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2105   (exit $ac_status); } &&
2106          { ac_try='test -s conftest.$ac_objext'
2107   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2108   (eval $ac_try) 2>&5
2109   ac_status=$?
2110   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2111   (exit $ac_status); }; }; then
2112   :
2113 else
2114   echo "$as_me: failed program was:" >&5
2115 cat conftest.$ac_ext >&5
2116 continue
2117 fi
2118 rm -f conftest.$ac_objext conftest.$ac_ext
2119   cat >conftest.$ac_ext <<_ACEOF
2120 #line $LINENO "configure"
2121 #include "confdefs.h"
2122 $ac_declaration
2123 int
2124 main ()
2125 {
2126 exit (42);
2127   ;
2128   return 0;
2129 }
2130 _ACEOF
2131 rm -f conftest.$ac_objext
2132 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2133   (eval $ac_compile) 2>&5
2134   ac_status=$?
2135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2136   (exit $ac_status); } &&
2137          { ac_try='test -s conftest.$ac_objext'
2138   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2139   (eval $ac_try) 2>&5
2140   ac_status=$?
2141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2142   (exit $ac_status); }; }; then
2143   break
2144 else
2145   echo "$as_me: failed program was:" >&5
2146 cat conftest.$ac_ext >&5
2147 fi
2148 rm -f conftest.$ac_objext conftest.$ac_ext
2149 done
2150 rm -f conftest*
2151 if test -n "$ac_declaration"; then
2152   echo '#ifdef __cplusplus' >>confdefs.h
2153   echo $ac_declaration      >>confdefs.h
2154   echo '#endif'             >>confdefs.h
2155 fi
2156
2157 else
2158   echo "$as_me: failed program was:" >&5
2159 cat conftest.$ac_ext >&5
2160 fi
2161 rm -f conftest.$ac_objext conftest.$ac_ext
2162 ac_ext=c
2163 ac_cpp='$CPP $CPPFLAGS'
2164 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2165 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2166 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2167
2168 ac_ext=cc
2169 ac_cpp='$CXXCPP $CPPFLAGS'
2170 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2171 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2172 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2173 if test -n "$ac_tool_prefix"; then
2174   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2175   do
2176     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2177 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2178 echo "$as_me:$LINENO: checking for $ac_word" >&5
2179 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2180 if test "${ac_cv_prog_CXX+set}" = set; then
2181   echo $ECHO_N "(cached) $ECHO_C" >&6
2182 else
2183   if test -n "$CXX"; then
2184   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2185 else
2186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2187 for as_dir in $PATH
2188 do
2189   IFS=$as_save_IFS
2190   test -z "$as_dir" && as_dir=.
2191   for ac_exec_ext in '' $ac_executable_extensions; do
2192   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2193     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2194     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2195     break 2
2196   fi
2197 done
2198 done
2199
2200 fi
2201 fi
2202 CXX=$ac_cv_prog_CXX
2203 if test -n "$CXX"; then
2204   echo "$as_me:$LINENO: result: $CXX" >&5
2205 echo "${ECHO_T}$CXX" >&6
2206 else
2207   echo "$as_me:$LINENO: result: no" >&5
2208 echo "${ECHO_T}no" >&6
2209 fi
2210
2211     test -n "$CXX" && break
2212   done
2213 fi
2214 if test -z "$CXX"; then
2215   ac_ct_CXX=$CXX
2216   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2217 do
2218   # Extract the first word of "$ac_prog", so it can be a program name with args.
2219 set dummy $ac_prog; ac_word=$2
2220 echo "$as_me:$LINENO: checking for $ac_word" >&5
2221 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2222 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2223   echo $ECHO_N "(cached) $ECHO_C" >&6
2224 else
2225   if test -n "$ac_ct_CXX"; then
2226   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2227 else
2228 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2229 for as_dir in $PATH
2230 do
2231   IFS=$as_save_IFS
2232   test -z "$as_dir" && as_dir=.
2233   for ac_exec_ext in '' $ac_executable_extensions; do
2234   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2235     ac_cv_prog_ac_ct_CXX="$ac_prog"
2236     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2237     break 2
2238   fi
2239 done
2240 done
2241
2242 fi
2243 fi
2244 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2245 if test -n "$ac_ct_CXX"; then
2246   echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
2247 echo "${ECHO_T}$ac_ct_CXX" >&6
2248 else
2249   echo "$as_me:$LINENO: result: no" >&5
2250 echo "${ECHO_T}no" >&6
2251 fi
2252
2253   test -n "$ac_ct_CXX" && break
2254 done
2255 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2256
2257   CXX=$ac_ct_CXX
2258 fi
2259
2260
2261 # Provide some information about the compiler.
2262 echo "$as_me:$LINENO:" \
2263      "checking for C++ compiler version" >&5
2264 ac_compiler=`set X $ac_compile; echo $2`
2265 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2266   (eval $ac_compiler --version </dev/null >&5) 2>&5
2267   ac_status=$?
2268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2269   (exit $ac_status); }
2270 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2271   (eval $ac_compiler -v </dev/null >&5) 2>&5
2272   ac_status=$?
2273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2274   (exit $ac_status); }
2275 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2276   (eval $ac_compiler -V </dev/null >&5) 2>&5
2277   ac_status=$?
2278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2279   (exit $ac_status); }
2280
2281 echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
2282 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2283 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2284   echo $ECHO_N "(cached) $ECHO_C" >&6
2285 else
2286   cat >conftest.$ac_ext <<_ACEOF
2287 #line $LINENO "configure"
2288 #include "confdefs.h"
2289
2290 int
2291 main ()
2292 {
2293 #ifndef __GNUC__
2294        choke me
2295 #endif
2296
2297   ;
2298   return 0;
2299 }
2300 _ACEOF
2301 rm -f conftest.$ac_objext
2302 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2303   (eval $ac_compile) 2>&5
2304   ac_status=$?
2305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2306   (exit $ac_status); } &&
2307          { ac_try='test -s conftest.$ac_objext'
2308   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2309   (eval $ac_try) 2>&5
2310   ac_status=$?
2311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2312   (exit $ac_status); }; }; then
2313   ac_compiler_gnu=yes
2314 else
2315   echo "$as_me: failed program was:" >&5
2316 cat conftest.$ac_ext >&5
2317 ac_compiler_gnu=no
2318 fi
2319 rm -f conftest.$ac_objext conftest.$ac_ext
2320 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2321
2322 fi
2323 echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
2324 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2325 GXX=`test $ac_compiler_gnu = yes && echo yes`
2326 ac_test_CXXFLAGS=${CXXFLAGS+set}
2327 ac_save_CXXFLAGS=$CXXFLAGS
2328 CXXFLAGS="-g"
2329 echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
2330 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2331 if test "${ac_cv_prog_cxx_g+set}" = set; then
2332   echo $ECHO_N "(cached) $ECHO_C" >&6
2333 else
2334   cat >conftest.$ac_ext <<_ACEOF
2335 #line $LINENO "configure"
2336 #include "confdefs.h"
2337
2338 int
2339 main ()
2340 {
2341
2342   ;
2343   return 0;
2344 }
2345 _ACEOF
2346 rm -f conftest.$ac_objext
2347 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2348   (eval $ac_compile) 2>&5
2349   ac_status=$?
2350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2351   (exit $ac_status); } &&
2352          { ac_try='test -s conftest.$ac_objext'
2353   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2354   (eval $ac_try) 2>&5
2355   ac_status=$?
2356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2357   (exit $ac_status); }; }; then
2358   ac_cv_prog_cxx_g=yes
2359 else
2360   echo "$as_me: failed program was:" >&5
2361 cat conftest.$ac_ext >&5
2362 ac_cv_prog_cxx_g=no
2363 fi
2364 rm -f conftest.$ac_objext conftest.$ac_ext
2365 fi
2366 echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
2367 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2368 if test "$ac_test_CXXFLAGS" = set; then
2369   CXXFLAGS=$ac_save_CXXFLAGS
2370 elif test $ac_cv_prog_cxx_g = yes; then
2371   if test "$GXX" = yes; then
2372     CXXFLAGS="-g -O2"
2373   else
2374     CXXFLAGS="-g"
2375   fi
2376 else
2377   if test "$GXX" = yes; then
2378     CXXFLAGS="-O2"
2379   else
2380     CXXFLAGS=
2381   fi
2382 fi
2383 for ac_declaration in \
2384    ''\
2385    '#include <stdlib.h>' \
2386    'extern "C" void std::exit (int) throw (); using std::exit;' \
2387    'extern "C" void std::exit (int); using std::exit;' \
2388    'extern "C" void exit (int) throw ();' \
2389    'extern "C" void exit (int);' \
2390    'void exit (int);'
2391 do
2392   cat >conftest.$ac_ext <<_ACEOF
2393 #line $LINENO "configure"
2394 #include "confdefs.h"
2395 #include <stdlib.h>
2396 $ac_declaration
2397 int
2398 main ()
2399 {
2400 exit (42);
2401   ;
2402   return 0;
2403 }
2404 _ACEOF
2405 rm -f conftest.$ac_objext
2406 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2407   (eval $ac_compile) 2>&5
2408   ac_status=$?
2409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2410   (exit $ac_status); } &&
2411          { ac_try='test -s conftest.$ac_objext'
2412   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2413   (eval $ac_try) 2>&5
2414   ac_status=$?
2415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2416   (exit $ac_status); }; }; then
2417   :
2418 else
2419   echo "$as_me: failed program was:" >&5
2420 cat conftest.$ac_ext >&5
2421 continue
2422 fi
2423 rm -f conftest.$ac_objext conftest.$ac_ext
2424   cat >conftest.$ac_ext <<_ACEOF
2425 #line $LINENO "configure"
2426 #include "confdefs.h"
2427 $ac_declaration
2428 int
2429 main ()
2430 {
2431 exit (42);
2432   ;
2433   return 0;
2434 }
2435 _ACEOF
2436 rm -f conftest.$ac_objext
2437 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2438   (eval $ac_compile) 2>&5
2439   ac_status=$?
2440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2441   (exit $ac_status); } &&
2442          { ac_try='test -s conftest.$ac_objext'
2443   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2444   (eval $ac_try) 2>&5
2445   ac_status=$?
2446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2447   (exit $ac_status); }; }; then
2448   break
2449 else
2450   echo "$as_me: failed program was:" >&5
2451 cat conftest.$ac_ext >&5
2452 fi
2453 rm -f conftest.$ac_objext conftest.$ac_ext
2454 done
2455 rm -f conftest*
2456 if test -n "$ac_declaration"; then
2457   echo '#ifdef __cplusplus' >>confdefs.h
2458   echo $ac_declaration      >>confdefs.h
2459   echo '#endif'             >>confdefs.h
2460 fi
2461
2462 ac_ext=c
2463 ac_cpp='$CPP $CPPFLAGS'
2464 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2465 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2466 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2467
2468 ac_ext=c
2469 ac_cpp='$CPP $CPPFLAGS'
2470 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2471 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2472 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2473 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2474 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2475 # On Suns, sometimes $CPP names a directory.
2476 if test -n "$CPP" && test -d "$CPP"; then
2477   CPP=
2478 fi
2479 if test -z "$CPP"; then
2480   if test "${ac_cv_prog_CPP+set}" = set; then
2481   echo $ECHO_N "(cached) $ECHO_C" >&6
2482 else
2483       # Double quotes because CPP needs to be expanded
2484     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2485     do
2486       ac_preproc_ok=false
2487 for ac_c_preproc_warn_flag in '' yes
2488 do
2489   # Use a header file that comes with gcc, so configuring glibc
2490   # with a fresh cross-compiler works.
2491   # On the NeXT, cc -E runs the code through the compiler's parser,
2492   # not just through cpp. "Syntax error" is here to catch this case.
2493   cat >conftest.$ac_ext <<_ACEOF
2494 #line $LINENO "configure"
2495 #include "confdefs.h"
2496 #include <assert.h>
2497                      Syntax error
2498 _ACEOF
2499 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2500   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2501   ac_status=$?
2502   grep -v '^ *+' conftest.er1 >conftest.err
2503   rm -f conftest.er1
2504   cat conftest.err >&5
2505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2506   (exit $ac_status); } >/dev/null; then
2507   if test -s conftest.err; then
2508     ac_cpp_err=$ac_c_preproc_warn_flag
2509   else
2510     ac_cpp_err=
2511   fi
2512 else
2513   ac_cpp_err=yes
2514 fi
2515 if test -z "$ac_cpp_err"; then
2516   :
2517 else
2518   echo "$as_me: failed program was:" >&5
2519   cat conftest.$ac_ext >&5
2520   # Broken: fails on valid input.
2521 continue
2522 fi
2523 rm -f conftest.err conftest.$ac_ext
2524
2525   # OK, works on sane cases.  Now check whether non-existent headers
2526   # can be detected and how.
2527   cat >conftest.$ac_ext <<_ACEOF
2528 #line $LINENO "configure"
2529 #include "confdefs.h"
2530 #include <ac_nonexistent.h>
2531 _ACEOF
2532 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2533   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2534   ac_status=$?
2535   grep -v '^ *+' conftest.er1 >conftest.err
2536   rm -f conftest.er1
2537   cat conftest.err >&5
2538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2539   (exit $ac_status); } >/dev/null; then
2540   if test -s conftest.err; then
2541     ac_cpp_err=$ac_c_preproc_warn_flag
2542   else
2543     ac_cpp_err=
2544   fi
2545 else
2546   ac_cpp_err=yes
2547 fi
2548 if test -z "$ac_cpp_err"; then
2549   # Broken: success on invalid input.
2550 continue
2551 else
2552   echo "$as_me: failed program was:" >&5
2553   cat conftest.$ac_ext >&5
2554   # Passes both tests.
2555 ac_preproc_ok=:
2556 break
2557 fi
2558 rm -f conftest.err conftest.$ac_ext
2559
2560 done
2561 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2562 rm -f conftest.err conftest.$ac_ext
2563 if $ac_preproc_ok; then
2564   break
2565 fi
2566
2567     done
2568     ac_cv_prog_CPP=$CPP
2569
2570 fi
2571   CPP=$ac_cv_prog_CPP
2572 else
2573   ac_cv_prog_CPP=$CPP
2574 fi
2575 echo "$as_me:$LINENO: result: $CPP" >&5
2576 echo "${ECHO_T}$CPP" >&6
2577 ac_preproc_ok=false
2578 for ac_c_preproc_warn_flag in '' yes
2579 do
2580   # Use a header file that comes with gcc, so configuring glibc
2581   # with a fresh cross-compiler works.
2582   # On the NeXT, cc -E runs the code through the compiler's parser,
2583   # not just through cpp. "Syntax error" is here to catch this case.
2584   cat >conftest.$ac_ext <<_ACEOF
2585 #line $LINENO "configure"
2586 #include "confdefs.h"
2587 #include <assert.h>
2588                      Syntax error
2589 _ACEOF
2590 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2591   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2592   ac_status=$?
2593   grep -v '^ *+' conftest.er1 >conftest.err
2594   rm -f conftest.er1
2595   cat conftest.err >&5
2596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2597   (exit $ac_status); } >/dev/null; then
2598   if test -s conftest.err; then
2599     ac_cpp_err=$ac_c_preproc_warn_flag
2600   else
2601     ac_cpp_err=
2602   fi
2603 else
2604   ac_cpp_err=yes
2605 fi
2606 if test -z "$ac_cpp_err"; then
2607   :
2608 else
2609   echo "$as_me: failed program was:" >&5
2610   cat conftest.$ac_ext >&5
2611   # Broken: fails on valid input.
2612 continue
2613 fi
2614 rm -f conftest.err conftest.$ac_ext
2615
2616   # OK, works on sane cases.  Now check whether non-existent headers
2617   # can be detected and how.
2618   cat >conftest.$ac_ext <<_ACEOF
2619 #line $LINENO "configure"
2620 #include "confdefs.h"
2621 #include <ac_nonexistent.h>
2622 _ACEOF
2623 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2624   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2625   ac_status=$?
2626   grep -v '^ *+' conftest.er1 >conftest.err
2627   rm -f conftest.er1
2628   cat conftest.err >&5
2629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2630   (exit $ac_status); } >/dev/null; then
2631   if test -s conftest.err; then
2632     ac_cpp_err=$ac_c_preproc_warn_flag
2633   else
2634     ac_cpp_err=
2635   fi
2636 else
2637   ac_cpp_err=yes
2638 fi
2639 if test -z "$ac_cpp_err"; then
2640   # Broken: success on invalid input.
2641 continue
2642 else
2643   echo "$as_me: failed program was:" >&5
2644   cat conftest.$ac_ext >&5
2645   # Passes both tests.
2646 ac_preproc_ok=:
2647 break
2648 fi
2649 rm -f conftest.err conftest.$ac_ext
2650
2651 done
2652 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2653 rm -f conftest.err conftest.$ac_ext
2654 if $ac_preproc_ok; then
2655   :
2656 else
2657   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2658 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2659    { (exit 1); exit 1; }; }
2660 fi
2661
2662 ac_ext=c
2663 ac_cpp='$CPP $CPPFLAGS'
2664 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2665 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2666 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2667
2668 ac_aux_dir=
2669 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
2670   if test -f $ac_dir/install-sh; then
2671     ac_aux_dir=$ac_dir
2672     ac_install_sh="$ac_aux_dir/install-sh -c"
2673     break
2674   elif test -f $ac_dir/install.sh; then
2675     ac_aux_dir=$ac_dir
2676     ac_install_sh="$ac_aux_dir/install.sh -c"
2677     break
2678   elif test -f $ac_dir/shtool; then
2679     ac_aux_dir=$ac_dir
2680     ac_install_sh="$ac_aux_dir/shtool install -c"
2681     break
2682   fi
2683 done
2684 if test -z "$ac_aux_dir"; then
2685   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
2686 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
2687    { (exit 1); exit 1; }; }
2688 fi
2689 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
2690 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
2691 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
2692
2693 # Find a good install program.  We prefer a C program (faster),
2694 # so one script is as good as another.  But avoid the broken or
2695 # incompatible versions:
2696 # SysV /etc/install, /usr/sbin/install
2697 # SunOS /usr/etc/install
2698 # IRIX /sbin/install
2699 # AIX /bin/install
2700 # AmigaOS /C/install, which installs bootblocks on floppy discs
2701 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2702 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2703 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2704 # ./install, which can be erroneously created by make from ./install.sh.
2705 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
2706 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
2707 if test -z "$INSTALL"; then
2708 if test "${ac_cv_path_install+set}" = set; then
2709   echo $ECHO_N "(cached) $ECHO_C" >&6
2710 else
2711   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2712 for as_dir in $PATH
2713 do
2714   IFS=$as_save_IFS
2715   test -z "$as_dir" && as_dir=.
2716   # Account for people who put trailing slashes in PATH elements.
2717 case $as_dir/ in
2718   ./ | .// | /cC/* | \
2719   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2720   /usr/ucb/* ) ;;
2721   *)
2722     # OSF1 and SCO ODT 3.0 have their own names for install.
2723     # Don't use installbsd from OSF since it installs stuff as root
2724     # by default.
2725     for ac_prog in ginstall scoinst install; do
2726       for ac_exec_ext in '' $ac_executable_extensions; do
2727         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2728           if test $ac_prog = install &&
2729             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2730             # AIX install.  It has an incompatible calling convention.
2731             :
2732           elif test $ac_prog = install &&
2733             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2734             # program-specific install script used by HP pwplus--don't use.
2735             :
2736           else
2737             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2738             break 3
2739           fi
2740         fi
2741       done
2742     done
2743     ;;
2744 esac
2745 done
2746
2747
2748 fi
2749   if test "${ac_cv_path_install+set}" = set; then
2750     INSTALL=$ac_cv_path_install
2751   else
2752     # As a last resort, use the slow shell script.  We don't cache a
2753     # path for INSTALL within a source directory, because that will
2754     # break other packages using the cache if that directory is
2755     # removed, or if the path is relative.
2756     INSTALL=$ac_install_sh
2757   fi
2758 fi
2759 echo "$as_me:$LINENO: result: $INSTALL" >&5
2760 echo "${ECHO_T}$INSTALL" >&6
2761
2762 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2763 # It thinks the first close brace ends the variable substitution.
2764 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2765
2766 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2767
2768 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2769
2770 if test -n "$ac_tool_prefix"; then
2771   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2772 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2773 echo "$as_me:$LINENO: checking for $ac_word" >&5
2774 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2775 if test "${ac_cv_prog_RANLIB+set}" = set; then
2776   echo $ECHO_N "(cached) $ECHO_C" >&6
2777 else
2778   if test -n "$RANLIB"; then
2779   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2780 else
2781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2782 for as_dir in $PATH
2783 do
2784   IFS=$as_save_IFS
2785   test -z "$as_dir" && as_dir=.
2786   for ac_exec_ext in '' $ac_executable_extensions; do
2787   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2788     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2789     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2790     break 2
2791   fi
2792 done
2793 done
2794
2795 fi
2796 fi
2797 RANLIB=$ac_cv_prog_RANLIB
2798 if test -n "$RANLIB"; then
2799   echo "$as_me:$LINENO: result: $RANLIB" >&5
2800 echo "${ECHO_T}$RANLIB" >&6
2801 else
2802   echo "$as_me:$LINENO: result: no" >&5
2803 echo "${ECHO_T}no" >&6
2804 fi
2805
2806 fi
2807 if test -z "$ac_cv_prog_RANLIB"; then
2808   ac_ct_RANLIB=$RANLIB
2809   # Extract the first word of "ranlib", so it can be a program name with args.
2810 set dummy ranlib; ac_word=$2
2811 echo "$as_me:$LINENO: checking for $ac_word" >&5
2812 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2813 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2814   echo $ECHO_N "(cached) $ECHO_C" >&6
2815 else
2816   if test -n "$ac_ct_RANLIB"; then
2817   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2818 else
2819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2820 for as_dir in $PATH
2821 do
2822   IFS=$as_save_IFS
2823   test -z "$as_dir" && as_dir=.
2824   for ac_exec_ext in '' $ac_executable_extensions; do
2825   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2826     ac_cv_prog_ac_ct_RANLIB="ranlib"
2827     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2828     break 2
2829   fi
2830 done
2831 done
2832
2833   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2834 fi
2835 fi
2836 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2837 if test -n "$ac_ct_RANLIB"; then
2838   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
2839 echo "${ECHO_T}$ac_ct_RANLIB" >&6
2840 else
2841   echo "$as_me:$LINENO: result: no" >&5
2842 echo "${ECHO_T}no" >&6
2843 fi
2844
2845   RANLIB=$ac_ct_RANLIB
2846 else
2847   RANLIB="$ac_cv_prog_RANLIB"
2848 fi
2849
2850
2851 for ac_prog in flex lex
2852 do
2853   # Extract the first word of "$ac_prog", so it can be a program name with args.
2854 set dummy $ac_prog; ac_word=$2
2855 echo "$as_me:$LINENO: checking for $ac_word" >&5
2856 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2857 if test "${ac_cv_prog_LEX+set}" = set; then
2858   echo $ECHO_N "(cached) $ECHO_C" >&6
2859 else
2860   if test -n "$LEX"; then
2861   ac_cv_prog_LEX="$LEX" # Let the user override the test.
2862 else
2863 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2864 for as_dir in $PATH
2865 do
2866   IFS=$as_save_IFS
2867   test -z "$as_dir" && as_dir=.
2868   for ac_exec_ext in '' $ac_executable_extensions; do
2869   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2870     ac_cv_prog_LEX="$ac_prog"
2871     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2872     break 2
2873   fi
2874 done
2875 done
2876
2877 fi
2878 fi
2879 LEX=$ac_cv_prog_LEX
2880 if test -n "$LEX"; then
2881   echo "$as_me:$LINENO: result: $LEX" >&5
2882 echo "${ECHO_T}$LEX" >&6
2883 else
2884   echo "$as_me:$LINENO: result: no" >&5
2885 echo "${ECHO_T}no" >&6
2886 fi
2887
2888   test -n "$LEX" && break
2889 done
2890 test -n "$LEX" || LEX=":"
2891
2892 if test -z "$LEXLIB"
2893 then
2894   echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5
2895 echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6
2896 if test "${ac_cv_lib_fl_yywrap+set}" = set; then
2897   echo $ECHO_N "(cached) $ECHO_C" >&6
2898 else
2899   ac_check_lib_save_LIBS=$LIBS
2900 LIBS="-lfl  $LIBS"
2901 cat >conftest.$ac_ext <<_ACEOF
2902 #line $LINENO "configure"
2903 #include "confdefs.h"
2904
2905 /* Override any gcc2 internal prototype to avoid an error.  */
2906 #ifdef __cplusplus
2907 extern "C"
2908 #endif
2909 /* We use char because int might match the return type of a gcc2
2910    builtin and then its argument prototype would still apply.  */
2911 char yywrap ();
2912 int
2913 main ()
2914 {
2915 yywrap ();
2916   ;
2917   return 0;
2918 }
2919 _ACEOF
2920 rm -f conftest.$ac_objext conftest$ac_exeext
2921 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2922   (eval $ac_link) 2>&5
2923   ac_status=$?
2924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2925   (exit $ac_status); } &&
2926          { ac_try='test -s conftest$ac_exeext'
2927   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2928   (eval $ac_try) 2>&5
2929   ac_status=$?
2930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2931   (exit $ac_status); }; }; then
2932   ac_cv_lib_fl_yywrap=yes
2933 else
2934   echo "$as_me: failed program was:" >&5
2935 cat conftest.$ac_ext >&5
2936 ac_cv_lib_fl_yywrap=no
2937 fi
2938 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2939 LIBS=$ac_check_lib_save_LIBS
2940 fi
2941 echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5
2942 echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6
2943 if test $ac_cv_lib_fl_yywrap = yes; then
2944   LEXLIB="-lfl"
2945 else
2946   echo "$as_me:$LINENO: checking for yywrap in -ll" >&5
2947 echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6
2948 if test "${ac_cv_lib_l_yywrap+set}" = set; then
2949   echo $ECHO_N "(cached) $ECHO_C" >&6
2950 else
2951   ac_check_lib_save_LIBS=$LIBS
2952 LIBS="-ll  $LIBS"
2953 cat >conftest.$ac_ext <<_ACEOF
2954 #line $LINENO "configure"
2955 #include "confdefs.h"
2956
2957 /* Override any gcc2 internal prototype to avoid an error.  */
2958 #ifdef __cplusplus
2959 extern "C"
2960 #endif
2961 /* We use char because int might match the return type of a gcc2
2962    builtin and then its argument prototype would still apply.  */
2963 char yywrap ();
2964 int
2965 main ()
2966 {
2967 yywrap ();
2968   ;
2969   return 0;
2970 }
2971 _ACEOF
2972 rm -f conftest.$ac_objext conftest$ac_exeext
2973 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2974   (eval $ac_link) 2>&5
2975   ac_status=$?
2976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2977   (exit $ac_status); } &&
2978          { ac_try='test -s conftest$ac_exeext'
2979   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2980   (eval $ac_try) 2>&5
2981   ac_status=$?
2982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2983   (exit $ac_status); }; }; then
2984   ac_cv_lib_l_yywrap=yes
2985 else
2986   echo "$as_me: failed program was:" >&5
2987 cat conftest.$ac_ext >&5
2988 ac_cv_lib_l_yywrap=no
2989 fi
2990 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2991 LIBS=$ac_check_lib_save_LIBS
2992 fi
2993 echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5
2994 echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6
2995 if test $ac_cv_lib_l_yywrap = yes; then
2996   LEXLIB="-ll"
2997 fi
2998
2999 fi
3000
3001 fi
3002
3003 if test "x$LEX" != "x:"; then
3004   echo "$as_me:$LINENO: checking lex output file root" >&5
3005 echo $ECHO_N "checking lex output file root... $ECHO_C" >&6
3006 if test "${ac_cv_prog_lex_root+set}" = set; then
3007   echo $ECHO_N "(cached) $ECHO_C" >&6
3008 else
3009   # The minimal lex program is just a single line: %%.  But some broken lexes
3010 # (Solaris, I think it was) want two %% lines, so accommodate them.
3011 cat >conftest.l <<_ACEOF
3012 %%
3013 %%
3014 _ACEOF
3015 { (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5
3016   (eval $LEX conftest.l) 2>&5
3017   ac_status=$?
3018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3019   (exit $ac_status); }
3020 if test -f lex.yy.c; then
3021   ac_cv_prog_lex_root=lex.yy
3022 elif test -f lexyy.c; then
3023   ac_cv_prog_lex_root=lexyy
3024 else
3025   { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
3026 echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
3027    { (exit 1); exit 1; }; }
3028 fi
3029 fi
3030 echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
3031 echo "${ECHO_T}$ac_cv_prog_lex_root" >&6
3032 rm -f conftest.l
3033 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
3034
3035 echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
3036 echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6
3037 if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
3038   echo $ECHO_N "(cached) $ECHO_C" >&6
3039 else
3040   # POSIX says lex can declare yytext either as a pointer or an array; the
3041 # default is implementation-dependent. Figure out which it is, since
3042 # not all implementations provide the %pointer and %array declarations.
3043 ac_cv_prog_lex_yytext_pointer=no
3044 echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
3045 ac_save_LIBS=$LIBS
3046 LIBS="$LIBS $LEXLIB"
3047 cat >conftest.$ac_ext <<_ACEOF
3048 `cat $LEX_OUTPUT_ROOT.c`
3049 _ACEOF
3050 rm -f conftest.$ac_objext conftest$ac_exeext
3051 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3052   (eval $ac_link) 2>&5
3053   ac_status=$?
3054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3055   (exit $ac_status); } &&
3056          { ac_try='test -s conftest$ac_exeext'
3057   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3058   (eval $ac_try) 2>&5
3059   ac_status=$?
3060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3061   (exit $ac_status); }; }; then
3062   ac_cv_prog_lex_yytext_pointer=yes
3063 else
3064   echo "$as_me: failed program was:" >&5
3065 cat conftest.$ac_ext >&5
3066 fi
3067 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3068 LIBS=$ac_save_LIBS
3069 rm -f "${LEX_OUTPUT_ROOT}.c"
3070
3071 fi
3072 echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
3073 echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6
3074 if test $ac_cv_prog_lex_yytext_pointer = yes; then
3075
3076 cat >>confdefs.h <<\_ACEOF
3077 #define YYTEXT_POINTER 1
3078 _ACEOF
3079
3080 fi
3081
3082 fi
3083 # Extract the first word of "bison", so it can be a program name with args.
3084 set dummy bison; ac_word=$2
3085 echo "$as_me:$LINENO: checking for $ac_word" >&5
3086 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3087 if test "${ac_cv_prog_YACC+set}" = set; then
3088   echo $ECHO_N "(cached) $ECHO_C" >&6
3089 else
3090   if test -n "$YACC"; then
3091   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3092 else
3093 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3094 for as_dir in $PATH
3095 do
3096   IFS=$as_save_IFS
3097   test -z "$as_dir" && as_dir=.
3098   for ac_exec_ext in '' $ac_executable_extensions; do
3099   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3100     ac_cv_prog_YACC="bison -y"
3101     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3102     break 2
3103   fi
3104 done
3105 done
3106
3107   test -z "$ac_cv_prog_YACC" && ac_cv_prog_YACC=":"
3108 fi
3109 fi
3110 YACC=$ac_cv_prog_YACC
3111 if test -n "$YACC"; then
3112   echo "$as_me:$LINENO: result: $YACC" >&5
3113 echo "${ECHO_T}$YACC" >&6
3114 else
3115   echo "$as_me:$LINENO: result: no" >&5
3116 echo "${ECHO_T}no" >&6
3117 fi
3118
3119 # Extract the first word of "autoconf", so it can be a program name with args.
3120 set dummy autoconf; ac_word=$2
3121 echo "$as_me:$LINENO: checking for $ac_word" >&5
3122 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3123 if test "${ac_cv_prog_AUTOCONF+set}" = set; then
3124   echo $ECHO_N "(cached) $ECHO_C" >&6
3125 else
3126   if test -n "$AUTOCONF"; then
3127   ac_cv_prog_AUTOCONF="$AUTOCONF" # Let the user override the test.
3128 else
3129 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3130 for as_dir in $PATH
3131 do
3132   IFS=$as_save_IFS
3133   test -z "$as_dir" && as_dir=.
3134   for ac_exec_ext in '' $ac_executable_extensions; do
3135   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3136     ac_cv_prog_AUTOCONF="autoconf"
3137     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3138     break 2
3139   fi
3140 done
3141 done
3142
3143   test -z "$ac_cv_prog_AUTOCONF" && ac_cv_prog_AUTOCONF=":"
3144 fi
3145 fi
3146 AUTOCONF=$ac_cv_prog_AUTOCONF
3147 if test -n "$AUTOCONF"; then
3148   echo "$as_me:$LINENO: result: $AUTOCONF" >&5
3149 echo "${ECHO_T}$AUTOCONF" >&6
3150 else
3151   echo "$as_me:$LINENO: result: no" >&5
3152 echo "${ECHO_T}no" >&6
3153 fi
3154
3155 # Extract the first word of "strip", so it can be a program name with args.
3156 set dummy strip; ac_word=$2
3157 echo "$as_me:$LINENO: checking for $ac_word" >&5
3158 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3159 if test "${ac_cv_prog_STRIP+set}" = set; then
3160   echo $ECHO_N "(cached) $ECHO_C" >&6
3161 else
3162   if test -n "$STRIP"; then
3163   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3164 else
3165 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3166 for as_dir in $PATH
3167 do
3168   IFS=$as_save_IFS
3169   test -z "$as_dir" && as_dir=.
3170   for ac_exec_ext in '' $ac_executable_extensions; do
3171   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3172     ac_cv_prog_STRIP="strip"
3173     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3174     break 2
3175   fi
3176 done
3177 done
3178
3179   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
3180 fi
3181 fi
3182 STRIP=$ac_cv_prog_STRIP
3183 if test -n "$STRIP"; then
3184   echo "$as_me:$LINENO: result: $STRIP" >&5
3185 echo "${ECHO_T}$STRIP" >&6
3186 else
3187   echo "$as_me:$LINENO: result: no" >&5
3188 echo "${ECHO_T}no" >&6
3189 fi
3190
3191 # Extract the first word of "as", so it can be a program name with args.
3192 set dummy as; ac_word=$2
3193 echo "$as_me:$LINENO: checking for $ac_word" >&5
3194 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3195 if test "${ac_cv_prog_AS+set}" = set; then
3196   echo $ECHO_N "(cached) $ECHO_C" >&6
3197 else
3198   if test -n "$AS"; then
3199   ac_cv_prog_AS="$AS" # Let the user override the test.
3200 else
3201 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3202 for as_dir in $PATH
3203 do
3204   IFS=$as_save_IFS
3205   test -z "$as_dir" && as_dir=.
3206   for ac_exec_ext in '' $ac_executable_extensions; do
3207   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3208     ac_cv_prog_AS="as"
3209     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3210     break 2
3211   fi
3212 done
3213 done
3214
3215   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS=":"
3216 fi
3217 fi
3218 AS=$ac_cv_prog_AS
3219 if test -n "$AS"; then
3220   echo "$as_me:$LINENO: result: $AS" >&5
3221 echo "${ECHO_T}$AS" >&6
3222 else
3223   echo "$as_me:$LINENO: result: no" >&5
3224 echo "${ECHO_T}no" >&6
3225 fi
3226
3227 # Extract the first word of "cp", so it can be a program name with args.
3228 set dummy cp; ac_word=$2
3229 echo "$as_me:$LINENO: checking for $ac_word" >&5
3230 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3231 if test "${ac_cv_prog_CP+set}" = set; then
3232   echo $ECHO_N "(cached) $ECHO_C" >&6
3233 else
3234   if test -n "$CP"; then
3235   ac_cv_prog_CP="$CP" # Let the user override the test.
3236 else
3237 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3238 for as_dir in $PATH
3239 do
3240   IFS=$as_save_IFS
3241   test -z "$as_dir" && as_dir=.
3242   for ac_exec_ext in '' $ac_executable_extensions; do
3243   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3244     ac_cv_prog_CP="cp"
3245     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3246     break 2
3247   fi
3248 done
3249 done
3250
3251   test -z "$ac_cv_prog_CP" && ac_cv_prog_CP=":"
3252 fi
3253 fi
3254 CP=$ac_cv_prog_CP
3255 if test -n "$CP"; then
3256   echo "$as_me:$LINENO: result: $CP" >&5
3257 echo "${ECHO_T}$CP" >&6
3258 else
3259   echo "$as_me:$LINENO: result: no" >&5
3260 echo "${ECHO_T}no" >&6
3261 fi
3262
3263
3264
3265
3266 if test "$YACC" = ":"; then
3267   { { echo "$as_me:$LINENO: error: Cannot find required program bison." >&5
3268 echo "$as_me: error: Cannot find required program bison." >&2;}
3269    { (exit 1); exit 1; }; }
3270  fi
3271
3272 if test "$LEX" = ":"; then
3273   { { echo "$as_me:$LINENO: error: Cannot find required program lex." >&5
3274 echo "$as_me: error: Cannot find required program lex." >&2;}
3275    { (exit 1); exit 1; }; }
3276  fi
3277
3278
3279 ac_ext=c
3280 ac_cpp='$CPP $CPPFLAGS'
3281 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3282 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3283 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3284
3285
3286 # Checking for header files.
3287 # ===========================================================================
3288
3289 echo "$as_me:$LINENO: checking for egrep" >&5
3290 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3291 if test "${ac_cv_prog_egrep+set}" = set; then
3292   echo $ECHO_N "(cached) $ECHO_C" >&6
3293 else
3294   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3295     then ac_cv_prog_egrep='grep -E'
3296     else ac_cv_prog_egrep='egrep'
3297     fi
3298 fi
3299 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3300 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3301  EGREP=$ac_cv_prog_egrep
3302
3303
3304 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3305 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3306 if test "${ac_cv_header_stdc+set}" = set; then
3307   echo $ECHO_N "(cached) $ECHO_C" >&6
3308 else
3309   cat >conftest.$ac_ext <<_ACEOF
3310 #line $LINENO "configure"
3311 #include "confdefs.h"
3312 #include <stdlib.h>
3313 #include <stdarg.h>
3314 #include <string.h>
3315 #include <float.h>
3316
3317 _ACEOF
3318 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3319   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3320   ac_status=$?
3321   grep -v '^ *+' conftest.er1 >conftest.err
3322   rm -f conftest.er1
3323   cat conftest.err >&5
3324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3325   (exit $ac_status); } >/dev/null; then
3326   if test -s conftest.err; then
3327     ac_cpp_err=$ac_c_preproc_warn_flag
3328   else
3329     ac_cpp_err=
3330   fi
3331 else
3332   ac_cpp_err=yes
3333 fi
3334 if test -z "$ac_cpp_err"; then
3335   ac_cv_header_stdc=yes
3336 else
3337   echo "$as_me: failed program was:" >&5
3338   cat conftest.$ac_ext >&5
3339   ac_cv_header_stdc=no
3340 fi
3341 rm -f conftest.err conftest.$ac_ext
3342
3343 if test $ac_cv_header_stdc = yes; then
3344   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3345   cat >conftest.$ac_ext <<_ACEOF
3346 #line $LINENO "configure"
3347 #include "confdefs.h"
3348 #include <string.h>
3349
3350 _ACEOF
3351 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3352   $EGREP "memchr" >/dev/null 2>&1; then
3353   :
3354 else
3355   ac_cv_header_stdc=no
3356 fi
3357 rm -f conftest*
3358
3359 fi
3360
3361 if test $ac_cv_header_stdc = yes; then
3362   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3363   cat >conftest.$ac_ext <<_ACEOF
3364 #line $LINENO "configure"
3365 #include "confdefs.h"
3366 #include <stdlib.h>
3367
3368 _ACEOF
3369 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3370   $EGREP "free" >/dev/null 2>&1; then
3371   :
3372 else
3373   ac_cv_header_stdc=no
3374 fi
3375 rm -f conftest*
3376
3377 fi
3378
3379 if test $ac_cv_header_stdc = yes; then
3380   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3381   if test "$cross_compiling" = yes; then
3382   :
3383 else
3384   cat >conftest.$ac_ext <<_ACEOF
3385 #line $LINENO "configure"
3386 #include "confdefs.h"
3387 #include <ctype.h>
3388 #if ((' ' & 0x0FF) == 0x020)
3389 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3390 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3391 #else
3392 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3393                      || ('j' <= (c) && (c) <= 'r') \
3394                      || ('s' <= (c) && (c) <= 'z'))
3395 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3396 #endif
3397
3398 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3399 int
3400 main ()
3401 {
3402   int i;
3403   for (i = 0; i < 256; i++)
3404     if (XOR (islower (i), ISLOWER (i))
3405         || toupper (i) != TOUPPER (i))
3406       exit(2);
3407   exit (0);
3408 }
3409 _ACEOF
3410 rm -f conftest$ac_exeext
3411 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3412   (eval $ac_link) 2>&5
3413   ac_status=$?
3414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3415   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3416   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3417   (eval $ac_try) 2>&5
3418   ac_status=$?
3419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3420   (exit $ac_status); }; }; then
3421   :
3422 else
3423   echo "$as_me: program exited with status $ac_status" >&5
3424 echo "$as_me: failed program was:" >&5
3425 cat conftest.$ac_ext >&5
3426 ( exit $ac_status )
3427 ac_cv_header_stdc=no
3428 fi
3429 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3430 fi
3431 fi
3432 fi
3433 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3434 echo "${ECHO_T}$ac_cv_header_stdc" >&6
3435 if test $ac_cv_header_stdc = yes; then
3436
3437 cat >>confdefs.h <<\_ACEOF
3438 #define STDC_HEADERS 1
3439 _ACEOF
3440
3441 fi
3442
3443 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3454                   inttypes.h stdint.h unistd.h
3455 do
3456 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3457 echo "$as_me:$LINENO: checking for $ac_header" >&5
3458 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3459 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3460   echo $ECHO_N "(cached) $ECHO_C" >&6
3461 else
3462   cat >conftest.$ac_ext <<_ACEOF
3463 #line $LINENO "configure"
3464 #include "confdefs.h"
3465 $ac_includes_default
3466
3467 #include <$ac_header>
3468 _ACEOF
3469 rm -f conftest.$ac_objext
3470 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3471   (eval $ac_compile) 2>&5
3472   ac_status=$?
3473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3474   (exit $ac_status); } &&
3475          { ac_try='test -s conftest.$ac_objext'
3476   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3477   (eval $ac_try) 2>&5
3478   ac_status=$?
3479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3480   (exit $ac_status); }; }; then
3481   eval "$as_ac_Header=yes"
3482 else
3483   echo "$as_me: failed program was:" >&5
3484 cat conftest.$ac_ext >&5
3485 eval "$as_ac_Header=no"
3486 fi
3487 rm -f conftest.$ac_objext conftest.$ac_ext
3488 fi
3489 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3490 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3491 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3492   cat >>confdefs.h <<_ACEOF
3493 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3494 _ACEOF
3495
3496 fi
3497
3498 done
3499
3500
3501
3502 for ac_header in getopt.h
3503 do
3504 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3505 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3506   echo "$as_me:$LINENO: checking for $ac_header" >&5
3507 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3508 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3509   echo $ECHO_N "(cached) $ECHO_C" >&6
3510 fi
3511 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3512 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3513 else
3514   # Is the header compilable?
3515 echo "$as_me:$LINENO: checking $ac_header usability" >&5
3516 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3517 cat >conftest.$ac_ext <<_ACEOF
3518 #line $LINENO "configure"
3519 #include "confdefs.h"
3520 $ac_includes_default
3521 #include <$ac_header>
3522 _ACEOF
3523 rm -f conftest.$ac_objext
3524 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3525   (eval $ac_compile) 2>&5
3526   ac_status=$?
3527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3528   (exit $ac_status); } &&
3529          { ac_try='test -s conftest.$ac_objext'
3530   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3531   (eval $ac_try) 2>&5
3532   ac_status=$?
3533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3534   (exit $ac_status); }; }; then
3535   ac_header_compiler=yes
3536 else
3537   echo "$as_me: failed program was:" >&5
3538 cat conftest.$ac_ext >&5
3539 ac_header_compiler=no
3540 fi
3541 rm -f conftest.$ac_objext conftest.$ac_ext
3542 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3543 echo "${ECHO_T}$ac_header_compiler" >&6
3544
3545 # Is the header present?
3546 echo "$as_me:$LINENO: checking $ac_header presence" >&5
3547 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3548 cat >conftest.$ac_ext <<_ACEOF
3549 #line $LINENO "configure"
3550 #include "confdefs.h"
3551 #include <$ac_header>
3552 _ACEOF
3553 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3554   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3555   ac_status=$?
3556   grep -v '^ *+' conftest.er1 >conftest.err
3557   rm -f conftest.er1
3558   cat conftest.err >&5
3559   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3560   (exit $ac_status); } >/dev/null; then
3561   if test -s conftest.err; then
3562     ac_cpp_err=$ac_c_preproc_warn_flag
3563   else
3564     ac_cpp_err=
3565   fi
3566 else
3567   ac_cpp_err=yes
3568 fi
3569 if test -z "$ac_cpp_err"; then
3570   ac_header_preproc=yes
3571 else
3572   echo "$as_me: failed program was:" >&5
3573   cat conftest.$ac_ext >&5
3574   ac_header_preproc=no
3575 fi
3576 rm -f conftest.err conftest.$ac_ext
3577 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3578 echo "${ECHO_T}$ac_header_preproc" >&6
3579
3580 # So?  What about this header?
3581 case $ac_header_compiler:$ac_header_preproc in
3582   yes:no )
3583     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3584 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3585     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3586 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3587   no:yes )
3588     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3589 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3590     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3591 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3592     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3593 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3594 esac
3595 echo "$as_me:$LINENO: checking for $ac_header" >&5
3596 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3597 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3598   echo $ECHO_N "(cached) $ECHO_C" >&6
3599 else
3600   eval "$as_ac_Header=$ac_header_preproc"
3601 fi
3602 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3603 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3604
3605 fi
3606 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3607   cat >>confdefs.h <<_ACEOF
3608 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3609 _ACEOF
3610
3611 fi
3612
3613 done
3614
3615
3616 for ac_header in unistd.h
3617 do
3618 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3619 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3620   echo "$as_me:$LINENO: checking for $ac_header" >&5
3621 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3622 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3623   echo $ECHO_N "(cached) $ECHO_C" >&6
3624 fi
3625 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3626 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3627 else
3628   # Is the header compilable?
3629 echo "$as_me:$LINENO: checking $ac_header usability" >&5
3630 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3631 cat >conftest.$ac_ext <<_ACEOF
3632 #line $LINENO "configure"
3633 #include "confdefs.h"
3634 $ac_includes_default
3635 #include <$ac_header>
3636 _ACEOF
3637 rm -f conftest.$ac_objext
3638 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3639   (eval $ac_compile) 2>&5
3640   ac_status=$?
3641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3642   (exit $ac_status); } &&
3643          { ac_try='test -s conftest.$ac_objext'
3644   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3645   (eval $ac_try) 2>&5
3646   ac_status=$?
3647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3648   (exit $ac_status); }; }; then
3649   ac_header_compiler=yes
3650 else
3651   echo "$as_me: failed program was:" >&5
3652 cat conftest.$ac_ext >&5
3653 ac_header_compiler=no
3654 fi
3655 rm -f conftest.$ac_objext conftest.$ac_ext
3656 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3657 echo "${ECHO_T}$ac_header_compiler" >&6
3658
3659 # Is the header present?
3660 echo "$as_me:$LINENO: checking $ac_header presence" >&5
3661 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3662 cat >conftest.$ac_ext <<_ACEOF
3663 #line $LINENO "configure"
3664 #include "confdefs.h"
3665 #include <$ac_header>
3666 _ACEOF
3667 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3668   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3669   ac_status=$?
3670   grep -v '^ *+' conftest.er1 >conftest.err
3671   rm -f conftest.er1
3672   cat conftest.err >&5
3673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3674   (exit $ac_status); } >/dev/null; then
3675   if test -s conftest.err; then
3676     ac_cpp_err=$ac_c_preproc_warn_flag
3677   else
3678     ac_cpp_err=
3679   fi
3680 else
3681   ac_cpp_err=yes
3682 fi
3683 if test -z "$ac_cpp_err"; then
3684   ac_header_preproc=yes
3685 else
3686   echo "$as_me: failed program was:" >&5
3687   cat conftest.$ac_ext >&5
3688   ac_header_preproc=no
3689 fi
3690 rm -f conftest.err conftest.$ac_ext
3691 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3692 echo "${ECHO_T}$ac_header_preproc" >&6
3693
3694 # So?  What about this header?
3695 case $ac_header_compiler:$ac_header_preproc in
3696   yes:no )
3697     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3698 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3699     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3700 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3701   no:yes )
3702     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3703 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3704     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3705 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3706     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3707 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3708 esac
3709 echo "$as_me:$LINENO: checking for $ac_header" >&5
3710 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3711 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3712   echo $ECHO_N "(cached) $ECHO_C" >&6
3713 else
3714   eval "$as_ac_Header=$ac_header_preproc"
3715 fi
3716 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3717 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3718
3719 fi
3720 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3721   cat >>confdefs.h <<_ACEOF
3722 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3723 _ACEOF
3724
3725 fi
3726
3727 done
3728
3729
3730 for ac_header in malloc.h
3731 do
3732 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3733 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3734   echo "$as_me:$LINENO: checking for $ac_header" >&5
3735 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3736 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3737   echo $ECHO_N "(cached) $ECHO_C" >&6
3738 fi
3739 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3740 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3741 else
3742   # Is the header compilable?
3743 echo "$as_me:$LINENO: checking $ac_header usability" >&5
3744 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3745 cat >conftest.$ac_ext <<_ACEOF
3746 #line $LINENO "configure"
3747 #include "confdefs.h"
3748 $ac_includes_default
3749 #include <$ac_header>
3750 _ACEOF
3751 rm -f conftest.$ac_objext
3752 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3753   (eval $ac_compile) 2>&5
3754   ac_status=$?
3755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3756   (exit $ac_status); } &&
3757          { ac_try='test -s conftest.$ac_objext'
3758   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3759   (eval $ac_try) 2>&5
3760   ac_status=$?
3761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3762   (exit $ac_status); }; }; then
3763   ac_header_compiler=yes
3764 else
3765   echo "$as_me: failed program was:" >&5
3766 cat conftest.$ac_ext >&5
3767 ac_header_compiler=no
3768 fi
3769 rm -f conftest.$ac_objext conftest.$ac_ext
3770 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3771 echo "${ECHO_T}$ac_header_compiler" >&6
3772
3773 # Is the header present?
3774 echo "$as_me:$LINENO: checking $ac_header presence" >&5
3775 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3776 cat >conftest.$ac_ext <<_ACEOF
3777 #line $LINENO "configure"
3778 #include "confdefs.h"
3779 #include <$ac_header>
3780 _ACEOF
3781 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3782   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3783   ac_status=$?
3784   grep -v '^ *+' conftest.er1 >conftest.err
3785   rm -f conftest.er1
3786   cat conftest.err >&5
3787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3788   (exit $ac_status); } >/dev/null; then
3789   if test -s conftest.err; then
3790     ac_cpp_err=$ac_c_preproc_warn_flag
3791   else
3792     ac_cpp_err=
3793   fi
3794 else
3795   ac_cpp_err=yes
3796 fi
3797 if test -z "$ac_cpp_err"; then
3798   ac_header_preproc=yes
3799 else
3800   echo "$as_me: failed program was:" >&5
3801   cat conftest.$ac_ext >&5
3802   ac_header_preproc=no
3803 fi
3804 rm -f conftest.err conftest.$ac_ext
3805 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3806 echo "${ECHO_T}$ac_header_preproc" >&6
3807
3808 # So?  What about this header?
3809 case $ac_header_compiler:$ac_header_preproc in
3810   yes:no )
3811     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3812 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3813     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3814 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3815   no:yes )
3816     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3817 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3818     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3819 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3820     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3821 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3822 esac
3823 echo "$as_me:$LINENO: checking for $ac_header" >&5
3824 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3825 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3826   echo $ECHO_N "(cached) $ECHO_C" >&6
3827 else
3828   eval "$as_ac_Header=$ac_header_preproc"
3829 fi
3830 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3831 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3832
3833 fi
3834 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3835   cat >>confdefs.h <<_ACEOF
3836 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3837 _ACEOF
3838
3839 fi
3840
3841 done
3842
3843
3844 for ac_header in sys/isa_defs.h
3845 do
3846 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3847 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3848   echo "$as_me:$LINENO: checking for $ac_header" >&5
3849 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3850 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3851   echo $ECHO_N "(cached) $ECHO_C" >&6
3852 fi
3853 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3854 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3855 else
3856   # Is the header compilable?
3857 echo "$as_me:$LINENO: checking $ac_header usability" >&5
3858 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3859 cat >conftest.$ac_ext <<_ACEOF
3860 #line $LINENO "configure"
3861 #include "confdefs.h"
3862 $ac_includes_default
3863 #include <$ac_header>
3864 _ACEOF
3865 rm -f conftest.$ac_objext
3866 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3867   (eval $ac_compile) 2>&5
3868   ac_status=$?
3869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3870   (exit $ac_status); } &&
3871          { ac_try='test -s conftest.$ac_objext'
3872   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3873   (eval $ac_try) 2>&5
3874   ac_status=$?
3875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3876   (exit $ac_status); }; }; then
3877   ac_header_compiler=yes
3878 else
3879   echo "$as_me: failed program was:" >&5
3880 cat conftest.$ac_ext >&5
3881 ac_header_compiler=no
3882 fi
3883 rm -f conftest.$ac_objext conftest.$ac_ext
3884 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3885 echo "${ECHO_T}$ac_header_compiler" >&6
3886
3887 # Is the header present?
3888 echo "$as_me:$LINENO: checking $ac_header presence" >&5
3889 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3890 cat >conftest.$ac_ext <<_ACEOF
3891 #line $LINENO "configure"
3892 #include "confdefs.h"
3893 #include <$ac_header>
3894 _ACEOF
3895 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3896   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3897   ac_status=$?
3898   grep -v '^ *+' conftest.er1 >conftest.err
3899   rm -f conftest.er1
3900   cat conftest.err >&5
3901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3902   (exit $ac_status); } >/dev/null; then
3903   if test -s conftest.err; then
3904     ac_cpp_err=$ac_c_preproc_warn_flag
3905   else
3906     ac_cpp_err=
3907   fi
3908 else
3909   ac_cpp_err=yes
3910 fi
3911 if test -z "$ac_cpp_err"; then
3912   ac_header_preproc=yes
3913 else
3914   echo "$as_me: failed program was:" >&5
3915   cat conftest.$ac_ext >&5
3916   ac_header_preproc=no
3917 fi
3918 rm -f conftest.err conftest.$ac_ext
3919 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3920 echo "${ECHO_T}$ac_header_preproc" >&6
3921
3922 # So?  What about this header?
3923 case $ac_header_compiler:$ac_header_preproc in
3924   yes:no )
3925     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3926 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3927     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3928 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3929   no:yes )
3930     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3931 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3932     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3933 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3934     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3935 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3936 esac
3937 echo "$as_me:$LINENO: checking for $ac_header" >&5
3938 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3939 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3940   echo $ECHO_N "(cached) $ECHO_C" >&6
3941 else
3942   eval "$as_ac_Header=$ac_header_preproc"
3943 fi
3944 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3945 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3946
3947 fi
3948 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3949   cat >>confdefs.h <<_ACEOF
3950 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3951 _ACEOF
3952
3953 fi
3954
3955 done
3956
3957
3958 for ac_header in sys/socket.h
3959 do
3960 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3961 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3962   echo "$as_me:$LINENO: checking for $ac_header" >&5
3963 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3964 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3965   echo $ECHO_N "(cached) $ECHO_C" >&6
3966 fi
3967 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3968 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3969 else
3970   # Is the header compilable?
3971 echo "$as_me:$LINENO: checking $ac_header usability" >&5
3972 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3973 cat >conftest.$ac_ext <<_ACEOF
3974 #line $LINENO "configure"
3975 #include "confdefs.h"
3976 $ac_includes_default
3977 #include <$ac_header>
3978 _ACEOF
3979 rm -f conftest.$ac_objext
3980 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3981   (eval $ac_compile) 2>&5
3982   ac_status=$?
3983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3984   (exit $ac_status); } &&
3985          { ac_try='test -s conftest.$ac_objext'
3986   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3987   (eval $ac_try) 2>&5
3988   ac_status=$?
3989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3990   (exit $ac_status); }; }; then
3991   ac_header_compiler=yes
3992 else
3993   echo "$as_me: failed program was:" >&5
3994 cat conftest.$ac_ext >&5
3995 ac_header_compiler=no
3996 fi
3997 rm -f conftest.$ac_objext conftest.$ac_ext
3998 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3999 echo "${ECHO_T}$ac_header_compiler" >&6
4000
4001 # Is the header present?
4002 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4003 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4004 cat >conftest.$ac_ext <<_ACEOF
4005 #line $LINENO "configure"
4006 #include "confdefs.h"
4007 #include <$ac_header>
4008 _ACEOF
4009 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4010   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4011   ac_status=$?
4012   grep -v '^ *+' conftest.er1 >conftest.err
4013   rm -f conftest.er1
4014   cat conftest.err >&5
4015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4016   (exit $ac_status); } >/dev/null; then
4017   if test -s conftest.err; then
4018     ac_cpp_err=$ac_c_preproc_warn_flag
4019   else
4020     ac_cpp_err=
4021   fi
4022 else
4023   ac_cpp_err=yes
4024 fi
4025 if test -z "$ac_cpp_err"; then
4026   ac_header_preproc=yes
4027 else
4028   echo "$as_me: failed program was:" >&5
4029   cat conftest.$ac_ext >&5
4030   ac_header_preproc=no
4031 fi
4032 rm -f conftest.err conftest.$ac_ext
4033 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4034 echo "${ECHO_T}$ac_header_preproc" >&6
4035
4036 # So?  What about this header?
4037 case $ac_header_compiler:$ac_header_preproc in
4038   yes:no )
4039     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4040 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4041     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4042 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4043   no:yes )
4044     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4045 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4046     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4047 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4048     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4049 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4050 esac
4051 echo "$as_me:$LINENO: checking for $ac_header" >&5
4052 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4053 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4054   echo $ECHO_N "(cached) $ECHO_C" >&6
4055 else
4056   eval "$as_ac_Header=$ac_header_preproc"
4057 fi
4058 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4059 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4060
4061 fi
4062 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4063   cat >>confdefs.h <<_ACEOF
4064 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4065 _ACEOF
4066
4067 fi
4068
4069 done
4070
4071
4072
4073
4074
4075
4076 ac_header_dirent=no
4077 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4078   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4079 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4080 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4081 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4082   echo $ECHO_N "(cached) $ECHO_C" >&6
4083 else
4084   cat >conftest.$ac_ext <<_ACEOF
4085 #line $LINENO "configure"
4086 #include "confdefs.h"
4087 #include <sys/types.h>
4088 #include <$ac_hdr>
4089
4090 int
4091 main ()
4092 {
4093 if ((DIR *) 0)
4094 return 0;
4095   ;
4096   return 0;
4097 }
4098 _ACEOF
4099 rm -f conftest.$ac_objext
4100 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4101   (eval $ac_compile) 2>&5
4102   ac_status=$?
4103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4104   (exit $ac_status); } &&
4105          { ac_try='test -s conftest.$ac_objext'
4106   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4107   (eval $ac_try) 2>&5
4108   ac_status=$?
4109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4110   (exit $ac_status); }; }; then
4111   eval "$as_ac_Header=yes"
4112 else
4113   echo "$as_me: failed program was:" >&5
4114 cat conftest.$ac_ext >&5
4115 eval "$as_ac_Header=no"
4116 fi
4117 rm -f conftest.$ac_objext conftest.$ac_ext
4118 fi
4119 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4120 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4121 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4122   cat >>confdefs.h <<_ACEOF
4123 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4124 _ACEOF
4125
4126 ac_header_dirent=$ac_hdr; break
4127 fi
4128
4129 done
4130 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4131 if test $ac_header_dirent = dirent.h; then
4132   echo "$as_me:$LINENO: checking for library containing opendir" >&5
4133 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4134 if test "${ac_cv_search_opendir+set}" = set; then
4135   echo $ECHO_N "(cached) $ECHO_C" >&6
4136 else
4137   ac_func_search_save_LIBS=$LIBS
4138 ac_cv_search_opendir=no
4139 cat >conftest.$ac_ext <<_ACEOF
4140 #line $LINENO "configure"
4141 #include "confdefs.h"
4142
4143 /* Override any gcc2 internal prototype to avoid an error.  */
4144 #ifdef __cplusplus
4145 extern "C"
4146 #endif
4147 /* We use char because int might match the return type of a gcc2
4148    builtin and then its argument prototype would still apply.  */
4149 char opendir ();
4150 int
4151 main ()
4152 {
4153 opendir ();
4154   ;
4155   return 0;
4156 }
4157 _ACEOF
4158 rm -f conftest.$ac_objext conftest$ac_exeext
4159 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4160   (eval $ac_link) 2>&5
4161   ac_status=$?
4162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4163   (exit $ac_status); } &&
4164          { ac_try='test -s conftest$ac_exeext'
4165   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4166   (eval $ac_try) 2>&5
4167   ac_status=$?
4168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4169   (exit $ac_status); }; }; then
4170   ac_cv_search_opendir="none required"
4171 else
4172   echo "$as_me: failed program was:" >&5
4173 cat conftest.$ac_ext >&5
4174 fi
4175 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4176 if test "$ac_cv_search_opendir" = no; then
4177   for ac_lib in dir; do
4178     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4179     cat >conftest.$ac_ext <<_ACEOF
4180 #line $LINENO "configure"
4181 #include "confdefs.h"
4182
4183 /* Override any gcc2 internal prototype to avoid an error.  */
4184 #ifdef __cplusplus
4185 extern "C"
4186 #endif
4187 /* We use char because int might match the return type of a gcc2
4188    builtin and then its argument prototype would still apply.  */
4189 char opendir ();
4190 int
4191 main ()
4192 {
4193 opendir ();
4194   ;
4195   return 0;
4196 }
4197 _ACEOF
4198 rm -f conftest.$ac_objext conftest$ac_exeext
4199 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4200   (eval $ac_link) 2>&5
4201   ac_status=$?
4202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4203   (exit $ac_status); } &&
4204          { ac_try='test -s conftest$ac_exeext'
4205   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4206   (eval $ac_try) 2>&5
4207   ac_status=$?
4208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4209   (exit $ac_status); }; }; then
4210   ac_cv_search_opendir="-l$ac_lib"
4211 break
4212 else
4213   echo "$as_me: failed program was:" >&5
4214 cat conftest.$ac_ext >&5
4215 fi
4216 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4217   done
4218 fi
4219 LIBS=$ac_func_search_save_LIBS
4220 fi
4221 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4222 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4223 if test "$ac_cv_search_opendir" != no; then
4224   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4225
4226 fi
4227
4228 else
4229   echo "$as_me:$LINENO: checking for library containing opendir" >&5
4230 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4231 if test "${ac_cv_search_opendir+set}" = set; then
4232   echo $ECHO_N "(cached) $ECHO_C" >&6
4233 else
4234   ac_func_search_save_LIBS=$LIBS
4235 ac_cv_search_opendir=no
4236 cat >conftest.$ac_ext <<_ACEOF
4237 #line $LINENO "configure"
4238 #include "confdefs.h"
4239
4240 /* Override any gcc2 internal prototype to avoid an error.  */
4241 #ifdef __cplusplus
4242 extern "C"
4243 #endif
4244 /* We use char because int might match the return type of a gcc2
4245    builtin and then its argument prototype would still apply.  */
4246 char opendir ();
4247 int
4248 main ()
4249 {
4250 opendir ();
4251   ;
4252   return 0;
4253 }
4254 _ACEOF
4255 rm -f conftest.$ac_objext conftest$ac_exeext
4256 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4257   (eval $ac_link) 2>&5
4258   ac_status=$?
4259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4260   (exit $ac_status); } &&
4261          { ac_try='test -s conftest$ac_exeext'
4262   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4263   (eval $ac_try) 2>&5
4264   ac_status=$?
4265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4266   (exit $ac_status); }; }; then
4267   ac_cv_search_opendir="none required"
4268 else
4269   echo "$as_me: failed program was:" >&5
4270 cat conftest.$ac_ext >&5
4271 fi
4272 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4273 if test "$ac_cv_search_opendir" = no; then
4274   for ac_lib in x; do
4275     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4276     cat >conftest.$ac_ext <<_ACEOF
4277 #line $LINENO "configure"
4278 #include "confdefs.h"
4279
4280 /* Override any gcc2 internal prototype to avoid an error.  */
4281 #ifdef __cplusplus
4282 extern "C"
4283 #endif
4284 /* We use char because int might match the return type of a gcc2
4285    builtin and then its argument prototype would still apply.  */
4286 char opendir ();
4287 int
4288 main ()
4289 {
4290 opendir ();
4291   ;
4292   return 0;
4293 }
4294 _ACEOF
4295 rm -f conftest.$ac_objext conftest$ac_exeext
4296 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4297   (eval $ac_link) 2>&5
4298   ac_status=$?
4299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4300   (exit $ac_status); } &&
4301          { ac_try='test -s conftest$ac_exeext'
4302   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4303   (eval $ac_try) 2>&5
4304   ac_status=$?
4305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4306   (exit $ac_status); }; }; then
4307   ac_cv_search_opendir="-l$ac_lib"
4308 break
4309 else
4310   echo "$as_me: failed program was:" >&5
4311 cat conftest.$ac_ext >&5
4312 fi
4313 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4314   done
4315 fi
4316 LIBS=$ac_func_search_save_LIBS
4317 fi
4318 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4319 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4320 if test "$ac_cv_search_opendir" != no; then
4321   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4322
4323 fi
4324
4325 fi
4326
4327
4328 # This must be after CPP
4329
4330 echo "$as_me:$LINENO: checking which header file defines FD_ macros" >&5
4331 echo $ECHO_N "checking which header file defines FD_ macros... $ECHO_C" >&6
4332 if test "${s51_cv_fd+set}" = set; then
4333   echo $ECHO_N "(cached) $ECHO_C" >&6
4334 else
4335   sdcc_cv_fd="unknown"
4336 cat >conftest.$ac_ext <<_ACEOF
4337 #line $LINENO "configure"
4338 #include "confdefs.h"
4339
4340 #include <sys/time.h>
4341 #ifdef FD_ZERO
4342 yes
4343 #endif
4344 _ACEOF
4345 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4346   $EGREP "yes" >/dev/null 2>&1; then
4347   sdcc_cv_fd="<sys/time.h>"
4348 fi
4349 rm -f conftest*
4350
4351 cat >conftest.$ac_ext <<_ACEOF
4352 #line $LINENO "configure"
4353 #include "confdefs.h"
4354
4355 #include <sys/types.h>
4356 #ifdef FD_ZERO
4357 yes
4358 #endif
4359 _ACEOF
4360 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4361   $EGREP "yes" >/dev/null 2>&1; then
4362   sdcc_cv_fd="<sys/types.h>"
4363 fi
4364 rm -f conftest*
4365
4366 cat >conftest.$ac_ext <<_ACEOF
4367 #line $LINENO "configure"
4368 #include "confdefs.h"
4369
4370 #include <sys/select.h>
4371 #ifdef FD_ZERO
4372 yes
4373 #endif
4374 _ACEOF
4375 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4376   $EGREP "yes" >/dev/null 2>&1; then
4377   sdcc_cv_fd="<sys/types.h>"
4378 fi
4379 rm -f conftest*
4380
4381 fi
4382 echo "$as_me:$LINENO: result: $s51_cv_fd" >&5
4383 echo "${ECHO_T}$s51_cv_fd" >&6
4384
4385 cat >>confdefs.h <<\_ACEOF
4386 #define FD_HEADER_OK 0
4387 _ACEOF
4388
4389 if echo $sdcc_cv_fd|grep time >/dev/null 2>&1; then
4390 cat >>confdefs.h <<\_ACEOF
4391 #define FD_NEED_TIME_H 1
4392 _ACEOF
4393
4394 cat >>confdefs.h <<\_ACEOF
4395 #define FD_HEADER_OK 1
4396 _ACEOF
4397
4398 else
4399 cat >>confdefs.h <<\_ACEOF
4400 #define FD_NEED_TIME_H 0
4401 _ACEOF
4402
4403 fi
4404 if echo $sdcc_cv_fd|grep types >/dev/null 2>&1; then
4405 cat >>confdefs.h <<\_ACEOF
4406 #define FD_NEED_TYPES_H 1
4407 _ACEOF
4408
4409 cat >>confdefs.h <<\_ACEOF
4410 #define FD_HEADER_OK 1
4411 _ACEOF
4412
4413 else
4414 cat >>confdefs.h <<\_ACEOF
4415 #define FD_NEED_TYPES_H 0
4416 _ACEOF
4417
4418 fi
4419 if echo $sdcc_cv_fd|grep select >/dev/null 2>&1; then
4420 cat >>confdefs.h <<\_ACEOF
4421 #define FD_NEED_SELECT_H 1
4422 _ACEOF
4423
4424 cat >>confdefs.h <<\_ACEOF
4425 #define FD_HEADER_OK 1
4426 _ACEOF
4427
4428 else
4429 cat >>confdefs.h <<\_ACEOF
4430 #define FD_NEED_SELECT_H 0
4431 _ACEOF
4432
4433 fi
4434
4435 cat >>confdefs.h <<_ACEOF
4436 #define HEADER_FD ${sdcc_cv_fd}
4437 _ACEOF
4438
4439
4440
4441 # Checking for functions
4442 # ===========================================================================
4443
4444
4445
4446
4447
4448
4449
4450
4451 for ac_func in strlen strcpy strcat strstr strcmp strerror strtok strdup
4452 do
4453 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4454 echo "$as_me:$LINENO: checking for $ac_func" >&5
4455 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4456 if eval "test \"\${$as_ac_var+set}\" = set"; then
4457   echo $ECHO_N "(cached) $ECHO_C" >&6
4458 else
4459   cat >conftest.$ac_ext <<_ACEOF
4460 #line $LINENO "configure"
4461 #include "confdefs.h"
4462 /* System header to define __stub macros and hopefully few prototypes,
4463     which can conflict with char $ac_func (); below.  */
4464 #include <assert.h>
4465 /* Override any gcc2 internal prototype to avoid an error.  */
4466 #ifdef __cplusplus
4467 extern "C"
4468 #endif
4469 /* We use char because int might match the return type of a gcc2
4470    builtin and then its argument prototype would still apply.  */
4471 char $ac_func ();
4472 char (*f) ();
4473
4474 int
4475 main ()
4476 {
4477 /* The GNU C library defines this for functions which it implements
4478     to always fail with ENOSYS.  Some functions are actually named
4479     something starting with __ and the normal name is an alias.  */
4480 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4481 choke me
4482 #else
4483 f = $ac_func;
4484 #endif
4485
4486   ;
4487   return 0;
4488 }
4489 _ACEOF
4490 rm -f conftest.$ac_objext conftest$ac_exeext
4491 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4492   (eval $ac_link) 2>&5
4493   ac_status=$?
4494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4495   (exit $ac_status); } &&
4496          { ac_try='test -s conftest$ac_exeext'
4497   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4498   (eval $ac_try) 2>&5
4499   ac_status=$?
4500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4501   (exit $ac_status); }; }; then
4502   eval "$as_ac_var=yes"
4503 else
4504   echo "$as_me: failed program was:" >&5
4505 cat conftest.$ac_ext >&5
4506 eval "$as_ac_var=no"
4507 fi
4508 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4509 fi
4510 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4511 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4512 if test `eval echo '${'$as_ac_var'}'` = yes; then
4513   cat >>confdefs.h <<_ACEOF
4514 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4515 _ACEOF
4516
4517 fi
4518 done
4519
4520
4521
4522
4523
4524
4525 for ac_func in strchr memcpy vsnprintf snprintf vsprintf
4526 do
4527 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4528 echo "$as_me:$LINENO: checking for $ac_func" >&5
4529 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4530 if eval "test \"\${$as_ac_var+set}\" = set"; then
4531   echo $ECHO_N "(cached) $ECHO_C" >&6
4532 else
4533   cat >conftest.$ac_ext <<_ACEOF
4534 #line $LINENO "configure"
4535 #include "confdefs.h"
4536 /* System header to define __stub macros and hopefully few prototypes,
4537     which can conflict with char $ac_func (); below.  */
4538 #include <assert.h>
4539 /* Override any gcc2 internal prototype to avoid an error.  */
4540 #ifdef __cplusplus
4541 extern "C"
4542 #endif
4543 /* We use char because int might match the return type of a gcc2
4544    builtin and then its argument prototype would still apply.  */
4545 char $ac_func ();
4546 char (*f) ();
4547
4548 int
4549 main ()
4550 {
4551 /* The GNU C library defines this for functions which it implements
4552     to always fail with ENOSYS.  Some functions are actually named
4553     something starting with __ and the normal name is an alias.  */
4554 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4555 choke me
4556 #else
4557 f = $ac_func;
4558 #endif
4559
4560   ;
4561   return 0;
4562 }
4563 _ACEOF
4564 rm -f conftest.$ac_objext conftest$ac_exeext
4565 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4566   (eval $ac_link) 2>&5
4567   ac_status=$?
4568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4569   (exit $ac_status); } &&
4570          { ac_try='test -s conftest$ac_exeext'
4571   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4572   (eval $ac_try) 2>&5
4573   ac_status=$?
4574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4575   (exit $ac_status); }; }; then
4576   eval "$as_ac_var=yes"
4577 else
4578   echo "$as_me: failed program was:" >&5
4579 cat conftest.$ac_ext >&5
4580 eval "$as_ac_var=no"
4581 fi
4582 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4583 fi
4584 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4585 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4586 if test `eval echo '${'$as_ac_var'}'` = yes; then
4587   cat >>confdefs.h <<_ACEOF
4588 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4589 _ACEOF
4590
4591 fi
4592 done
4593
4594
4595 for ac_func in mkstemp
4596 do
4597 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4598 echo "$as_me:$LINENO: checking for $ac_func" >&5
4599 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4600 if eval "test \"\${$as_ac_var+set}\" = set"; then
4601   echo $ECHO_N "(cached) $ECHO_C" >&6
4602 else
4603   cat >conftest.$ac_ext <<_ACEOF
4604 #line $LINENO "configure"
4605 #include "confdefs.h"
4606 /* System header to define __stub macros and hopefully few prototypes,
4607     which can conflict with char $ac_func (); below.  */
4608 #include <assert.h>
4609 /* Override any gcc2 internal prototype to avoid an error.  */
4610 #ifdef __cplusplus
4611 extern "C"
4612 #endif
4613 /* We use char because int might match the return type of a gcc2
4614    builtin and then its argument prototype would still apply.  */
4615 char $ac_func ();
4616 char (*f) ();
4617
4618 int
4619 main ()
4620 {
4621 /* The GNU C library defines this for functions which it implements
4622     to always fail with ENOSYS.  Some functions are actually named
4623     something starting with __ and the normal name is an alias.  */
4624 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4625 choke me
4626 #else
4627 f = $ac_func;
4628 #endif
4629
4630   ;
4631   return 0;
4632 }
4633 _ACEOF
4634 rm -f conftest.$ac_objext conftest$ac_exeext
4635 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4636   (eval $ac_link) 2>&5
4637   ac_status=$?
4638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4639   (exit $ac_status); } &&
4640          { ac_try='test -s conftest$ac_exeext'
4641   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4642   (eval $ac_try) 2>&5
4643   ac_status=$?
4644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4645   (exit $ac_status); }; }; then
4646   eval "$as_ac_var=yes"
4647 else
4648   echo "$as_me: failed program was:" >&5
4649 cat conftest.$ac_ext >&5
4650 eval "$as_ac_var=no"
4651 fi
4652 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4653 fi
4654 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4655 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4656 if test `eval echo '${'$as_ac_var'}'` = yes; then
4657   cat >>confdefs.h <<_ACEOF
4658 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4659 _ACEOF
4660
4661 fi
4662 done
4663
4664
4665 for ac_func in fgets
4666 do
4667 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4668 echo "$as_me:$LINENO: checking for $ac_func" >&5
4669 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4670 if eval "test \"\${$as_ac_var+set}\" = set"; then
4671   echo $ECHO_N "(cached) $ECHO_C" >&6
4672 else
4673   cat >conftest.$ac_ext <<_ACEOF
4674 #line $LINENO "configure"
4675 #include "confdefs.h"
4676 /* System header to define __stub macros and hopefully few prototypes,
4677     which can conflict with char $ac_func (); below.  */
4678 #include <assert.h>
4679 /* Override any gcc2 internal prototype to avoid an error.  */
4680 #ifdef __cplusplus
4681 extern "C"
4682 #endif
4683 /* We use char because int might match the return type of a gcc2
4684    builtin and then its argument prototype would still apply.  */
4685 char $ac_func ();
4686 char (*f) ();
4687
4688 int
4689 main ()
4690 {
4691 /* The GNU C library defines this for functions which it implements
4692     to always fail with ENOSYS.  Some functions are actually named
4693     something starting with __ and the normal name is an alias.  */
4694 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4695 choke me
4696 #else
4697 f = $ac_func;
4698 #endif
4699
4700   ;
4701   return 0;
4702 }
4703 _ACEOF
4704 rm -f conftest.$ac_objext conftest$ac_exeext
4705 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4706   (eval $ac_link) 2>&5
4707   ac_status=$?
4708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4709   (exit $ac_status); } &&
4710          { ac_try='test -s conftest$ac_exeext'
4711   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4712   (eval $ac_try) 2>&5
4713   ac_status=$?
4714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4715   (exit $ac_status); }; }; then
4716   eval "$as_ac_var=yes"
4717 else
4718   echo "$as_me: failed program was:" >&5
4719 cat conftest.$ac_ext >&5
4720 eval "$as_ac_var=no"
4721 fi
4722 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4723 fi
4724 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4725 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4726 if test `eval echo '${'$as_ac_var'}'` = yes; then
4727   cat >>confdefs.h <<_ACEOF
4728 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4729 _ACEOF
4730
4731 fi
4732 done
4733
4734
4735 for ac_func in yylex
4736 do
4737 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4738 echo "$as_me:$LINENO: checking for $ac_func" >&5
4739 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4740 if eval "test \"\${$as_ac_var+set}\" = set"; then
4741   echo $ECHO_N "(cached) $ECHO_C" >&6
4742 else
4743   cat >conftest.$ac_ext <<_ACEOF
4744 #line $LINENO "configure"
4745 #include "confdefs.h"
4746 /* System header to define __stub macros and hopefully few prototypes,
4747     which can conflict with char $ac_func (); below.  */
4748 #include <assert.h>
4749 /* Override any gcc2 internal prototype to avoid an error.  */
4750 #ifdef __cplusplus
4751 extern "C"
4752 #endif
4753 /* We use char because int might match the return type of a gcc2
4754    builtin and then its argument prototype would still apply.  */
4755 char $ac_func ();
4756 char (*f) ();
4757
4758 int
4759 main ()
4760 {
4761 /* The GNU C library defines this for functions which it implements
4762     to always fail with ENOSYS.  Some functions are actually named
4763     something starting with __ and the normal name is an alias.  */
4764 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4765 choke me
4766 #else
4767 f = $ac_func;
4768 #endif
4769
4770   ;
4771   return 0;
4772 }
4773 _ACEOF
4774 rm -f conftest.$ac_objext conftest$ac_exeext
4775 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4776   (eval $ac_link) 2>&5
4777   ac_status=$?
4778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4779   (exit $ac_status); } &&
4780          { ac_try='test -s conftest$ac_exeext'
4781   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4782   (eval $ac_try) 2>&5
4783   ac_status=$?
4784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4785   (exit $ac_status); }; }; then
4786   eval "$as_ac_var=yes"
4787 else
4788   echo "$as_me: failed program was:" >&5
4789 cat conftest.$ac_ext >&5
4790 eval "$as_ac_var=no"
4791 fi
4792 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4793 fi
4794 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4795 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4796 if test `eval echo '${'$as_ac_var'}'` = yes; then
4797   cat >>confdefs.h <<_ACEOF
4798 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4799 _ACEOF
4800
4801 fi
4802 done
4803
4804
4805 # check if -lsocket && -lxnet is required to compile socket stuff
4806 echo "$as_me:$LINENO: checking for library containing socket" >&5
4807 echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6
4808 if test "${ac_cv_search_socket+set}" = set; then
4809   echo $ECHO_N "(cached) $ECHO_C" >&6
4810 else
4811   ac_func_search_save_LIBS=$LIBS
4812 ac_cv_search_socket=no
4813 cat >conftest.$ac_ext <<_ACEOF
4814 #line $LINENO "configure"
4815 #include "confdefs.h"
4816
4817 /* Override any gcc2 internal prototype to avoid an error.  */
4818 #ifdef __cplusplus
4819 extern "C"
4820 #endif
4821 /* We use char because int might match the return type of a gcc2
4822    builtin and then its argument prototype would still apply.  */
4823 char socket ();
4824 int
4825 main ()
4826 {
4827 socket ();
4828   ;
4829   return 0;
4830 }
4831 _ACEOF
4832 rm -f conftest.$ac_objext conftest$ac_exeext
4833 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4834   (eval $ac_link) 2>&5
4835   ac_status=$?
4836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4837   (exit $ac_status); } &&
4838          { ac_try='test -s conftest$ac_exeext'
4839   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4840   (eval $ac_try) 2>&5
4841   ac_status=$?
4842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4843   (exit $ac_status); }; }; then
4844   ac_cv_search_socket="none required"
4845 else
4846   echo "$as_me: failed program was:" >&5
4847 cat conftest.$ac_ext >&5
4848 fi
4849 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4850 if test "$ac_cv_search_socket" = no; then
4851   for ac_lib in socket; do
4852     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4853     cat >conftest.$ac_ext <<_ACEOF
4854 #line $LINENO "configure"
4855 #include "confdefs.h"
4856
4857 /* Override any gcc2 internal prototype to avoid an error.  */
4858 #ifdef __cplusplus
4859 extern "C"
4860 #endif
4861 /* We use char because int might match the return type of a gcc2
4862    builtin and then its argument prototype would still apply.  */
4863 char socket ();
4864 int
4865 main ()
4866 {
4867 socket ();
4868   ;
4869   return 0;
4870 }
4871 _ACEOF
4872 rm -f conftest.$ac_objext conftest$ac_exeext
4873 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4874   (eval $ac_link) 2>&5
4875   ac_status=$?
4876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4877   (exit $ac_status); } &&
4878          { ac_try='test -s conftest$ac_exeext'
4879   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4880   (eval $ac_try) 2>&5
4881   ac_status=$?
4882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4883   (exit $ac_status); }; }; then
4884   ac_cv_search_socket="-l$ac_lib"
4885 break
4886 else
4887   echo "$as_me: failed program was:" >&5
4888 cat conftest.$ac_ext >&5
4889 fi
4890 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4891   done
4892 fi
4893 LIBS=$ac_func_search_save_LIBS
4894 fi
4895 echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
4896 echo "${ECHO_T}$ac_cv_search_socket" >&6
4897 if test "$ac_cv_search_socket" != no; then
4898   test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
4899
4900 fi
4901
4902 echo "$as_me:$LINENO: checking for library containing inet_addr" >&5
4903 echo $ECHO_N "checking for library containing inet_addr... $ECHO_C" >&6
4904 if test "${ac_cv_search_inet_addr+set}" = set; then
4905   echo $ECHO_N "(cached) $ECHO_C" >&6
4906 else
4907   ac_func_search_save_LIBS=$LIBS
4908 ac_cv_search_inet_addr=no
4909 cat >conftest.$ac_ext <<_ACEOF
4910 #line $LINENO "configure"
4911 #include "confdefs.h"
4912
4913 /* Override any gcc2 internal prototype to avoid an error.  */
4914 #ifdef __cplusplus
4915 extern "C"
4916 #endif
4917 /* We use char because int might match the return type of a gcc2
4918    builtin and then its argument prototype would still apply.  */
4919 char inet_addr ();
4920 int
4921 main ()
4922 {
4923 inet_addr ();
4924   ;
4925   return 0;
4926 }
4927 _ACEOF
4928 rm -f conftest.$ac_objext conftest$ac_exeext
4929 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4930   (eval $ac_link) 2>&5
4931   ac_status=$?
4932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4933   (exit $ac_status); } &&
4934          { ac_try='test -s conftest$ac_exeext'
4935   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4936   (eval $ac_try) 2>&5
4937   ac_status=$?
4938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4939   (exit $ac_status); }; }; then
4940   ac_cv_search_inet_addr="none required"
4941 else
4942   echo "$as_me: failed program was:" >&5
4943 cat conftest.$ac_ext >&5
4944 fi
4945 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4946 if test "$ac_cv_search_inet_addr" = no; then
4947   for ac_lib in nsl xnet; do
4948     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4949     cat >conftest.$ac_ext <<_ACEOF
4950 #line $LINENO "configure"
4951 #include "confdefs.h"
4952
4953 /* Override any gcc2 internal prototype to avoid an error.  */
4954 #ifdef __cplusplus
4955 extern "C"
4956 #endif
4957 /* We use char because int might match the return type of a gcc2
4958    builtin and then its argument prototype would still apply.  */
4959 char inet_addr ();
4960 int
4961 main ()
4962 {
4963 inet_addr ();
4964   ;
4965   return 0;
4966 }
4967 _ACEOF
4968 rm -f conftest.$ac_objext conftest$ac_exeext
4969 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4970   (eval $ac_link) 2>&5
4971   ac_status=$?
4972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4973   (exit $ac_status); } &&
4974          { ac_try='test -s conftest$ac_exeext'
4975   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4976   (eval $ac_try) 2>&5
4977   ac_status=$?
4978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4979   (exit $ac_status); }; }; then
4980   ac_cv_search_inet_addr="-l$ac_lib"
4981 break
4982 else
4983   echo "$as_me: failed program was:" >&5
4984 cat conftest.$ac_ext >&5
4985 fi
4986 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4987   done
4988 fi
4989 LIBS=$ac_func_search_save_LIBS
4990 fi
4991 echo "$as_me:$LINENO: result: $ac_cv_search_inet_addr" >&5
4992 echo "${ECHO_T}$ac_cv_search_inet_addr" >&6
4993 if test "$ac_cv_search_inet_addr" != no; then
4994   test "$ac_cv_search_inet_addr" = "none required" || LIBS="$ac_cv_search_inet_addr $LIBS"
4995
4996 fi
4997
4998
4999 # Macro definitions
5000 ###################
5001
5002 # DD_COPT macro checks if the compiler specified as the 1st parameter
5003 # supports option specified as the 2nd parameter
5004 # For example: DD_CPORT(CXX, fPIC)
5005
5006
5007
5008
5009 # Checking characteristics of compilers and other programs
5010 # --------------------------------------------------------
5011 echo "$as_me:$LINENO: checking whether preprocessor accepts -MM or -M" >&5
5012 echo $ECHO_N "checking whether preprocessor accepts -MM or -M... $ECHO_C" >&6
5013 if test "${sdcc_cv_MM+set}" = set; then
5014   echo $ECHO_N "(cached) $ECHO_C" >&6
5015 else
5016   echo "#include <stdio.h>" >_test_.c
5017 echo "" >>_test_.c
5018 $CPP -v -MM _test_.c 1>&5 2>&5
5019 if test "$?" = "0"; then
5020   sdcc_cv_MM="-MM"
5021 else
5022   sdcc_cv_MM="-M"
5023 fi
5024 rm -f _test_.*
5025 fi
5026 echo "$as_me:$LINENO: result: $sdcc_cv_MM" >&5
5027 echo "${ECHO_T}$sdcc_cv_MM" >&6
5028 M_OR_MM=$sdcc_cv_MM
5029
5030
5031 # This is the first time when CFLAGS are set/modified!!
5032
5033 echo "$as_me:$LINENO: checking whether $CC accepts -ggdb" >&5
5034 echo $ECHO_N "checking whether $CC accepts -ggdb... $ECHO_C" >&6
5035 if test "${sdcc_cv_CCggdb+set}" = set; then
5036   echo $ECHO_N "(cached) $ECHO_C" >&6
5037 else
5038   cat >_test_.c <<EOF
5039 #include <stdio.h>
5040 void main(void) {}
5041 EOF
5042 $CC -v -ggdb -c _test_.c 1>&5 2>&5
5043 if test "$?" = "0"; then
5044   sdcc_cv_CCggdb="yes"
5045 else
5046   sdcc_cv_CCggdb="no"
5047 fi
5048 rm -f _test_.* a.out
5049 fi
5050 echo "$as_me:$LINENO: result: $sdcc_cv_CCggdb" >&5
5051 echo "${ECHO_T}$sdcc_cv_CCggdb" >&6
5052
5053 if test "$sdcc_cv_CCggdb" = "yes"; then
5054   CFLAGS="-ggdb -O2"
5055 fi
5056
5057
5058 echo "$as_me:$LINENO: checking whether $CC accepts -pipe" >&5
5059 echo $ECHO_N "checking whether $CC accepts -pipe... $ECHO_C" >&6
5060 if test "${sdcc_cv_CCpipe+set}" = set; then
5061   echo $ECHO_N "(cached) $ECHO_C" >&6
5062 else
5063   cat >_test_.c <<EOF
5064 #include <stdio.h>
5065 void main(void) {}
5066 EOF
5067 $CC -v -pipe -c _test_.c 1>&5 2>&5
5068 if test "$?" = "0"; then
5069   sdcc_cv_CCpipe="yes"
5070 else
5071   sdcc_cv_CCpipe="no"
5072 fi
5073 rm -f _test_.* a.out
5074 fi
5075 echo "$as_me:$LINENO: result: $sdcc_cv_CCpipe" >&5
5076 echo "${ECHO_T}$sdcc_cv_CCpipe" >&6
5077
5078 if test "$sdcc_cv_CCpipe" = "yes"; then
5079   CFLAGS="$CFLAGS -pipe"
5080 fi
5081
5082
5083 # Checks for typedefs, structures, and compiler characteristics.
5084 # ===========================================================================
5085 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5086 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5087 if test "${ac_cv_type_signal+set}" = set; then
5088   echo $ECHO_N "(cached) $ECHO_C" >&6
5089 else
5090   cat >conftest.$ac_ext <<_ACEOF
5091 #line $LINENO "configure"
5092 #include "confdefs.h"
5093 #include <sys/types.h>
5094 #include <signal.h>
5095 #ifdef signal
5096 # undef signal
5097 #endif
5098 #ifdef __cplusplus
5099 extern "C" void (*signal (int, void (*)(int)))(int);
5100 #else
5101 void (*signal ()) ();
5102 #endif
5103
5104 int
5105 main ()
5106 {
5107 int i;
5108   ;
5109   return 0;
5110 }
5111 _ACEOF
5112 rm -f conftest.$ac_objext
5113 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5114   (eval $ac_compile) 2>&5
5115   ac_status=$?
5116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5117   (exit $ac_status); } &&
5118          { ac_try='test -s conftest.$ac_objext'
5119   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5120   (eval $ac_try) 2>&5
5121   ac_status=$?
5122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5123   (exit $ac_status); }; }; then
5124   ac_cv_type_signal=void
5125 else
5126   echo "$as_me: failed program was:" >&5
5127 cat conftest.$ac_ext >&5
5128 ac_cv_type_signal=int
5129 fi
5130 rm -f conftest.$ac_objext conftest.$ac_ext
5131 fi
5132 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5133 echo "${ECHO_T}$ac_cv_type_signal" >&6
5134
5135 cat >>confdefs.h <<_ACEOF
5136 #define RETSIGTYPE $ac_cv_type_signal
5137 _ACEOF
5138
5139
5140
5141 if test "$cross_compiling" = "no"; then
5142 echo "$as_me:$LINENO: checking for char" >&5
5143 echo $ECHO_N "checking for char... $ECHO_C" >&6
5144 if test "${ac_cv_type_char+set}" = set; then
5145   echo $ECHO_N "(cached) $ECHO_C" >&6
5146 else
5147   cat >conftest.$ac_ext <<_ACEOF
5148 #line $LINENO "configure"
5149 #include "confdefs.h"
5150 $ac_includes_default
5151 int
5152 main ()
5153 {
5154 if ((char *) 0)
5155   return 0;
5156 if (sizeof (char))
5157   return 0;
5158   ;
5159   return 0;
5160 }
5161 _ACEOF
5162 rm -f conftest.$ac_objext
5163 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5164   (eval $ac_compile) 2>&5
5165   ac_status=$?
5166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5167   (exit $ac_status); } &&
5168          { ac_try='test -s conftest.$ac_objext'
5169   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5170   (eval $ac_try) 2>&5
5171   ac_status=$?
5172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5173   (exit $ac_status); }; }; then
5174   ac_cv_type_char=yes
5175 else
5176   echo "$as_me: failed program was:" >&5
5177 cat conftest.$ac_ext >&5
5178 ac_cv_type_char=no
5179 fi
5180 rm -f conftest.$ac_objext conftest.$ac_ext
5181 fi
5182 echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
5183 echo "${ECHO_T}$ac_cv_type_char" >&6
5184
5185 echo "$as_me:$LINENO: checking size of char" >&5
5186 echo $ECHO_N "checking size of char... $ECHO_C" >&6
5187 if test "${ac_cv_sizeof_char+set}" = set; then
5188   echo $ECHO_N "(cached) $ECHO_C" >&6
5189 else
5190   if test "$ac_cv_type_char" = yes; then
5191   # The cast to unsigned long works around a bug in the HP C Compiler
5192   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5193   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5194   # This bug is HP SR number 8606223364.
5195   if test "$cross_compiling" = yes; then
5196   # Depending upon the size, compute the lo and hi bounds.
5197 cat >conftest.$ac_ext <<_ACEOF
5198 #line $LINENO "configure"
5199 #include "confdefs.h"
5200 $ac_includes_default
5201 int
5202 main ()
5203 {
5204 static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
5205 test_array [0] = 0
5206
5207   ;
5208   return 0;
5209 }
5210 _ACEOF
5211 rm -f conftest.$ac_objext
5212 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5213   (eval $ac_compile) 2>&5
5214   ac_status=$?
5215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5216   (exit $ac_status); } &&
5217          { ac_try='test -s conftest.$ac_objext'
5218   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5219   (eval $ac_try) 2>&5
5220   ac_status=$?
5221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5222   (exit $ac_status); }; }; then
5223   ac_lo=0 ac_mid=0
5224   while :; do
5225     cat >conftest.$ac_ext <<_ACEOF
5226 #line $LINENO "configure"
5227 #include "confdefs.h"
5228 $ac_includes_default
5229 int
5230 main ()
5231 {
5232 static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5233 test_array [0] = 0
5234
5235   ;
5236   return 0;
5237 }
5238 _ACEOF
5239 rm -f conftest.$ac_objext
5240 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5241   (eval $ac_compile) 2>&5
5242   ac_status=$?
5243   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5244   (exit $ac_status); } &&
5245          { ac_try='test -s conftest.$ac_objext'
5246   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5247   (eval $ac_try) 2>&5
5248   ac_status=$?
5249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5250   (exit $ac_status); }; }; then
5251   ac_hi=$ac_mid; break
5252 else
5253   echo "$as_me: failed program was:" >&5
5254 cat conftest.$ac_ext >&5
5255 ac_lo=`expr $ac_mid + 1`
5256                     if test $ac_lo -le $ac_mid; then
5257                       ac_lo= ac_hi=
5258                       break
5259                     fi
5260                     ac_mid=`expr 2 '*' $ac_mid + 1`
5261 fi
5262 rm -f conftest.$ac_objext conftest.$ac_ext
5263   done
5264 else
5265   echo "$as_me: failed program was:" >&5
5266 cat conftest.$ac_ext >&5
5267 cat >conftest.$ac_ext <<_ACEOF
5268 #line $LINENO "configure"
5269 #include "confdefs.h"
5270 $ac_includes_default
5271 int
5272 main ()
5273 {
5274 static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
5275 test_array [0] = 0
5276
5277   ;
5278   return 0;
5279 }
5280 _ACEOF
5281 rm -f conftest.$ac_objext
5282 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5283   (eval $ac_compile) 2>&5
5284   ac_status=$?
5285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5286   (exit $ac_status); } &&
5287          { ac_try='test -s conftest.$ac_objext'
5288   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5289   (eval $ac_try) 2>&5
5290   ac_status=$?
5291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5292   (exit $ac_status); }; }; then
5293   ac_hi=-1 ac_mid=-1
5294   while :; do
5295     cat >conftest.$ac_ext <<_ACEOF
5296 #line $LINENO "configure"
5297 #include "confdefs.h"
5298 $ac_includes_default
5299 int
5300 main ()
5301 {
5302 static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
5303 test_array [0] = 0
5304
5305   ;
5306   return 0;
5307 }
5308 _ACEOF
5309 rm -f conftest.$ac_objext
5310 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5311   (eval $ac_compile) 2>&5
5312   ac_status=$?
5313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5314   (exit $ac_status); } &&
5315          { ac_try='test -s conftest.$ac_objext'
5316   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5317   (eval $ac_try) 2>&5
5318   ac_status=$?
5319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5320   (exit $ac_status); }; }; then
5321   ac_lo=$ac_mid; break
5322 else
5323   echo "$as_me: failed program was:" >&5
5324 cat conftest.$ac_ext >&5
5325 ac_hi=`expr '(' $ac_mid ')' - 1`
5326                        if test $ac_mid -le $ac_hi; then
5327                          ac_lo= ac_hi=
5328                          break
5329                        fi
5330                        ac_mid=`expr 2 '*' $ac_mid`
5331 fi
5332 rm -f conftest.$ac_objext conftest.$ac_ext
5333   done
5334 else
5335   echo "$as_me: failed program was:" >&5
5336 cat conftest.$ac_ext >&5
5337 ac_lo= ac_hi=
5338 fi
5339 rm -f conftest.$ac_objext conftest.$ac_ext
5340 fi
5341 rm -f conftest.$ac_objext conftest.$ac_ext
5342 # Binary search between lo and hi bounds.
5343 while test "x$ac_lo" != "x$ac_hi"; do
5344   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5345   cat >conftest.$ac_ext <<_ACEOF
5346 #line $LINENO "configure"
5347 #include "confdefs.h"
5348 $ac_includes_default
5349 int
5350 main ()
5351 {
5352 static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5353 test_array [0] = 0
5354
5355   ;
5356   return 0;
5357 }
5358 _ACEOF
5359 rm -f conftest.$ac_objext
5360 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5361   (eval $ac_compile) 2>&5
5362   ac_status=$?
5363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5364   (exit $ac_status); } &&
5365          { ac_try='test -s conftest.$ac_objext'
5366   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5367   (eval $ac_try) 2>&5
5368   ac_status=$?
5369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5370   (exit $ac_status); }; }; then
5371   ac_hi=$ac_mid
5372 else
5373   echo "$as_me: failed program was:" >&5
5374 cat conftest.$ac_ext >&5
5375 ac_lo=`expr '(' $ac_mid ')' + 1`
5376 fi
5377 rm -f conftest.$ac_objext conftest.$ac_ext
5378 done
5379 case $ac_lo in
5380 ?*) ac_cv_sizeof_char=$ac_lo;;
5381 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
5382 echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
5383    { (exit 1); exit 1; }; } ;;
5384 esac
5385 else
5386   if test "$cross_compiling" = yes; then
5387   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5388 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5389    { (exit 1); exit 1; }; }
5390 else
5391   cat >conftest.$ac_ext <<_ACEOF
5392 #line $LINENO "configure"
5393 #include "confdefs.h"
5394 $ac_includes_default
5395 long longval () { return (long) (sizeof (char)); }
5396 unsigned long ulongval () { return (long) (sizeof (char)); }
5397 #include <stdio.h>
5398 #include <stdlib.h>
5399 int
5400 main ()
5401 {
5402
5403   FILE *f = fopen ("conftest.val", "w");
5404   if (! f)
5405     exit (1);
5406   if (((long) (sizeof (char))) < 0)
5407     {
5408       long i = longval ();
5409       if (i != ((long) (sizeof (char))))
5410         exit (1);
5411       fprintf (f, "%ld\n", i);
5412     }
5413   else
5414     {
5415       unsigned long i = ulongval ();
5416       if (i != ((long) (sizeof (char))))
5417         exit (1);
5418       fprintf (f, "%lu\n", i);
5419     }
5420   exit (ferror (f) || fclose (f) != 0);
5421
5422   ;
5423   return 0;
5424 }
5425 _ACEOF
5426 rm -f conftest$ac_exeext
5427 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5428   (eval $ac_link) 2>&5
5429   ac_status=$?
5430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5431   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5432   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5433   (eval $ac_try) 2>&5
5434   ac_status=$?
5435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5436   (exit $ac_status); }; }; then
5437   ac_cv_sizeof_char=`cat conftest.val`
5438 else
5439   echo "$as_me: program exited with status $ac_status" >&5
5440 echo "$as_me: failed program was:" >&5
5441 cat conftest.$ac_ext >&5
5442 ( exit $ac_status )
5443 { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
5444 echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
5445    { (exit 1); exit 1; }; }
5446 fi
5447 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5448 fi
5449 fi
5450 rm -f conftest.val
5451 else
5452   ac_cv_sizeof_char=0
5453 fi
5454 fi
5455 echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
5456 echo "${ECHO_T}$ac_cv_sizeof_char" >&6
5457 cat >>confdefs.h <<_ACEOF
5458 #define SIZEOF_CHAR $ac_cv_sizeof_char
5459 _ACEOF
5460
5461
5462 echo "$as_me:$LINENO: checking for short" >&5
5463 echo $ECHO_N "checking for short... $ECHO_C" >&6
5464 if test "${ac_cv_type_short+set}" = set; then
5465   echo $ECHO_N "(cached) $ECHO_C" >&6
5466 else
5467   cat >conftest.$ac_ext <<_ACEOF
5468 #line $LINENO "configure"
5469 #include "confdefs.h"
5470 $ac_includes_default
5471 int
5472 main ()
5473 {
5474 if ((short *) 0)
5475   return 0;
5476 if (sizeof (short))
5477   return 0;
5478   ;
5479   return 0;
5480 }
5481 _ACEOF
5482 rm -f conftest.$ac_objext
5483 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5484   (eval $ac_compile) 2>&5
5485   ac_status=$?
5486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5487   (exit $ac_status); } &&
5488          { ac_try='test -s conftest.$ac_objext'
5489   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5490   (eval $ac_try) 2>&5
5491   ac_status=$?
5492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5493   (exit $ac_status); }; }; then
5494   ac_cv_type_short=yes
5495 else
5496   echo "$as_me: failed program was:" >&5
5497 cat conftest.$ac_ext >&5
5498 ac_cv_type_short=no
5499 fi
5500 rm -f conftest.$ac_objext conftest.$ac_ext
5501 fi
5502 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
5503 echo "${ECHO_T}$ac_cv_type_short" >&6
5504
5505 echo "$as_me:$LINENO: checking size of short" >&5
5506 echo $ECHO_N "checking size of short... $ECHO_C" >&6
5507 if test "${ac_cv_sizeof_short+set}" = set; then
5508   echo $ECHO_N "(cached) $ECHO_C" >&6
5509 else
5510   if test "$ac_cv_type_short" = yes; then
5511   # The cast to unsigned long works around a bug in the HP C Compiler
5512   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5513   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5514   # This bug is HP SR number 8606223364.
5515   if test "$cross_compiling" = yes; then
5516   # Depending upon the size, compute the lo and hi bounds.
5517 cat >conftest.$ac_ext <<_ACEOF
5518 #line $LINENO "configure"
5519 #include "confdefs.h"
5520 $ac_includes_default
5521 int
5522 main ()
5523 {
5524 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
5525 test_array [0] = 0
5526
5527   ;
5528   return 0;
5529 }
5530 _ACEOF
5531 rm -f conftest.$ac_objext
5532 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5533   (eval $ac_compile) 2>&5
5534   ac_status=$?
5535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5536   (exit $ac_status); } &&
5537          { ac_try='test -s conftest.$ac_objext'
5538   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5539   (eval $ac_try) 2>&5
5540   ac_status=$?
5541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5542   (exit $ac_status); }; }; then
5543   ac_lo=0 ac_mid=0
5544   while :; do
5545     cat >conftest.$ac_ext <<_ACEOF
5546 #line $LINENO "configure"
5547 #include "confdefs.h"
5548 $ac_includes_default
5549 int
5550 main ()
5551 {
5552 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
5553 test_array [0] = 0
5554
5555   ;
5556   return 0;
5557 }
5558 _ACEOF
5559 rm -f conftest.$ac_objext
5560 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5561   (eval $ac_compile) 2>&5
5562   ac_status=$?
5563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5564   (exit $ac_status); } &&
5565          { ac_try='test -s conftest.$ac_objext'
5566   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5567   (eval $ac_try) 2>&5
5568   ac_status=$?
5569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5570   (exit $ac_status); }; }; then
5571   ac_hi=$ac_mid; break
5572 else
5573   echo "$as_me: failed program was:" >&5
5574 cat conftest.$ac_ext >&5
5575 ac_lo=`expr $ac_mid + 1`
5576                     if test $ac_lo -le $ac_mid; then
5577                       ac_lo= ac_hi=
5578                       break
5579                     fi
5580                     ac_mid=`expr 2 '*' $ac_mid + 1`
5581 fi
5582 rm -f conftest.$ac_objext conftest.$ac_ext
5583   done
5584 else
5585   echo "$as_me: failed program was:" >&5
5586 cat conftest.$ac_ext >&5
5587 cat >conftest.$ac_ext <<_ACEOF
5588 #line $LINENO "configure"
5589 #include "confdefs.h"
5590 $ac_includes_default
5591 int
5592 main ()
5593 {
5594 static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
5595 test_array [0] = 0
5596
5597   ;
5598   return 0;
5599 }
5600 _ACEOF
5601 rm -f conftest.$ac_objext
5602 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5603   (eval $ac_compile) 2>&5
5604   ac_status=$?
5605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5606   (exit $ac_status); } &&
5607          { ac_try='test -s conftest.$ac_objext'
5608   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5609   (eval $ac_try) 2>&5
5610   ac_status=$?
5611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5612   (exit $ac_status); }; }; then
5613   ac_hi=-1 ac_mid=-1
5614   while :; do
5615     cat >conftest.$ac_ext <<_ACEOF
5616 #line $LINENO "configure"
5617 #include "confdefs.h"
5618 $ac_includes_default
5619 int
5620 main ()
5621 {
5622 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
5623 test_array [0] = 0
5624
5625   ;
5626   return 0;
5627 }
5628 _ACEOF
5629 rm -f conftest.$ac_objext
5630 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5631   (eval $ac_compile) 2>&5
5632   ac_status=$?
5633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5634   (exit $ac_status); } &&
5635          { ac_try='test -s conftest.$ac_objext'
5636   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5637   (eval $ac_try) 2>&5
5638   ac_status=$?
5639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5640   (exit $ac_status); }; }; then
5641   ac_lo=$ac_mid; break
5642 else
5643   echo "$as_me: failed program was:" >&5
5644 cat conftest.$ac_ext >&5
5645 ac_hi=`expr '(' $ac_mid ')' - 1`
5646                        if test $ac_mid -le $ac_hi; then
5647                          ac_lo= ac_hi=
5648                          break
5649                        fi
5650                        ac_mid=`expr 2 '*' $ac_mid`
5651 fi
5652 rm -f conftest.$ac_objext conftest.$ac_ext
5653   done
5654 else
5655   echo "$as_me: failed program was:" >&5
5656 cat conftest.$ac_ext >&5
5657 ac_lo= ac_hi=
5658 fi
5659 rm -f conftest.$ac_objext conftest.$ac_ext
5660 fi
5661 rm -f conftest.$ac_objext conftest.$ac_ext
5662 # Binary search between lo and hi bounds.
5663 while test "x$ac_lo" != "x$ac_hi"; do
5664   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5665   cat >conftest.$ac_ext <<_ACEOF
5666 #line $LINENO "configure"
5667 #include "confdefs.h"
5668 $ac_includes_default
5669 int
5670 main ()
5671 {
5672 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
5673 test_array [0] = 0
5674
5675   ;
5676   return 0;
5677 }
5678 _ACEOF
5679 rm -f conftest.$ac_objext
5680 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5681   (eval $ac_compile) 2>&5
5682   ac_status=$?
5683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5684   (exit $ac_status); } &&
5685          { ac_try='test -s conftest.$ac_objext'
5686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5687   (eval $ac_try) 2>&5
5688   ac_status=$?
5689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5690   (exit $ac_status); }; }; then
5691   ac_hi=$ac_mid
5692 else
5693   echo "$as_me: failed program was:" >&5
5694 cat conftest.$ac_ext >&5
5695 ac_lo=`expr '(' $ac_mid ')' + 1`
5696 fi
5697 rm -f conftest.$ac_objext conftest.$ac_ext
5698 done
5699 case $ac_lo in
5700 ?*) ac_cv_sizeof_short=$ac_lo;;
5701 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
5702 echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
5703    { (exit 1); exit 1; }; } ;;
5704 esac
5705 else
5706   if test "$cross_compiling" = yes; then
5707   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5708 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5709    { (exit 1); exit 1; }; }
5710 else
5711   cat >conftest.$ac_ext <<_ACEOF
5712 #line $LINENO "configure"
5713 #include "confdefs.h"
5714 $ac_includes_default
5715 long longval () { return (long) (sizeof (short)); }
5716 unsigned long ulongval () { return (long) (sizeof (short)); }
5717 #include <stdio.h>
5718 #include <stdlib.h>
5719 int
5720 main ()
5721 {
5722
5723   FILE *f = fopen ("conftest.val", "w");
5724   if (! f)
5725     exit (1);
5726   if (((long) (sizeof (short))) < 0)
5727     {
5728       long i = longval ();
5729       if (i != ((long) (sizeof (short))))
5730         exit (1);
5731       fprintf (f, "%ld\n", i);
5732     }
5733   else
5734     {
5735       unsigned long i = ulongval ();
5736       if (i != ((long) (sizeof (short))))
5737         exit (1);
5738       fprintf (f, "%lu\n", i);
5739     }
5740   exit (ferror (f) || fclose (f) != 0);
5741
5742   ;
5743   return 0;
5744 }
5745 _ACEOF
5746 rm -f conftest$ac_exeext
5747 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5748   (eval $ac_link) 2>&5
5749   ac_status=$?
5750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5751   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5752   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5753   (eval $ac_try) 2>&5
5754   ac_status=$?
5755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5756   (exit $ac_status); }; }; then
5757   ac_cv_sizeof_short=`cat conftest.val`
5758 else
5759   echo "$as_me: program exited with status $ac_status" >&5
5760 echo "$as_me: failed program was:" >&5
5761 cat conftest.$ac_ext >&5
5762 ( exit $ac_status )
5763 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
5764 echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
5765    { (exit 1); exit 1; }; }
5766 fi
5767 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5768 fi
5769 fi
5770 rm -f conftest.val
5771 else
5772   ac_cv_sizeof_short=0
5773 fi
5774 fi
5775 echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
5776 echo "${ECHO_T}$ac_cv_sizeof_short" >&6
5777 cat >>confdefs.h <<_ACEOF
5778 #define SIZEOF_SHORT $ac_cv_sizeof_short
5779 _ACEOF
5780
5781
5782 echo "$as_me:$LINENO: checking for int" >&5
5783 echo $ECHO_N "checking for int... $ECHO_C" >&6
5784 if test "${ac_cv_type_int+set}" = set; then
5785   echo $ECHO_N "(cached) $ECHO_C" >&6
5786 else
5787   cat >conftest.$ac_ext <<_ACEOF
5788 #line $LINENO "configure"
5789 #include "confdefs.h"
5790 $ac_includes_default
5791 int
5792 main ()
5793 {
5794 if ((int *) 0)
5795   return 0;
5796 if (sizeof (int))
5797   return 0;
5798   ;
5799   return 0;
5800 }
5801 _ACEOF
5802 rm -f conftest.$ac_objext
5803 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5804   (eval $ac_compile) 2>&5
5805   ac_status=$?
5806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5807   (exit $ac_status); } &&
5808          { ac_try='test -s conftest.$ac_objext'
5809   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5810   (eval $ac_try) 2>&5
5811   ac_status=$?
5812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5813   (exit $ac_status); }; }; then
5814   ac_cv_type_int=yes
5815 else
5816   echo "$as_me: failed program was:" >&5
5817 cat conftest.$ac_ext >&5
5818 ac_cv_type_int=no
5819 fi
5820 rm -f conftest.$ac_objext conftest.$ac_ext
5821 fi
5822 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5823 echo "${ECHO_T}$ac_cv_type_int" >&6
5824
5825 echo "$as_me:$LINENO: checking size of int" >&5
5826 echo $ECHO_N "checking size of int... $ECHO_C" >&6
5827 if test "${ac_cv_sizeof_int+set}" = set; then
5828   echo $ECHO_N "(cached) $ECHO_C" >&6
5829 else
5830   if test "$ac_cv_type_int" = yes; then
5831   # The cast to unsigned long works around a bug in the HP C Compiler
5832   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5833   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5834   # This bug is HP SR number 8606223364.
5835   if test "$cross_compiling" = yes; then
5836   # Depending upon the size, compute the lo and hi bounds.
5837 cat >conftest.$ac_ext <<_ACEOF
5838 #line $LINENO "configure"
5839 #include "confdefs.h"
5840 $ac_includes_default
5841 int
5842 main ()
5843 {
5844 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5845 test_array [0] = 0
5846
5847   ;
5848   return 0;
5849 }
5850 _ACEOF
5851 rm -f conftest.$ac_objext
5852 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5853   (eval $ac_compile) 2>&5
5854   ac_status=$?
5855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5856   (exit $ac_status); } &&
5857          { ac_try='test -s conftest.$ac_objext'
5858   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5859   (eval $ac_try) 2>&5
5860   ac_status=$?
5861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5862   (exit $ac_status); }; }; then
5863   ac_lo=0 ac_mid=0
5864   while :; do
5865     cat >conftest.$ac_ext <<_ACEOF
5866 #line $LINENO "configure"
5867 #include "confdefs.h"
5868 $ac_includes_default
5869 int
5870 main ()
5871 {
5872 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5873 test_array [0] = 0
5874
5875   ;
5876   return 0;
5877 }
5878 _ACEOF
5879 rm -f conftest.$ac_objext
5880 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5881   (eval $ac_compile) 2>&5
5882   ac_status=$?
5883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5884   (exit $ac_status); } &&
5885          { ac_try='test -s conftest.$ac_objext'
5886   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5887   (eval $ac_try) 2>&5
5888   ac_status=$?
5889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5890   (exit $ac_status); }; }; then
5891   ac_hi=$ac_mid; break
5892 else
5893   echo "$as_me: failed program was:" >&5
5894 cat conftest.$ac_ext >&5
5895 ac_lo=`expr $ac_mid + 1`
5896                     if test $ac_lo -le $ac_mid; then
5897                       ac_lo= ac_hi=
5898                       break
5899                     fi
5900                     ac_mid=`expr 2 '*' $ac_mid + 1`
5901 fi
5902 rm -f conftest.$ac_objext conftest.$ac_ext
5903   done
5904 else
5905   echo "$as_me: failed program was:" >&5
5906 cat conftest.$ac_ext >&5
5907 cat >conftest.$ac_ext <<_ACEOF
5908 #line $LINENO "configure"
5909 #include "confdefs.h"
5910 $ac_includes_default
5911 int
5912 main ()
5913 {
5914 static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5915 test_array [0] = 0
5916
5917   ;
5918   return 0;
5919 }
5920 _ACEOF
5921 rm -f conftest.$ac_objext
5922 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5923   (eval $ac_compile) 2>&5
5924   ac_status=$?
5925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5926   (exit $ac_status); } &&
5927          { ac_try='test -s conftest.$ac_objext'
5928   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5929   (eval $ac_try) 2>&5
5930   ac_status=$?
5931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5932   (exit $ac_status); }; }; then
5933   ac_hi=-1 ac_mid=-1
5934   while :; do
5935     cat >conftest.$ac_ext <<_ACEOF
5936 #line $LINENO "configure"
5937 #include "confdefs.h"
5938 $ac_includes_default
5939 int
5940 main ()
5941 {
5942 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5943 test_array [0] = 0
5944
5945   ;
5946   return 0;
5947 }
5948 _ACEOF
5949 rm -f conftest.$ac_objext
5950 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5951   (eval $ac_compile) 2>&5
5952   ac_status=$?
5953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5954   (exit $ac_status); } &&
5955          { ac_try='test -s conftest.$ac_objext'
5956   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5957   (eval $ac_try) 2>&5
5958   ac_status=$?
5959   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5960   (exit $ac_status); }; }; then
5961   ac_lo=$ac_mid; break
5962 else
5963   echo "$as_me: failed program was:" >&5
5964 cat conftest.$ac_ext >&5
5965 ac_hi=`expr '(' $ac_mid ')' - 1`
5966                        if test $ac_mid -le $ac_hi; then
5967                          ac_lo= ac_hi=
5968                          break
5969                        fi
5970                        ac_mid=`expr 2 '*' $ac_mid`
5971 fi
5972 rm -f conftest.$ac_objext conftest.$ac_ext
5973   done
5974 else
5975   echo "$as_me: failed program was:" >&5
5976 cat conftest.$ac_ext >&5
5977 ac_lo= ac_hi=
5978 fi
5979 rm -f conftest.$ac_objext conftest.$ac_ext
5980 fi
5981 rm -f conftest.$ac_objext conftest.$ac_ext
5982 # Binary search between lo and hi bounds.
5983 while test "x$ac_lo" != "x$ac_hi"; do
5984   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5985   cat >conftest.$ac_ext <<_ACEOF
5986 #line $LINENO "configure"
5987 #include "confdefs.h"
5988 $ac_includes_default
5989 int
5990 main ()
5991 {
5992 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5993 test_array [0] = 0
5994
5995   ;
5996   return 0;
5997 }
5998 _ACEOF
5999 rm -f conftest.$ac_objext
6000 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6001   (eval $ac_compile) 2>&5
6002   ac_status=$?
6003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6004   (exit $ac_status); } &&
6005          { ac_try='test -s conftest.$ac_objext'
6006   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6007   (eval $ac_try) 2>&5
6008   ac_status=$?
6009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6010   (exit $ac_status); }; }; then
6011   ac_hi=$ac_mid
6012 else
6013   echo "$as_me: failed program was:" >&5
6014 cat conftest.$ac_ext >&5
6015 ac_lo=`expr '(' $ac_mid ')' + 1`
6016 fi
6017 rm -f conftest.$ac_objext conftest.$ac_ext
6018 done
6019 case $ac_lo in
6020 ?*) ac_cv_sizeof_int=$ac_lo;;
6021 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
6022 echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
6023    { (exit 1); exit 1; }; } ;;
6024 esac
6025 else
6026   if test "$cross_compiling" = yes; then
6027   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6028 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6029    { (exit 1); exit 1; }; }
6030 else
6031   cat >conftest.$ac_ext <<_ACEOF
6032 #line $LINENO "configure"
6033 #include "confdefs.h"
6034 $ac_includes_default
6035 long longval () { return (long) (sizeof (int)); }
6036 unsigned long ulongval () { return (long) (sizeof (int)); }
6037 #include <stdio.h>
6038 #include <stdlib.h>
6039 int
6040 main ()
6041 {
6042
6043   FILE *f = fopen ("conftest.val", "w");
6044   if (! f)
6045     exit (1);
6046   if (((long) (sizeof (int))) < 0)
6047     {
6048       long i = longval ();
6049       if (i != ((long) (sizeof (int))))
6050         exit (1);
6051       fprintf (f, "%ld\n", i);
6052     }
6053   else
6054     {
6055       unsigned long i = ulongval ();
6056       if (i != ((long) (sizeof (int))))
6057         exit (1);
6058       fprintf (f, "%lu\n", i);
6059     }
6060   exit (ferror (f) || fclose (f) != 0);
6061
6062   ;
6063   return 0;
6064 }
6065 _ACEOF
6066 rm -f conftest$ac_exeext
6067 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6068   (eval $ac_link) 2>&5
6069   ac_status=$?
6070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6071   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6072   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6073   (eval $ac_try) 2>&5
6074   ac_status=$?
6075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6076   (exit $ac_status); }; }; then
6077   ac_cv_sizeof_int=`cat conftest.val`
6078 else
6079   echo "$as_me: program exited with status $ac_status" >&5
6080 echo "$as_me: failed program was:" >&5
6081 cat conftest.$ac_ext >&5
6082 ( exit $ac_status )
6083 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
6084 echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
6085    { (exit 1); exit 1; }; }
6086 fi
6087 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6088 fi
6089 fi
6090 rm -f conftest.val
6091 else
6092   ac_cv_sizeof_int=0
6093 fi
6094 fi
6095 echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6096 echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6097 cat >>confdefs.h <<_ACEOF
6098 #define SIZEOF_INT $ac_cv_sizeof_int
6099 _ACEOF
6100
6101
6102 echo "$as_me:$LINENO: checking for long" >&5
6103 echo $ECHO_N "checking for long... $ECHO_C" >&6
6104 if test "${ac_cv_type_long+set}" = set; then
6105   echo $ECHO_N "(cached) $ECHO_C" >&6
6106 else
6107   cat >conftest.$ac_ext <<_ACEOF
6108 #line $LINENO "configure"
6109 #include "confdefs.h"
6110 $ac_includes_default
6111 int
6112 main ()
6113 {
6114 if ((long *) 0)
6115   return 0;
6116 if (sizeof (long))
6117   return 0;
6118   ;
6119   return 0;
6120 }
6121 _ACEOF
6122 rm -f conftest.$ac_objext
6123 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6124   (eval $ac_compile) 2>&5
6125   ac_status=$?
6126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6127   (exit $ac_status); } &&
6128          { ac_try='test -s conftest.$ac_objext'
6129   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6130   (eval $ac_try) 2>&5
6131   ac_status=$?
6132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6133   (exit $ac_status); }; }; then
6134   ac_cv_type_long=yes
6135 else
6136   echo "$as_me: failed program was:" >&5
6137 cat conftest.$ac_ext >&5
6138 ac_cv_type_long=no
6139 fi
6140 rm -f conftest.$ac_objext conftest.$ac_ext
6141 fi
6142 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6143 echo "${ECHO_T}$ac_cv_type_long" >&6
6144
6145 echo "$as_me:$LINENO: checking size of long" >&5
6146 echo $ECHO_N "checking size of long... $ECHO_C" >&6
6147 if test "${ac_cv_sizeof_long+set}" = set; then
6148   echo $ECHO_N "(cached) $ECHO_C" >&6
6149 else
6150   if test "$ac_cv_type_long" = yes; then
6151   # The cast to unsigned long works around a bug in the HP C Compiler
6152   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6153   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6154   # This bug is HP SR number 8606223364.
6155   if test "$cross_compiling" = yes; then
6156   # Depending upon the size, compute the lo and hi bounds.
6157 cat >conftest.$ac_ext <<_ACEOF
6158 #line $LINENO "configure"
6159 #include "confdefs.h"
6160 $ac_includes_default
6161 int
6162 main ()
6163 {
6164 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6165 test_array [0] = 0
6166
6167   ;
6168   return 0;
6169 }
6170 _ACEOF
6171 rm -f conftest.$ac_objext
6172 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6173   (eval $ac_compile) 2>&5
6174   ac_status=$?
6175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6176   (exit $ac_status); } &&
6177          { ac_try='test -s conftest.$ac_objext'
6178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6179   (eval $ac_try) 2>&5
6180   ac_status=$?
6181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6182   (exit $ac_status); }; }; then
6183   ac_lo=0 ac_mid=0
6184   while :; do
6185     cat >conftest.$ac_ext <<_ACEOF
6186 #line $LINENO "configure"
6187 #include "confdefs.h"
6188 $ac_includes_default
6189 int
6190 main ()
6191 {
6192 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6193 test_array [0] = 0
6194
6195   ;
6196   return 0;
6197 }
6198 _ACEOF
6199 rm -f conftest.$ac_objext
6200 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6201   (eval $ac_compile) 2>&5
6202   ac_status=$?
6203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6204   (exit $ac_status); } &&
6205          { ac_try='test -s conftest.$ac_objext'
6206   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6207   (eval $ac_try) 2>&5
6208   ac_status=$?
6209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6210   (exit $ac_status); }; }; then
6211   ac_hi=$ac_mid; break
6212 else
6213   echo "$as_me: failed program was:" >&5
6214 cat conftest.$ac_ext >&5
6215 ac_lo=`expr $ac_mid + 1`
6216                     if test $ac_lo -le $ac_mid; then
6217                       ac_lo= ac_hi=
6218                       break
6219                     fi
6220                     ac_mid=`expr 2 '*' $ac_mid + 1`
6221 fi
6222 rm -f conftest.$ac_objext conftest.$ac_ext
6223   done
6224 else
6225   echo "$as_me: failed program was:" >&5
6226 cat conftest.$ac_ext >&5
6227 cat >conftest.$ac_ext <<_ACEOF
6228 #line $LINENO "configure"
6229 #include "confdefs.h"
6230 $ac_includes_default
6231 int
6232 main ()
6233 {
6234 static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6235 test_array [0] = 0
6236
6237   ;
6238   return 0;
6239 }
6240 _ACEOF
6241 rm -f conftest.$ac_objext
6242 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6243   (eval $ac_compile) 2>&5
6244   ac_status=$?
6245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6246   (exit $ac_status); } &&
6247          { ac_try='test -s conftest.$ac_objext'
6248   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6249   (eval $ac_try) 2>&5
6250   ac_status=$?
6251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6252   (exit $ac_status); }; }; then
6253   ac_hi=-1 ac_mid=-1
6254   while :; do
6255     cat >conftest.$ac_ext <<_ACEOF
6256 #line $LINENO "configure"
6257 #include "confdefs.h"
6258 $ac_includes_default
6259 int
6260 main ()
6261 {
6262 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6263 test_array [0] = 0
6264
6265   ;
6266   return 0;
6267 }
6268 _ACEOF
6269 rm -f conftest.$ac_objext
6270 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6271   (eval $ac_compile) 2>&5
6272   ac_status=$?
6273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6274   (exit $ac_status); } &&
6275          { ac_try='test -s conftest.$ac_objext'
6276   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6277   (eval $ac_try) 2>&5
6278   ac_status=$?
6279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6280   (exit $ac_status); }; }; then
6281   ac_lo=$ac_mid; break
6282 else
6283   echo "$as_me: failed program was:" >&5
6284 cat conftest.$ac_ext >&5
6285 ac_hi=`expr '(' $ac_mid ')' - 1`
6286                        if test $ac_mid -le $ac_hi; then
6287                          ac_lo= ac_hi=
6288                          break
6289                        fi
6290                        ac_mid=`expr 2 '*' $ac_mid`
6291 fi
6292 rm -f conftest.$ac_objext conftest.$ac_ext
6293   done
6294 else
6295   echo "$as_me: failed program was:" >&5
6296 cat conftest.$ac_ext >&5
6297 ac_lo= ac_hi=
6298 fi
6299 rm -f conftest.$ac_objext conftest.$ac_ext
6300 fi
6301 rm -f conftest.$ac_objext conftest.$ac_ext
6302 # Binary search between lo and hi bounds.
6303 while test "x$ac_lo" != "x$ac_hi"; do
6304   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6305   cat >conftest.$ac_ext <<_ACEOF
6306 #line $LINENO "configure"
6307 #include "confdefs.h"
6308 $ac_includes_default
6309 int
6310 main ()
6311 {
6312 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6313 test_array [0] = 0
6314
6315   ;
6316   return 0;
6317 }
6318 _ACEOF
6319 rm -f conftest.$ac_objext
6320 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6321   (eval $ac_compile) 2>&5
6322   ac_status=$?
6323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6324   (exit $ac_status); } &&
6325          { ac_try='test -s conftest.$ac_objext'
6326   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6327   (eval $ac_try) 2>&5
6328   ac_status=$?
6329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6330   (exit $ac_status); }; }; then
6331   ac_hi=$ac_mid
6332 else
6333   echo "$as_me: failed program was:" >&5
6334 cat conftest.$ac_ext >&5
6335 ac_lo=`expr '(' $ac_mid ')' + 1`
6336 fi
6337 rm -f conftest.$ac_objext conftest.$ac_ext
6338 done
6339 case $ac_lo in
6340 ?*) ac_cv_sizeof_long=$ac_lo;;
6341 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
6342 echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
6343    { (exit 1); exit 1; }; } ;;
6344 esac
6345 else
6346   if test "$cross_compiling" = yes; then
6347   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6348 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6349    { (exit 1); exit 1; }; }
6350 else
6351   cat >conftest.$ac_ext <<_ACEOF
6352 #line $LINENO "configure"
6353 #include "confdefs.h"
6354 $ac_includes_default
6355 long longval () { return (long) (sizeof (long)); }
6356 unsigned long ulongval () { return (long) (sizeof (long)); }
6357 #include <stdio.h>
6358 #include <stdlib.h>
6359 int
6360 main ()
6361 {
6362
6363   FILE *f = fopen ("conftest.val", "w");
6364   if (! f)
6365     exit (1);
6366   if (((long) (sizeof (long))) < 0)
6367     {
6368       long i = longval ();
6369       if (i != ((long) (sizeof (long))))
6370         exit (1);
6371       fprintf (f, "%ld\n", i);
6372     }
6373   else
6374     {
6375       unsigned long i = ulongval ();
6376       if (i != ((long) (sizeof (long))))
6377         exit (1);
6378       fprintf (f, "%lu\n", i);
6379     }
6380   exit (ferror (f) || fclose (f) != 0);
6381
6382   ;
6383   return 0;
6384 }
6385 _ACEOF
6386 rm -f conftest$ac_exeext
6387 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6388   (eval $ac_link) 2>&5
6389   ac_status=$?
6390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6391   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6392   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6393   (eval $ac_try) 2>&5
6394   ac_status=$?
6395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6396   (exit $ac_status); }; }; then
6397   ac_cv_sizeof_long=`cat conftest.val`
6398 else
6399   echo "$as_me: program exited with status $ac_status" >&5
6400 echo "$as_me: failed program was:" >&5
6401 cat conftest.$ac_ext >&5
6402 ( exit $ac_status )
6403 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
6404 echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
6405    { (exit 1); exit 1; }; }
6406 fi
6407 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6408 fi
6409 fi
6410 rm -f conftest.val
6411 else
6412   ac_cv_sizeof_long=0
6413 fi
6414 fi
6415 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6416 echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6417 cat >>confdefs.h <<_ACEOF
6418 #define SIZEOF_LONG $ac_cv_sizeof_long
6419 _ACEOF
6420
6421
6422 else
6423     if $CXX -v 2>&1|grep "mingw" >/dev/null 2>&1; then
6424         ac_cv_sizeof_char=1
6425         ac_cv_sizeof_short=2
6426         ac_cv_sizeof_int=4
6427         ac_cv_sizeof_long=4
6428     else
6429         : # FIXME
6430     fi
6431 #echo
6432 fi
6433
6434 type_name()
6435 {
6436     if expr "$ac_cv_sizeof_char" '>=' "$1" >/dev/null; then
6437         echo "char"
6438         exit
6439     fi
6440     if expr "$ac_cv_sizeof_short" '>=' "$1" >/dev/null; then
6441         echo "short"
6442         exit
6443     fi
6444     if expr "$ac_cv_sizeof_int" '>=' "$1" >/dev/null; then
6445         echo "int"
6446         exit
6447     fi
6448     if expr "$ac_cv_sizeof_long" '>=' "$1" >/dev/null; then
6449         echo "long"
6450         exit
6451     fi
6452     echo "long"
6453 }
6454
6455 echo "$as_me:$LINENO: checking type name for byte" >&5
6456 echo $ECHO_N "checking type name for byte... $ECHO_C" >&6
6457 TYPE_BYTE=`type_name 1`
6458 echo "$as_me:$LINENO: result: $TYPE_BYTE" >&5
6459 echo "${ECHO_T}$TYPE_BYTE" >&6
6460 echo "$as_me:$LINENO: checking type name for word" >&5
6461 echo $ECHO_N "checking type name for word... $ECHO_C" >&6
6462 TYPE_WORD=`type_name 2`
6463 echo "$as_me:$LINENO: result: $TYPE_WORD" >&5
6464 echo "${ECHO_T}$TYPE_WORD" >&6
6465 echo "$as_me:$LINENO: checking type name for dword" >&5
6466 echo $ECHO_N "checking type name for dword... $ECHO_C" >&6
6467 TYPE_DWORD=`type_name 4`
6468 echo "$as_me:$LINENO: result: $TYPE_DWORD" >&5
6469 echo "${ECHO_T}$TYPE_DWORD" >&6
6470 cat >>confdefs.h <<_ACEOF
6471 #define TYPE_BYTE $TYPE_BYTE
6472 _ACEOF
6473
6474 cat >>confdefs.h <<_ACEOF
6475 #define TYPE_WORD $TYPE_WORD
6476 _ACEOF
6477
6478 cat >>confdefs.h <<_ACEOF
6479 #define TYPE_DWORD $TYPE_DWORD
6480 _ACEOF
6481
6482
6483 echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
6484 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
6485 if test "${ac_cv_c_bigendian+set}" = set; then
6486   echo $ECHO_N "(cached) $ECHO_C" >&6
6487 else
6488   # See if sys/param.h defines the BYTE_ORDER macro.
6489 cat >conftest.$ac_ext <<_ACEOF
6490 #line $LINENO "configure"
6491 #include "confdefs.h"
6492 #include <sys/types.h>
6493 #include <sys/param.h>
6494
6495 int
6496 main ()
6497 {
6498 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
6499  bogus endian macros
6500 #endif
6501
6502   ;
6503   return 0;
6504 }
6505 _ACEOF
6506 rm -f conftest.$ac_objext
6507 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6508   (eval $ac_compile) 2>&5
6509   ac_status=$?
6510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6511   (exit $ac_status); } &&
6512          { ac_try='test -s conftest.$ac_objext'
6513   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6514   (eval $ac_try) 2>&5
6515   ac_status=$?
6516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6517   (exit $ac_status); }; }; then
6518   # It does; now see whether it defined to BIG_ENDIAN or not.
6519 cat >conftest.$ac_ext <<_ACEOF
6520 #line $LINENO "configure"
6521 #include "confdefs.h"
6522 #include <sys/types.h>
6523 #include <sys/param.h>
6524
6525 int
6526 main ()
6527 {
6528 #if BYTE_ORDER != BIG_ENDIAN
6529  not big endian
6530 #endif
6531
6532   ;
6533   return 0;
6534 }
6535 _ACEOF
6536 rm -f conftest.$ac_objext
6537 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6538   (eval $ac_compile) 2>&5
6539   ac_status=$?
6540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6541   (exit $ac_status); } &&
6542          { ac_try='test -s conftest.$ac_objext'
6543   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6544   (eval $ac_try) 2>&5
6545   ac_status=$?
6546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6547   (exit $ac_status); }; }; then
6548   ac_cv_c_bigendian=yes
6549 else
6550   echo "$as_me: failed program was:" >&5
6551 cat conftest.$ac_ext >&5
6552 ac_cv_c_bigendian=no
6553 fi
6554 rm -f conftest.$ac_objext conftest.$ac_ext
6555 else
6556   echo "$as_me: failed program was:" >&5
6557 cat conftest.$ac_ext >&5
6558 # It does not; compile a test program.
6559 if test "$cross_compiling" = yes; then
6560   # try to guess the endianness by grepping values into an object file
6561   ac_cv_c_bigendian=unknown
6562   cat >conftest.$ac_ext <<_ACEOF
6563 #line $LINENO "configure"
6564 #include "confdefs.h"
6565 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
6566 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
6567 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
6568 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
6569 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
6570 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
6571 int
6572 main ()
6573 {
6574  _ascii (); _ebcdic ();
6575   ;
6576   return 0;
6577 }
6578 _ACEOF
6579 rm -f conftest.$ac_objext
6580 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6581   (eval $ac_compile) 2>&5
6582   ac_status=$?
6583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6584   (exit $ac_status); } &&
6585          { ac_try='test -s conftest.$ac_objext'
6586   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6587   (eval $ac_try) 2>&5
6588   ac_status=$?
6589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6590   (exit $ac_status); }; }; then
6591   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
6592   ac_cv_c_bigendian=yes
6593 fi
6594 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
6595   if test "$ac_cv_c_bigendian" = unknown; then
6596     ac_cv_c_bigendian=no
6597   else
6598     # finding both strings is unlikely to happen, but who knows?
6599     ac_cv_c_bigendian=unknown
6600   fi
6601 fi
6602 else
6603   echo "$as_me: failed program was:" >&5
6604 cat conftest.$ac_ext >&5
6605 fi
6606 rm -f conftest.$ac_objext conftest.$ac_ext
6607 else
6608   cat >conftest.$ac_ext <<_ACEOF
6609 #line $LINENO "configure"
6610 #include "confdefs.h"
6611 int
6612 main ()
6613 {
6614   /* Are we little or big endian?  From Harbison&Steele.  */
6615   union
6616   {
6617     long l;
6618     char c[sizeof (long)];
6619   } u;
6620   u.l = 1;
6621   exit (u.c[sizeof (long) - 1] == 1);
6622 }
6623 _ACEOF
6624 rm -f conftest$ac_exeext
6625 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6626   (eval $ac_link) 2>&5
6627   ac_status=$?
6628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6629   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6630   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6631   (eval $ac_try) 2>&5
6632   ac_status=$?
6633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6634   (exit $ac_status); }; }; then
6635   ac_cv_c_bigendian=no
6636 else
6637   echo "$as_me: program exited with status $ac_status" >&5
6638 echo "$as_me: failed program was:" >&5
6639 cat conftest.$ac_ext >&5
6640 ( exit $ac_status )
6641 ac_cv_c_bigendian=yes
6642 fi
6643 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6644 fi
6645 fi
6646 rm -f conftest.$ac_objext conftest.$ac_ext
6647 fi
6648 echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
6649 echo "${ECHO_T}$ac_cv_c_bigendian" >&6
6650 case $ac_cv_c_bigendian in
6651   yes)
6652
6653 cat >>confdefs.h <<\_ACEOF
6654 #define WORDS_BIGENDIAN 1
6655 _ACEOF
6656  ;;
6657   no)
6658      ;;
6659   *)
6660     { { echo "$as_me:$LINENO: error: unknown endianness
6661 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
6662 echo "$as_me: error: unknown endianness
6663 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
6664    { (exit 1); exit 1; }; } ;;
6665 esac
6666
6667
6668 #
6669 #
6670 if test "${prefix}" = "NONE"; then
6671     prefix="/usr/local"
6672 fi
6673
6674 config_in=`pwd`
6675 sdcc_datadir=${datadir}/sdcc
6676
6677
6678 # For some unknown reason, putting this assignment in a subshell
6679 # like this causes the rvalue to be fully substituted. We need this
6680 # for the defines below to generate the right thing. We keep this
6681 # separate from the substituted sdcc_datadir because we want the
6682 # latter for makefiles.
6683 if test "${datadir}" = "\${prefix}/share"; then
6684     sdcc_datadir_tmp=${prefix}/share/sdcc
6685 else
6686     sdcc_datadir_tmp=${datadir}/sdcc
6687 fi
6688
6689 if test "${includedir}" = "\${prefix}/include"; then
6690    cat >>confdefs.h <<_ACEOF
6691 #define STANDARD_INCLUDE_DIR "${sdcc_datadir_tmp}/include"
6692 _ACEOF
6693
6694    cat >>confdefs.h <<_ACEOF
6695 #define SDCC_INCLUDE_DIR "${sdcc_datadir_tmp}/include"
6696 _ACEOF
6697
6698 else
6699    cat >>confdefs.h <<_ACEOF
6700 #define STANDARD_INCLUDE_DIR "${includedir}"
6701 _ACEOF
6702
6703    cat >>confdefs.h <<_ACEOF
6704 #define SDCC_INCLUDE_DIR "${includedir}"
6705 _ACEOF
6706
6707 fi
6708
6709 cat >>confdefs.h <<_ACEOF
6710 #define SDCC_LIB_DIR "${sdcc_datadir_tmp}/lib"
6711 _ACEOF
6712
6713 cat >>confdefs.h <<_ACEOF
6714 #define STD_LIB "libsdcc"
6715 _ACEOF
6716
6717 cat >>confdefs.h <<_ACEOF
6718 #define STD_INT_LIB "libint"
6719 _ACEOF
6720
6721 cat >>confdefs.h <<_ACEOF
6722 #define STD_LONG_LIB "liblong"
6723 _ACEOF
6724
6725 cat >>confdefs.h <<_ACEOF
6726 #define STD_FP_LIB "libfloat"
6727 _ACEOF
6728
6729 cat >>confdefs.h <<_ACEOF
6730 #define STD_DS390_LIB "libds390"
6731 _ACEOF
6732
6733 cat >>confdefs.h <<_ACEOF
6734 #define STD_xa51_LIB "xa51"
6735 _ACEOF
6736
6737
6738 cat >>confdefs.h <<_ACEOF
6739 #define PREFIX "${prefix}"
6740 _ACEOF
6741
6742 cat >>confdefs.h <<_ACEOF
6743 #define DATADIR "${sdcc_datadir_tmp}"
6744 _ACEOF
6745
6746 cat >>confdefs.h <<_ACEOF
6747 #define SRCDIR "${config_in}"
6748 _ACEOF
6749
6750
6751
6752
6753 # Now handle the port selection
6754 rm -f ports.all ports.build
6755 # Check whether --enable-mcs51-port or --disable-mcs51-port was given.
6756 if test "${enable_mcs51_port+set}" = set; then
6757   enableval="$enable_mcs51_port"
6758
6759 fi;
6760 echo mcs51 >>ports.all
6761 if test "$enable_mcs51_port" = "no"; then
6762     cat >>confdefs.h <<_ACEOF
6763 #define OPT_DISABLE_MCS51 1
6764 _ACEOF
6765
6766 else
6767     echo mcs51 >>ports.build
6768     cat >>confdefs.h <<_ACEOF
6769 #define OPT_DISABLE_MCS51 0
6770 _ACEOF
6771
6772 fi
6773
6774 # Check whether --enable-gbz80-port or --disable-gbz80-port was given.
6775 if test "${enable_gbz80_port+set}" = set; then
6776   enableval="$enable_gbz80_port"
6777
6778 fi;
6779 echo z80 >>ports.all
6780 if test "$enable_gbz80_port" = "no"; then
6781     cat >>confdefs.h <<_ACEOF
6782 #define OPT_DISABLE_GBZ80 1
6783 _ACEOF
6784
6785 else
6786     echo z80 >>ports.build
6787     cat >>confdefs.h <<_ACEOF
6788 #define OPT_DISABLE_GBZ80 0
6789 _ACEOF
6790
6791 fi
6792
6793 # Check whether --enable-z80-port or --disable-z80-port was given.
6794 if test "${enable_z80_port+set}" = set; then
6795   enableval="$enable_z80_port"
6796
6797 fi;
6798 echo z80 >>ports.all
6799 if test "$enable_z80_port" = "no"; then
6800     cat >>confdefs.h <<_ACEOF
6801 #define OPT_DISABLE_Z80 1
6802 _ACEOF
6803
6804 else
6805     echo z80 >>ports.build
6806     cat >>confdefs.h <<_ACEOF
6807 #define OPT_DISABLE_Z80 0
6808 _ACEOF
6809
6810 fi
6811
6812 # Check whether --enable-avr-port or --disable-avr-port was given.
6813 if test "${enable_avr_port+set}" = set; then
6814   enableval="$enable_avr_port"
6815
6816 fi;
6817 echo avr >>ports.all
6818 if test "$enable_avr_port" = "no"; then
6819     cat >>confdefs.h <<_ACEOF
6820 #define OPT_DISABLE_AVR 1
6821 _ACEOF
6822
6823 else
6824     echo avr >>ports.build
6825     cat >>confdefs.h <<_ACEOF
6826 #define OPT_DISABLE_AVR 0
6827 _ACEOF
6828
6829 fi
6830
6831 # Check whether --enable-ds390-port or --disable-ds390-port was given.
6832 if test "${enable_ds390_port+set}" = set; then
6833   enableval="$enable_ds390_port"
6834
6835 fi;
6836 echo ds390 >>ports.all
6837 if test "$enable_ds390_port" = "no"; then
6838     cat >>confdefs.h <<_ACEOF
6839 #define OPT_DISABLE_DS390 1
6840 _ACEOF
6841
6842     cat >>confdefs.h <<_ACEOF
6843 #define OPT_DISABLE_TININative 1
6844 _ACEOF
6845
6846 else
6847     echo ds390 >>ports.build
6848     cat >>confdefs.h <<_ACEOF
6849 #define OPT_DISABLE_DS390 0
6850 _ACEOF
6851
6852     cat >>confdefs.h <<_ACEOF
6853 #define OPT_DISABLE_TININative 0
6854 _ACEOF
6855
6856 fi
6857
6858 # Check whether --enable-pic-port or --disable-pic-port was given.
6859 if test "${enable_pic_port+set}" = set; then
6860   enableval="$enable_pic_port"
6861
6862 fi;
6863 echo pic >>ports.all
6864 if test "$enable_pic_port" = "no"; then
6865     cat >>confdefs.h <<_ACEOF
6866 #define OPT_DISABLE_PIC 1
6867 _ACEOF
6868
6869 else
6870     echo pic >>ports.build
6871     cat >>confdefs.h <<_ACEOF
6872 #define OPT_DISABLE_PIC 0
6873 _ACEOF
6874
6875 fi
6876
6877 # Check whether --enable-xa51-port or --disable-xa51-port was given.
6878 if test "${enable_xa51_port+set}" = set; then
6879   enableval="$enable_xa51_port"
6880
6881 fi;
6882 echo xa51 >>ports.all
6883 if test "$enable_xa51_port" = "no"; then
6884     cat >>confdefs.h <<_ACEOF
6885 #define OPT_DISABLE_XA51 1
6886 _ACEOF
6887
6888 else
6889     echo xa51 >>ports.build
6890     cat >>confdefs.h <<_ACEOF
6891 #define OPT_DISABLE_XA51 0
6892 _ACEOF
6893
6894 fi
6895
6896 # Check whether --enable-ucsim or --disable-ucsim was given.
6897 if test "${enable_ucsim+set}" = set; then
6898   enableval="$enable_ucsim"
6899
6900 fi;
6901 OPT_ENABLE_UCSIM=$enable_ucsim
6902
6903
6904 # Check whether --enable-device-lib-build or --disable-device-lib-build was given.
6905 if test "${enable_device_lib_build+set}" = set; then
6906   enableval="$enable_device_lib_build"
6907
6908 fi;
6909 OPT_ENABLE_DEVICE_LIB_BUILD=$enable_device_lib_build
6910
6911
6912 # Check whether --enable-packihx or --disable-packihx was given.
6913 if test "${enable_packihx+set}" = set; then
6914   enableval="$enable_packihx"
6915
6916 fi;
6917 OPT_ENABLE_PACKIHX=$enable_packihx
6918
6919
6920 # Check whether --enable-libgc or --disable-libgc was given.
6921 if test "${enable_libgc+set}" = set; then
6922   enableval="$enable_libgc"
6923
6924 fi;
6925 if test "$enable_libgc" = "yes"; then
6926
6927 echo "$as_me:$LINENO: checking for GC_malloc in -lgc" >&5
6928 echo $ECHO_N "checking for GC_malloc in -lgc... $ECHO_C" >&6
6929 if test "${ac_cv_lib_gc_GC_malloc+set}" = set; then
6930   echo $ECHO_N "(cached) $ECHO_C" >&6
6931 else
6932   ac_check_lib_save_LIBS=$LIBS
6933 LIBS="-lgc  $LIBS"
6934 cat >conftest.$ac_ext <<_ACEOF
6935 #line $LINENO "configure"
6936 #include "confdefs.h"
6937
6938 /* Override any gcc2 internal prototype to avoid an error.  */
6939 #ifdef __cplusplus
6940 extern "C"
6941 #endif
6942 /* We use char because int might match the return type of a gcc2
6943    builtin and then its argument prototype would still apply.  */
6944 char GC_malloc ();
6945 int
6946 main ()
6947 {
6948 GC_malloc ();
6949   ;
6950   return 0;
6951 }
6952 _ACEOF
6953 rm -f conftest.$ac_objext conftest$ac_exeext
6954 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6955   (eval $ac_link) 2>&5
6956   ac_status=$?
6957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6958   (exit $ac_status); } &&
6959          { ac_try='test -s conftest$ac_exeext'
6960   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6961   (eval $ac_try) 2>&5
6962   ac_status=$?
6963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6964   (exit $ac_status); }; }; then
6965   ac_cv_lib_gc_GC_malloc=yes
6966 else
6967   echo "$as_me: failed program was:" >&5
6968 cat conftest.$ac_ext >&5
6969 ac_cv_lib_gc_GC_malloc=no
6970 fi
6971 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6972 LIBS=$ac_check_lib_save_LIBS
6973 fi
6974 echo "$as_me:$LINENO: result: $ac_cv_lib_gc_GC_malloc" >&5
6975 echo "${ECHO_T}$ac_cv_lib_gc_GC_malloc" >&6
6976 if test $ac_cv_lib_gc_GC_malloc = yes; then
6977   cat >>confdefs.h <<_ACEOF
6978 #define HAVE_LIBGC 1
6979 _ACEOF
6980
6981   LIBS="-lgc $LIBS"
6982
6983 fi
6984
6985         OPT_ENABLE_LIBGC=1
6986 else
6987         OPT_ENABLE_LIBGC=0
6988 fi
6989 cat >>confdefs.h <<_ACEOF
6990 #define OPT_ENABLE_LIBGC $OPT_ENABLE_LIBGC
6991 _ACEOF
6992
6993
6994 #remove duplicates
6995 cat ports.all | uniq >ports
6996 mv ports ports.all
6997 cat ports.build | uniq >ports
6998 mv ports ports.build
6999
7000 # Generating output files
7001 # ===========================================================================
7002
7003
7004 subdirs="$subdirs support/cpp2"
7005
7006
7007
7008 subdirs="$subdirs packihx"
7009
7010
7011
7012 subdirs="$subdirs sim/ucsim"
7013
7014 # MLH: removed as the rules are already in Makefile.common
7015 #as/z80/Makefile
7016 #link/z80/Makefile
7017                                                                       ac_config_files="$ac_config_files main.mk:main_in.mk src/Makefile as/mcs51/Makefile device/include/Makefile device/lib/Makefile debugger/mcs51/Makefile Makefile.common:Makefile.common.in"
7018 cat >confcache <<\_ACEOF
7019 # This file is a shell script that caches the results of configure
7020 # tests run on this system so they can be shared between configure
7021 # scripts and configure runs, see configure's option --config-cache.
7022 # It is not useful on other systems.  If it contains results you don't
7023 # want to keep, you may remove or edit it.
7024 #
7025 # config.status only pays attention to the cache file if you give it
7026 # the --recheck option to rerun configure.
7027 #
7028 # `ac_cv_env_foo' variables (set or unset) will be overridden when
7029 # loading this file, other *unset* `ac_cv_foo' will be assigned the
7030 # following values.
7031
7032 _ACEOF
7033
7034 # The following way of writing the cache mishandles newlines in values,
7035 # but we know of no workaround that is simple, portable, and efficient.
7036 # So, don't put newlines in cache variables' values.
7037 # Ultrix sh set writes to stderr and can't be redirected directly,
7038 # and sets the high bit in the cache file unless we assign to the vars.
7039 {
7040   (set) 2>&1 |
7041     case `(ac_space=' '; set | grep ac_space) 2>&1` in
7042     *ac_space=\ *)
7043       # `set' does not quote correctly, so add quotes (double-quote
7044       # substitution turns \\\\ into \\, and sed turns \\ into \).
7045       sed -n \
7046         "s/'/'\\\\''/g;
7047           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
7048       ;;
7049     *)
7050       # `set' quotes correctly as required by POSIX, so do not add quotes.
7051       sed -n \
7052         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
7053       ;;
7054     esac;
7055 } |
7056   sed '
7057      t clear
7058      : clear
7059      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
7060      t end
7061      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
7062      : end' >>confcache
7063 if cmp -s $cache_file confcache; then :; else
7064   if test -w $cache_file; then
7065     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
7066     cat confcache >$cache_file
7067   else
7068     echo "not updating unwritable cache $cache_file"
7069   fi
7070 fi
7071 rm -f confcache
7072
7073 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7074 # Let make expand exec_prefix.
7075 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7076
7077 # VPATH may cause trouble with some makes, so we remove $(srcdir),
7078 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
7079 # trailing colons and then remove the whole line if VPATH becomes empty
7080 # (actually we leave an empty line to preserve line numbers).
7081 if test "x$srcdir" = x.; then
7082   ac_vpsub='/^[         ]*VPATH[        ]*=/{
7083 s/:*\$(srcdir):*/:/;
7084 s/:*\${srcdir}:*/:/;
7085 s/:*@srcdir@:*/:/;
7086 s/^\([^=]*=[    ]*\):*/\1/;
7087 s/:*$//;
7088 s/^[^=]*=[      ]*$//;
7089 }'
7090 fi
7091
7092 DEFS=-DHAVE_CONFIG_H
7093
7094 ac_libobjs=
7095 ac_ltlibobjs=
7096 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
7097   # 1. Remove the extension, and $U if already installed.
7098   ac_i=`echo "$ac_i" |
7099          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
7100   # 2. Add them.
7101   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
7102   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
7103 done
7104 LIBOBJS=$ac_libobjs
7105
7106 LTLIBOBJS=$ac_ltlibobjs
7107
7108
7109
7110 : ${CONFIG_STATUS=./config.status}
7111 ac_clean_files_save=$ac_clean_files
7112 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
7113 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
7114 echo "$as_me: creating $CONFIG_STATUS" >&6;}
7115 cat >$CONFIG_STATUS <<_ACEOF
7116 #! $SHELL
7117 # Generated by $as_me.
7118 # Run this file to recreate the current configuration.
7119 # Compiler output produced by configure, useful for debugging
7120 # configure, is in config.log if it exists.
7121
7122 debug=false
7123 SHELL=\${CONFIG_SHELL-$SHELL}
7124 _ACEOF
7125
7126 cat >>$CONFIG_STATUS <<\_ACEOF
7127 ## --------------------- ##
7128 ## M4sh Initialization.  ##
7129 ## --------------------- ##
7130
7131 # Be Bourne compatible
7132 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
7133   emulate sh
7134   NULLCMD=:
7135   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
7136   # is contrary to our usage.  Disable this feature.
7137   alias -g '${1+"$@"}'='"$@"'
7138 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
7139   set -o posix
7140 fi
7141
7142 # Support unset when possible.
7143 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
7144   as_unset=unset
7145 else
7146   as_unset=false
7147 fi
7148
7149
7150 # Work around bugs in pre-3.0 UWIN ksh.
7151 $as_unset ENV MAIL MAILPATH
7152 PS1='$ '
7153 PS2='> '
7154 PS4='+ '
7155
7156 # NLS nuisances.
7157 for as_var in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME
7158 do
7159   if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
7160     eval $as_var=C; export $as_var
7161   else
7162     $as_unset $as_var
7163   fi
7164 done
7165
7166 # Required to use basename.
7167 if expr a : '\(a\)' >/dev/null 2>&1; then
7168   as_expr=expr
7169 else
7170   as_expr=false
7171 fi
7172
7173 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
7174   as_basename=basename
7175 else
7176   as_basename=false
7177 fi
7178
7179
7180 # Name of the executable.
7181 as_me=`$as_basename "$0" ||
7182 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
7183          X"$0" : 'X\(//\)$' \| \
7184          X"$0" : 'X\(/\)$' \| \
7185          .     : '\(.\)' 2>/dev/null ||
7186 echo X/"$0" |
7187     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
7188           /^X\/\(\/\/\)$/{ s//\1/; q; }
7189           /^X\/\(\/\).*/{ s//\1/; q; }
7190           s/.*/./; q'`
7191
7192
7193 # PATH needs CR, and LINENO needs CR and PATH.
7194 # Avoid depending upon Character Ranges.
7195 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
7196 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
7197 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
7198 as_cr_digits='0123456789'
7199 as_cr_alnum=$as_cr_Letters$as_cr_digits
7200
7201 # The user is always right.
7202 if test "${PATH_SEPARATOR+set}" != set; then
7203   echo "#! /bin/sh" >conftest.sh
7204   echo  "exit 0"   >>conftest.sh
7205   chmod +x conftest.sh
7206   if (PATH="/nonexistent;."; conftest.sh) >/dev/null 2>&1; then
7207     PATH_SEPARATOR=';'
7208   else
7209     PATH_SEPARATOR=:
7210   fi
7211   rm -f conftest.sh
7212 fi
7213
7214
7215   as_lineno_1=$LINENO
7216   as_lineno_2=$LINENO
7217   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
7218   test "x$as_lineno_1" != "x$as_lineno_2" &&
7219   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
7220   # Find who we are.  Look in the path if we contain no path at all
7221   # relative or not.
7222   case $0 in
7223     *[\\/]* ) as_myself=$0 ;;
7224     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7225 for as_dir in $PATH
7226 do
7227   IFS=$as_save_IFS
7228   test -z "$as_dir" && as_dir=.
7229   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
7230 done
7231
7232        ;;
7233   esac
7234   # We did not find ourselves, most probably we were run as `sh COMMAND'
7235   # in which case we are not to be found in the path.
7236   if test "x$as_myself" = x; then
7237     as_myself=$0
7238   fi
7239   if test ! -f "$as_myself"; then
7240     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
7241 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
7242    { (exit 1); exit 1; }; }
7243   fi
7244   case $CONFIG_SHELL in
7245   '')
7246     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7247 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
7248 do
7249   IFS=$as_save_IFS
7250   test -z "$as_dir" && as_dir=.
7251   for as_base in sh bash ksh sh5; do
7252          case $as_dir in
7253          /*)
7254            if ("$as_dir/$as_base" -c '
7255   as_lineno_1=$LINENO
7256   as_lineno_2=$LINENO
7257   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
7258   test "x$as_lineno_1" != "x$as_lineno_2" &&
7259   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
7260              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
7261              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
7262              CONFIG_SHELL=$as_dir/$as_base
7263              export CONFIG_SHELL
7264              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
7265            fi;;
7266          esac
7267        done
7268 done
7269 ;;
7270   esac
7271
7272   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
7273   # uniformly replaced by the line number.  The first 'sed' inserts a
7274   # line-number line before each line; the second 'sed' does the real
7275   # work.  The second script uses 'N' to pair each line-number line
7276   # with the numbered line, and appends trailing '-' during
7277   # substitution so that $LINENO is not a special case at line end.
7278   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
7279   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
7280   sed '=' <$as_myself |
7281     sed '
7282       N
7283       s,$,-,
7284       : loop
7285       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
7286       t loop
7287       s,-$,,
7288       s,^['$as_cr_digits']*\n,,
7289     ' >$as_me.lineno &&
7290   chmod +x $as_me.lineno ||
7291     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
7292 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
7293    { (exit 1); exit 1; }; }
7294
7295   # Don't try to exec as it changes $[0], causing all sort of problems
7296   # (the dirname of $[0] is not the place where we might find the
7297   # original and so on.  Autoconf is especially sensible to this).
7298   . ./$as_me.lineno
7299   # Exit status is that of the last command.
7300   exit
7301 }
7302
7303
7304 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
7305   *c*,-n*) ECHO_N= ECHO_C='
7306 ' ECHO_T='      ' ;;
7307   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
7308   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
7309 esac
7310
7311 if expr a : '\(a\)' >/dev/null 2>&1; then
7312   as_expr=expr
7313 else
7314   as_expr=false
7315 fi
7316
7317 rm -f conf$$ conf$$.exe conf$$.file
7318 echo >conf$$.file
7319 if ln -s conf$$.file conf$$ 2>/dev/null; then
7320   # We could just check for DJGPP; but this test a) works b) is more generic
7321   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
7322   if test -f conf$$.exe; then
7323     # Don't use ln at all; we don't have any links
7324     as_ln_s='cp -p'
7325   else
7326     as_ln_s='ln -s'
7327   fi
7328 elif ln conf$$.file conf$$ 2>/dev/null; then
7329   as_ln_s=ln
7330 else
7331   as_ln_s='cp -p'
7332 fi
7333 rm -f conf$$ conf$$.exe conf$$.file
7334
7335 if mkdir -p . 2>/dev/null; then
7336   as_mkdir_p=:
7337 else
7338   as_mkdir_p=false
7339 fi
7340
7341 as_executable_p="test -f"
7342
7343 # Sed expression to map a string onto a valid CPP name.
7344 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
7345
7346 # Sed expression to map a string onto a valid variable name.
7347 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
7348
7349
7350 # IFS
7351 # We need space, tab and new line, in precisely that order.
7352 as_nl='
7353 '
7354 IFS="   $as_nl"
7355
7356 # CDPATH.
7357 $as_unset CDPATH
7358
7359 exec 6>&1
7360
7361 # Open the log real soon, to keep \$[0] and so on meaningful, and to
7362 # report actual input values of CONFIG_FILES etc. instead of their
7363 # values after options handling.  Logging --version etc. is OK.
7364 exec 5>>config.log
7365 {
7366   echo
7367   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
7368 ## Running $as_me. ##
7369 _ASBOX
7370 } >&5
7371 cat >&5 <<_CSEOF
7372
7373 This file was extended by $as_me, which was
7374 generated by GNU Autoconf 2.54.  Invocation command line was
7375
7376   CONFIG_FILES    = $CONFIG_FILES
7377   CONFIG_HEADERS  = $CONFIG_HEADERS
7378   CONFIG_LINKS    = $CONFIG_LINKS
7379   CONFIG_COMMANDS = $CONFIG_COMMANDS
7380   $ $0 $@
7381
7382 _CSEOF
7383 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
7384 echo >&5
7385 _ACEOF
7386
7387 # Files that config.status was made for.
7388 if test -n "$ac_config_files"; then
7389   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
7390 fi
7391
7392 if test -n "$ac_config_headers"; then
7393   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
7394 fi
7395
7396 if test -n "$ac_config_links"; then
7397   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
7398 fi
7399
7400 if test -n "$ac_config_commands"; then
7401   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
7402 fi
7403
7404 cat >>$CONFIG_STATUS <<\_ACEOF
7405
7406 ac_cs_usage="\
7407 \`$as_me' instantiates files from templates according to the
7408 current configuration.
7409
7410 Usage: $0 [OPTIONS] [FILE]...
7411
7412   -h, --help       print this help, then exit
7413   -V, --version    print version number, then exit
7414   -d, --debug      don't remove temporary files
7415       --recheck    update $as_me by reconfiguring in the same conditions
7416   --file=FILE[:TEMPLATE]
7417                    instantiate the configuration file FILE
7418   --header=FILE[:TEMPLATE]
7419                    instantiate the configuration header FILE
7420
7421 Configuration files:
7422 $config_files
7423
7424 Configuration headers:
7425 $config_headers
7426
7427 Report bugs to <bug-autoconf@gnu.org>."
7428 _ACEOF
7429
7430 cat >>$CONFIG_STATUS <<_ACEOF
7431 ac_cs_version="\\
7432 config.status
7433 configured by $0, generated by GNU Autoconf 2.54,
7434   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
7435
7436 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7437 Free Software Foundation, Inc.
7438 This config.status script is free software; the Free Software Foundation
7439 gives unlimited permission to copy, distribute and modify it."
7440 srcdir=$srcdir
7441 INSTALL="$INSTALL"
7442 _ACEOF
7443
7444 cat >>$CONFIG_STATUS <<\_ACEOF
7445 # If no file are specified by the user, then we need to provide default
7446 # value.  By we need to know if files were specified by the user.
7447 ac_need_defaults=:
7448 while test $# != 0
7449 do
7450   case $1 in
7451   --*=*)
7452     ac_option=`expr "x$1" : 'x\([^=]*\)='`
7453     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
7454     ac_shift=:
7455     ;;
7456   -*)
7457     ac_option=$1
7458     ac_optarg=$2
7459     ac_shift=shift
7460     ;;
7461   *) # This is not an option, so the user has probably given explicit
7462      # arguments.
7463      ac_option=$1
7464      ac_need_defaults=false;;
7465   esac
7466
7467   case $ac_option in
7468   # Handling of the options.
7469 _ACEOF
7470 cat >>$CONFIG_STATUS <<_ACEOF
7471   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7472     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
7473     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
7474 _ACEOF
7475 cat >>$CONFIG_STATUS <<\_ACEOF
7476   --version | --vers* | -V )
7477     echo "$ac_cs_version"; exit 0 ;;
7478   --he | --h)
7479     # Conflict between --help and --header
7480     { { echo "$as_me:$LINENO: error: ambiguous option: $1
7481 Try \`$0 --help' for more information." >&5
7482 echo "$as_me: error: ambiguous option: $1
7483 Try \`$0 --help' for more information." >&2;}
7484    { (exit 1); exit 1; }; };;
7485   --help | --hel | -h )
7486     echo "$ac_cs_usage"; exit 0 ;;
7487   --debug | --d* | -d )
7488     debug=: ;;
7489   --file | --fil | --fi | --f )
7490     $ac_shift
7491     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
7492     ac_need_defaults=false;;
7493   --header | --heade | --head | --hea )
7494     $ac_shift
7495     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
7496     ac_need_defaults=false;;
7497
7498   # This is an error.
7499   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
7500 Try \`$0 --help' for more information." >&5
7501 echo "$as_me: error: unrecognized option: $1
7502 Try \`$0 --help' for more information." >&2;}
7503    { (exit 1); exit 1; }; } ;;
7504
7505   *) ac_config_targets="$ac_config_targets $1" ;;
7506
7507   esac
7508   shift
7509 done
7510
7511 _ACEOF
7512
7513
7514
7515
7516
7517 cat >>$CONFIG_STATUS <<\_ACEOF
7518 for ac_config_target in $ac_config_targets
7519 do
7520   case "$ac_config_target" in
7521   # Handling of arguments.
7522   "main.mk" ) CONFIG_FILES="$CONFIG_FILES main.mk:main_in.mk" ;;
7523   "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
7524   "as/mcs51/Makefile" ) CONFIG_FILES="$CONFIG_FILES as/mcs51/Makefile" ;;
7525   "device/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES device/include/Makefile" ;;
7526   "device/lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES device/lib/Makefile" ;;
7527   "debugger/mcs51/Makefile" ) CONFIG_FILES="$CONFIG_FILES debugger/mcs51/Makefile" ;;
7528   "Makefile.common" ) CONFIG_FILES="$CONFIG_FILES Makefile.common:Makefile.common.in" ;;
7529   "sdccconf.h" ) CONFIG_HEADERS="$CONFIG_HEADERS sdccconf.h:sdccconf_in.h" ;;
7530   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
7531 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
7532    { (exit 1); exit 1; }; };;
7533   esac
7534 done
7535
7536 # If the user did not use the arguments to specify the items to instantiate,
7537 # then the envvar interface is used.  Set only those that are not.
7538 # We use the long form for the default assignment because of an extremely
7539 # bizarre bug on SunOS 4.1.3.
7540 if $ac_need_defaults; then
7541   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
7542   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
7543 fi
7544
7545 # Create a temporary directory, and hook for its removal unless debugging.
7546 $debug ||
7547 {
7548   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
7549   trap '{ (exit 1); exit 1; }' 1 2 13 15
7550 }
7551
7552 # Create a (secure) tmp directory for tmp files.
7553 : ${TMPDIR=/tmp}
7554 {
7555   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
7556   test -n "$tmp" && test -d "$tmp"
7557 }  ||
7558 {
7559   tmp=$TMPDIR/cs$$-$RANDOM
7560   (umask 077 && mkdir $tmp)
7561 } ||
7562 {
7563    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
7564    { (exit 1); exit 1; }
7565 }
7566
7567 _ACEOF
7568
7569 cat >>$CONFIG_STATUS <<_ACEOF
7570
7571 #
7572 # CONFIG_FILES section.
7573 #
7574
7575 # No need to generate the scripts if there are no CONFIG_FILES.
7576 # This happens for instance when ./config.status config.h
7577 if test -n "\$CONFIG_FILES"; then
7578   # Protect against being on the right side of a sed subst in config.status.
7579   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
7580    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
7581 s,@SHELL@,$SHELL,;t t
7582 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
7583 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
7584 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
7585 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
7586 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
7587 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
7588 s,@exec_prefix@,$exec_prefix,;t t
7589 s,@prefix@,$prefix,;t t
7590 s,@program_transform_name@,$program_transform_name,;t t
7591 s,@bindir@,$bindir,;t t
7592 s,@sbindir@,$sbindir,;t t
7593 s,@libexecdir@,$libexecdir,;t t
7594 s,@datadir@,$datadir,;t t
7595 s,@sysconfdir@,$sysconfdir,;t t
7596 s,@sharedstatedir@,$sharedstatedir,;t t
7597 s,@localstatedir@,$localstatedir,;t t
7598 s,@libdir@,$libdir,;t t
7599 s,@includedir@,$includedir,;t t
7600 s,@oldincludedir@,$oldincludedir,;t t
7601 s,@infodir@,$infodir,;t t
7602 s,@mandir@,$mandir,;t t
7603 s,@build_alias@,$build_alias,;t t
7604 s,@host_alias@,$host_alias,;t t
7605 s,@target_alias@,$target_alias,;t t
7606 s,@DEFS@,$DEFS,;t t
7607 s,@ECHO_C@,$ECHO_C,;t t
7608 s,@ECHO_N@,$ECHO_N,;t t
7609 s,@ECHO_T@,$ECHO_T,;t t
7610 s,@LIBS@,$LIBS,;t t
7611 s,@AWK@,$AWK,;t t
7612 s,@VERSION@,$VERSION,;t t
7613 s,@VERSIONHI@,$VERSIONHI,;t t
7614 s,@VERSIONLO@,$VERSIONLO,;t t
7615 s,@VERSIONP@,$VERSIONP,;t t
7616 s,@CC@,$CC,;t t
7617 s,@CFLAGS@,$CFLAGS,;t t
7618 s,@LDFLAGS@,$LDFLAGS,;t t
7619 s,@CPPFLAGS@,$CPPFLAGS,;t t
7620 s,@ac_ct_CC@,$ac_ct_CC,;t t
7621 s,@EXEEXT@,$EXEEXT,;t t
7622 s,@OBJEXT@,$OBJEXT,;t t
7623 s,@CXX@,$CXX,;t t
7624 s,@CXXFLAGS@,$CXXFLAGS,;t t
7625 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
7626 s,@CPP@,$CPP,;t t
7627 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
7628 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
7629 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
7630 s,@RANLIB@,$RANLIB,;t t
7631 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
7632 s,@LEX@,$LEX,;t t
7633 s,@LEXLIB@,$LEXLIB,;t t
7634 s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
7635 s,@YACC@,$YACC,;t t
7636 s,@AUTOCONF@,$AUTOCONF,;t t
7637 s,@STRIP@,$STRIP,;t t
7638 s,@AS@,$AS,;t t
7639 s,@CP@,$CP,;t t
7640 s,@EGREP@,$EGREP,;t t
7641 s,@M_OR_MM@,$M_OR_MM,;t t
7642 s,@sdcc_datadir@,$sdcc_datadir,;t t
7643 s,@OPT_ENABLE_UCSIM@,$OPT_ENABLE_UCSIM,;t t
7644 s,@OPT_ENABLE_DEVICE_LIB_BUILD@,$OPT_ENABLE_DEVICE_LIB_BUILD,;t t
7645 s,@OPT_ENABLE_PACKIHX@,$OPT_ENABLE_PACKIHX,;t t
7646 s,@subdirs@,$subdirs,;t t
7647 s,@LIBOBJS@,$LIBOBJS,;t t
7648 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
7649 CEOF
7650
7651 _ACEOF
7652
7653   cat >>$CONFIG_STATUS <<\_ACEOF
7654   # Split the substitutions into bite-sized pieces for seds with
7655   # small command number limits, like on Digital OSF/1 and HP-UX.
7656   ac_max_sed_lines=48
7657   ac_sed_frag=1 # Number of current file.
7658   ac_beg=1 # First line for current file.
7659   ac_end=$ac_max_sed_lines # Line after last line for current file.
7660   ac_more_lines=:
7661   ac_sed_cmds=
7662   while $ac_more_lines; do
7663     if test $ac_beg -gt 1; then
7664       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
7665     else
7666       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
7667     fi
7668     if test ! -s $tmp/subs.frag; then
7669       ac_more_lines=false
7670     else
7671       # The purpose of the label and of the branching condition is to
7672       # speed up the sed processing (if there are no `@' at all, there
7673       # is no need to browse any of the substitutions).
7674       # These are the two extra sed commands mentioned above.
7675       (echo ':t
7676   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
7677       if test -z "$ac_sed_cmds"; then
7678         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
7679       else
7680         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
7681       fi
7682       ac_sed_frag=`expr $ac_sed_frag + 1`
7683       ac_beg=$ac_end
7684       ac_end=`expr $ac_end + $ac_max_sed_lines`
7685     fi
7686   done
7687   if test -z "$ac_sed_cmds"; then
7688     ac_sed_cmds=cat
7689   fi
7690 fi # test -n "$CONFIG_FILES"
7691
7692 _ACEOF
7693 cat >>$CONFIG_STATUS <<\_ACEOF
7694 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
7695   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7696   case $ac_file in
7697   - | *:- | *:-:* ) # input from stdin
7698         cat >$tmp/stdin
7699         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
7700         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
7701   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
7702         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
7703   * )   ac_file_in=$ac_file.in ;;
7704   esac
7705
7706   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
7707   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
7708 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
7709          X"$ac_file" : 'X\(//\)[^/]' \| \
7710          X"$ac_file" : 'X\(//\)$' \| \
7711          X"$ac_file" : 'X\(/\)' \| \
7712          .     : '\(.\)' 2>/dev/null ||
7713 echo X"$ac_file" |
7714     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
7715           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
7716           /^X\(\/\/\)$/{ s//\1/; q; }
7717           /^X\(\/\).*/{ s//\1/; q; }
7718           s/.*/./; q'`
7719   { if $as_mkdir_p; then
7720     mkdir -p "$ac_dir"
7721   else
7722     as_dir="$ac_dir"
7723     as_dirs=
7724     while test ! -d "$as_dir"; do
7725       as_dirs="$as_dir $as_dirs"
7726       as_dir=`(dirname "$as_dir") 2>/dev/null ||
7727 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
7728          X"$as_dir" : 'X\(//\)[^/]' \| \
7729          X"$as_dir" : 'X\(//\)$' \| \
7730          X"$as_dir" : 'X\(/\)' \| \
7731          .     : '\(.\)' 2>/dev/null ||
7732 echo X"$as_dir" |
7733     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
7734           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
7735           /^X\(\/\/\)$/{ s//\1/; q; }
7736           /^X\(\/\).*/{ s//\1/; q; }
7737           s/.*/./; q'`
7738     done
7739     test ! -n "$as_dirs" || mkdir $as_dirs
7740   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
7741 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
7742    { (exit 1); exit 1; }; }; }
7743
7744   ac_builddir=.
7745
7746 if test "$ac_dir" != .; then
7747   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
7748   # A "../" for each directory in $ac_dir_suffix.
7749   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
7750 else
7751   ac_dir_suffix= ac_top_builddir=
7752 fi
7753
7754 case $srcdir in
7755   .)  # No --srcdir option.  We are building in place.
7756     ac_srcdir=.
7757     if test -z "$ac_top_builddir"; then
7758        ac_top_srcdir=.
7759     else
7760        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
7761     fi ;;
7762   [\\/]* | ?:[\\/]* )  # Absolute path.
7763     ac_srcdir=$srcdir$ac_dir_suffix;
7764     ac_top_srcdir=$srcdir ;;
7765   *) # Relative path.
7766     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
7767     ac_top_srcdir=$ac_top_builddir$srcdir ;;
7768 esac
7769 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
7770 # absolute.
7771 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
7772 ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
7773 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
7774 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
7775
7776
7777   case $INSTALL in
7778   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
7779   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
7780   esac
7781
7782   if test x"$ac_file" != x-; then
7783     { echo "$as_me:$LINENO: creating $ac_file" >&5
7784 echo "$as_me: creating $ac_file" >&6;}
7785     rm -f "$ac_file"
7786   fi
7787   # Let's still pretend it is `configure' which instantiates (i.e., don't
7788   # use $as_me), people would be surprised to read:
7789   #    /* config.h.  Generated by config.status.  */
7790   if test x"$ac_file" = x-; then
7791     configure_input=
7792   else
7793     configure_input="$ac_file.  "
7794   fi
7795   configure_input=$configure_input"Generated from `echo $ac_file_in |
7796                                      sed 's,.*/,,'` by configure."
7797
7798   # First look for the input files in the build tree, otherwise in the
7799   # src tree.
7800   ac_file_inputs=`IFS=:
7801     for f in $ac_file_in; do
7802       case $f in
7803       -) echo $tmp/stdin ;;
7804       [\\/$]*)
7805          # Absolute (can't be DOS-style, as IFS=:)
7806          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
7807 echo "$as_me: error: cannot find input file: $f" >&2;}
7808    { (exit 1); exit 1; }; }
7809          echo $f;;
7810       *) # Relative
7811          if test -f "$f"; then
7812            # Build tree
7813            echo $f
7814          elif test -f "$srcdir/$f"; then
7815            # Source tree
7816            echo $srcdir/$f
7817          else
7818            # /dev/null tree
7819            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
7820 echo "$as_me: error: cannot find input file: $f" >&2;}
7821    { (exit 1); exit 1; }; }
7822          fi;;
7823       esac
7824     done` || { (exit 1); exit 1; }
7825 _ACEOF
7826 cat >>$CONFIG_STATUS <<_ACEOF
7827   sed "$ac_vpsub
7828 $extrasub
7829 _ACEOF
7830 cat >>$CONFIG_STATUS <<\_ACEOF
7831 :t
7832 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
7833 s,@configure_input@,$configure_input,;t t
7834 s,@srcdir@,$ac_srcdir,;t t
7835 s,@abs_srcdir@,$ac_abs_srcdir,;t t
7836 s,@top_srcdir@,$ac_top_srcdir,;t t
7837 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
7838 s,@builddir@,$ac_builddir,;t t
7839 s,@abs_builddir@,$ac_abs_builddir,;t t
7840 s,@top_builddir@,$ac_top_builddir,;t t
7841 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
7842 s,@INSTALL@,$ac_INSTALL,;t t
7843 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
7844   rm -f $tmp/stdin
7845   if test x"$ac_file" != x-; then
7846     mv $tmp/out $ac_file
7847   else
7848     cat $tmp/out
7849     rm -f $tmp/out
7850   fi
7851
7852 done
7853 _ACEOF
7854 cat >>$CONFIG_STATUS <<\_ACEOF
7855
7856 #
7857 # CONFIG_HEADER section.
7858 #
7859
7860 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7861 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7862 #
7863 # ac_d sets the value in "#define NAME VALUE" lines.
7864 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
7865 ac_dB='[        ].*$,\1#\2'
7866 ac_dC=' '
7867 ac_dD=',;t'
7868 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7869 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
7870 ac_uB='$,\1#\2define\3'
7871 ac_uC=' '
7872 ac_uD=',;t'
7873
7874 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
7875   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7876   case $ac_file in
7877   - | *:- | *:-:* ) # input from stdin
7878         cat >$tmp/stdin
7879         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
7880         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
7881   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
7882         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
7883   * )   ac_file_in=$ac_file.in ;;
7884   esac
7885
7886   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
7887 echo "$as_me: creating $ac_file" >&6;}
7888
7889   # First look for the input files in the build tree, otherwise in the
7890   # src tree.
7891   ac_file_inputs=`IFS=:
7892     for f in $ac_file_in; do
7893       case $f in
7894       -) echo $tmp/stdin ;;
7895       [\\/$]*)
7896          # Absolute (can't be DOS-style, as IFS=:)
7897          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
7898 echo "$as_me: error: cannot find input file: $f" >&2;}
7899    { (exit 1); exit 1; }; }
7900          echo $f;;
7901       *) # Relative
7902          if test -f "$f"; then
7903            # Build tree
7904            echo $f
7905          elif test -f "$srcdir/$f"; then
7906            # Source tree
7907            echo $srcdir/$f
7908          else
7909            # /dev/null tree
7910            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
7911 echo "$as_me: error: cannot find input file: $f" >&2;}
7912    { (exit 1); exit 1; }; }
7913          fi;;
7914       esac
7915     done` || { (exit 1); exit 1; }
7916   # Remove the trailing spaces.
7917   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
7918
7919 _ACEOF
7920
7921 # Transform confdefs.h into two sed scripts, `conftest.defines' and
7922 # `conftest.undefs', that substitutes the proper values into
7923 # config.h.in to produce config.h.  The first handles `#define'
7924 # templates, and the second `#undef' templates.
7925 # And first: Protect against being on the right side of a sed subst in
7926 # config.status.  Protect against being in an unquoted here document
7927 # in config.status.
7928 rm -f conftest.defines conftest.undefs
7929 # Using a here document instead of a string reduces the quoting nightmare.
7930 # Putting comments in sed scripts is not portable.
7931 #
7932 # `end' is used to avoid that the second main sed command (meant for
7933 # 0-ary CPP macros) applies to n-ary macro definitions.
7934 # See the Autoconf documentation for `clear'.
7935 cat >confdef2sed.sed <<\_ACEOF
7936 s/[\\&,]/\\&/g
7937 s,[\\$`],\\&,g
7938 t clear
7939 : clear
7940 s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
7941 t end
7942 s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
7943 : end
7944 _ACEOF
7945 # If some macros were called several times there might be several times
7946 # the same #defines, which is useless.  Nevertheless, we may not want to
7947 # sort them, since we want the *last* AC-DEFINE to be honored.
7948 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
7949 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
7950 rm -f confdef2sed.sed
7951
7952 # This sed command replaces #undef with comments.  This is necessary, for
7953 # example, in the case of _POSIX_SOURCE, which is predefined and required
7954 # on some systems where configure will not decide to define it.
7955 cat >>conftest.undefs <<\_ACEOF
7956 s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
7957 _ACEOF
7958
7959 # Break up conftest.defines because some shells have a limit on the size
7960 # of here documents, and old seds have small limits too (100 cmds).
7961 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
7962 echo '  if grep "^[     ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
7963 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
7964 echo '  :' >>$CONFIG_STATUS
7965 rm -f conftest.tail
7966 while grep . conftest.defines >/dev/null
7967 do
7968   # Write a limited-size here document to $tmp/defines.sed.
7969   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
7970   # Speed up: don't consider the non `#define' lines.
7971   echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
7972   # Work around the forget-to-reset-the-flag bug.
7973   echo 't clr' >>$CONFIG_STATUS
7974   echo ': clr' >>$CONFIG_STATUS
7975   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
7976   echo 'CEOF
7977   sed -f $tmp/defines.sed $tmp/in >$tmp/out
7978   rm -f $tmp/in
7979   mv $tmp/out $tmp/in
7980 ' >>$CONFIG_STATUS
7981   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
7982   rm -f conftest.defines
7983   mv conftest.tail conftest.defines
7984 done
7985 rm -f conftest.defines
7986 echo '  fi # grep' >>$CONFIG_STATUS
7987 echo >>$CONFIG_STATUS
7988
7989 # Break up conftest.undefs because some shells have a limit on the size
7990 # of here documents, and old seds have small limits too (100 cmds).
7991 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
7992 rm -f conftest.tail
7993 while grep . conftest.undefs >/dev/null
7994 do
7995   # Write a limited-size here document to $tmp/undefs.sed.
7996   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
7997   # Speed up: don't consider the non `#undef'
7998   echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
7999   # Work around the forget-to-reset-the-flag bug.
8000   echo 't clr' >>$CONFIG_STATUS
8001   echo ': clr' >>$CONFIG_STATUS
8002   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
8003   echo 'CEOF
8004   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
8005   rm -f $tmp/in
8006   mv $tmp/out $tmp/in
8007 ' >>$CONFIG_STATUS
8008   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
8009   rm -f conftest.undefs
8010   mv conftest.tail conftest.undefs
8011 done
8012 rm -f conftest.undefs
8013
8014 cat >>$CONFIG_STATUS <<\_ACEOF
8015   # Let's still pretend it is `configure' which instantiates (i.e., don't
8016   # use $as_me), people would be surprised to read:
8017   #    /* config.h.  Generated by config.status.  */
8018   if test x"$ac_file" = x-; then
8019     echo "/* Generated by configure.  */" >$tmp/config.h
8020   else
8021     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
8022   fi
8023   cat $tmp/in >>$tmp/config.h
8024   rm -f $tmp/in
8025   if test x"$ac_file" != x-; then
8026     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
8027       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
8028 echo "$as_me: $ac_file is unchanged" >&6;}
8029     else
8030       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
8031 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8032          X"$ac_file" : 'X\(//\)[^/]' \| \
8033          X"$ac_file" : 'X\(//\)$' \| \
8034          X"$ac_file" : 'X\(/\)' \| \
8035          .     : '\(.\)' 2>/dev/null ||
8036 echo X"$ac_file" |
8037     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8038           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8039           /^X\(\/\/\)$/{ s//\1/; q; }
8040           /^X\(\/\).*/{ s//\1/; q; }
8041           s/.*/./; q'`
8042       { if $as_mkdir_p; then
8043     mkdir -p "$ac_dir"
8044   else
8045     as_dir="$ac_dir"
8046     as_dirs=
8047     while test ! -d "$as_dir"; do
8048       as_dirs="$as_dir $as_dirs"
8049       as_dir=`(dirname "$as_dir") 2>/dev/null ||
8050 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8051          X"$as_dir" : 'X\(//\)[^/]' \| \
8052          X"$as_dir" : 'X\(//\)$' \| \
8053          X"$as_dir" : 'X\(/\)' \| \
8054          .     : '\(.\)' 2>/dev/null ||
8055 echo X"$as_dir" |
8056     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8057           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8058           /^X\(\/\/\)$/{ s//\1/; q; }
8059           /^X\(\/\).*/{ s//\1/; q; }
8060           s/.*/./; q'`
8061     done
8062     test ! -n "$as_dirs" || mkdir $as_dirs
8063   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
8064 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
8065    { (exit 1); exit 1; }; }; }
8066
8067       rm -f $ac_file
8068       mv $tmp/config.h $ac_file
8069     fi
8070   else
8071     cat $tmp/config.h
8072     rm -f $tmp/config.h
8073   fi
8074 done
8075 _ACEOF
8076
8077 cat >>$CONFIG_STATUS <<\_ACEOF
8078
8079 { (exit 0); exit 0; }
8080 _ACEOF
8081 chmod +x $CONFIG_STATUS
8082 ac_clean_files=$ac_clean_files_save
8083
8084
8085 # configure is writing to config.log, and then calls config.status.
8086 # config.status does its own redirection, appending to config.log.
8087 # Unfortunately, on DOS this fails, as config.log is still kept open
8088 # by configure, so config.status won't be able to write to it; its
8089 # output is simply discarded.  So we exec the FD to /dev/null,
8090 # effectively closing config.log, so it can be properly (re)opened and
8091 # appended to by config.status.  When coming back to configure, we
8092 # need to make the FD available again.
8093 if test "$no_create" != yes; then
8094   ac_cs_success=:
8095   exec 5>/dev/null
8096   $SHELL $CONFIG_STATUS || ac_cs_success=false
8097   exec 5>>config.log
8098   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
8099   # would make configure fail if this is the last instruction.
8100   $ac_cs_success || { (exit 1); exit 1; }
8101 fi
8102
8103 #
8104 # CONFIG_SUBDIRS section.
8105 #
8106 if test "$no_recursion" != yes; then
8107
8108   # Remove --cache-file and --srcdir arguments so they do not pile up.
8109   ac_sub_configure_args=
8110   ac_prev=
8111   for ac_arg in $ac_configure_args; do
8112     if test -n "$ac_prev"; then
8113       ac_prev=
8114       continue
8115     fi
8116     case $ac_arg in
8117     -cache-file | --cache-file | --cache-fil | --cache-fi \
8118     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
8119       ac_prev=cache_file ;;
8120     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
8121     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
8122     | --c=*)
8123       ;;
8124     --config-cache | -C)
8125       ;;
8126     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
8127       ac_prev=srcdir ;;
8128     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
8129       ;;
8130     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
8131       ac_prev=prefix ;;
8132     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
8133       ;;
8134     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
8135     esac
8136   done
8137
8138   # Always prepend --prefix to ensure using the same prefix
8139   # in subdir configurations.
8140   ac_sub_configure_args="--prefix=$prefix $ac_sub_configure_args"
8141
8142   ac_popdir=`pwd`
8143   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
8144
8145     # Do not complain, so a configure script can configure whichever
8146     # parts of a large source tree are present.
8147     test -d $srcdir/$ac_dir || continue
8148
8149     { echo "$as_me:$LINENO: configuring in $ac_dir" >&5
8150 echo "$as_me: configuring in $ac_dir" >&6;}
8151     { if $as_mkdir_p; then
8152     mkdir -p "$ac_dir"
8153   else
8154     as_dir="$ac_dir"
8155     as_dirs=
8156     while test ! -d "$as_dir"; do
8157       as_dirs="$as_dir $as_dirs"
8158       as_dir=`(dirname "$as_dir") 2>/dev/null ||
8159 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8160          X"$as_dir" : 'X\(//\)[^/]' \| \
8161          X"$as_dir" : 'X\(//\)$' \| \
8162          X"$as_dir" : 'X\(/\)' \| \
8163          .     : '\(.\)' 2>/dev/null ||
8164 echo X"$as_dir" |
8165     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8166           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8167           /^X\(\/\/\)$/{ s//\1/; q; }
8168           /^X\(\/\).*/{ s//\1/; q; }
8169           s/.*/./; q'`
8170     done
8171     test ! -n "$as_dirs" || mkdir $as_dirs
8172   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
8173 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
8174    { (exit 1); exit 1; }; }; }
8175
8176     ac_builddir=.
8177
8178 if test "$ac_dir" != .; then
8179   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
8180   # A "../" for each directory in $ac_dir_suffix.
8181   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
8182 else
8183   ac_dir_suffix= ac_top_builddir=
8184 fi
8185
8186 case $srcdir in
8187   .)  # No --srcdir option.  We are building in place.
8188     ac_srcdir=.
8189     if test -z "$ac_top_builddir"; then
8190        ac_top_srcdir=.
8191     else
8192        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
8193     fi ;;
8194   [\\/]* | ?:[\\/]* )  # Absolute path.
8195     ac_srcdir=$srcdir$ac_dir_suffix;
8196     ac_top_srcdir=$srcdir ;;
8197   *) # Relative path.
8198     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
8199     ac_top_srcdir=$ac_top_builddir$srcdir ;;
8200 esac
8201 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
8202 # absolute.
8203 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
8204 ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
8205 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
8206 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
8207
8208
8209     cd $ac_dir
8210
8211     # Check for guested configure; otherwise get Cygnus style configure.
8212     if test -f $ac_srcdir/configure.gnu; then
8213       ac_sub_configure="$SHELL '$ac_srcdir/configure.gnu'"
8214     elif test -f $ac_srcdir/configure; then
8215       ac_sub_configure="$SHELL '$ac_srcdir/configure'"
8216     elif test -f $ac_srcdir/configure.in; then
8217       ac_sub_configure=$ac_configure
8218     else
8219       { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
8220 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
8221       ac_sub_configure=
8222     fi
8223
8224     # The recursion is here.
8225     if test -n "$ac_sub_configure"; then
8226       # Make the cache file name correct relative to the subdirectory.
8227       case $cache_file in
8228       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
8229       *) # Relative path.
8230         ac_sub_cache_file=$ac_top_builddir$cache_file ;;
8231       esac
8232
8233       { echo "$as_me:$LINENO: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
8234 echo "$as_me: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
8235       # The eval makes quoting arguments work.
8236       eval $ac_sub_configure $ac_sub_configure_args \
8237            --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir ||
8238         { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
8239 echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
8240    { (exit 1); exit 1; }; }
8241     fi
8242
8243     cd $ac_popdir
8244   done
8245 fi
8246
8247
8248 # End of configure/configure.in