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