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-ucsim Disables configuring and building of ucsim"
33 --disable-device-lib-build Disables automatically building device libraries"
35 --disable-packihx Disables building packihx"
37 --enable-libgc Use the Bohem memory allocator. Lower runtime footprint."
39 # Initialize some variables set by options.
40 # The variables have the same names as the options, with
41 # dashes changed to underlines.
43 cache_file=./config.cache
52 program_transform_name=s,x,x,
60 bindir='${exec_prefix}/bin'
61 sbindir='${exec_prefix}/sbin'
62 libexecdir='${exec_prefix}/libexec'
63 datadir='${prefix}/share'
64 sysconfdir='${prefix}/etc'
65 sharedstatedir='${prefix}/com'
66 localstatedir='${prefix}/var'
67 libdir='${exec_prefix}/lib'
68 includedir='${prefix}/include'
69 oldincludedir='/usr/include'
70 infodir='${prefix}/info'
71 mandir='${prefix}/man'
73 # Initialize some other variables.
76 SHELL=${CONFIG_SHELL-/bin/sh}
77 # Maximum number of lines to put in a shell here document.
84 # If the previous option needs an argument, assign it.
85 if test -n "$ac_prev"; then
86 eval "$ac_prev=\$ac_option"
92 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
96 # Accept the important Cygnus configure options, so we can diagnose typos.
100 -bindir | --bindir | --bindi | --bind | --bin | --bi)
102 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
103 bindir="$ac_optarg" ;;
105 -build | --build | --buil | --bui | --bu)
107 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
108 build="$ac_optarg" ;;
110 -cache-file | --cache-file | --cache-fil | --cache-fi \
111 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
112 ac_prev=cache_file ;;
113 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
114 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
115 cache_file="$ac_optarg" ;;
117 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
119 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
121 datadir="$ac_optarg" ;;
123 -disable-* | --disable-*)
124 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
125 # Reject names that are not valid shell variable names.
126 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
127 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
129 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
130 eval "enable_${ac_feature}=no" ;;
132 -enable-* | --enable-*)
133 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
134 # Reject names that are not valid shell variable names.
135 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
136 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
138 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
143 eval "enable_${ac_feature}='$ac_optarg'" ;;
145 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
146 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
147 | --exec | --exe | --ex)
148 ac_prev=exec_prefix ;;
149 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
150 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
151 | --exec=* | --exe=* | --ex=*)
152 exec_prefix="$ac_optarg" ;;
154 -gas | --gas | --ga | --g)
155 # Obsolete; use --with-gas.
158 -help | --help | --hel | --he)
159 # Omit some internal or obsolete options to make the list less imposing.
160 # This message is too long to be a string in the A/UX 3.1 sh.
162 Usage: configure [options] [host]
163 Options: [defaults in brackets after descriptions]
165 --cache-file=FILE cache test results in FILE
166 --help print this message
167 --no-create do not create output files
168 --quiet, --silent do not print \`checking...' messages
169 --version print the version of autoconf that created configure
170 Directory and file names:
171 --prefix=PREFIX install architecture-independent files in PREFIX
173 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
175 --bindir=DIR user executables in DIR [EPREFIX/bin]
176 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
177 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
178 --datadir=DIR read-only architecture-independent data in DIR
180 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
181 --sharedstatedir=DIR modifiable architecture-independent data in DIR
183 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
184 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
185 --includedir=DIR C header files in DIR [PREFIX/include]
186 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
187 --infodir=DIR info documentation in DIR [PREFIX/info]
188 --mandir=DIR man documentation in DIR [PREFIX/man]
189 --srcdir=DIR find the sources in DIR [configure dir or ..]
190 --program-prefix=PREFIX prepend PREFIX to installed program names
191 --program-suffix=SUFFIX append SUFFIX to installed program names
192 --program-transform-name=PROGRAM
193 run sed PROGRAM on installed program names
197 --build=BUILD configure for building on BUILD [BUILD=HOST]
198 --host=HOST configure for HOST [guessed]
199 --target=TARGET configure for TARGET [TARGET=HOST]
200 Features and packages:
201 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
202 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
203 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
204 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
205 --x-includes=DIR X include files are in DIR
206 --x-libraries=DIR X library files are in DIR
208 if test -n "$ac_help"; then
209 echo "--enable and --with options recognized:$ac_help"
213 -host | --host | --hos | --ho)
215 -host=* | --host=* | --hos=* | --ho=*)
218 -includedir | --includedir | --includedi | --included | --include \
219 | --includ | --inclu | --incl | --inc)
220 ac_prev=includedir ;;
221 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
222 | --includ=* | --inclu=* | --incl=* | --inc=*)
223 includedir="$ac_optarg" ;;
225 -infodir | --infodir | --infodi | --infod | --info | --inf)
227 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
228 infodir="$ac_optarg" ;;
230 -libdir | --libdir | --libdi | --libd)
232 -libdir=* | --libdir=* | --libdi=* | --libd=*)
233 libdir="$ac_optarg" ;;
235 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
236 | --libexe | --libex | --libe)
237 ac_prev=libexecdir ;;
238 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
239 | --libexe=* | --libex=* | --libe=*)
240 libexecdir="$ac_optarg" ;;
242 -localstatedir | --localstatedir | --localstatedi | --localstated \
243 | --localstate | --localstat | --localsta | --localst \
244 | --locals | --local | --loca | --loc | --lo)
245 ac_prev=localstatedir ;;
246 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
247 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
248 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
249 localstatedir="$ac_optarg" ;;
251 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
253 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
254 mandir="$ac_optarg" ;;
257 # Obsolete; use --without-fp.
260 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
264 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
265 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
268 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
269 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
270 | --oldin | --oldi | --old | --ol | --o)
271 ac_prev=oldincludedir ;;
272 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
273 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
274 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
275 oldincludedir="$ac_optarg" ;;
277 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
279 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
280 prefix="$ac_optarg" ;;
282 -program-prefix | --program-prefix | --program-prefi | --program-pref \
283 | --program-pre | --program-pr | --program-p)
284 ac_prev=program_prefix ;;
285 -program-prefix=* | --program-prefix=* | --program-prefi=* \
286 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
287 program_prefix="$ac_optarg" ;;
289 -program-suffix | --program-suffix | --program-suffi | --program-suff \
290 | --program-suf | --program-su | --program-s)
291 ac_prev=program_suffix ;;
292 -program-suffix=* | --program-suffix=* | --program-suffi=* \
293 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
294 program_suffix="$ac_optarg" ;;
296 -program-transform-name | --program-transform-name \
297 | --program-transform-nam | --program-transform-na \
298 | --program-transform-n | --program-transform- \
299 | --program-transform | --program-transfor \
300 | --program-transfo | --program-transf \
301 | --program-trans | --program-tran \
302 | --progr-tra | --program-tr | --program-t)
303 ac_prev=program_transform_name ;;
304 -program-transform-name=* | --program-transform-name=* \
305 | --program-transform-nam=* | --program-transform-na=* \
306 | --program-transform-n=* | --program-transform-=* \
307 | --program-transform=* | --program-transfor=* \
308 | --program-transfo=* | --program-transf=* \
309 | --program-trans=* | --program-tran=* \
310 | --progr-tra=* | --program-tr=* | --program-t=*)
311 program_transform_name="$ac_optarg" ;;
313 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
314 | -silent | --silent | --silen | --sile | --sil)
317 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
319 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
321 sbindir="$ac_optarg" ;;
323 -sharedstatedir | --sharedstatedir | --sharedstatedi \
324 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
325 | --sharedst | --shareds | --shared | --share | --shar \
327 ac_prev=sharedstatedir ;;
328 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
329 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
330 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
332 sharedstatedir="$ac_optarg" ;;
334 -site | --site | --sit)
336 -site=* | --site=* | --sit=*)
339 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
341 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
342 srcdir="$ac_optarg" ;;
344 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
345 | --syscon | --sysco | --sysc | --sys | --sy)
346 ac_prev=sysconfdir ;;
347 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
348 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
349 sysconfdir="$ac_optarg" ;;
351 -target | --target | --targe | --targ | --tar | --ta | --t)
353 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
354 target="$ac_optarg" ;;
356 -v | -verbose | --verbose | --verbos | --verbo | --verb)
359 -version | --version | --versio | --versi | --vers)
360 echo "configure generated by autoconf version 2.13"
364 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
365 # Reject names that are not valid shell variable names.
366 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
367 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
369 ac_package=`echo $ac_package| sed 's/-/_/g'`
374 eval "with_${ac_package}='$ac_optarg'" ;;
376 -without-* | --without-*)
377 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
378 # Reject names that are not valid shell variable names.
379 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
380 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
382 ac_package=`echo $ac_package| sed 's/-/_/g'`
383 eval "with_${ac_package}=no" ;;
386 # Obsolete; use --with-x.
389 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
390 | --x-incl | --x-inc | --x-in | --x-i)
391 ac_prev=x_includes ;;
392 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
393 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
394 x_includes="$ac_optarg" ;;
396 -x-libraries | --x-libraries | --x-librarie | --x-librari \
397 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
398 ac_prev=x_libraries ;;
399 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
400 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
401 x_libraries="$ac_optarg" ;;
403 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
407 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
408 echo "configure: warning: $ac_option: invalid host type" 1>&2
410 if test "x$nonopt" != xNONE; then
411 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
419 if test -n "$ac_prev"; then
420 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
423 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
425 # File descriptor usage:
428 # 2 errors and warnings
429 # 3 some systems may open it to /dev/tty
430 # 4 used on the Kubota Titan
431 # 6 checking for... messages and results
432 # 5 compiler messages saved in config.log
433 if test "$silent" = yes; then
441 This file contains any messages produced by compilers while
442 running configure, to aid debugging if configure makes a mistake.
445 # Strip out --no-create and --no-recursion so they do not pile up.
446 # Also quote any args containing shell metacharacters.
451 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
452 | --no-cr | --no-c) ;;
453 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
454 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
455 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
456 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
457 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
462 # Only set these to C if already set. These must not be set unconditionally
463 # because not all systems understand e.g. LANG=C (notably SCO).
464 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
465 # Non-C LC_CTYPE values break the ctype check.
466 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
467 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
468 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
469 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
471 # confdefs.h avoids OS command line length limits that DEFS can exceed.
472 rm -rf conftest* confdefs.h
473 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
476 # A filename unique to this package, relative to the directory that
477 # configure is in, which we can look for to find out if srcdir is correct.
478 ac_unique_file=Makefile
480 # Find the source files, if location was not specified.
481 if test -z "$srcdir"; then
482 ac_srcdir_defaulted=yes
483 # Try the directory containing this script, then its parent.
485 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
486 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
488 if test ! -r $srcdir/$ac_unique_file; then
492 ac_srcdir_defaulted=no
494 if test ! -r $srcdir/$ac_unique_file; then
495 if test "$ac_srcdir_defaulted" = yes; then
496 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
498 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
501 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
503 # Prefer explicitly selected file to automatically selected ones.
504 if test -z "$CONFIG_SITE"; then
505 if test "x$prefix" != xNONE; then
506 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
508 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
511 for ac_site_file in $CONFIG_SITE; do
512 if test -r "$ac_site_file"; then
513 echo "loading site script $ac_site_file"
518 if test -r "$cache_file"; then
519 echo "loading cache $cache_file"
522 echo "creating cache $cache_file"
527 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
528 ac_cpp='$CPP $CPPFLAGS'
529 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
530 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
531 cross_compiling=$ac_cv_prog_cc_cross
535 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
536 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
537 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
544 ac_n= ac_c='\c' ac_t=
550 for ac_prog in mawk gawk nawk awk
552 # Extract the first word of "$ac_prog", so it can be a program name with args.
553 set dummy $ac_prog; ac_word=$2
554 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
555 echo "configure:556: checking for $ac_word" >&5
556 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
557 echo $ac_n "(cached) $ac_c" 1>&6
559 if test -n "$AWK"; then
560 ac_cv_prog_AWK="$AWK" # Let the user override the test.
562 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
564 for ac_dir in $ac_dummy; do
565 test -z "$ac_dir" && ac_dir=.
566 if test -f $ac_dir/$ac_word; then
567 ac_cv_prog_AWK="$ac_prog"
574 AWK="$ac_cv_prog_AWK"
575 if test -n "$AWK"; then
576 echo "$ac_t""$AWK" 1>&6
578 echo "$ac_t""no" 1>&6
581 test -n "$AWK" && break
585 echo $ac_n "checking version of the package""... $ac_c" 1>&6
586 echo "configure:587: checking version of the package" >&5
587 if test -f .version; then
588 VERSION=`cat .version`
589 elif test -f ../.version; then
590 VERSION=`cat ../.version`
594 VERSIONHI=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $1}'`
595 VERSIONLO=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $2}'`
596 VERSIONP=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $3}'`
597 # Assume no special extension
598 EXEEXT=`echo $EXEEXT`
600 echo "$ac_t""${VERSION}" 1>&6
605 cat >> confdefs.h <<EOF
606 #define SDCC_VERSION_LO ${VERSIONLO}
609 cat >> confdefs.h <<EOF
610 #define SDCC_VERSION_HI ${VERSIONHI}
613 cat >> confdefs.h <<EOF
614 #define SDCC_VERSION_P ${VERSIONP}
617 cat >> confdefs.h <<EOF
618 #define SDCC_VERSION_STR "${VERSION}"
621 if test "$program_transform_name" = s,x,x,; then
622 program_transform_name=
624 # Double any \ or $. echo might interpret backslashes.
625 cat <<\EOF_SED > conftestsed
626 s,\\,\\\\,g; s,\$,$$,g
628 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
631 test "$program_prefix" != NONE &&
632 program_transform_name="s,^,${program_prefix},; $program_transform_name"
633 # Use a double $ so make ignores it.
634 test "$program_suffix" != NONE &&
635 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
637 # sed with no file args requires a program.
638 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
640 sdcc_cv_version=$VERSION
641 sdcc_cv_versionhi=$VERSIONHI
642 sdcc_cv_versionlo=$VERSIONLO
643 sdcc_cv_versionp=$VERSIONP
647 # Extract the first word of "gcc", so it can be a program name with args.
648 set dummy gcc; ac_word=$2
649 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
650 echo "configure:651: checking for $ac_word" >&5
651 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
652 echo $ac_n "(cached) $ac_c" 1>&6
654 if test -n "$CC"; then
655 ac_cv_prog_CC="$CC" # Let the user override the test.
657 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
659 for ac_dir in $ac_dummy; do
660 test -z "$ac_dir" && ac_dir=.
661 if test -f $ac_dir/$ac_word; then
670 if test -n "$CC"; then
671 echo "$ac_t""$CC" 1>&6
673 echo "$ac_t""no" 1>&6
676 if test -z "$CC"; then
677 # Extract the first word of "cc", so it can be a program name with args.
678 set dummy cc; ac_word=$2
679 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
680 echo "configure:681: checking for $ac_word" >&5
681 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
682 echo $ac_n "(cached) $ac_c" 1>&6
684 if test -n "$CC"; then
685 ac_cv_prog_CC="$CC" # Let the user override the test.
687 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
690 for ac_dir in $ac_dummy; do
691 test -z "$ac_dir" && ac_dir=.
692 if test -f $ac_dir/$ac_word; then
693 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
702 if test $ac_prog_rejected = yes; then
703 # We found a bogon in the path, so make sure we never use it.
704 set dummy $ac_cv_prog_CC
706 if test $# -gt 0; then
707 # We chose a different compiler from the bogus one.
708 # However, it has the same basename, so the bogon will be chosen
709 # first if we set CC to just the basename; use the full file name.
711 set dummy "$ac_dir/$ac_word" "$@"
719 if test -n "$CC"; then
720 echo "$ac_t""$CC" 1>&6
722 echo "$ac_t""no" 1>&6
725 if test -z "$CC"; then
728 # Extract the first word of "cl", so it can be a program name with args.
729 set dummy cl; ac_word=$2
730 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
731 echo "configure:732: checking for $ac_word" >&5
732 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
733 echo $ac_n "(cached) $ac_c" 1>&6
735 if test -n "$CC"; then
736 ac_cv_prog_CC="$CC" # Let the user override the test.
738 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
740 for ac_dir in $ac_dummy; do
741 test -z "$ac_dir" && ac_dir=.
742 if test -f $ac_dir/$ac_word; then
751 if test -n "$CC"; then
752 echo "$ac_t""$CC" 1>&6
754 echo "$ac_t""no" 1>&6
759 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
762 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
763 echo "configure:764: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
766 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
767 ac_cpp='$CPP $CPPFLAGS'
768 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
769 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
770 cross_compiling=$ac_cv_prog_cc_cross
772 cat > conftest.$ac_ext << EOF
774 #line 775 "configure"
775 #include "confdefs.h"
779 if { (eval echo configure:780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
780 ac_cv_prog_cc_works=yes
781 # If we can't run a trivial program, we are probably using a cross compiler.
782 if (./conftest; exit) 2>/dev/null; then
783 ac_cv_prog_cc_cross=no
785 ac_cv_prog_cc_cross=yes
788 echo "configure: failed program was:" >&5
789 cat conftest.$ac_ext >&5
790 ac_cv_prog_cc_works=no
794 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
795 ac_cpp='$CPP $CPPFLAGS'
796 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
797 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
798 cross_compiling=$ac_cv_prog_cc_cross
800 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
801 if test $ac_cv_prog_cc_works = no; then
802 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
804 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
805 echo "configure:806: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
806 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
807 cross_compiling=$ac_cv_prog_cc_cross
809 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
810 echo "configure:811: checking whether we are using GNU C" >&5
811 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
812 echo $ac_n "(cached) $ac_c" 1>&6
814 cat > conftest.c <<EOF
819 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
826 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
828 if test $ac_cv_prog_gcc = yes; then
834 ac_test_CFLAGS="${CFLAGS+set}"
835 ac_save_CFLAGS="$CFLAGS"
837 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
838 echo "configure:839: checking whether ${CC-cc} accepts -g" >&5
839 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
840 echo $ac_n "(cached) $ac_c" 1>&6
842 echo 'void f(){}' > conftest.c
843 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
852 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
853 if test "$ac_test_CFLAGS" = set; then
854 CFLAGS="$ac_save_CFLAGS"
855 elif test $ac_cv_prog_cc_g = yes; then
856 if test "$GCC" = yes; then
862 if test "$GCC" = yes; then
869 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
871 # Extract the first word of "$ac_prog", so it can be a program name with args.
872 set dummy $ac_prog; ac_word=$2
873 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
874 echo "configure:875: checking for $ac_word" >&5
875 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
876 echo $ac_n "(cached) $ac_c" 1>&6
878 if test -n "$CXX"; then
879 ac_cv_prog_CXX="$CXX" # Let the user override the test.
881 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
883 for ac_dir in $ac_dummy; do
884 test -z "$ac_dir" && ac_dir=.
885 if test -f $ac_dir/$ac_word; then
886 ac_cv_prog_CXX="$ac_prog"
893 CXX="$ac_cv_prog_CXX"
894 if test -n "$CXX"; then
895 echo "$ac_t""$CXX" 1>&6
897 echo "$ac_t""no" 1>&6
900 test -n "$CXX" && break
902 test -n "$CXX" || CXX="gcc"
905 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
906 echo "configure:907: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
909 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
910 ac_cpp='$CXXCPP $CPPFLAGS'
911 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
912 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
913 cross_compiling=$ac_cv_prog_cxx_cross
915 cat > conftest.$ac_ext << EOF
917 #line 918 "configure"
918 #include "confdefs.h"
920 int main(){return(0);}
922 if { (eval echo configure:923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
923 ac_cv_prog_cxx_works=yes
924 # If we can't run a trivial program, we are probably using a cross compiler.
925 if (./conftest; exit) 2>/dev/null; then
926 ac_cv_prog_cxx_cross=no
928 ac_cv_prog_cxx_cross=yes
931 echo "configure: failed program was:" >&5
932 cat conftest.$ac_ext >&5
933 ac_cv_prog_cxx_works=no
937 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
938 ac_cpp='$CPP $CPPFLAGS'
939 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
940 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
941 cross_compiling=$ac_cv_prog_cc_cross
943 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
944 if test $ac_cv_prog_cxx_works = no; then
945 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
947 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
948 echo "configure:949: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
949 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
950 cross_compiling=$ac_cv_prog_cxx_cross
952 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
953 echo "configure:954: checking whether we are using GNU C++" >&5
954 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
955 echo $ac_n "(cached) $ac_c" 1>&6
957 cat > conftest.C <<EOF
962 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
969 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
971 if test $ac_cv_prog_gxx = yes; then
977 ac_test_CXXFLAGS="${CXXFLAGS+set}"
978 ac_save_CXXFLAGS="$CXXFLAGS"
980 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
981 echo "configure:982: checking whether ${CXX-g++} accepts -g" >&5
982 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
983 echo $ac_n "(cached) $ac_c" 1>&6
985 echo 'void f(){}' > conftest.cc
986 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
995 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
996 if test "$ac_test_CXXFLAGS" = set; then
997 CXXFLAGS="$ac_save_CXXFLAGS"
998 elif test $ac_cv_prog_cxx_g = yes; then
999 if test "$GXX" = yes; then
1005 if test "$GXX" = yes; then
1012 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1013 echo "configure:1014: checking how to run the C preprocessor" >&5
1014 # On Suns, sometimes $CPP names a directory.
1015 if test -n "$CPP" && test -d "$CPP"; then
1018 if test -z "$CPP"; then
1019 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1020 echo $ac_n "(cached) $ac_c" 1>&6
1022 # This must be in double quotes, not single quotes, because CPP may get
1023 # substituted into the Makefile and "${CC-cc}" will confuse make.
1025 # On the NeXT, cc -E runs the code through the compiler's parser,
1026 # not just through cpp.
1027 cat > conftest.$ac_ext <<EOF
1028 #line 1029 "configure"
1029 #include "confdefs.h"
1033 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1034 { (eval echo configure:1035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1035 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1036 if test -z "$ac_err"; then
1040 echo "configure: failed program was:" >&5
1041 cat conftest.$ac_ext >&5
1043 CPP="${CC-cc} -E -traditional-cpp"
1044 cat > conftest.$ac_ext <<EOF
1045 #line 1046 "configure"
1046 #include "confdefs.h"
1050 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1051 { (eval echo configure:1052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1052 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1053 if test -z "$ac_err"; then
1057 echo "configure: failed program was:" >&5
1058 cat conftest.$ac_ext >&5
1060 CPP="${CC-cc} -nologo -E"
1061 cat > conftest.$ac_ext <<EOF
1062 #line 1063 "configure"
1063 #include "confdefs.h"
1067 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1068 { (eval echo configure:1069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1069 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1070 if test -z "$ac_err"; then
1074 echo "configure: failed program was:" >&5
1075 cat conftest.$ac_ext >&5
1084 ac_cv_prog_CPP="$CPP"
1086 CPP="$ac_cv_prog_CPP"
1088 ac_cv_prog_CPP="$CPP"
1090 echo "$ac_t""$CPP" 1>&6
1093 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1094 if test -f $ac_dir/install-sh; then
1096 ac_install_sh="$ac_aux_dir/install-sh -c"
1098 elif test -f $ac_dir/install.sh; then
1100 ac_install_sh="$ac_aux_dir/install.sh -c"
1104 if test -z "$ac_aux_dir"; then
1105 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1107 ac_config_guess=$ac_aux_dir/config.guess
1108 ac_config_sub=$ac_aux_dir/config.sub
1109 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1111 # Find a good install program. We prefer a C program (faster),
1112 # so one script is as good as another. But avoid the broken or
1113 # incompatible versions:
1114 # SysV /etc/install, /usr/sbin/install
1115 # SunOS /usr/etc/install
1116 # IRIX /sbin/install
1118 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1119 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1120 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1121 # ./install, which can be erroneously created by make from ./install.sh.
1122 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1123 echo "configure:1124: checking for a BSD compatible install" >&5
1124 if test -z "$INSTALL"; then
1125 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1126 echo $ac_n "(cached) $ac_c" 1>&6
1128 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1129 for ac_dir in $PATH; do
1130 # Account for people who put trailing slashes in PATH elements.
1132 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1134 # OSF1 and SCO ODT 3.0 have their own names for install.
1135 # Don't use installbsd from OSF since it installs stuff as root
1137 for ac_prog in ginstall scoinst install; do
1138 if test -f $ac_dir/$ac_prog; then
1139 if test $ac_prog = install &&
1140 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1141 # AIX install. It has an incompatible calling convention.
1144 ac_cv_path_install="$ac_dir/$ac_prog -c"
1155 if test "${ac_cv_path_install+set}" = set; then
1156 INSTALL="$ac_cv_path_install"
1158 # As a last resort, use the slow shell script. We don't cache a
1159 # path for INSTALL within a source directory, because that will
1160 # break other packages using the cache if that directory is
1161 # removed, or if the path is relative.
1162 INSTALL="$ac_install_sh"
1165 echo "$ac_t""$INSTALL" 1>&6
1167 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1168 # It thinks the first close brace ends the variable substitution.
1169 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1171 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1173 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1175 # Extract the first word of "ranlib", so it can be a program name with args.
1176 set dummy ranlib; ac_word=$2
1177 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1178 echo "configure:1179: checking for $ac_word" >&5
1179 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1180 echo $ac_n "(cached) $ac_c" 1>&6
1182 if test -n "$RANLIB"; then
1183 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1185 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1187 for ac_dir in $ac_dummy; do
1188 test -z "$ac_dir" && ac_dir=.
1189 if test -f $ac_dir/$ac_word; then
1190 ac_cv_prog_RANLIB="ranlib"
1195 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1198 RANLIB="$ac_cv_prog_RANLIB"
1199 if test -n "$RANLIB"; then
1200 echo "$ac_t""$RANLIB" 1>&6
1202 echo "$ac_t""no" 1>&6
1205 # Extract the first word of "flex", so it can be a program name with args.
1206 set dummy flex; ac_word=$2
1207 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1208 echo "configure:1209: checking for $ac_word" >&5
1209 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1210 echo $ac_n "(cached) $ac_c" 1>&6
1212 if test -n "$LEX"; then
1213 ac_cv_prog_LEX="$LEX" # Let the user override the test.
1215 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1217 for ac_dir in $ac_dummy; do
1218 test -z "$ac_dir" && ac_dir=.
1219 if test -f $ac_dir/$ac_word; then
1220 ac_cv_prog_LEX="flex"
1225 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1228 LEX="$ac_cv_prog_LEX"
1229 if test -n "$LEX"; then
1230 echo "$ac_t""$LEX" 1>&6
1232 echo "$ac_t""no" 1>&6
1235 if test -z "$LEXLIB"
1241 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1242 echo "configure:1243: checking for yywrap in -l$ac_lib" >&5
1243 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1244 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1245 echo $ac_n "(cached) $ac_c" 1>&6
1247 ac_save_LIBS="$LIBS"
1248 LIBS="-l$ac_lib $LIBS"
1249 cat > conftest.$ac_ext <<EOF
1250 #line 1251 "configure"
1251 #include "confdefs.h"
1252 /* Override any gcc2 internal prototype to avoid an error. */
1253 /* We use char because int might match the return type of a gcc2
1254 builtin and then its argument prototype would still apply. */
1261 if { (eval echo configure:1262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1263 eval "ac_cv_lib_$ac_lib_var=yes"
1265 echo "configure: failed program was:" >&5
1266 cat conftest.$ac_ext >&5
1268 eval "ac_cv_lib_$ac_lib_var=no"
1271 LIBS="$ac_save_LIBS"
1274 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1275 echo "$ac_t""yes" 1>&6
1278 echo "$ac_t""no" 1>&6
1283 # Extract the first word of "bison", so it can be a program name with args.
1284 set dummy bison; ac_word=$2
1285 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1286 echo "configure:1287: checking for $ac_word" >&5
1287 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1288 echo $ac_n "(cached) $ac_c" 1>&6
1290 if test -n "$YACC"; then
1291 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1293 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1295 for ac_dir in $ac_dummy; do
1296 test -z "$ac_dir" && ac_dir=.
1297 if test -f $ac_dir/$ac_word; then
1298 ac_cv_prog_YACC="bison -y"
1303 test -z "$ac_cv_prog_YACC" && ac_cv_prog_YACC=":"
1306 YACC="$ac_cv_prog_YACC"
1307 if test -n "$YACC"; then
1308 echo "$ac_t""$YACC" 1>&6
1310 echo "$ac_t""no" 1>&6
1313 # Extract the first word of "autoconf", so it can be a program name with args.
1314 set dummy autoconf; ac_word=$2
1315 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1316 echo "configure:1317: checking for $ac_word" >&5
1317 if eval "test \"`echo '$''{'ac_cv_prog_AUTOCONF'+set}'`\" = set"; then
1318 echo $ac_n "(cached) $ac_c" 1>&6
1320 if test -n "$AUTOCONF"; then
1321 ac_cv_prog_AUTOCONF="$AUTOCONF" # Let the user override the test.
1323 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1325 for ac_dir in $ac_dummy; do
1326 test -z "$ac_dir" && ac_dir=.
1327 if test -f $ac_dir/$ac_word; then
1328 ac_cv_prog_AUTOCONF="autoconf"
1333 test -z "$ac_cv_prog_AUTOCONF" && ac_cv_prog_AUTOCONF=":"
1336 AUTOCONF="$ac_cv_prog_AUTOCONF"
1337 if test -n "$AUTOCONF"; then
1338 echo "$ac_t""$AUTOCONF" 1>&6
1340 echo "$ac_t""no" 1>&6
1343 # Extract the first word of "strip", so it can be a program name with args.
1344 set dummy strip; ac_word=$2
1345 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1346 echo "configure:1347: checking for $ac_word" >&5
1347 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1348 echo $ac_n "(cached) $ac_c" 1>&6
1350 if test -n "$STRIP"; then
1351 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1353 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1355 for ac_dir in $ac_dummy; do
1356 test -z "$ac_dir" && ac_dir=.
1357 if test -f $ac_dir/$ac_word; then
1358 ac_cv_prog_STRIP="strip"
1363 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
1366 STRIP="$ac_cv_prog_STRIP"
1367 if test -n "$STRIP"; then
1368 echo "$ac_t""$STRIP" 1>&6
1370 echo "$ac_t""no" 1>&6
1373 # Extract the first word of "as", so it can be a program name with args.
1374 set dummy as; ac_word=$2
1375 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1376 echo "configure:1377: checking for $ac_word" >&5
1377 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1378 echo $ac_n "(cached) $ac_c" 1>&6
1380 if test -n "$AS"; then
1381 ac_cv_prog_AS="$AS" # Let the user override the test.
1383 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1385 for ac_dir in $ac_dummy; do
1386 test -z "$ac_dir" && ac_dir=.
1387 if test -f $ac_dir/$ac_word; then
1393 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS=":"
1397 if test -n "$AS"; then
1398 echo "$ac_t""$AS" 1>&6
1400 echo "$ac_t""no" 1>&6
1403 # Extract the first word of "cp", so it can be a program name with args.
1404 set dummy cp; ac_word=$2
1405 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1406 echo "configure:1407: checking for $ac_word" >&5
1407 if eval "test \"`echo '$''{'ac_cv_prog_CP'+set}'`\" = set"; then
1408 echo $ac_n "(cached) $ac_c" 1>&6
1410 if test -n "$CP"; then
1411 ac_cv_prog_CP="$CP" # Let the user override the test.
1413 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1415 for ac_dir in $ac_dummy; do
1416 test -z "$ac_dir" && ac_dir=.
1417 if test -f $ac_dir/$ac_word; then
1423 test -z "$ac_cv_prog_CP" && ac_cv_prog_CP=":"
1427 if test -n "$CP"; then
1428 echo "$ac_t""$CP" 1>&6
1430 echo "$ac_t""no" 1>&6
1436 if test "$YACC" = ":"; then
1437 { echo "configure: error: Cannot find required program bison." 1>&2; exit 1; }
1440 if test "$LEX" = ":"; then
1441 { echo "configure: error: Cannot find required program lex." 1>&2; exit 1; }
1446 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1447 ac_cpp='$CPP $CPPFLAGS'
1448 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1449 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1450 cross_compiling=$ac_cv_prog_cc_cross
1453 # Checking for header files.
1454 # ===========================================================================
1455 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1456 echo "configure:1457: checking for ANSI C header files" >&5
1457 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1458 echo $ac_n "(cached) $ac_c" 1>&6
1460 cat > conftest.$ac_ext <<EOF
1461 #line 1462 "configure"
1462 #include "confdefs.h"
1468 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1469 { (eval echo configure:1470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1470 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1471 if test -z "$ac_err"; then
1473 ac_cv_header_stdc=yes
1476 echo "configure: failed program was:" >&5
1477 cat conftest.$ac_ext >&5
1479 ac_cv_header_stdc=no
1483 if test $ac_cv_header_stdc = yes; then
1484 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1485 cat > conftest.$ac_ext <<EOF
1486 #line 1487 "configure"
1487 #include "confdefs.h"
1490 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1491 egrep "memchr" >/dev/null 2>&1; then
1495 ac_cv_header_stdc=no
1501 if test $ac_cv_header_stdc = yes; then
1502 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1503 cat > conftest.$ac_ext <<EOF
1504 #line 1505 "configure"
1505 #include "confdefs.h"
1508 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1509 egrep "free" >/dev/null 2>&1; then
1513 ac_cv_header_stdc=no
1519 if test $ac_cv_header_stdc = yes; then
1520 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1521 if test "$cross_compiling" = yes; then
1524 cat > conftest.$ac_ext <<EOF
1525 #line 1526 "configure"
1526 #include "confdefs.h"
1528 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1529 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1530 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1531 int main () { int i; for (i = 0; i < 256; i++)
1532 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1536 if { (eval echo configure:1537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1540 echo "configure: failed program was:" >&5
1541 cat conftest.$ac_ext >&5
1543 ac_cv_header_stdc=no
1551 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1552 if test $ac_cv_header_stdc = yes; then
1553 cat >> confdefs.h <<\EOF
1554 #define STDC_HEADERS 1
1559 for ac_hdr in getopt.h
1561 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1562 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1563 echo "configure:1564: checking for $ac_hdr" >&5
1564 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1565 echo $ac_n "(cached) $ac_c" 1>&6
1567 cat > conftest.$ac_ext <<EOF
1568 #line 1569 "configure"
1569 #include "confdefs.h"
1572 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1573 { (eval echo configure:1574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1574 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1575 if test -z "$ac_err"; then
1577 eval "ac_cv_header_$ac_safe=yes"
1580 echo "configure: failed program was:" >&5
1581 cat conftest.$ac_ext >&5
1583 eval "ac_cv_header_$ac_safe=no"
1587 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1588 echo "$ac_t""yes" 1>&6
1589 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1590 cat >> confdefs.h <<EOF
1591 #define $ac_tr_hdr 1
1595 echo "$ac_t""no" 1>&6
1599 for ac_hdr in unistd.h
1601 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1602 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1603 echo "configure:1604: checking for $ac_hdr" >&5
1604 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1605 echo $ac_n "(cached) $ac_c" 1>&6
1607 cat > conftest.$ac_ext <<EOF
1608 #line 1609 "configure"
1609 #include "confdefs.h"
1612 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1613 { (eval echo configure:1614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1614 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1615 if test -z "$ac_err"; then
1617 eval "ac_cv_header_$ac_safe=yes"
1620 echo "configure: failed program was:" >&5
1621 cat conftest.$ac_ext >&5
1623 eval "ac_cv_header_$ac_safe=no"
1627 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1628 echo "$ac_t""yes" 1>&6
1629 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1630 cat >> confdefs.h <<EOF
1631 #define $ac_tr_hdr 1
1635 echo "$ac_t""no" 1>&6
1639 for ac_hdr in endian.h
1641 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1642 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1643 echo "configure:1644: checking for $ac_hdr" >&5
1644 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1645 echo $ac_n "(cached) $ac_c" 1>&6
1647 cat > conftest.$ac_ext <<EOF
1648 #line 1649 "configure"
1649 #include "confdefs.h"
1652 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1653 { (eval echo configure:1654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1654 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1655 if test -z "$ac_err"; then
1657 eval "ac_cv_header_$ac_safe=yes"
1660 echo "configure: failed program was:" >&5
1661 cat conftest.$ac_ext >&5
1663 eval "ac_cv_header_$ac_safe=no"
1667 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1668 echo "$ac_t""yes" 1>&6
1669 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1670 cat >> confdefs.h <<EOF
1671 #define $ac_tr_hdr 1
1675 echo "$ac_t""no" 1>&6
1679 for ac_hdr in machine/endian.h
1681 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1682 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1683 echo "configure:1684: checking for $ac_hdr" >&5
1684 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1685 echo $ac_n "(cached) $ac_c" 1>&6
1687 cat > conftest.$ac_ext <<EOF
1688 #line 1689 "configure"
1689 #include "confdefs.h"
1692 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1693 { (eval echo configure:1694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1694 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1695 if test -z "$ac_err"; then
1697 eval "ac_cv_header_$ac_safe=yes"
1700 echo "configure: failed program was:" >&5
1701 cat conftest.$ac_ext >&5
1703 eval "ac_cv_header_$ac_safe=no"
1707 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1708 echo "$ac_t""yes" 1>&6
1709 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1710 cat >> confdefs.h <<EOF
1711 #define $ac_tr_hdr 1
1715 echo "$ac_t""no" 1>&6
1719 for ac_hdr in malloc.h
1721 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1722 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1723 echo "configure:1724: checking for $ac_hdr" >&5
1724 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1725 echo $ac_n "(cached) $ac_c" 1>&6
1727 cat > conftest.$ac_ext <<EOF
1728 #line 1729 "configure"
1729 #include "confdefs.h"
1732 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1733 { (eval echo configure:1734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1734 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1735 if test -z "$ac_err"; then
1737 eval "ac_cv_header_$ac_safe=yes"
1740 echo "configure: failed program was:" >&5
1741 cat conftest.$ac_ext >&5
1743 eval "ac_cv_header_$ac_safe=no"
1747 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1748 echo "$ac_t""yes" 1>&6
1749 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1750 cat >> confdefs.h <<EOF
1751 #define $ac_tr_hdr 1
1755 echo "$ac_t""no" 1>&6
1759 for ac_hdr in sys/isa_defs.h
1761 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1762 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1763 echo "configure:1764: checking for $ac_hdr" >&5
1764 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1765 echo $ac_n "(cached) $ac_c" 1>&6
1767 cat > conftest.$ac_ext <<EOF
1768 #line 1769 "configure"
1769 #include "confdefs.h"
1772 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1773 { (eval echo configure:1774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1774 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1775 if test -z "$ac_err"; then
1777 eval "ac_cv_header_$ac_safe=yes"
1780 echo "configure: failed program was:" >&5
1781 cat conftest.$ac_ext >&5
1783 eval "ac_cv_header_$ac_safe=no"
1787 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1788 echo "$ac_t""yes" 1>&6
1789 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1790 cat >> confdefs.h <<EOF
1791 #define $ac_tr_hdr 1
1795 echo "$ac_t""no" 1>&6
1799 for ac_hdr in sys/socket.h
1801 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1802 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1803 echo "configure:1804: checking for $ac_hdr" >&5
1804 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1805 echo $ac_n "(cached) $ac_c" 1>&6
1807 cat > conftest.$ac_ext <<EOF
1808 #line 1809 "configure"
1809 #include "confdefs.h"
1812 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1813 { (eval echo configure:1814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1814 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1815 if test -z "$ac_err"; then
1817 eval "ac_cv_header_$ac_safe=yes"
1820 echo "configure: failed program was:" >&5
1821 cat conftest.$ac_ext >&5
1823 eval "ac_cv_header_$ac_safe=no"
1827 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1828 echo "$ac_t""yes" 1>&6
1829 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1830 cat >> confdefs.h <<EOF
1831 #define $ac_tr_hdr 1
1835 echo "$ac_t""no" 1>&6
1840 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1842 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1843 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1844 echo "configure:1845: checking for $ac_hdr that defines DIR" >&5
1845 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1846 echo $ac_n "(cached) $ac_c" 1>&6
1848 cat > conftest.$ac_ext <<EOF
1849 #line 1850 "configure"
1850 #include "confdefs.h"
1851 #include <sys/types.h>
1857 if { (eval echo configure:1858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1859 eval "ac_cv_header_dirent_$ac_safe=yes"
1861 echo "configure: failed program was:" >&5
1862 cat conftest.$ac_ext >&5
1864 eval "ac_cv_header_dirent_$ac_safe=no"
1868 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1869 echo "$ac_t""yes" 1>&6
1870 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1871 cat >> confdefs.h <<EOF
1872 #define $ac_tr_hdr 1
1874 ac_header_dirent=$ac_hdr; break
1876 echo "$ac_t""no" 1>&6
1879 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1880 if test $ac_header_dirent = dirent.h; then
1881 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1882 echo "configure:1883: checking for opendir in -ldir" >&5
1883 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1884 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1885 echo $ac_n "(cached) $ac_c" 1>&6
1887 ac_save_LIBS="$LIBS"
1889 cat > conftest.$ac_ext <<EOF
1890 #line 1891 "configure"
1891 #include "confdefs.h"
1892 /* Override any gcc2 internal prototype to avoid an error. */
1893 /* We use char because int might match the return type of a gcc2
1894 builtin and then its argument prototype would still apply. */
1901 if { (eval echo configure:1902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1903 eval "ac_cv_lib_$ac_lib_var=yes"
1905 echo "configure: failed program was:" >&5
1906 cat conftest.$ac_ext >&5
1908 eval "ac_cv_lib_$ac_lib_var=no"
1911 LIBS="$ac_save_LIBS"
1914 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1915 echo "$ac_t""yes" 1>&6
1918 echo "$ac_t""no" 1>&6
1922 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1923 echo "configure:1924: checking for opendir in -lx" >&5
1924 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1925 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1926 echo $ac_n "(cached) $ac_c" 1>&6
1928 ac_save_LIBS="$LIBS"
1930 cat > conftest.$ac_ext <<EOF
1931 #line 1932 "configure"
1932 #include "confdefs.h"
1933 /* Override any gcc2 internal prototype to avoid an error. */
1934 /* We use char because int might match the return type of a gcc2
1935 builtin and then its argument prototype would still apply. */
1942 if { (eval echo configure:1943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1944 eval "ac_cv_lib_$ac_lib_var=yes"
1946 echo "configure: failed program was:" >&5
1947 cat conftest.$ac_ext >&5
1949 eval "ac_cv_lib_$ac_lib_var=no"
1952 LIBS="$ac_save_LIBS"
1955 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1956 echo "$ac_t""yes" 1>&6
1959 echo "$ac_t""no" 1>&6
1965 # This must be after CPP
1967 echo $ac_n "checking which header file defines FD_ macros""... $ac_c" 1>&6
1968 echo "configure:1969: checking which header file defines FD_ macros" >&5
1969 if eval "test \"`echo '$''{'s51_cv_fd'+set}'`\" = set"; then
1970 echo $ac_n "(cached) $ac_c" 1>&6
1972 sdcc_cv_fd="unknown"
1973 cat > conftest.$ac_ext <<EOF
1974 #line 1975 "configure"
1975 #include "confdefs.h"
1977 #include <sys/time.h>
1982 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1983 egrep "yes" >/dev/null 2>&1; then
1985 sdcc_cv_fd="<sys/time.h>"
1989 cat > conftest.$ac_ext <<EOF
1990 #line 1991 "configure"
1991 #include "confdefs.h"
1993 #include <sys/types.h>
1998 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1999 egrep "yes" >/dev/null 2>&1; then
2001 sdcc_cv_fd="<sys/types.h>"
2005 cat > conftest.$ac_ext <<EOF
2006 #line 2007 "configure"
2007 #include "confdefs.h"
2009 #include <sys/select.h>
2014 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2015 egrep "yes" >/dev/null 2>&1; then
2017 sdcc_cv_fd="<sys/types.h>"
2023 echo "$ac_t""$s51_cv_fd" 1>&6
2025 cat >> confdefs.h <<\EOF
2026 #define FD_HEADER_OK 0
2029 if echo $sdcc_cv_fd|grep time >/dev/null 2>&1; then
2030 cat >> confdefs.h <<\EOF
2031 #define FD_NEED_TIME_H 1
2034 cat >> confdefs.h <<\EOF
2035 #define FD_HEADER_OK 1
2039 cat >> confdefs.h <<\EOF
2040 #define FD_NEED_TIME_H 0
2044 if echo $sdcc_cv_fd|grep types >/dev/null 2>&1; then
2045 cat >> confdefs.h <<\EOF
2046 #define FD_NEED_TYPES_H 1
2049 cat >> confdefs.h <<\EOF
2050 #define FD_HEADER_OK 1
2054 cat >> confdefs.h <<\EOF
2055 #define FD_NEED_TYPES_H 0
2059 if echo $sdcc_cv_fd|grep select >/dev/null 2>&1; then
2060 cat >> confdefs.h <<\EOF
2061 #define FD_NEED_SELECT_H 1
2064 cat >> confdefs.h <<\EOF
2065 #define FD_HEADER_OK 1
2069 cat >> confdefs.h <<\EOF
2070 #define FD_NEED_SELECT_H 0
2075 cat >> confdefs.h <<EOF
2076 #define HEADER_FD ${sdcc_cv_fd}
2081 # Checking for functions
2082 # ===========================================================================
2083 for ac_func in strlen strcpy strcat strstr strcmp strerror strtok strdup
2085 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2086 echo "configure:2087: checking for $ac_func" >&5
2087 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2088 echo $ac_n "(cached) $ac_c" 1>&6
2090 cat > conftest.$ac_ext <<EOF
2091 #line 2092 "configure"
2092 #include "confdefs.h"
2093 /* System header to define __stub macros and hopefully few prototypes,
2094 which can conflict with char $ac_func(); below. */
2096 /* Override any gcc2 internal prototype to avoid an error. */
2097 /* We use char because int might match the return type of a gcc2
2098 builtin and then its argument prototype would still apply. */
2103 /* The GNU C library defines this for functions which it implements
2104 to always fail with ENOSYS. Some functions are actually named
2105 something starting with __ and the normal name is an alias. */
2106 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2114 if { (eval echo configure:2115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2116 eval "ac_cv_func_$ac_func=yes"
2118 echo "configure: failed program was:" >&5
2119 cat conftest.$ac_ext >&5
2121 eval "ac_cv_func_$ac_func=no"
2126 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2127 echo "$ac_t""yes" 1>&6
2128 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2129 cat >> confdefs.h <<EOF
2130 #define $ac_tr_func 1
2134 echo "$ac_t""no" 1>&6
2138 for ac_func in strchr memcpy
2140 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2141 echo "configure:2142: checking for $ac_func" >&5
2142 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2143 echo $ac_n "(cached) $ac_c" 1>&6
2145 cat > conftest.$ac_ext <<EOF
2146 #line 2147 "configure"
2147 #include "confdefs.h"
2148 /* System header to define __stub macros and hopefully few prototypes,
2149 which can conflict with char $ac_func(); below. */
2151 /* Override any gcc2 internal prototype to avoid an error. */
2152 /* We use char because int might match the return type of a gcc2
2153 builtin and then its argument prototype would still apply. */
2158 /* The GNU C library defines this for functions which it implements
2159 to always fail with ENOSYS. Some functions are actually named
2160 something starting with __ and the normal name is an alias. */
2161 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2169 if { (eval echo configure:2170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2171 eval "ac_cv_func_$ac_func=yes"
2173 echo "configure: failed program was:" >&5
2174 cat conftest.$ac_ext >&5
2176 eval "ac_cv_func_$ac_func=no"
2181 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2182 echo "$ac_t""yes" 1>&6
2183 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2184 cat >> confdefs.h <<EOF
2185 #define $ac_tr_func 1
2189 echo "$ac_t""no" 1>&6
2193 for ac_func in fgets
2195 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2196 echo "configure:2197: checking for $ac_func" >&5
2197 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2198 echo $ac_n "(cached) $ac_c" 1>&6
2200 cat > conftest.$ac_ext <<EOF
2201 #line 2202 "configure"
2202 #include "confdefs.h"
2203 /* System header to define __stub macros and hopefully few prototypes,
2204 which can conflict with char $ac_func(); below. */
2206 /* Override any gcc2 internal prototype to avoid an error. */
2207 /* We use char because int might match the return type of a gcc2
2208 builtin and then its argument prototype would still apply. */
2213 /* The GNU C library defines this for functions which it implements
2214 to always fail with ENOSYS. Some functions are actually named
2215 something starting with __ and the normal name is an alias. */
2216 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2224 if { (eval echo configure:2225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2226 eval "ac_cv_func_$ac_func=yes"
2228 echo "configure: failed program was:" >&5
2229 cat conftest.$ac_ext >&5
2231 eval "ac_cv_func_$ac_func=no"
2236 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2237 echo "$ac_t""yes" 1>&6
2238 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2239 cat >> confdefs.h <<EOF
2240 #define $ac_tr_func 1
2244 echo "$ac_t""no" 1>&6
2248 for ac_func in yylex
2250 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2251 echo "configure:2252: checking for $ac_func" >&5
2252 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2253 echo $ac_n "(cached) $ac_c" 1>&6
2255 cat > conftest.$ac_ext <<EOF
2256 #line 2257 "configure"
2257 #include "confdefs.h"
2258 /* System header to define __stub macros and hopefully few prototypes,
2259 which can conflict with char $ac_func(); below. */
2261 /* Override any gcc2 internal prototype to avoid an error. */
2262 /* We use char because int might match the return type of a gcc2
2263 builtin and then its argument prototype would still apply. */
2268 /* The GNU C library defines this for functions which it implements
2269 to always fail with ENOSYS. Some functions are actually named
2270 something starting with __ and the normal name is an alias. */
2271 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2279 if { (eval echo configure:2280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2281 eval "ac_cv_func_$ac_func=yes"
2283 echo "configure: failed program was:" >&5
2284 cat conftest.$ac_ext >&5
2286 eval "ac_cv_func_$ac_func=no"
2291 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2292 echo "$ac_t""yes" 1>&6
2293 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2294 cat >> confdefs.h <<EOF
2295 #define $ac_tr_func 1
2299 echo "$ac_t""no" 1>&6
2304 # check if -lsocket && -lxnet is required to compile socket stuff
2306 echo $ac_n "checking for library containing socket""... $ac_c" 1>&6
2307 echo "configure:2308: checking for library containing socket" >&5
2308 if eval "test \"`echo '$''{'ac_cv_search_socket'+set}'`\" = set"; then
2309 echo $ac_n "(cached) $ac_c" 1>&6
2311 ac_func_search_save_LIBS="$LIBS"
2312 ac_cv_search_socket="no"
2313 cat > conftest.$ac_ext <<EOF
2314 #line 2315 "configure"
2315 #include "confdefs.h"
2316 /* Override any gcc2 internal prototype to avoid an error. */
2317 /* We use char because int might match the return type of a gcc2
2318 builtin and then its argument prototype would still apply. */
2325 if { (eval echo configure:2326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2327 ac_cv_search_socket="none required"
2329 echo "configure: failed program was:" >&5
2330 cat conftest.$ac_ext >&5
2333 test "$ac_cv_search_socket" = "no" && for i in socket; do
2334 LIBS="-l$i $ac_func_search_save_LIBS"
2335 cat > conftest.$ac_ext <<EOF
2336 #line 2337 "configure"
2337 #include "confdefs.h"
2338 /* Override any gcc2 internal prototype to avoid an error. */
2339 /* We use char because int might match the return type of a gcc2
2340 builtin and then its argument prototype would still apply. */
2347 if { (eval echo configure:2348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2349 ac_cv_search_socket="-l$i"
2352 echo "configure: failed program was:" >&5
2353 cat conftest.$ac_ext >&5
2357 LIBS="$ac_func_search_save_LIBS"
2360 echo "$ac_t""$ac_cv_search_socket" 1>&6
2361 if test "$ac_cv_search_socket" != "no"; then
2362 test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
2368 echo $ac_n "checking for library containing inet_addr""... $ac_c" 1>&6
2369 echo "configure:2370: checking for library containing inet_addr" >&5
2370 if eval "test \"`echo '$''{'ac_cv_search_inet_addr'+set}'`\" = set"; then
2371 echo $ac_n "(cached) $ac_c" 1>&6
2373 ac_func_search_save_LIBS="$LIBS"
2374 ac_cv_search_inet_addr="no"
2375 cat > conftest.$ac_ext <<EOF
2376 #line 2377 "configure"
2377 #include "confdefs.h"
2378 /* Override any gcc2 internal prototype to avoid an error. */
2379 /* We use char because int might match the return type of a gcc2
2380 builtin and then its argument prototype would still apply. */
2387 if { (eval echo configure:2388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2389 ac_cv_search_inet_addr="none required"
2391 echo "configure: failed program was:" >&5
2392 cat conftest.$ac_ext >&5
2395 test "$ac_cv_search_inet_addr" = "no" && for i in nsl xnet; do
2396 LIBS="-l$i $ac_func_search_save_LIBS"
2397 cat > conftest.$ac_ext <<EOF
2398 #line 2399 "configure"
2399 #include "confdefs.h"
2400 /* Override any gcc2 internal prototype to avoid an error. */
2401 /* We use char because int might match the return type of a gcc2
2402 builtin and then its argument prototype would still apply. */
2409 if { (eval echo configure:2410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2411 ac_cv_search_inet_addr="-l$i"
2414 echo "configure: failed program was:" >&5
2415 cat conftest.$ac_ext >&5
2419 LIBS="$ac_func_search_save_LIBS"
2422 echo "$ac_t""$ac_cv_search_inet_addr" 1>&6
2423 if test "$ac_cv_search_inet_addr" != "no"; then
2424 test "$ac_cv_search_inet_addr" = "none required" || LIBS="$ac_cv_search_inet_addr $LIBS"
2433 # DD_COPT macro checks if the compiler specified as the 1st parameter
2434 # supports option specified as the 2nd parameter
2435 # For example: DD_CPORT(CXX, fPIC)
2440 # Checking characteristics of compilers and other programs
2441 # --------------------------------------------------------
2442 echo $ac_n "checking whether preprocessor accepts -MM or -M""... $ac_c" 1>&6
2443 echo "configure:2444: checking whether preprocessor accepts -MM or -M" >&5
2444 if eval "test \"`echo '$''{'sdcc_cv_MM'+set}'`\" = set"; then
2445 echo $ac_n "(cached) $ac_c" 1>&6
2447 echo "#include <stdio.h>" >_test_.c
2449 $CPP -v -MM _test_.c 1>&5 2>&5
2450 if test "$?" = "0"; then
2458 echo "$ac_t""$sdcc_cv_MM" 1>&6
2462 # This is the first time when CFLAGS are set/modified!!
2464 echo $ac_n "checking whether $CC accepts -ggdb""... $ac_c" 1>&6
2465 echo "configure:2466: checking whether $CC accepts -ggdb" >&5
2466 if eval "test \"`echo '$''{'sdcc_cv_CCggdb'+set}'`\" = set"; then
2467 echo $ac_n "(cached) $ac_c" 1>&6
2473 $CC -v -ggdb -c _test_.c 1>&5 2>&5
2474 if test "$?" = "0"; then
2475 sdcc_cv_CCggdb="yes"
2479 rm -f _test_.* a.out
2482 echo "$ac_t""$sdcc_cv_CCggdb" 1>&6
2484 if test "$sdcc_cv_CCggdb" = "yes"; then
2489 echo $ac_n "checking whether $CC accepts -pipe""... $ac_c" 1>&6
2490 echo "configure:2491: checking whether $CC accepts -pipe" >&5
2491 if eval "test \"`echo '$''{'sdcc_cv_CCpipe'+set}'`\" = set"; then
2492 echo $ac_n "(cached) $ac_c" 1>&6
2498 $CC -v -pipe -c _test_.c 1>&5 2>&5
2499 if test "$?" = "0"; then
2500 sdcc_cv_CCpipe="yes"
2504 rm -f _test_.* a.out
2507 echo "$ac_t""$sdcc_cv_CCpipe" 1>&6
2509 if test "$sdcc_cv_CCpipe" = "yes"; then
2510 CFLAGS="$CFLAGS -pipe"
2514 # Checks for typedefs, structures, and compiler characteristics.
2515 # ===========================================================================
2516 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2517 echo "configure:2518: checking return type of signal handlers" >&5
2518 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2519 echo $ac_n "(cached) $ac_c" 1>&6
2521 cat > conftest.$ac_ext <<EOF
2522 #line 2523 "configure"
2523 #include "confdefs.h"
2524 #include <sys/types.h>
2530 extern "C" void (*signal (int, void (*)(int)))(int);
2532 void (*signal ()) ();
2539 if { (eval echo configure:2540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2541 ac_cv_type_signal=void
2543 echo "configure: failed program was:" >&5
2544 cat conftest.$ac_ext >&5
2546 ac_cv_type_signal=int
2551 echo "$ac_t""$ac_cv_type_signal" 1>&6
2552 cat >> confdefs.h <<EOF
2553 #define RETSIGTYPE $ac_cv_type_signal
2560 if test "${prefix}" = "NONE"; then
2565 sdcc_datadir=${datadir}/sdcc
2568 # For some unknown reason, putting this assignment in a subshell
2569 # like this causes the rvalue to be fully substituted. We need this
2570 # for the defines below to generate the right thing. We keep this
2571 # separate from the substituted sdcc_datadir because we want the
2572 # latter for makefiles.
2573 if test "${datadir}" = "\${prefix}/share"; then
2574 sdcc_datadir_tmp=${prefix}/share/sdcc
2576 sdcc_datadir_tmp=${datadir}/sdcc
2580 cat >> confdefs.h <<EOF
2581 #define STANDARD_INCLUDE_DIR "${sdcc_datadir_tmp}/include"
2584 cat >> confdefs.h <<EOF
2585 #define SDCC_INCLUDE_DIR "${sdcc_datadir_tmp}/include"
2588 cat >> confdefs.h <<EOF
2589 #define SDCC_LIB_DIR "${sdcc_datadir_tmp}/lib"
2592 cat >> confdefs.h <<EOF
2593 #define STD_LIB "libsdcc"
2596 cat >> confdefs.h <<EOF
2597 #define STD_INT_LIB "libint"
2600 cat >> confdefs.h <<EOF
2601 #define STD_LONG_LIB "liblong"
2604 cat >> confdefs.h <<EOF
2605 #define STD_FP_LIB "libfloat"
2608 cat >> confdefs.h <<EOF
2609 #define STD_DS390_LIB "libds390"
2613 cat >> confdefs.h <<EOF
2614 #define PREFIX "${prefix}"
2617 cat >> confdefs.h <<EOF
2618 #define DATADIR "${sdcc_datadir_tmp}"
2621 cat >> confdefs.h <<EOF
2622 #define SRCDIR "${config_in}"
2628 # Now handle the port selection
2629 rm -f ports.all ports.build
2630 # Check whether --enable-mcs51-port or --disable-mcs51-port was given.
2631 if test "${enable_mcs51_port+set}" = set; then
2632 enableval="$enable_mcs51_port"
2636 echo mcs51 >>ports.all
2637 if test "$enable_mcs51_port" = "no"; then
2638 cat >> confdefs.h <<EOF
2639 #define OPT_DISABLE_MCS51 1
2643 echo mcs51 >>ports.build
2644 cat >> confdefs.h <<EOF
2645 #define OPT_DISABLE_MCS51 0
2650 # Check whether --enable-gbz80-port or --disable-gbz80-port was given.
2651 if test "${enable_gbz80_port+set}" = set; then
2652 enableval="$enable_gbz80_port"
2656 echo z80 >>ports.all
2657 if test "$enable_gbz80_port" = "no"; then
2658 cat >> confdefs.h <<EOF
2659 #define OPT_DISABLE_GBZ80 1
2663 echo z80 >>ports.build
2664 cat >> confdefs.h <<EOF
2665 #define OPT_DISABLE_GBZ80 0
2670 # Check whether --enable-z80-port or --disable-z80-port was given.
2671 if test "${enable_z80_port+set}" = set; then
2672 enableval="$enable_z80_port"
2676 echo z80 >>ports.all
2677 if test "$enable_z80_port" = "no"; then
2678 cat >> confdefs.h <<EOF
2679 #define OPT_DISABLE_Z80 1
2683 echo z80 >>ports.build
2684 cat >> confdefs.h <<EOF
2685 #define OPT_DISABLE_Z80 0
2690 # Check whether --enable-avr-port or --disable-avr-port was given.
2691 if test "${enable_avr_port+set}" = set; then
2692 enableval="$enable_avr_port"
2696 echo avr >>ports.all
2697 if test "$enable_avr_port" = "no"; then
2698 cat >> confdefs.h <<EOF
2699 #define OPT_DISABLE_AVR 1
2703 echo avr >>ports.build
2704 cat >> confdefs.h <<EOF
2705 #define OPT_DISABLE_AVR 0
2710 # Check whether --enable-ds390-port or --disable-ds390-port was given.
2711 if test "${enable_ds390_port+set}" = set; then
2712 enableval="$enable_ds390_port"
2716 echo ds390 >>ports.all
2717 if test "$enable_ds390_port" = "no"; then
2718 cat >> confdefs.h <<EOF
2719 #define OPT_DISABLE_DS390 1
2723 echo ds390 >>ports.build
2724 cat >> confdefs.h <<EOF
2725 #define OPT_DISABLE_DS390 0
2730 # Check whether --enable-pic-port or --disable-pic-port was given.
2731 if test "${enable_pic_port+set}" = set; then
2732 enableval="$enable_pic_port"
2736 echo pic >>ports.all
2737 if test "$enable_pic_port" = "no"; then
2738 cat >> confdefs.h <<EOF
2739 #define OPT_DISABLE_PIC 1
2743 echo pic >>ports.build
2744 cat >> confdefs.h <<EOF
2745 #define OPT_DISABLE_PIC 0
2750 # Check whether --enable-i186-port or --disable-i186-port was given.
2751 if test "${enable_i186_port+set}" = set; then
2752 enableval="$enable_i186_port"
2756 echo izt >>ports.all
2757 if test "$enable_i186_port" = "no"; then
2758 cat >> confdefs.h <<EOF
2759 #define OPT_DISABLE_I186 1
2763 echo izt >>ports.build
2764 cat >> confdefs.h <<EOF
2765 #define OPT_DISABLE_I186 0
2770 # Check whether --enable-tlcs900h-port or --disable-tlcs900h-port was given.
2771 if test "${enable_tlcs900h_port+set}" = set; then
2772 enableval="$enable_tlcs900h_port"
2776 echo izt >>ports.all
2777 if test "$enable_tlcs900h_port" = "no"; then
2778 cat >> confdefs.h <<EOF
2779 #define OPT_DISABLE_TLCS900H 1
2783 echo izt >>ports.build
2784 cat >> confdefs.h <<EOF
2785 #define OPT_DISABLE_TLCS900H 0
2790 # Check whether --enable-ucsim or --disable-ucsim was given.
2791 if test "${enable_ucsim+set}" = set; then
2792 enableval="$enable_ucsim"
2796 OPT_ENABLE_UCSIM=$enable_ucsim
2799 # Check whether --enable-device-lib-build or --disable-device-lib-build was given.
2800 if test "${enable_device_lib_build+set}" = set; then
2801 enableval="$enable_device_lib_build"
2805 OPT_ENABLE_DEVICE_LIB_BUILD=$enable_device_lib_build
2808 # Check whether --enable-packihx or --disable-packihx was given.
2809 if test "${enable_packihx+set}" = set; then
2810 enableval="$enable_packihx"
2814 OPT_ENABLE_PACKIHX=$enable_packihx
2817 # Check whether --enable-libgc or --disable-libgc was given.
2818 if test "${enable_libgc+set}" = set; then
2819 enableval="$enable_libgc"
2823 if test "$enable_libgc" = "yes"; then
2824 echo $ac_n "checking for GC_malloc in -lgc""... $ac_c" 1>&6
2825 echo "configure:2826: checking for GC_malloc in -lgc" >&5
2826 ac_lib_var=`echo gc'_'GC_malloc | sed 'y%./+-%__p_%'`
2827 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2828 echo $ac_n "(cached) $ac_c" 1>&6
2830 ac_save_LIBS="$LIBS"
2832 cat > conftest.$ac_ext <<EOF
2833 #line 2834 "configure"
2834 #include "confdefs.h"
2835 /* Override any gcc2 internal prototype to avoid an error. */
2836 /* We use char because int might match the return type of a gcc2
2837 builtin and then its argument prototype would still apply. */
2844 if { (eval echo configure:2845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2846 eval "ac_cv_lib_$ac_lib_var=yes"
2848 echo "configure: failed program was:" >&5
2849 cat conftest.$ac_ext >&5
2851 eval "ac_cv_lib_$ac_lib_var=no"
2854 LIBS="$ac_save_LIBS"
2857 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2858 echo "$ac_t""yes" 1>&6
2859 ac_tr_lib=HAVE_LIB`echo gc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2860 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2861 cat >> confdefs.h <<EOF
2862 #define $ac_tr_lib 1
2868 echo "$ac_t""no" 1>&6
2875 cat >> confdefs.h <<EOF
2876 #define OPT_ENABLE_LIBGC $OPT_ENABLE_LIBGC
2881 cat ports.all | uniq >ports
2883 cat ports.build | uniq >ports
2884 mv ports ports.build
2886 # Generating output files
2887 # ===========================================================================
2888 subdirs="support/cpp2"
2890 subdirs="support/cpp2 packihx"
2892 subdirs="support/cpp2 packihx sim/ucsim"
2894 # MLH: removed as the rules are already in Makefile.common
2898 cat > confcache <<\EOF
2899 # This file is a shell script that caches the results of configure
2900 # tests run on this system so they can be shared between configure
2901 # scripts and configure runs. It is not useful on other systems.
2902 # If it contains results you don't want to keep, you may remove or edit it.
2904 # By default, configure uses ./config.cache as the cache file,
2905 # creating it if it does not exist already. You can give configure
2906 # the --cache-file=FILE option to use a different cache file; that is
2907 # what configure does when it calls configure scripts in
2908 # subdirectories, so they share the cache.
2909 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2910 # config.status only pays attention to the cache file if you give it the
2911 # --recheck option to rerun configure.
2914 # The following way of writing the cache mishandles newlines in values,
2915 # but we know of no workaround that is simple, portable, and efficient.
2916 # So, don't put newlines in cache variables' values.
2917 # Ultrix sh set writes to stderr and can't be redirected directly,
2918 # and sets the high bit in the cache file unless we assign to the vars.
2920 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2922 # `set' does not quote correctly, so add quotes (double-quote substitution
2923 # turns \\\\ into \\, and sed turns \\ into \).
2925 -e "s/'/'\\\\''/g" \
2926 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2929 # `set' quotes correctly as required by POSIX, so do not add quotes.
2930 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2933 if cmp -s $cache_file confcache; then
2936 if test -w $cache_file; then
2937 echo "updating cache $cache_file"
2938 cat confcache > $cache_file
2940 echo "not updating unwritable cache $cache_file"
2945 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2947 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2948 # Let make expand exec_prefix.
2949 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2951 # Any assignment to VPATH causes Sun make to only execute
2952 # the first set of double-colon rules, so remove it if not needed.
2953 # If there is a colon in the path, we need to keep it.
2954 if test "x$srcdir" = x.; then
2955 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2958 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2960 DEFS=-DHAVE_CONFIG_H
2962 # Without the "./", some shells look in PATH for config.status.
2963 : ${CONFIG_STATUS=./config.status}
2965 echo creating $CONFIG_STATUS
2966 rm -f $CONFIG_STATUS
2967 cat > $CONFIG_STATUS <<EOF
2969 # Generated automatically by configure.
2970 # Run this file to recreate the current configuration.
2971 # This directory was configured as follows,
2972 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2974 # $0 $ac_configure_args
2976 # Compiler output produced by configure, useful for debugging
2977 # configure, is in ./config.log if it exists.
2979 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2982 case "\$ac_option" in
2983 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2984 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2985 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2986 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2987 echo "$CONFIG_STATUS generated by autoconf version 2.13"
2989 -help | --help | --hel | --he | --h)
2990 echo "\$ac_cs_usage"; exit 0 ;;
2991 *) echo "\$ac_cs_usage"; exit 1 ;;
2995 ac_given_srcdir=$srcdir
2996 ac_given_INSTALL="$INSTALL"
2998 trap 'rm -fr `echo "main.mk:main_in.mk
3001 device/include/Makefile
3003 debugger/mcs51/Makefile
3004 Makefile.common:Makefile.common.in
3005 sdccconf.h:sdccconf_in.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3007 cat >> $CONFIG_STATUS <<EOF
3009 # Protect against being on the right side of a sed subst in config.status.
3010 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3011 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3015 s%@CFLAGS@%$CFLAGS%g
3016 s%@CPPFLAGS@%$CPPFLAGS%g
3017 s%@CXXFLAGS@%$CXXFLAGS%g
3018 s%@FFLAGS@%$FFLAGS%g
3020 s%@LDFLAGS@%$LDFLAGS%g
3022 s%@exec_prefix@%$exec_prefix%g
3023 s%@prefix@%$prefix%g
3024 s%@program_transform_name@%$program_transform_name%g
3025 s%@bindir@%$bindir%g
3026 s%@sbindir@%$sbindir%g
3027 s%@libexecdir@%$libexecdir%g
3028 s%@datadir@%$datadir%g
3029 s%@sysconfdir@%$sysconfdir%g
3030 s%@sharedstatedir@%$sharedstatedir%g
3031 s%@localstatedir@%$localstatedir%g
3032 s%@libdir@%$libdir%g
3033 s%@includedir@%$includedir%g
3034 s%@oldincludedir@%$oldincludedir%g
3035 s%@infodir@%$infodir%g
3036 s%@mandir@%$mandir%g
3038 s%@VERSION@%$VERSION%g
3039 s%@VERSIONHI@%$VERSIONHI%g
3040 s%@VERSIONLO@%$VERSIONLO%g
3041 s%@VERSIONP@%$VERSIONP%g
3045 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3046 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3047 s%@INSTALL_DATA@%$INSTALL_DATA%g
3048 s%@RANLIB@%$RANLIB%g
3050 s%@LEXLIB@%$LEXLIB%g
3052 s%@AUTOCONF@%$AUTOCONF%g
3056 s%@M_OR_MM@%$M_OR_MM%g
3057 s%@sdcc_datadir@%$sdcc_datadir%g
3058 s%@OPT_ENABLE_UCSIM@%$OPT_ENABLE_UCSIM%g
3059 s%@OPT_ENABLE_DEVICE_LIB_BUILD@%$OPT_ENABLE_DEVICE_LIB_BUILD%g
3060 s%@OPT_ENABLE_PACKIHX@%$OPT_ENABLE_PACKIHX%g
3061 s%@subdirs@%$subdirs%g
3066 cat >> $CONFIG_STATUS <<\EOF
3068 # Split the substitutions into bite-sized pieces for seds with
3069 # small command number limits, like on Digital OSF/1 and HP-UX.
3070 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3071 ac_file=1 # Number of current file.
3072 ac_beg=1 # First line for current file.
3073 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3076 while $ac_more_lines; do
3077 if test $ac_beg -gt 1; then
3078 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3080 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3082 if test ! -s conftest.s$ac_file; then
3084 rm -f conftest.s$ac_file
3086 if test -z "$ac_sed_cmds"; then
3087 ac_sed_cmds="sed -f conftest.s$ac_file"
3089 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3091 ac_file=`expr $ac_file + 1`
3093 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3096 if test -z "$ac_sed_cmds"; then
3101 cat >> $CONFIG_STATUS <<EOF
3103 CONFIG_FILES=\${CONFIG_FILES-"main.mk:main_in.mk
3106 device/include/Makefile
3108 debugger/mcs51/Makefile
3109 Makefile.common:Makefile.common.in
3112 cat >> $CONFIG_STATUS <<\EOF
3113 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3114 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3116 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3117 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3118 *) ac_file_in="${ac_file}.in" ;;
3121 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3123 # Remove last slash and all that follows it. Not all systems have dirname.
3124 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3125 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3126 # The file is in a subdirectory.
3127 test ! -d "$ac_dir" && mkdir "$ac_dir"
3128 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3129 # A "../" for each directory in $ac_dir_suffix.
3130 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3132 ac_dir_suffix= ac_dots=
3135 case "$ac_given_srcdir" in
3137 if test -z "$ac_dots"; then top_srcdir=.
3138 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3139 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3141 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3142 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3145 case "$ac_given_INSTALL" in
3146 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3147 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3150 echo creating "$ac_file"
3152 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3154 *Makefile*) ac_comsub="1i\\
3155 # $configure_input" ;;
3159 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3161 s%@configure_input@%$configure_input%g
3162 s%@srcdir@%$srcdir%g
3163 s%@top_srcdir@%$top_srcdir%g
3164 s%@INSTALL@%$INSTALL%g
3165 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3169 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3170 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3172 # ac_d sets the value in "#define NAME VALUE" lines.
3173 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3174 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3177 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3178 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3179 ac_uB='\([ ]\)%\1#\2define\3'
3182 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3183 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3184 ac_eB='$%\1#\2define\3'
3188 if test "${CONFIG_HEADERS+set}" != set; then
3190 cat >> $CONFIG_STATUS <<EOF
3191 CONFIG_HEADERS="sdccconf.h:sdccconf_in.h"
3193 cat >> $CONFIG_STATUS <<\EOF
3195 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3196 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3198 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3199 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3200 *) ac_file_in="${ac_file}.in" ;;
3203 echo creating $ac_file
3205 rm -f conftest.frag conftest.in conftest.out
3206 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3207 cat $ac_file_inputs > conftest.in
3211 # Transform confdefs.h into a sed script conftest.vals that substitutes
3212 # the proper values into config.h.in to produce config.h. And first:
3213 # Protect against being on the right side of a sed subst in config.status.
3214 # Protect against being in an unquoted here document in config.status.
3216 cat > conftest.hdr <<\EOF
3219 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3223 sed -n -f conftest.hdr confdefs.h > conftest.vals
3226 # This sed command replaces #undef with comments. This is necessary, for
3227 # example, in the case of _POSIX_SOURCE, which is predefined and required
3228 # on some systems where configure will not decide to define it.
3229 cat >> conftest.vals <<\EOF
3230 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3233 # Break up conftest.vals because some shells have a limit on
3234 # the size of here documents, and old seds have small limits too.
3239 ac_lines=`grep -c . conftest.vals`
3240 # grep -c gives empty output for an empty file on some AIX systems.
3241 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3242 # Write a limited-size here document to conftest.frag.
3243 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3244 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3246 sed -f conftest.frag conftest.in > conftest.out
3248 mv conftest.out conftest.in
3250 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3252 mv conftest.tail conftest.vals
3256 cat >> $CONFIG_STATUS <<\EOF
3257 rm -f conftest.frag conftest.h
3258 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3259 cat conftest.in >> conftest.h
3261 if cmp -s $ac_file conftest.h 2>/dev/null; then
3262 echo "$ac_file is unchanged"
3265 # Remove last slash and all that follows it. Not all systems have dirname.
3266 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3267 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3268 # The file is in a subdirectory.
3269 test ! -d "$ac_dir" && mkdir "$ac_dir"
3272 mv conftest.h $ac_file
3277 cat >> $CONFIG_STATUS <<EOF
3280 cat >> $CONFIG_STATUS <<\EOF
3284 chmod +x $CONFIG_STATUS
3285 rm -fr confdefs* $ac_clean_files
3286 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3288 if test "$no_recursion" != yes; then
3290 # Remove --cache-file and --srcdir arguments so they do not pile up.
3291 ac_sub_configure_args=
3293 for ac_arg in $ac_configure_args; do
3294 if test -n "$ac_prev"; then
3299 -cache-file | --cache-file | --cache-fil | --cache-fi \
3300 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
3301 ac_prev=cache_file ;;
3302 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
3303 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
3305 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
3307 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
3309 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
3313 for ac_config_dir in support/cpp2 packihx sim/ucsim; do
3315 # Do not complain, so a configure script can configure whichever
3316 # parts of a large source tree are present.
3317 if test ! -d $srcdir/$ac_config_dir; then
3321 echo configuring in $ac_config_dir
3326 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
3328 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
3336 # A "../" for each directory in /$ac_config_dir.
3337 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
3340 .) # No --srcdir option. We are building in place.
3341 ac_sub_srcdir=$srcdir ;;
3342 /*) # Absolute path.
3343 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
3345 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
3348 # Check for guested configure; otherwise get Cygnus style configure.
3349 if test -f $ac_sub_srcdir/configure; then
3350 ac_sub_configure=$ac_sub_srcdir/configure
3351 elif test -f $ac_sub_srcdir/configure.in; then
3352 ac_sub_configure=$ac_configure
3354 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
3358 # The recursion is here.
3359 if test -n "$ac_sub_configure"; then
3361 # Make the cache file name correct relative to the subdirectory.
3362 case "$cache_file" in
3363 /*) ac_sub_cache_file=$cache_file ;;
3365 ac_sub_cache_file="$ac_dots$cache_file" ;;
3367 case "$ac_given_INSTALL" in
3368 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3369 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3372 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
3373 # The eval makes quoting arguments work.
3374 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
3377 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
3386 # End of configure/configure.in