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.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
15 --disable-mcs51-port Excludes the Intel mcs51 port"
17 --disable-gbz80-port Excludes the Gameboy gbz80 port"
19 --disable-z80-port Excludes the z80 port"
21 --disable-avr-port Excludes the AVR port"
23 --disable-ds390-port Excludes the DS390 port"
25 --disable-pic-port Excludes the PIC port"
27 --disable-i186-port Excludes the I186 port"
29 --disable-tlcs900h-port Excludes the TLCS900H port"
31 --disable-xa51-port Excludes the XA51 port"
33 --disable-ucsim Disables configuring and building of ucsim"
35 --disable-device-lib-build Disables automatically building device libraries"
37 --disable-packihx Disables building packihx"
39 --enable-libgc Use the Bohem memory allocator. Lower runtime footprint."
41 # Initialize some variables set by options.
42 # The variables have the same names as the options, with
43 # dashes changed to underlines.
45 cache_file=./config.cache
54 program_transform_name=s,x,x,
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'
75 # Initialize some other variables.
78 SHELL=${CONFIG_SHELL-/bin/sh}
79 # Maximum number of lines to put in a shell here document.
86 # If the previous option needs an argument, assign it.
87 if test -n "$ac_prev"; then
88 eval "$ac_prev=\$ac_option"
94 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
98 # Accept the important Cygnus configure options, so we can diagnose typos.
102 -bindir | --bindir | --bindi | --bind | --bin | --bi)
104 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
105 bindir="$ac_optarg" ;;
107 -build | --build | --buil | --bui | --bu)
109 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
110 build="$ac_optarg" ;;
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" ;;
119 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
121 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
123 datadir="$ac_optarg" ;;
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; }
131 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
132 eval "enable_${ac_feature}=no" ;;
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; }
140 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
145 eval "enable_${ac_feature}='$ac_optarg'" ;;
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" ;;
156 -gas | --gas | --ga | --g)
157 # Obsolete; use --with-gas.
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.
164 Usage: configure [options] [host]
165 Options: [defaults in brackets after descriptions]
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
175 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
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
182 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
183 --sharedstatedir=DIR modifiable architecture-independent data in DIR
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
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
210 if test -n "$ac_help"; then
211 echo "--enable and --with options recognized:$ac_help"
215 -host | --host | --hos | --ho)
217 -host=* | --host=* | --hos=* | --ho=*)
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" ;;
227 -infodir | --infodir | --infodi | --infod | --info | --inf)
229 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
230 infodir="$ac_optarg" ;;
232 -libdir | --libdir | --libdi | --libd)
234 -libdir=* | --libdir=* | --libdi=* | --libd=*)
235 libdir="$ac_optarg" ;;
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" ;;
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" ;;
253 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
255 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
256 mandir="$ac_optarg" ;;
259 # Obsolete; use --without-fp.
262 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
266 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
267 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
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" ;;
279 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
281 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
282 prefix="$ac_optarg" ;;
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" ;;
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" ;;
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" ;;
315 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
316 | -silent | --silent | --silen | --sile | --sil)
319 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
321 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
323 sbindir="$ac_optarg" ;;
325 -sharedstatedir | --sharedstatedir | --sharedstatedi \
326 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
327 | --sharedst | --shareds | --shared | --share | --shar \
329 ac_prev=sharedstatedir ;;
330 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
331 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
332 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
334 sharedstatedir="$ac_optarg" ;;
336 -site | --site | --sit)
338 -site=* | --site=* | --sit=*)
341 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
343 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
344 srcdir="$ac_optarg" ;;
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" ;;
353 -target | --target | --targe | --targ | --tar | --ta | --t)
355 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
356 target="$ac_optarg" ;;
358 -v | -verbose | --verbose | --verbos | --verbo | --verb)
361 -version | --version | --versio | --versi | --vers)
362 echo "configure generated by autoconf version 2.13"
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; }
371 ac_package=`echo $ac_package| sed 's/-/_/g'`
376 eval "with_${ac_package}='$ac_optarg'" ;;
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; }
384 ac_package=`echo $ac_package| sed 's/-/_/g'`
385 eval "with_${ac_package}=no" ;;
388 # Obsolete; use --with-x.
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" ;;
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" ;;
405 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
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
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; }
421 if test -n "$ac_prev"; then
422 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
425 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
427 # File descriptor usage:
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
443 This file contains any messages produced by compilers while
444 running configure, to aid debugging if configure makes a mistake.
447 # Strip out --no-create and --no-recursion so they do not pile up.
448 # Also quote any args containing shell metacharacters.
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" ;;
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
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.
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
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.
487 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
488 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
490 if test ! -r $srcdir/$ac_unique_file; then
494 ac_srcdir_defaulted=no
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; }
500 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
503 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
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"
510 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
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"
520 if test -r "$cache_file"; then
521 echo "loading cache $cache_file"
524 echo "creating cache $cache_file"
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
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
546 ac_n= ac_c='\c' ac_t=
552 for ac_prog in mawk gawk nawk awk
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:556: 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
561 if test -n "$AWK"; then
562 ac_cv_prog_AWK="$AWK" # Let the user override the test.
564 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
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"
576 AWK="$ac_cv_prog_AWK"
577 if test -n "$AWK"; then
578 echo "$ac_t""$AWK" 1>&6
580 echo "$ac_t""no" 1>&6
583 test -n "$AWK" && break
587 echo $ac_n "checking version of the package""... $ac_c" 1>&6
588 echo "configure:587: 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`
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`
602 echo "$ac_t""${VERSION}" 1>&6
607 cat >> confdefs.h <<EOF
608 #define SDCC_VERSION_LO ${VERSIONLO}
611 cat >> confdefs.h <<EOF
612 #define SDCC_VERSION_HI ${VERSIONHI}
615 cat >> confdefs.h <<EOF
616 #define SDCC_VERSION_P ${VERSIONP}
619 cat >> confdefs.h <<EOF
620 #define SDCC_VERSION_STR "${VERSION}"
623 if test "$program_transform_name" = s,x,x,; then
624 program_transform_name=
626 # Double any \ or $. echo might interpret backslashes.
627 cat <<\EOF_SED > conftestsed
628 s,\\,\\\\,g; s,\$,$$,g
630 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
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"
639 # sed with no file args requires a program.
640 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
642 sdcc_cv_version=$VERSION
643 sdcc_cv_versionhi=$VERSIONHI
644 sdcc_cv_versionlo=$VERSIONLO
645 sdcc_cv_versionp=$VERSIONP
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:651: 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
656 if test -n "$CC"; then
657 ac_cv_prog_CC="$CC" # Let the user override the test.
659 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
661 for ac_dir in $ac_dummy; do
662 test -z "$ac_dir" && ac_dir=.
663 if test -f $ac_dir/$ac_word; then
672 if test -n "$CC"; then
673 echo "$ac_t""$CC" 1>&6
675 echo "$ac_t""no" 1>&6
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:681: 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
686 if test -n "$CC"; then
687 ac_cv_prog_CC="$CC" # Let the user override the test.
689 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
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
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
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.
713 set dummy "$ac_dir/$ac_word" "$@"
721 if test -n "$CC"; then
722 echo "$ac_t""$CC" 1>&6
724 echo "$ac_t""no" 1>&6
727 if test -z "$CC"; then
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:732: 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
737 if test -n "$CC"; then
738 ac_cv_prog_CC="$CC" # Let the user override the test.
740 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
742 for ac_dir in $ac_dummy; do
743 test -z "$ac_dir" && ac_dir=.
744 if test -f $ac_dir/$ac_word; then
753 if test -n "$CC"; then
754 echo "$ac_t""$CC" 1>&6
756 echo "$ac_t""no" 1>&6
761 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
764 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
765 echo "configure:764: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
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
774 cat > conftest.$ac_ext << EOF
776 #line 775 "configure"
777 #include "confdefs.h"
781 if { (eval echo configure:780: \"$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
787 ac_cv_prog_cc_cross=yes
790 echo "configure: failed program was:" >&5
791 cat conftest.$ac_ext >&5
792 ac_cv_prog_cc_works=no
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
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; }
806 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
807 echo "configure:806: 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
811 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
812 echo "configure:811: 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
816 cat > conftest.c <<EOF
821 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
828 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
830 if test $ac_cv_prog_gcc = yes; then
836 ac_test_CFLAGS="${CFLAGS+set}"
837 ac_save_CFLAGS="$CFLAGS"
839 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
840 echo "configure:839: 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
844 echo 'void f(){}' > conftest.c
845 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
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
864 if test "$GCC" = yes; then
871 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
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:875: 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
880 if test -n "$CXX"; then
881 ac_cv_prog_CXX="$CXX" # Let the user override the test.
883 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
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"
895 CXX="$ac_cv_prog_CXX"
896 if test -n "$CXX"; then
897 echo "$ac_t""$CXX" 1>&6
899 echo "$ac_t""no" 1>&6
902 test -n "$CXX" && break
904 test -n "$CXX" || CXX="gcc"
907 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
908 echo "configure:907: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
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
917 cat > conftest.$ac_ext << EOF
919 #line 918 "configure"
920 #include "confdefs.h"
922 int main(){return(0);}
924 if { (eval echo configure:923: \"$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
930 ac_cv_prog_cxx_cross=yes
933 echo "configure: failed program was:" >&5
934 cat conftest.$ac_ext >&5
935 ac_cv_prog_cxx_works=no
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
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; }
949 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
950 echo "configure:949: 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
954 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
955 echo "configure:954: 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
959 cat > conftest.C <<EOF
964 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
971 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
973 if test $ac_cv_prog_gxx = yes; then
979 ac_test_CXXFLAGS="${CXXFLAGS+set}"
980 ac_save_CXXFLAGS="$CXXFLAGS"
982 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
983 echo "configure:982: 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
987 echo 'void f(){}' > conftest.cc
988 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
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
1007 if test "$GXX" = yes; then
1014 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1015 echo "configure:1014: checking how to run the C preprocessor" >&5
1016 # On Suns, sometimes $CPP names a directory.
1017 if test -n "$CPP" && test -d "$CPP"; then
1020 if test -z "$CPP"; then
1021 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1022 echo $ac_n "(cached) $ac_c" 1>&6
1024 # This must be in double quotes, not single quotes, because CPP may get
1025 # substituted into the Makefile and "${CC-cc}" will confuse make.
1027 # On the NeXT, cc -E runs the code through the compiler's parser,
1028 # not just through cpp.
1029 cat > conftest.$ac_ext <<EOF
1030 #line 1029 "configure"
1031 #include "confdefs.h"
1035 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1036 { (eval echo configure:1035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1037 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1038 if test -z "$ac_err"; then
1042 echo "configure: failed program was:" >&5
1043 cat conftest.$ac_ext >&5
1045 CPP="${CC-cc} -E -traditional-cpp"
1046 cat > conftest.$ac_ext <<EOF
1047 #line 1046 "configure"
1048 #include "confdefs.h"
1052 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1053 { (eval echo configure:1052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1054 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1055 if test -z "$ac_err"; then
1059 echo "configure: failed program was:" >&5
1060 cat conftest.$ac_ext >&5
1062 CPP="${CC-cc} -nologo -E"
1063 cat > conftest.$ac_ext <<EOF
1064 #line 1063 "configure"
1065 #include "confdefs.h"
1069 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1070 { (eval echo configure:1069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1071 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1072 if test -z "$ac_err"; then
1076 echo "configure: failed program was:" >&5
1077 cat conftest.$ac_ext >&5
1086 ac_cv_prog_CPP="$CPP"
1088 CPP="$ac_cv_prog_CPP"
1090 ac_cv_prog_CPP="$CPP"
1092 echo "$ac_t""$CPP" 1>&6
1095 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1096 if test -f $ac_dir/install-sh; then
1098 ac_install_sh="$ac_aux_dir/install-sh -c"
1100 elif test -f $ac_dir/install.sh; then
1102 ac_install_sh="$ac_aux_dir/install.sh -c"
1106 if test -z "$ac_aux_dir"; then
1107 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1109 ac_config_guess=$ac_aux_dir/config.guess
1110 ac_config_sub=$ac_aux_dir/config.sub
1111 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1113 # Find a good install program. We prefer a C program (faster),
1114 # so one script is as good as another. But avoid the broken or
1115 # incompatible versions:
1116 # SysV /etc/install, /usr/sbin/install
1117 # SunOS /usr/etc/install
1118 # IRIX /sbin/install
1120 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1121 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1122 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1123 # ./install, which can be erroneously created by make from ./install.sh.
1124 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1125 echo "configure:1124: checking for a BSD compatible install" >&5
1126 if test -z "$INSTALL"; then
1127 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1128 echo $ac_n "(cached) $ac_c" 1>&6
1130 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1131 for ac_dir in $PATH; do
1132 # Account for people who put trailing slashes in PATH elements.
1134 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1136 # OSF1 and SCO ODT 3.0 have their own names for install.
1137 # Don't use installbsd from OSF since it installs stuff as root
1139 for ac_prog in ginstall scoinst install; do
1140 if test -f $ac_dir/$ac_prog; then
1141 if test $ac_prog = install &&
1142 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1143 # AIX install. It has an incompatible calling convention.
1146 ac_cv_path_install="$ac_dir/$ac_prog -c"
1157 if test "${ac_cv_path_install+set}" = set; then
1158 INSTALL="$ac_cv_path_install"
1160 # As a last resort, use the slow shell script. We don't cache a
1161 # path for INSTALL within a source directory, because that will
1162 # break other packages using the cache if that directory is
1163 # removed, or if the path is relative.
1164 INSTALL="$ac_install_sh"
1167 echo "$ac_t""$INSTALL" 1>&6
1169 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1170 # It thinks the first close brace ends the variable substitution.
1171 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1173 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1175 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1177 # Extract the first word of "ranlib", so it can be a program name with args.
1178 set dummy ranlib; ac_word=$2
1179 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1180 echo "configure:1179: checking for $ac_word" >&5
1181 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1182 echo $ac_n "(cached) $ac_c" 1>&6
1184 if test -n "$RANLIB"; then
1185 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1187 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1189 for ac_dir in $ac_dummy; do
1190 test -z "$ac_dir" && ac_dir=.
1191 if test -f $ac_dir/$ac_word; then
1192 ac_cv_prog_RANLIB="ranlib"
1197 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1200 RANLIB="$ac_cv_prog_RANLIB"
1201 if test -n "$RANLIB"; then
1202 echo "$ac_t""$RANLIB" 1>&6
1204 echo "$ac_t""no" 1>&6
1207 # Extract the first word of "flex", so it can be a program name with args.
1208 set dummy flex; ac_word=$2
1209 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1210 echo "configure:1209: checking for $ac_word" >&5
1211 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1212 echo $ac_n "(cached) $ac_c" 1>&6
1214 if test -n "$LEX"; then
1215 ac_cv_prog_LEX="$LEX" # Let the user override the test.
1217 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1219 for ac_dir in $ac_dummy; do
1220 test -z "$ac_dir" && ac_dir=.
1221 if test -f $ac_dir/$ac_word; then
1222 ac_cv_prog_LEX="flex"
1227 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1230 LEX="$ac_cv_prog_LEX"
1231 if test -n "$LEX"; then
1232 echo "$ac_t""$LEX" 1>&6
1234 echo "$ac_t""no" 1>&6
1237 if test -z "$LEXLIB"
1243 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1244 echo "configure:1243: checking for yywrap in -l$ac_lib" >&5
1245 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1246 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1247 echo $ac_n "(cached) $ac_c" 1>&6
1249 ac_save_LIBS="$LIBS"
1250 LIBS="-l$ac_lib $LIBS"
1251 cat > conftest.$ac_ext <<EOF
1252 #line 1251 "configure"
1253 #include "confdefs.h"
1254 /* Override any gcc2 internal prototype to avoid an error. */
1255 /* We use char because int might match the return type of a gcc2
1256 builtin and then its argument prototype would still apply. */
1263 if { (eval echo configure:1262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1265 eval "ac_cv_lib_$ac_lib_var=yes"
1267 echo "configure: failed program was:" >&5
1268 cat conftest.$ac_ext >&5
1270 eval "ac_cv_lib_$ac_lib_var=no"
1273 LIBS="$ac_save_LIBS"
1276 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1277 echo "$ac_t""yes" 1>&6
1280 echo "$ac_t""no" 1>&6
1285 # Extract the first word of "bison", so it can be a program name with args.
1286 set dummy bison; ac_word=$2
1287 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1288 echo "configure:1287: checking for $ac_word" >&5
1289 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1290 echo $ac_n "(cached) $ac_c" 1>&6
1292 if test -n "$YACC"; then
1293 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1295 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1297 for ac_dir in $ac_dummy; do
1298 test -z "$ac_dir" && ac_dir=.
1299 if test -f $ac_dir/$ac_word; then
1300 ac_cv_prog_YACC="bison -y"
1305 test -z "$ac_cv_prog_YACC" && ac_cv_prog_YACC=":"
1308 YACC="$ac_cv_prog_YACC"
1309 if test -n "$YACC"; then
1310 echo "$ac_t""$YACC" 1>&6
1312 echo "$ac_t""no" 1>&6
1315 # Extract the first word of "autoconf", so it can be a program name with args.
1316 set dummy autoconf; ac_word=$2
1317 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1318 echo "configure:1317: checking for $ac_word" >&5
1319 if eval "test \"`echo '$''{'ac_cv_prog_AUTOCONF'+set}'`\" = set"; then
1320 echo $ac_n "(cached) $ac_c" 1>&6
1322 if test -n "$AUTOCONF"; then
1323 ac_cv_prog_AUTOCONF="$AUTOCONF" # Let the user override the test.
1325 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1327 for ac_dir in $ac_dummy; do
1328 test -z "$ac_dir" && ac_dir=.
1329 if test -f $ac_dir/$ac_word; then
1330 ac_cv_prog_AUTOCONF="autoconf"
1335 test -z "$ac_cv_prog_AUTOCONF" && ac_cv_prog_AUTOCONF=":"
1338 AUTOCONF="$ac_cv_prog_AUTOCONF"
1339 if test -n "$AUTOCONF"; then
1340 echo "$ac_t""$AUTOCONF" 1>&6
1342 echo "$ac_t""no" 1>&6
1345 # Extract the first word of "strip", so it can be a program name with args.
1346 set dummy strip; ac_word=$2
1347 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1348 echo "configure:1347: checking for $ac_word" >&5
1349 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1350 echo $ac_n "(cached) $ac_c" 1>&6
1352 if test -n "$STRIP"; then
1353 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1355 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1357 for ac_dir in $ac_dummy; do
1358 test -z "$ac_dir" && ac_dir=.
1359 if test -f $ac_dir/$ac_word; then
1360 ac_cv_prog_STRIP="strip"
1365 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
1368 STRIP="$ac_cv_prog_STRIP"
1369 if test -n "$STRIP"; then
1370 echo "$ac_t""$STRIP" 1>&6
1372 echo "$ac_t""no" 1>&6
1375 # Extract the first word of "as", so it can be a program name with args.
1376 set dummy as; ac_word=$2
1377 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1378 echo "configure:1377: checking for $ac_word" >&5
1379 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1380 echo $ac_n "(cached) $ac_c" 1>&6
1382 if test -n "$AS"; then
1383 ac_cv_prog_AS="$AS" # Let the user override the test.
1385 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1387 for ac_dir in $ac_dummy; do
1388 test -z "$ac_dir" && ac_dir=.
1389 if test -f $ac_dir/$ac_word; then
1395 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS=":"
1399 if test -n "$AS"; then
1400 echo "$ac_t""$AS" 1>&6
1402 echo "$ac_t""no" 1>&6
1405 # Extract the first word of "cp", so it can be a program name with args.
1406 set dummy cp; ac_word=$2
1407 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1408 echo "configure:1407: checking for $ac_word" >&5
1409 if eval "test \"`echo '$''{'ac_cv_prog_CP'+set}'`\" = set"; then
1410 echo $ac_n "(cached) $ac_c" 1>&6
1412 if test -n "$CP"; then
1413 ac_cv_prog_CP="$CP" # Let the user override the test.
1415 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1417 for ac_dir in $ac_dummy; do
1418 test -z "$ac_dir" && ac_dir=.
1419 if test -f $ac_dir/$ac_word; then
1425 test -z "$ac_cv_prog_CP" && ac_cv_prog_CP=":"
1429 if test -n "$CP"; then
1430 echo "$ac_t""$CP" 1>&6
1432 echo "$ac_t""no" 1>&6
1438 if test "$YACC" = ":"; then
1439 { echo "configure: error: Cannot find required program bison." 1>&2; exit 1; }
1442 if test "$LEX" = ":"; then
1443 { echo "configure: error: Cannot find required program lex." 1>&2; exit 1; }
1448 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1449 ac_cpp='$CPP $CPPFLAGS'
1450 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1451 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1452 cross_compiling=$ac_cv_prog_cc_cross
1455 # Checking for header files.
1456 # ===========================================================================
1457 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1458 echo "configure:1457: checking for ANSI C header files" >&5
1459 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1460 echo $ac_n "(cached) $ac_c" 1>&6
1462 cat > conftest.$ac_ext <<EOF
1463 #line 1462 "configure"
1464 #include "confdefs.h"
1470 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1471 { (eval echo configure:1470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1472 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1473 if test -z "$ac_err"; then
1475 ac_cv_header_stdc=yes
1478 echo "configure: failed program was:" >&5
1479 cat conftest.$ac_ext >&5
1481 ac_cv_header_stdc=no
1485 if test $ac_cv_header_stdc = yes; then
1486 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1487 cat > conftest.$ac_ext <<EOF
1488 #line 1487 "configure"
1489 #include "confdefs.h"
1492 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1493 egrep "memchr" >/dev/null 2>&1; then
1497 ac_cv_header_stdc=no
1503 if test $ac_cv_header_stdc = yes; then
1504 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1505 cat > conftest.$ac_ext <<EOF
1506 #line 1505 "configure"
1507 #include "confdefs.h"
1510 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1511 egrep "free" >/dev/null 2>&1; then
1515 ac_cv_header_stdc=no
1521 if test $ac_cv_header_stdc = yes; then
1522 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1523 if test "$cross_compiling" = yes; then
1526 cat > conftest.$ac_ext <<EOF
1527 #line 1526 "configure"
1528 #include "confdefs.h"
1530 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1531 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1532 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1533 int main () { int i; for (i = 0; i < 256; i++)
1534 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1538 if { (eval echo configure:1537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1542 echo "configure: failed program was:" >&5
1543 cat conftest.$ac_ext >&5
1545 ac_cv_header_stdc=no
1553 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1554 if test $ac_cv_header_stdc = yes; then
1555 cat >> confdefs.h <<\EOF
1556 #define STDC_HEADERS 1
1561 for ac_hdr in getopt.h
1563 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1564 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1565 echo "configure:1564: checking for $ac_hdr" >&5
1566 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1567 echo $ac_n "(cached) $ac_c" 1>&6
1569 cat > conftest.$ac_ext <<EOF
1570 #line 1569 "configure"
1571 #include "confdefs.h"
1574 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1575 { (eval echo configure:1574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1576 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1577 if test -z "$ac_err"; then
1579 eval "ac_cv_header_$ac_safe=yes"
1582 echo "configure: failed program was:" >&5
1583 cat conftest.$ac_ext >&5
1585 eval "ac_cv_header_$ac_safe=no"
1589 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1590 echo "$ac_t""yes" 1>&6
1591 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1592 cat >> confdefs.h <<EOF
1593 #define $ac_tr_hdr 1
1597 echo "$ac_t""no" 1>&6
1601 for ac_hdr in unistd.h
1603 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1604 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1605 echo "configure:1604: checking for $ac_hdr" >&5
1606 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1607 echo $ac_n "(cached) $ac_c" 1>&6
1609 cat > conftest.$ac_ext <<EOF
1610 #line 1609 "configure"
1611 #include "confdefs.h"
1614 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1615 { (eval echo configure:1614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1616 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1617 if test -z "$ac_err"; then
1619 eval "ac_cv_header_$ac_safe=yes"
1622 echo "configure: failed program was:" >&5
1623 cat conftest.$ac_ext >&5
1625 eval "ac_cv_header_$ac_safe=no"
1629 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1630 echo "$ac_t""yes" 1>&6
1631 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1632 cat >> confdefs.h <<EOF
1633 #define $ac_tr_hdr 1
1637 echo "$ac_t""no" 1>&6
1641 for ac_hdr in endian.h
1643 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1644 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1645 echo "configure:1644: checking for $ac_hdr" >&5
1646 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1647 echo $ac_n "(cached) $ac_c" 1>&6
1649 cat > conftest.$ac_ext <<EOF
1650 #line 1649 "configure"
1651 #include "confdefs.h"
1654 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1655 { (eval echo configure:1654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1656 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1657 if test -z "$ac_err"; then
1659 eval "ac_cv_header_$ac_safe=yes"
1662 echo "configure: failed program was:" >&5
1663 cat conftest.$ac_ext >&5
1665 eval "ac_cv_header_$ac_safe=no"
1669 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1670 echo "$ac_t""yes" 1>&6
1671 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1672 cat >> confdefs.h <<EOF
1673 #define $ac_tr_hdr 1
1677 echo "$ac_t""no" 1>&6
1681 for ac_hdr in machine/endian.h
1683 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1684 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1685 echo "configure:1684: checking for $ac_hdr" >&5
1686 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1687 echo $ac_n "(cached) $ac_c" 1>&6
1689 cat > conftest.$ac_ext <<EOF
1690 #line 1689 "configure"
1691 #include "confdefs.h"
1694 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1695 { (eval echo configure:1694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1696 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1697 if test -z "$ac_err"; then
1699 eval "ac_cv_header_$ac_safe=yes"
1702 echo "configure: failed program was:" >&5
1703 cat conftest.$ac_ext >&5
1705 eval "ac_cv_header_$ac_safe=no"
1709 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1710 echo "$ac_t""yes" 1>&6
1711 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1712 cat >> confdefs.h <<EOF
1713 #define $ac_tr_hdr 1
1717 echo "$ac_t""no" 1>&6
1721 for ac_hdr in malloc.h
1723 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1724 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1725 echo "configure:1724: checking for $ac_hdr" >&5
1726 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1727 echo $ac_n "(cached) $ac_c" 1>&6
1729 cat > conftest.$ac_ext <<EOF
1730 #line 1729 "configure"
1731 #include "confdefs.h"
1734 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1735 { (eval echo configure:1734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1736 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1737 if test -z "$ac_err"; then
1739 eval "ac_cv_header_$ac_safe=yes"
1742 echo "configure: failed program was:" >&5
1743 cat conftest.$ac_ext >&5
1745 eval "ac_cv_header_$ac_safe=no"
1749 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1750 echo "$ac_t""yes" 1>&6
1751 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1752 cat >> confdefs.h <<EOF
1753 #define $ac_tr_hdr 1
1757 echo "$ac_t""no" 1>&6
1761 for ac_hdr in sys/isa_defs.h
1763 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1764 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1765 echo "configure:1764: checking for $ac_hdr" >&5
1766 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1767 echo $ac_n "(cached) $ac_c" 1>&6
1769 cat > conftest.$ac_ext <<EOF
1770 #line 1769 "configure"
1771 #include "confdefs.h"
1774 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1775 { (eval echo configure:1774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1776 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1777 if test -z "$ac_err"; then
1779 eval "ac_cv_header_$ac_safe=yes"
1782 echo "configure: failed program was:" >&5
1783 cat conftest.$ac_ext >&5
1785 eval "ac_cv_header_$ac_safe=no"
1789 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1790 echo "$ac_t""yes" 1>&6
1791 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1792 cat >> confdefs.h <<EOF
1793 #define $ac_tr_hdr 1
1797 echo "$ac_t""no" 1>&6
1801 for ac_hdr in sys/socket.h
1803 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1804 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1805 echo "configure:1804: checking for $ac_hdr" >&5
1806 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1807 echo $ac_n "(cached) $ac_c" 1>&6
1809 cat > conftest.$ac_ext <<EOF
1810 #line 1809 "configure"
1811 #include "confdefs.h"
1814 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1815 { (eval echo configure:1814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1816 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1817 if test -z "$ac_err"; then
1819 eval "ac_cv_header_$ac_safe=yes"
1822 echo "configure: failed program was:" >&5
1823 cat conftest.$ac_ext >&5
1825 eval "ac_cv_header_$ac_safe=no"
1829 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1830 echo "$ac_t""yes" 1>&6
1831 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1832 cat >> confdefs.h <<EOF
1833 #define $ac_tr_hdr 1
1837 echo "$ac_t""no" 1>&6
1842 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1844 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1845 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1846 echo "configure:1845: checking for $ac_hdr that defines DIR" >&5
1847 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1848 echo $ac_n "(cached) $ac_c" 1>&6
1850 cat > conftest.$ac_ext <<EOF
1851 #line 1850 "configure"
1852 #include "confdefs.h"
1853 #include <sys/types.h>
1859 if { (eval echo configure:1858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1861 eval "ac_cv_header_dirent_$ac_safe=yes"
1863 echo "configure: failed program was:" >&5
1864 cat conftest.$ac_ext >&5
1866 eval "ac_cv_header_dirent_$ac_safe=no"
1870 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1871 echo "$ac_t""yes" 1>&6
1872 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1873 cat >> confdefs.h <<EOF
1874 #define $ac_tr_hdr 1
1876 ac_header_dirent=$ac_hdr; break
1878 echo "$ac_t""no" 1>&6
1881 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1882 if test $ac_header_dirent = dirent.h; then
1883 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1884 echo "configure:1883: checking for opendir in -ldir" >&5
1885 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1886 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1887 echo $ac_n "(cached) $ac_c" 1>&6
1889 ac_save_LIBS="$LIBS"
1891 cat > conftest.$ac_ext <<EOF
1892 #line 1891 "configure"
1893 #include "confdefs.h"
1894 /* Override any gcc2 internal prototype to avoid an error. */
1895 /* We use char because int might match the return type of a gcc2
1896 builtin and then its argument prototype would still apply. */
1903 if { (eval echo configure:1902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1905 eval "ac_cv_lib_$ac_lib_var=yes"
1907 echo "configure: failed program was:" >&5
1908 cat conftest.$ac_ext >&5
1910 eval "ac_cv_lib_$ac_lib_var=no"
1913 LIBS="$ac_save_LIBS"
1916 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1917 echo "$ac_t""yes" 1>&6
1920 echo "$ac_t""no" 1>&6
1924 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1925 echo "configure:1924: checking for opendir in -lx" >&5
1926 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1927 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1928 echo $ac_n "(cached) $ac_c" 1>&6
1930 ac_save_LIBS="$LIBS"
1932 cat > conftest.$ac_ext <<EOF
1933 #line 1932 "configure"
1934 #include "confdefs.h"
1935 /* Override any gcc2 internal prototype to avoid an error. */
1936 /* We use char because int might match the return type of a gcc2
1937 builtin and then its argument prototype would still apply. */
1944 if { (eval echo configure:1943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1946 eval "ac_cv_lib_$ac_lib_var=yes"
1948 echo "configure: failed program was:" >&5
1949 cat conftest.$ac_ext >&5
1951 eval "ac_cv_lib_$ac_lib_var=no"
1954 LIBS="$ac_save_LIBS"
1957 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1958 echo "$ac_t""yes" 1>&6
1961 echo "$ac_t""no" 1>&6
1967 # This must be after CPP
1969 echo $ac_n "checking which header file defines FD_ macros""... $ac_c" 1>&6
1970 echo "configure:1969: checking which header file defines FD_ macros" >&5
1971 if eval "test \"`echo '$''{'s51_cv_fd'+set}'`\" = set"; then
1972 echo $ac_n "(cached) $ac_c" 1>&6
1974 sdcc_cv_fd="unknown"
1975 cat > conftest.$ac_ext <<EOF
1976 #line 1975 "configure"
1977 #include "confdefs.h"
1979 #include <sys/time.h>
1984 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1985 egrep "yes" >/dev/null 2>&1; then
1987 sdcc_cv_fd="<sys/time.h>"
1991 cat > conftest.$ac_ext <<EOF
1992 #line 1991 "configure"
1993 #include "confdefs.h"
1995 #include <sys/types.h>
2000 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2001 egrep "yes" >/dev/null 2>&1; then
2003 sdcc_cv_fd="<sys/types.h>"
2007 cat > conftest.$ac_ext <<EOF
2008 #line 2007 "configure"
2009 #include "confdefs.h"
2011 #include <sys/select.h>
2016 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2017 egrep "yes" >/dev/null 2>&1; then
2019 sdcc_cv_fd="<sys/types.h>"
2025 echo "$ac_t""$s51_cv_fd" 1>&6
2027 cat >> confdefs.h <<\EOF
2028 #define FD_HEADER_OK 0
2031 if echo $sdcc_cv_fd|grep time >/dev/null 2>&1; then
2032 cat >> confdefs.h <<\EOF
2033 #define FD_NEED_TIME_H 1
2036 cat >> confdefs.h <<\EOF
2037 #define FD_HEADER_OK 1
2041 cat >> confdefs.h <<\EOF
2042 #define FD_NEED_TIME_H 0
2046 if echo $sdcc_cv_fd|grep types >/dev/null 2>&1; then
2047 cat >> confdefs.h <<\EOF
2048 #define FD_NEED_TYPES_H 1
2051 cat >> confdefs.h <<\EOF
2052 #define FD_HEADER_OK 1
2056 cat >> confdefs.h <<\EOF
2057 #define FD_NEED_TYPES_H 0
2061 if echo $sdcc_cv_fd|grep select >/dev/null 2>&1; then
2062 cat >> confdefs.h <<\EOF
2063 #define FD_NEED_SELECT_H 1
2066 cat >> confdefs.h <<\EOF
2067 #define FD_HEADER_OK 1
2071 cat >> confdefs.h <<\EOF
2072 #define FD_NEED_SELECT_H 0
2077 cat >> confdefs.h <<EOF
2078 #define HEADER_FD ${sdcc_cv_fd}
2083 # Checking for functions
2084 # ===========================================================================
2085 for ac_func in strlen strcpy strcat strstr strcmp strerror strtok strdup
2087 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2088 echo "configure:2087: checking for $ac_func" >&5
2089 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2090 echo $ac_n "(cached) $ac_c" 1>&6
2092 cat > conftest.$ac_ext <<EOF
2093 #line 2092 "configure"
2094 #include "confdefs.h"
2095 /* System header to define __stub macros and hopefully few prototypes,
2096 which can conflict with char $ac_func(); below. */
2098 /* Override any gcc2 internal prototype to avoid an error. */
2099 /* We use char because int might match the return type of a gcc2
2100 builtin and then its argument prototype would still apply. */
2105 /* The GNU C library defines this for functions which it implements
2106 to always fail with ENOSYS. Some functions are actually named
2107 something starting with __ and the normal name is an alias. */
2108 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2116 if { (eval echo configure:2115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2118 eval "ac_cv_func_$ac_func=yes"
2120 echo "configure: failed program was:" >&5
2121 cat conftest.$ac_ext >&5
2123 eval "ac_cv_func_$ac_func=no"
2128 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2129 echo "$ac_t""yes" 1>&6
2130 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2131 cat >> confdefs.h <<EOF
2132 #define $ac_tr_func 1
2136 echo "$ac_t""no" 1>&6
2140 for ac_func in strchr memcpy
2142 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2143 echo "configure:2142: checking for $ac_func" >&5
2144 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2145 echo $ac_n "(cached) $ac_c" 1>&6
2147 cat > conftest.$ac_ext <<EOF
2148 #line 2147 "configure"
2149 #include "confdefs.h"
2150 /* System header to define __stub macros and hopefully few prototypes,
2151 which can conflict with char $ac_func(); below. */
2153 /* Override any gcc2 internal prototype to avoid an error. */
2154 /* We use char because int might match the return type of a gcc2
2155 builtin and then its argument prototype would still apply. */
2160 /* The GNU C library defines this for functions which it implements
2161 to always fail with ENOSYS. Some functions are actually named
2162 something starting with __ and the normal name is an alias. */
2163 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2171 if { (eval echo configure:2170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2173 eval "ac_cv_func_$ac_func=yes"
2175 echo "configure: failed program was:" >&5
2176 cat conftest.$ac_ext >&5
2178 eval "ac_cv_func_$ac_func=no"
2183 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2184 echo "$ac_t""yes" 1>&6
2185 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2186 cat >> confdefs.h <<EOF
2187 #define $ac_tr_func 1
2191 echo "$ac_t""no" 1>&6
2195 for ac_func in fgets
2197 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2198 echo "configure:2197: checking for $ac_func" >&5
2199 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2200 echo $ac_n "(cached) $ac_c" 1>&6
2202 cat > conftest.$ac_ext <<EOF
2203 #line 2202 "configure"
2204 #include "confdefs.h"
2205 /* System header to define __stub macros and hopefully few prototypes,
2206 which can conflict with char $ac_func(); below. */
2208 /* Override any gcc2 internal prototype to avoid an error. */
2209 /* We use char because int might match the return type of a gcc2
2210 builtin and then its argument prototype would still apply. */
2215 /* The GNU C library defines this for functions which it implements
2216 to always fail with ENOSYS. Some functions are actually named
2217 something starting with __ and the normal name is an alias. */
2218 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2226 if { (eval echo configure:2225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2228 eval "ac_cv_func_$ac_func=yes"
2230 echo "configure: failed program was:" >&5
2231 cat conftest.$ac_ext >&5
2233 eval "ac_cv_func_$ac_func=no"
2238 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2239 echo "$ac_t""yes" 1>&6
2240 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2241 cat >> confdefs.h <<EOF
2242 #define $ac_tr_func 1
2246 echo "$ac_t""no" 1>&6
2250 for ac_func in yylex
2252 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2253 echo "configure:2252: checking for $ac_func" >&5
2254 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2255 echo $ac_n "(cached) $ac_c" 1>&6
2257 cat > conftest.$ac_ext <<EOF
2258 #line 2257 "configure"
2259 #include "confdefs.h"
2260 /* System header to define __stub macros and hopefully few prototypes,
2261 which can conflict with char $ac_func(); below. */
2263 /* Override any gcc2 internal prototype to avoid an error. */
2264 /* We use char because int might match the return type of a gcc2
2265 builtin and then its argument prototype would still apply. */
2270 /* The GNU C library defines this for functions which it implements
2271 to always fail with ENOSYS. Some functions are actually named
2272 something starting with __ and the normal name is an alias. */
2273 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2281 if { (eval echo configure:2280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2283 eval "ac_cv_func_$ac_func=yes"
2285 echo "configure: failed program was:" >&5
2286 cat conftest.$ac_ext >&5
2288 eval "ac_cv_func_$ac_func=no"
2293 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2294 echo "$ac_t""yes" 1>&6
2295 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2296 cat >> confdefs.h <<EOF
2297 #define $ac_tr_func 1
2301 echo "$ac_t""no" 1>&6
2306 # check if -lsocket && -lxnet is required to compile socket stuff
2308 echo $ac_n "checking for library containing socket""... $ac_c" 1>&6
2309 echo "configure:2308: checking for library containing socket" >&5
2310 if eval "test \"`echo '$''{'ac_cv_search_socket'+set}'`\" = set"; then
2311 echo $ac_n "(cached) $ac_c" 1>&6
2313 ac_func_search_save_LIBS="$LIBS"
2314 ac_cv_search_socket="no"
2315 cat > conftest.$ac_ext <<EOF
2316 #line 2315 "configure"
2317 #include "confdefs.h"
2318 /* Override any gcc2 internal prototype to avoid an error. */
2319 /* We use char because int might match the return type of a gcc2
2320 builtin and then its argument prototype would still apply. */
2327 if { (eval echo configure:2326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2329 ac_cv_search_socket="none required"
2331 echo "configure: failed program was:" >&5
2332 cat conftest.$ac_ext >&5
2335 test "$ac_cv_search_socket" = "no" && for i in socket; do
2336 LIBS="-l$i $ac_func_search_save_LIBS"
2337 cat > conftest.$ac_ext <<EOF
2338 #line 2337 "configure"
2339 #include "confdefs.h"
2340 /* Override any gcc2 internal prototype to avoid an error. */
2341 /* We use char because int might match the return type of a gcc2
2342 builtin and then its argument prototype would still apply. */
2349 if { (eval echo configure:2348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2351 ac_cv_search_socket="-l$i"
2354 echo "configure: failed program was:" >&5
2355 cat conftest.$ac_ext >&5
2359 LIBS="$ac_func_search_save_LIBS"
2362 echo "$ac_t""$ac_cv_search_socket" 1>&6
2363 if test "$ac_cv_search_socket" != "no"; then
2364 test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
2370 echo $ac_n "checking for library containing inet_addr""... $ac_c" 1>&6
2371 echo "configure:2370: checking for library containing inet_addr" >&5
2372 if eval "test \"`echo '$''{'ac_cv_search_inet_addr'+set}'`\" = set"; then
2373 echo $ac_n "(cached) $ac_c" 1>&6
2375 ac_func_search_save_LIBS="$LIBS"
2376 ac_cv_search_inet_addr="no"
2377 cat > conftest.$ac_ext <<EOF
2378 #line 2377 "configure"
2379 #include "confdefs.h"
2380 /* Override any gcc2 internal prototype to avoid an error. */
2381 /* We use char because int might match the return type of a gcc2
2382 builtin and then its argument prototype would still apply. */
2389 if { (eval echo configure:2388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2391 ac_cv_search_inet_addr="none required"
2393 echo "configure: failed program was:" >&5
2394 cat conftest.$ac_ext >&5
2397 test "$ac_cv_search_inet_addr" = "no" && for i in nsl xnet; do
2398 LIBS="-l$i $ac_func_search_save_LIBS"
2399 cat > conftest.$ac_ext <<EOF
2400 #line 2399 "configure"
2401 #include "confdefs.h"
2402 /* Override any gcc2 internal prototype to avoid an error. */
2403 /* We use char because int might match the return type of a gcc2
2404 builtin and then its argument prototype would still apply. */
2411 if { (eval echo configure:2410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2413 ac_cv_search_inet_addr="-l$i"
2416 echo "configure: failed program was:" >&5
2417 cat conftest.$ac_ext >&5
2421 LIBS="$ac_func_search_save_LIBS"
2424 echo "$ac_t""$ac_cv_search_inet_addr" 1>&6
2425 if test "$ac_cv_search_inet_addr" != "no"; then
2426 test "$ac_cv_search_inet_addr" = "none required" || LIBS="$ac_cv_search_inet_addr $LIBS"
2435 # DD_COPT macro checks if the compiler specified as the 1st parameter
2436 # supports option specified as the 2nd parameter
2437 # For example: DD_CPORT(CXX, fPIC)
2442 # Checking characteristics of compilers and other programs
2443 # --------------------------------------------------------
2444 echo $ac_n "checking whether preprocessor accepts -MM or -M""... $ac_c" 1>&6
2445 echo "configure:2444: checking whether preprocessor accepts -MM or -M" >&5
2446 if eval "test \"`echo '$''{'sdcc_cv_MM'+set}'`\" = set"; then
2447 echo $ac_n "(cached) $ac_c" 1>&6
2449 echo "#include <stdio.h>" >_test_.c
2451 $CPP -v -MM _test_.c 1>&5 2>&5
2452 if test "$?" = "0"; then
2460 echo "$ac_t""$sdcc_cv_MM" 1>&6
2464 # This is the first time when CFLAGS are set/modified!!
2466 echo $ac_n "checking whether $CC accepts -ggdb""... $ac_c" 1>&6
2467 echo "configure:2466: checking whether $CC accepts -ggdb" >&5
2468 if eval "test \"`echo '$''{'sdcc_cv_CCggdb'+set}'`\" = set"; then
2469 echo $ac_n "(cached) $ac_c" 1>&6
2475 $CC -v -ggdb -c _test_.c 1>&5 2>&5
2476 if test "$?" = "0"; then
2477 sdcc_cv_CCggdb="yes"
2481 rm -f _test_.* a.out
2484 echo "$ac_t""$sdcc_cv_CCggdb" 1>&6
2486 if test "$sdcc_cv_CCggdb" = "yes"; then
2491 echo $ac_n "checking whether $CC accepts -pipe""... $ac_c" 1>&6
2492 echo "configure:2491: checking whether $CC accepts -pipe" >&5
2493 if eval "test \"`echo '$''{'sdcc_cv_CCpipe'+set}'`\" = set"; then
2494 echo $ac_n "(cached) $ac_c" 1>&6
2500 $CC -v -pipe -c _test_.c 1>&5 2>&5
2501 if test "$?" = "0"; then
2502 sdcc_cv_CCpipe="yes"
2506 rm -f _test_.* a.out
2509 echo "$ac_t""$sdcc_cv_CCpipe" 1>&6
2511 if test "$sdcc_cv_CCpipe" = "yes"; then
2512 CFLAGS="$CFLAGS -pipe"
2516 # Checks for typedefs, structures, and compiler characteristics.
2517 # ===========================================================================
2518 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2519 echo "configure:2518: checking return type of signal handlers" >&5
2520 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2521 echo $ac_n "(cached) $ac_c" 1>&6
2523 cat > conftest.$ac_ext <<EOF
2524 #line 2523 "configure"
2525 #include "confdefs.h"
2526 #include <sys/types.h>
2532 extern "C" void (*signal (int, void (*)(int)))(int);
2534 void (*signal ()) ();
2541 if { (eval echo configure:2540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2543 ac_cv_type_signal=void
2545 echo "configure: failed program was:" >&5
2546 cat conftest.$ac_ext >&5
2548 ac_cv_type_signal=int
2553 echo "$ac_t""$ac_cv_type_signal" 1>&6
2554 cat >> confdefs.h <<EOF
2555 #define RETSIGTYPE $ac_cv_type_signal
2562 if test "${prefix}" = "NONE"; then
2567 sdcc_datadir=${datadir}/sdcc
2570 # For some unknown reason, putting this assignment in a subshell
2571 # like this causes the rvalue to be fully substituted. We need this
2572 # for the defines below to generate the right thing. We keep this
2573 # separate from the substituted sdcc_datadir because we want the
2574 # latter for makefiles.
2575 if test "${datadir}" = "\${prefix}/share"; then
2576 sdcc_datadir_tmp=${prefix}/share/sdcc
2578 sdcc_datadir_tmp=${datadir}/sdcc
2582 cat >> confdefs.h <<EOF
2583 #define STANDARD_INCLUDE_DIR "${sdcc_datadir_tmp}/include"
2586 cat >> confdefs.h <<EOF
2587 #define SDCC_INCLUDE_DIR "${sdcc_datadir_tmp}/include"
2590 cat >> confdefs.h <<EOF
2591 #define SDCC_LIB_DIR "${sdcc_datadir_tmp}/lib"
2594 cat >> confdefs.h <<EOF
2595 #define STD_LIB "libsdcc"
2598 cat >> confdefs.h <<EOF
2599 #define STD_INT_LIB "libint"
2602 cat >> confdefs.h <<EOF
2603 #define STD_LONG_LIB "liblong"
2606 cat >> confdefs.h <<EOF
2607 #define STD_FP_LIB "libfloat"
2610 cat >> confdefs.h <<EOF
2611 #define STD_DS390_LIB "libds390"
2614 cat >> confdefs.h <<EOF
2615 #define STD_XA51_LIB "libxa51"
2618 cat >> confdefs.h <<EOF
2619 #define PREFIX "${prefix}"
2622 cat >> confdefs.h <<EOF
2623 #define DATADIR "${sdcc_datadir_tmp}"
2626 cat >> confdefs.h <<EOF
2627 #define SRCDIR "${config_in}"
2633 # Now handle the port selection
2634 rm -f ports.all ports.build
2635 # Check whether --enable-mcs51-port or --disable-mcs51-port was given.
2636 if test "${enable_mcs51_port+set}" = set; then
2637 enableval="$enable_mcs51_port"
2641 echo mcs51 >>ports.all
2642 if test "$enable_mcs51_port" = "no"; then
2643 cat >> confdefs.h <<EOF
2644 #define OPT_DISABLE_MCS51 1
2648 echo mcs51 >>ports.build
2649 cat >> confdefs.h <<EOF
2650 #define OPT_DISABLE_MCS51 0
2655 # Check whether --enable-gbz80-port or --disable-gbz80-port was given.
2656 if test "${enable_gbz80_port+set}" = set; then
2657 enableval="$enable_gbz80_port"
2661 echo z80 >>ports.all
2662 if test "$enable_gbz80_port" = "no"; then
2663 cat >> confdefs.h <<EOF
2664 #define OPT_DISABLE_GBZ80 1
2668 echo z80 >>ports.build
2669 cat >> confdefs.h <<EOF
2670 #define OPT_DISABLE_GBZ80 0
2675 # Check whether --enable-z80-port or --disable-z80-port was given.
2676 if test "${enable_z80_port+set}" = set; then
2677 enableval="$enable_z80_port"
2681 echo z80 >>ports.all
2682 if test "$enable_z80_port" = "no"; then
2683 cat >> confdefs.h <<EOF
2684 #define OPT_DISABLE_Z80 1
2688 echo z80 >>ports.build
2689 cat >> confdefs.h <<EOF
2690 #define OPT_DISABLE_Z80 0
2695 # Check whether --enable-avr-port or --disable-avr-port was given.
2696 if test "${enable_avr_port+set}" = set; then
2697 enableval="$enable_avr_port"
2701 echo avr >>ports.all
2702 if test "$enable_avr_port" = "no"; then
2703 cat >> confdefs.h <<EOF
2704 #define OPT_DISABLE_AVR 1
2708 echo avr >>ports.build
2709 cat >> confdefs.h <<EOF
2710 #define OPT_DISABLE_AVR 0
2715 # Check whether --enable-ds390-port or --disable-ds390-port was given.
2716 if test "${enable_ds390_port+set}" = set; then
2717 enableval="$enable_ds390_port"
2721 echo ds390 >>ports.all
2722 if test "$enable_ds390_port" = "no"; then
2723 cat >> confdefs.h <<EOF
2724 #define OPT_DISABLE_DS390 1
2725 #define OPT_DISABLE_TININative 1
2729 echo ds390 >>ports.build
2730 cat >> confdefs.h <<EOF
2731 #define OPT_DISABLE_DS390 0
2732 #define OPT_DISABLE_TININative 0
2737 # Check whether --enable-pic-port or --disable-pic-port was given.
2738 if test "${enable_pic_port+set}" = set; then
2739 enableval="$enable_pic_port"
2743 echo pic >>ports.all
2744 if test "$enable_pic_port" = "no"; then
2745 cat >> confdefs.h <<EOF
2746 #define OPT_DISABLE_PIC 1
2750 echo pic >>ports.build
2751 cat >> confdefs.h <<EOF
2752 #define OPT_DISABLE_PIC 0
2757 # Check whether --enable-i186-port or --disable-i186-port was given.
2758 if test "${enable_i186_port+set}" = set; then
2759 enableval="$enable_i186_port"
2763 echo izt >>ports.all
2764 if test "$enable_i186_port" = "no"; then
2765 cat >> confdefs.h <<EOF
2766 #define OPT_DISABLE_I186 1
2770 echo izt >>ports.build
2771 cat >> confdefs.h <<EOF
2772 #define OPT_DISABLE_I186 0
2777 # Check whether --enable-tlcs900h-port or --disable-tlcs900h-port was given.
2778 if test "${enable_tlcs900h_port+set}" = set; then
2779 enableval="$enable_tlcs900h_port"
2783 echo izt >>ports.all
2784 if test "$enable_tlcs900h_port" = "no"; then
2785 cat >> confdefs.h <<EOF
2786 #define OPT_DISABLE_TLCS900H 1
2790 echo izt >>ports.build
2791 cat >> confdefs.h <<EOF
2792 #define OPT_DISABLE_TLCS900H 0
2797 echo xa51 >>ports.all
2798 if test "$enable_xa51_port" = "no"; then
2799 cat >> confdefs.h <<EOF
2800 #define OPT_DISABLE_XA51 1
2804 #echo xa51 >>ports.build // not yet
2805 cat >> confdefs.h <<EOF
2806 #define OPT_DISABLE_XA51 1 // not yet
2811 # Check whether --enable-ucsim or --disable-ucsim was given.
2812 if test "${enable_ucsim+set}" = set; then
2813 enableval="$enable_ucsim"
2817 OPT_ENABLE_UCSIM=$enable_ucsim
2820 # Check whether --enable-device-lib-build or --disable-device-lib-build was given.
2821 if test "${enable_device_lib_build+set}" = set; then
2822 enableval="$enable_device_lib_build"
2826 OPT_ENABLE_DEVICE_LIB_BUILD=$enable_device_lib_build
2829 # Check whether --enable-packihx or --disable-packihx was given.
2830 if test "${enable_packihx+set}" = set; then
2831 enableval="$enable_packihx"
2835 OPT_ENABLE_PACKIHX=$enable_packihx
2838 # Check whether --enable-libgc or --disable-libgc was given.
2839 if test "${enable_libgc+set}" = set; then
2840 enableval="$enable_libgc"
2844 if test "$enable_libgc" = "yes"; then
2845 echo $ac_n "checking for GC_malloc in -lgc""... $ac_c" 1>&6
2846 echo "configure:2826: checking for GC_malloc in -lgc" >&5
2847 ac_lib_var=`echo gc'_'GC_malloc | sed 'y%./+-%__p_%'`
2848 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2849 echo $ac_n "(cached) $ac_c" 1>&6
2851 ac_save_LIBS="$LIBS"
2853 cat > conftest.$ac_ext <<EOF
2854 #line 2834 "configure"
2855 #include "confdefs.h"
2856 /* Override any gcc2 internal prototype to avoid an error. */
2857 /* We use char because int might match the return type of a gcc2
2858 builtin and then its argument prototype would still apply. */
2865 if { (eval echo configure:2845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2867 eval "ac_cv_lib_$ac_lib_var=yes"
2869 echo "configure: failed program was:" >&5
2870 cat conftest.$ac_ext >&5
2872 eval "ac_cv_lib_$ac_lib_var=no"
2875 LIBS="$ac_save_LIBS"
2878 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2879 echo "$ac_t""yes" 1>&6
2880 ac_tr_lib=HAVE_LIB`echo gc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2881 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2882 cat >> confdefs.h <<EOF
2883 #define $ac_tr_lib 1
2889 echo "$ac_t""no" 1>&6
2896 cat >> confdefs.h <<EOF
2897 #define OPT_ENABLE_LIBGC $OPT_ENABLE_LIBGC
2902 cat ports.all | uniq >ports
2904 cat ports.build | uniq >ports
2905 mv ports ports.build
2907 # Generating output files
2908 # ===========================================================================
2909 subdirs="support/cpp2"
2911 subdirs="support/cpp2 packihx"
2913 subdirs="support/cpp2 packihx sim/ucsim"
2915 # MLH: removed as the rules are already in Makefile.common
2919 cat > confcache <<\EOF
2920 # This file is a shell script that caches the results of configure
2921 # tests run on this system so they can be shared between configure
2922 # scripts and configure runs. It is not useful on other systems.
2923 # If it contains results you don't want to keep, you may remove or edit it.
2925 # By default, configure uses ./config.cache as the cache file,
2926 # creating it if it does not exist already. You can give configure
2927 # the --cache-file=FILE option to use a different cache file; that is
2928 # what configure does when it calls configure scripts in
2929 # subdirectories, so they share the cache.
2930 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2931 # config.status only pays attention to the cache file if you give it the
2932 # --recheck option to rerun configure.
2935 # The following way of writing the cache mishandles newlines in values,
2936 # but we know of no workaround that is simple, portable, and efficient.
2937 # So, don't put newlines in cache variables' values.
2938 # Ultrix sh set writes to stderr and can't be redirected directly,
2939 # and sets the high bit in the cache file unless we assign to the vars.
2941 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2943 # `set' does not quote correctly, so add quotes (double-quote substitution
2944 # turns \\\\ into \\, and sed turns \\ into \).
2946 -e "s/'/'\\\\''/g" \
2947 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2950 # `set' quotes correctly as required by POSIX, so do not add quotes.
2951 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2954 if cmp -s $cache_file confcache; then
2957 if test -w $cache_file; then
2958 echo "updating cache $cache_file"
2959 cat confcache > $cache_file
2961 echo "not updating unwritable cache $cache_file"
2966 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2968 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2969 # Let make expand exec_prefix.
2970 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2972 # Any assignment to VPATH causes Sun make to only execute
2973 # the first set of double-colon rules, so remove it if not needed.
2974 # If there is a colon in the path, we need to keep it.
2975 if test "x$srcdir" = x.; then
2976 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2979 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2981 DEFS=-DHAVE_CONFIG_H
2983 # Without the "./", some shells look in PATH for config.status.
2984 : ${CONFIG_STATUS=./config.status}
2986 echo creating $CONFIG_STATUS
2987 rm -f $CONFIG_STATUS
2988 cat > $CONFIG_STATUS <<EOF
2990 # Generated automatically by configure.
2991 # Run this file to recreate the current configuration.
2992 # This directory was configured as follows,
2993 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2995 # $0 $ac_configure_args
2997 # Compiler output produced by configure, useful for debugging
2998 # configure, is in ./config.log if it exists.
3000 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3003 case "\$ac_option" in
3004 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3005 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3006 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3007 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3008 echo "$CONFIG_STATUS generated by autoconf version 2.13"
3010 -help | --help | --hel | --he | --h)
3011 echo "\$ac_cs_usage"; exit 0 ;;
3012 *) echo "\$ac_cs_usage"; exit 1 ;;
3016 ac_given_srcdir=$srcdir
3017 ac_given_INSTALL="$INSTALL"
3019 trap 'rm -fr `echo "main.mk:main_in.mk
3022 device/include/Makefile
3024 debugger/mcs51/Makefile
3025 Makefile.common:Makefile.common.in
3026 sdccconf.h:sdccconf_in.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3028 cat >> $CONFIG_STATUS <<EOF
3030 # Protect against being on the right side of a sed subst in config.status.
3031 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3032 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3036 s%@CFLAGS@%$CFLAGS%g
3037 s%@CPPFLAGS@%$CPPFLAGS%g
3038 s%@CXXFLAGS@%$CXXFLAGS%g
3039 s%@FFLAGS@%$FFLAGS%g
3041 s%@LDFLAGS@%$LDFLAGS%g
3043 s%@exec_prefix@%$exec_prefix%g
3044 s%@prefix@%$prefix%g
3045 s%@program_transform_name@%$program_transform_name%g
3046 s%@bindir@%$bindir%g
3047 s%@sbindir@%$sbindir%g
3048 s%@libexecdir@%$libexecdir%g
3049 s%@datadir@%$datadir%g
3050 s%@sysconfdir@%$sysconfdir%g
3051 s%@sharedstatedir@%$sharedstatedir%g
3052 s%@localstatedir@%$localstatedir%g
3053 s%@libdir@%$libdir%g
3054 s%@includedir@%$includedir%g
3055 s%@oldincludedir@%$oldincludedir%g
3056 s%@infodir@%$infodir%g
3057 s%@mandir@%$mandir%g
3059 s%@VERSION@%$VERSION%g
3060 s%@VERSIONHI@%$VERSIONHI%g
3061 s%@VERSIONLO@%$VERSIONLO%g
3062 s%@VERSIONP@%$VERSIONP%g
3066 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3067 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3068 s%@INSTALL_DATA@%$INSTALL_DATA%g
3069 s%@RANLIB@%$RANLIB%g
3071 s%@LEXLIB@%$LEXLIB%g
3073 s%@AUTOCONF@%$AUTOCONF%g
3077 s%@M_OR_MM@%$M_OR_MM%g
3078 s%@sdcc_datadir@%$sdcc_datadir%g
3079 s%@OPT_ENABLE_UCSIM@%$OPT_ENABLE_UCSIM%g
3080 s%@OPT_ENABLE_DEVICE_LIB_BUILD@%$OPT_ENABLE_DEVICE_LIB_BUILD%g
3081 s%@OPT_ENABLE_PACKIHX@%$OPT_ENABLE_PACKIHX%g
3082 s%@subdirs@%$subdirs%g
3087 cat >> $CONFIG_STATUS <<\EOF
3089 # Split the substitutions into bite-sized pieces for seds with
3090 # small command number limits, like on Digital OSF/1 and HP-UX.
3091 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3092 ac_file=1 # Number of current file.
3093 ac_beg=1 # First line for current file.
3094 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3097 while $ac_more_lines; do
3098 if test $ac_beg -gt 1; then
3099 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3101 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3103 if test ! -s conftest.s$ac_file; then
3105 rm -f conftest.s$ac_file
3107 if test -z "$ac_sed_cmds"; then
3108 ac_sed_cmds="sed -f conftest.s$ac_file"
3110 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3112 ac_file=`expr $ac_file + 1`
3114 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3117 if test -z "$ac_sed_cmds"; then
3122 cat >> $CONFIG_STATUS <<EOF
3124 CONFIG_FILES=\${CONFIG_FILES-"main.mk:main_in.mk
3127 device/include/Makefile
3129 debugger/mcs51/Makefile
3130 Makefile.common:Makefile.common.in
3133 cat >> $CONFIG_STATUS <<\EOF
3134 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3135 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3137 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3138 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3139 *) ac_file_in="${ac_file}.in" ;;
3142 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3144 # Remove last slash and all that follows it. Not all systems have dirname.
3145 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3146 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3147 # The file is in a subdirectory.
3148 test ! -d "$ac_dir" && mkdir "$ac_dir"
3149 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3150 # A "../" for each directory in $ac_dir_suffix.
3151 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3153 ac_dir_suffix= ac_dots=
3156 case "$ac_given_srcdir" in
3158 if test -z "$ac_dots"; then top_srcdir=.
3159 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3160 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3162 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3163 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3166 case "$ac_given_INSTALL" in
3167 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3168 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3171 echo creating "$ac_file"
3173 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3175 *Makefile*) ac_comsub="1i\\
3176 # $configure_input" ;;
3180 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3182 s%@configure_input@%$configure_input%g
3183 s%@srcdir@%$srcdir%g
3184 s%@top_srcdir@%$top_srcdir%g
3185 s%@INSTALL@%$INSTALL%g
3186 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3190 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3191 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3193 # ac_d sets the value in "#define NAME VALUE" lines.
3194 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3195 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3198 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3199 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3200 ac_uB='\([ ]\)%\1#\2define\3'
3203 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3204 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3205 ac_eB='$%\1#\2define\3'
3209 if test "${CONFIG_HEADERS+set}" != set; then
3211 cat >> $CONFIG_STATUS <<EOF
3212 CONFIG_HEADERS="sdccconf.h:sdccconf_in.h"
3214 cat >> $CONFIG_STATUS <<\EOF
3216 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3217 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3219 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3220 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3221 *) ac_file_in="${ac_file}.in" ;;
3224 echo creating $ac_file
3226 rm -f conftest.frag conftest.in conftest.out
3227 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3228 cat $ac_file_inputs > conftest.in
3232 # Transform confdefs.h into a sed script conftest.vals that substitutes
3233 # the proper values into config.h.in to produce config.h. And first:
3234 # Protect against being on the right side of a sed subst in config.status.
3235 # Protect against being in an unquoted here document in config.status.
3237 cat > conftest.hdr <<\EOF
3240 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3244 sed -n -f conftest.hdr confdefs.h > conftest.vals
3247 # This sed command replaces #undef with comments. This is necessary, for
3248 # example, in the case of _POSIX_SOURCE, which is predefined and required
3249 # on some systems where configure will not decide to define it.
3250 cat >> conftest.vals <<\EOF
3251 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3254 # Break up conftest.vals because some shells have a limit on
3255 # the size of here documents, and old seds have small limits too.
3260 ac_lines=`grep -c . conftest.vals`
3261 # grep -c gives empty output for an empty file on some AIX systems.
3262 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3263 # Write a limited-size here document to conftest.frag.
3264 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3265 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3267 sed -f conftest.frag conftest.in > conftest.out
3269 mv conftest.out conftest.in
3271 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3273 mv conftest.tail conftest.vals
3277 cat >> $CONFIG_STATUS <<\EOF
3278 rm -f conftest.frag conftest.h
3279 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3280 cat conftest.in >> conftest.h
3282 if cmp -s $ac_file conftest.h 2>/dev/null; then
3283 echo "$ac_file is unchanged"
3286 # Remove last slash and all that follows it. Not all systems have dirname.
3287 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3288 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3289 # The file is in a subdirectory.
3290 test ! -d "$ac_dir" && mkdir "$ac_dir"
3293 mv conftest.h $ac_file
3298 cat >> $CONFIG_STATUS <<EOF
3301 cat >> $CONFIG_STATUS <<\EOF
3305 chmod +x $CONFIG_STATUS
3306 rm -fr confdefs* $ac_clean_files
3307 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3309 if test "$no_recursion" != yes; then
3311 # Remove --cache-file and --srcdir arguments so they do not pile up.
3312 ac_sub_configure_args=
3314 for ac_arg in $ac_configure_args; do
3315 if test -n "$ac_prev"; then
3320 -cache-file | --cache-file | --cache-fil | --cache-fi \
3321 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
3322 ac_prev=cache_file ;;
3323 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
3324 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
3326 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
3328 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
3330 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
3334 for ac_config_dir in support/cpp2 packihx sim/ucsim; do
3336 # Do not complain, so a configure script can configure whichever
3337 # parts of a large source tree are present.
3338 if test ! -d $srcdir/$ac_config_dir; then
3342 echo configuring in $ac_config_dir
3347 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
3349 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
3357 # A "../" for each directory in /$ac_config_dir.
3358 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
3361 .) # No --srcdir option. We are building in place.
3362 ac_sub_srcdir=$srcdir ;;
3363 /*) # Absolute path.
3364 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
3366 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
3369 # Check for guested configure; otherwise get Cygnus style configure.
3370 if test -f $ac_sub_srcdir/configure; then
3371 ac_sub_configure=$ac_sub_srcdir/configure
3372 elif test -f $ac_sub_srcdir/configure.in; then
3373 ac_sub_configure=$ac_configure
3375 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
3379 # The recursion is here.
3380 if test -n "$ac_sub_configure"; then
3382 # Make the cache file name correct relative to the subdirectory.
3383 case "$cache_file" in
3384 /*) ac_sub_cache_file=$cache_file ;;
3386 ac_sub_cache_file="$ac_dots$cache_file" ;;
3388 case "$ac_given_INSTALL" in
3389 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3390 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3393 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
3394 # The eval makes quoting arguments work.
3395 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
3398 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
3407 # End of configure/configure.in