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