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 # Initialize some variables set by options.
32 # The variables have the same names as the options, with
33 # dashes changed to underlines.
35 cache_file=./config.cache
44 program_transform_name=s,x,x,
52 bindir='${exec_prefix}/bin'
53 sbindir='${exec_prefix}/sbin'
54 libexecdir='${exec_prefix}/libexec'
55 datadir='${prefix}/share'
56 sysconfdir='${prefix}/etc'
57 sharedstatedir='${prefix}/com'
58 localstatedir='${prefix}/var'
59 libdir='${exec_prefix}/lib'
60 includedir='${prefix}/include'
61 oldincludedir='/usr/include'
62 infodir='${prefix}/info'
63 mandir='${prefix}/man'
65 # Initialize some other variables.
68 SHELL=${CONFIG_SHELL-/bin/sh}
69 # Maximum number of lines to put in a shell here document.
76 # If the previous option needs an argument, assign it.
77 if test -n "$ac_prev"; then
78 eval "$ac_prev=\$ac_option"
84 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
88 # Accept the important Cygnus configure options, so we can diagnose typos.
92 -bindir | --bindir | --bindi | --bind | --bin | --bi)
94 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
95 bindir="$ac_optarg" ;;
97 -build | --build | --buil | --bui | --bu)
99 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
100 build="$ac_optarg" ;;
102 -cache-file | --cache-file | --cache-fil | --cache-fi \
103 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
104 ac_prev=cache_file ;;
105 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
106 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
107 cache_file="$ac_optarg" ;;
109 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
111 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
113 datadir="$ac_optarg" ;;
115 -disable-* | --disable-*)
116 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
117 # Reject names that are not valid shell variable names.
118 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
119 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
121 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
122 eval "enable_${ac_feature}=no" ;;
124 -enable-* | --enable-*)
125 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
126 # Reject names that are not valid shell variable names.
127 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
128 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
130 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
135 eval "enable_${ac_feature}='$ac_optarg'" ;;
137 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
138 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
139 | --exec | --exe | --ex)
140 ac_prev=exec_prefix ;;
141 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
142 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
143 | --exec=* | --exe=* | --ex=*)
144 exec_prefix="$ac_optarg" ;;
146 -gas | --gas | --ga | --g)
147 # Obsolete; use --with-gas.
150 -help | --help | --hel | --he)
151 # Omit some internal or obsolete options to make the list less imposing.
152 # This message is too long to be a string in the A/UX 3.1 sh.
154 Usage: configure [options] [host]
155 Options: [defaults in brackets after descriptions]
157 --cache-file=FILE cache test results in FILE
158 --help print this message
159 --no-create do not create output files
160 --quiet, --silent do not print \`checking...' messages
161 --version print the version of autoconf that created configure
162 Directory and file names:
163 --prefix=PREFIX install architecture-independent files in PREFIX
165 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
167 --bindir=DIR user executables in DIR [EPREFIX/bin]
168 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
169 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
170 --datadir=DIR read-only architecture-independent data in DIR
172 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
173 --sharedstatedir=DIR modifiable architecture-independent data in DIR
175 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
176 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
177 --includedir=DIR C header files in DIR [PREFIX/include]
178 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
179 --infodir=DIR info documentation in DIR [PREFIX/info]
180 --mandir=DIR man documentation in DIR [PREFIX/man]
181 --srcdir=DIR find the sources in DIR [configure dir or ..]
182 --program-prefix=PREFIX prepend PREFIX to installed program names
183 --program-suffix=SUFFIX append SUFFIX to installed program names
184 --program-transform-name=PROGRAM
185 run sed PROGRAM on installed program names
189 --build=BUILD configure for building on BUILD [BUILD=HOST]
190 --host=HOST configure for HOST [guessed]
191 --target=TARGET configure for TARGET [TARGET=HOST]
192 Features and packages:
193 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
194 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
195 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
196 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
197 --x-includes=DIR X include files are in DIR
198 --x-libraries=DIR X library files are in DIR
200 if test -n "$ac_help"; then
201 echo "--enable and --with options recognized:$ac_help"
205 -host | --host | --hos | --ho)
207 -host=* | --host=* | --hos=* | --ho=*)
210 -includedir | --includedir | --includedi | --included | --include \
211 | --includ | --inclu | --incl | --inc)
212 ac_prev=includedir ;;
213 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
214 | --includ=* | --inclu=* | --incl=* | --inc=*)
215 includedir="$ac_optarg" ;;
217 -infodir | --infodir | --infodi | --infod | --info | --inf)
219 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
220 infodir="$ac_optarg" ;;
222 -libdir | --libdir | --libdi | --libd)
224 -libdir=* | --libdir=* | --libdi=* | --libd=*)
225 libdir="$ac_optarg" ;;
227 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
228 | --libexe | --libex | --libe)
229 ac_prev=libexecdir ;;
230 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
231 | --libexe=* | --libex=* | --libe=*)
232 libexecdir="$ac_optarg" ;;
234 -localstatedir | --localstatedir | --localstatedi | --localstated \
235 | --localstate | --localstat | --localsta | --localst \
236 | --locals | --local | --loca | --loc | --lo)
237 ac_prev=localstatedir ;;
238 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
239 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
240 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
241 localstatedir="$ac_optarg" ;;
243 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
245 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
246 mandir="$ac_optarg" ;;
249 # Obsolete; use --without-fp.
252 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
256 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
257 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
260 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
261 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
262 | --oldin | --oldi | --old | --ol | --o)
263 ac_prev=oldincludedir ;;
264 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
265 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
266 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
267 oldincludedir="$ac_optarg" ;;
269 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
271 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
272 prefix="$ac_optarg" ;;
274 -program-prefix | --program-prefix | --program-prefi | --program-pref \
275 | --program-pre | --program-pr | --program-p)
276 ac_prev=program_prefix ;;
277 -program-prefix=* | --program-prefix=* | --program-prefi=* \
278 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
279 program_prefix="$ac_optarg" ;;
281 -program-suffix | --program-suffix | --program-suffi | --program-suff \
282 | --program-suf | --program-su | --program-s)
283 ac_prev=program_suffix ;;
284 -program-suffix=* | --program-suffix=* | --program-suffi=* \
285 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
286 program_suffix="$ac_optarg" ;;
288 -program-transform-name | --program-transform-name \
289 | --program-transform-nam | --program-transform-na \
290 | --program-transform-n | --program-transform- \
291 | --program-transform | --program-transfor \
292 | --program-transfo | --program-transf \
293 | --program-trans | --program-tran \
294 | --progr-tra | --program-tr | --program-t)
295 ac_prev=program_transform_name ;;
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 program_transform_name="$ac_optarg" ;;
305 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
306 | -silent | --silent | --silen | --sile | --sil)
309 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
311 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
313 sbindir="$ac_optarg" ;;
315 -sharedstatedir | --sharedstatedir | --sharedstatedi \
316 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
317 | --sharedst | --shareds | --shared | --share | --shar \
319 ac_prev=sharedstatedir ;;
320 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
321 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
322 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
324 sharedstatedir="$ac_optarg" ;;
326 -site | --site | --sit)
328 -site=* | --site=* | --sit=*)
331 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
333 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
334 srcdir="$ac_optarg" ;;
336 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
337 | --syscon | --sysco | --sysc | --sys | --sy)
338 ac_prev=sysconfdir ;;
339 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
340 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
341 sysconfdir="$ac_optarg" ;;
343 -target | --target | --targe | --targ | --tar | --ta | --t)
345 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
346 target="$ac_optarg" ;;
348 -v | -verbose | --verbose | --verbos | --verbo | --verb)
351 -version | --version | --versio | --versi | --vers)
352 echo "configure generated by autoconf version 2.13"
356 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
357 # Reject names that are not valid shell variable names.
358 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
359 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
361 ac_package=`echo $ac_package| sed 's/-/_/g'`
366 eval "with_${ac_package}='$ac_optarg'" ;;
368 -without-* | --without-*)
369 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
370 # Reject names that are not valid shell variable names.
371 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
372 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
374 ac_package=`echo $ac_package| sed 's/-/_/g'`
375 eval "with_${ac_package}=no" ;;
378 # Obsolete; use --with-x.
381 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
382 | --x-incl | --x-inc | --x-in | --x-i)
383 ac_prev=x_includes ;;
384 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
385 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
386 x_includes="$ac_optarg" ;;
388 -x-libraries | --x-libraries | --x-librarie | --x-librari \
389 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
390 ac_prev=x_libraries ;;
391 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
392 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
393 x_libraries="$ac_optarg" ;;
395 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
399 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
400 echo "configure: warning: $ac_option: invalid host type" 1>&2
402 if test "x$nonopt" != xNONE; then
403 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
411 if test -n "$ac_prev"; then
412 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
415 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
417 # File descriptor usage:
420 # 2 errors and warnings
421 # 3 some systems may open it to /dev/tty
422 # 4 used on the Kubota Titan
423 # 6 checking for... messages and results
424 # 5 compiler messages saved in config.log
425 if test "$silent" = yes; then
433 This file contains any messages produced by compilers while
434 running configure, to aid debugging if configure makes a mistake.
437 # Strip out --no-create and --no-recursion so they do not pile up.
438 # Also quote any args containing shell metacharacters.
443 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
444 | --no-cr | --no-c) ;;
445 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
446 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
447 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
448 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
449 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
454 # Only set these to C if already set. These must not be set unconditionally
455 # because not all systems understand e.g. LANG=C (notably SCO).
456 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
457 # Non-C LC_CTYPE values break the ctype check.
458 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
459 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
460 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
461 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
463 # confdefs.h avoids OS command line length limits that DEFS can exceed.
464 rm -rf conftest* confdefs.h
465 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
468 # A filename unique to this package, relative to the directory that
469 # configure is in, which we can look for to find out if srcdir is correct.
470 ac_unique_file=Makefile
472 # Find the source files, if location was not specified.
473 if test -z "$srcdir"; then
474 ac_srcdir_defaulted=yes
475 # Try the directory containing this script, then its parent.
477 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
478 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
480 if test ! -r $srcdir/$ac_unique_file; then
484 ac_srcdir_defaulted=no
486 if test ! -r $srcdir/$ac_unique_file; then
487 if test "$ac_srcdir_defaulted" = yes; then
488 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
490 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
493 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
495 # Prefer explicitly selected file to automatically selected ones.
496 if test -z "$CONFIG_SITE"; then
497 if test "x$prefix" != xNONE; then
498 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
500 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
503 for ac_site_file in $CONFIG_SITE; do
504 if test -r "$ac_site_file"; then
505 echo "loading site script $ac_site_file"
510 if test -r "$cache_file"; then
511 echo "loading cache $cache_file"
514 echo "creating cache $cache_file"
519 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
520 ac_cpp='$CPP $CPPFLAGS'
521 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
522 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
523 cross_compiling=$ac_cv_prog_cc_cross
527 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
528 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
529 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
536 ac_n= ac_c='\c' ac_t=
542 for ac_prog in gawk mawk nawk awk
544 # Extract the first word of "$ac_prog", so it can be a program name with args.
545 set dummy $ac_prog; ac_word=$2
546 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
547 echo "configure:548: checking for $ac_word" >&5
548 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
549 echo $ac_n "(cached) $ac_c" 1>&6
551 if test -n "$AWK"; then
552 ac_cv_prog_AWK="$AWK" # Let the user override the test.
554 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
556 for ac_dir in $ac_dummy; do
557 test -z "$ac_dir" && ac_dir=.
558 if test -f $ac_dir/$ac_word; then
559 ac_cv_prog_AWK="$ac_prog"
566 AWK="$ac_cv_prog_AWK"
567 if test -n "$AWK"; then
568 echo "$ac_t""$AWK" 1>&6
570 echo "$ac_t""no" 1>&6
573 test -n "$AWK" && break
577 echo $ac_n "checking version of the package""... $ac_c" 1>&6
578 echo "configure:579: checking version of the package" >&5
579 if test -f .version; then
580 VERSION=`cat .version`
581 elif test -f ../.version; then
582 VERSION=`cat ../.version`
586 VERSIONHI=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $1}'`
587 VERSIONLO=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $2}'`
588 VERSIONP=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $3}'`
589 echo "$ac_t""${VERSION}" 1>&6
594 cat >> confdefs.h <<EOF
595 #define SDCC_VERSION_LO ${VERSIONLO}
598 cat >> confdefs.h <<EOF
599 #define SDCC_VERSION_HI ${VERSIONHI}
602 cat >> confdefs.h <<EOF
603 #define SDCC_VERSION_P ${VERSIONP}
606 cat >> confdefs.h <<EOF
607 #define SDCC_VERSION_STR "${VERSION}"
610 sdcc_cv_version=$VERSION
611 sdcc_cv_versionhi=$VERSIONHI
612 sdcc_cv_versionlo=$VERSIONLO
613 sdcc_cv_versionp=$VERSIONP
617 # Extract the first word of "gcc", so it can be a program name with args.
618 set dummy gcc; ac_word=$2
619 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
620 echo "configure:621: checking for $ac_word" >&5
621 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
622 echo $ac_n "(cached) $ac_c" 1>&6
624 if test -n "$CC"; then
625 ac_cv_prog_CC="$CC" # Let the user override the test.
627 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
629 for ac_dir in $ac_dummy; do
630 test -z "$ac_dir" && ac_dir=.
631 if test -f $ac_dir/$ac_word; then
640 if test -n "$CC"; then
641 echo "$ac_t""$CC" 1>&6
643 echo "$ac_t""no" 1>&6
646 if test -z "$CC"; then
647 # Extract the first word of "cc", so it can be a program name with args.
648 set dummy cc; 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=":"
660 for ac_dir in $ac_dummy; do
661 test -z "$ac_dir" && ac_dir=.
662 if test -f $ac_dir/$ac_word; then
663 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
672 if test $ac_prog_rejected = yes; then
673 # We found a bogon in the path, so make sure we never use it.
674 set dummy $ac_cv_prog_CC
676 if test $# -gt 0; then
677 # We chose a different compiler from the bogus one.
678 # However, it has the same basename, so the bogon will be chosen
679 # first if we set CC to just the basename; use the full file name.
681 set dummy "$ac_dir/$ac_word" "$@"
689 if test -n "$CC"; then
690 echo "$ac_t""$CC" 1>&6
692 echo "$ac_t""no" 1>&6
695 if test -z "$CC"; then
698 # Extract the first word of "cl", so it can be a program name with args.
699 set dummy cl; ac_word=$2
700 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
701 echo "configure:702: checking for $ac_word" >&5
702 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
703 echo $ac_n "(cached) $ac_c" 1>&6
705 if test -n "$CC"; then
706 ac_cv_prog_CC="$CC" # Let the user override the test.
708 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
710 for ac_dir in $ac_dummy; do
711 test -z "$ac_dir" && ac_dir=.
712 if test -f $ac_dir/$ac_word; then
721 if test -n "$CC"; then
722 echo "$ac_t""$CC" 1>&6
724 echo "$ac_t""no" 1>&6
729 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
732 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
733 echo "configure:734: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
736 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
737 ac_cpp='$CPP $CPPFLAGS'
738 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
739 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
740 cross_compiling=$ac_cv_prog_cc_cross
742 cat > conftest.$ac_ext << EOF
744 #line 745 "configure"
745 #include "confdefs.h"
749 if { (eval echo configure:750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
750 ac_cv_prog_cc_works=yes
751 # If we can't run a trivial program, we are probably using a cross compiler.
752 if (./conftest; exit) 2>/dev/null; then
753 ac_cv_prog_cc_cross=no
755 ac_cv_prog_cc_cross=yes
758 echo "configure: failed program was:" >&5
759 cat conftest.$ac_ext >&5
760 ac_cv_prog_cc_works=no
764 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
765 ac_cpp='$CPP $CPPFLAGS'
766 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
767 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
768 cross_compiling=$ac_cv_prog_cc_cross
770 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
771 if test $ac_cv_prog_cc_works = no; then
772 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
774 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
775 echo "configure:776: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
776 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
777 cross_compiling=$ac_cv_prog_cc_cross
779 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
780 echo "configure:781: checking whether we are using GNU C" >&5
781 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
782 echo $ac_n "(cached) $ac_c" 1>&6
784 cat > conftest.c <<EOF
789 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
796 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
798 if test $ac_cv_prog_gcc = yes; then
804 ac_test_CFLAGS="${CFLAGS+set}"
805 ac_save_CFLAGS="$CFLAGS"
807 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
808 echo "configure:809: checking whether ${CC-cc} accepts -g" >&5
809 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
810 echo $ac_n "(cached) $ac_c" 1>&6
812 echo 'void f(){}' > conftest.c
813 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
822 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
823 if test "$ac_test_CFLAGS" = set; then
824 CFLAGS="$ac_save_CFLAGS"
825 elif test $ac_cv_prog_cc_g = yes; then
826 if test "$GCC" = yes; then
832 if test "$GCC" = yes; then
839 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
841 # Extract the first word of "$ac_prog", so it can be a program name with args.
842 set dummy $ac_prog; ac_word=$2
843 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
844 echo "configure:845: checking for $ac_word" >&5
845 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
846 echo $ac_n "(cached) $ac_c" 1>&6
848 if test -n "$CXX"; then
849 ac_cv_prog_CXX="$CXX" # Let the user override the test.
851 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
853 for ac_dir in $ac_dummy; do
854 test -z "$ac_dir" && ac_dir=.
855 if test -f $ac_dir/$ac_word; then
856 ac_cv_prog_CXX="$ac_prog"
863 CXX="$ac_cv_prog_CXX"
864 if test -n "$CXX"; then
865 echo "$ac_t""$CXX" 1>&6
867 echo "$ac_t""no" 1>&6
870 test -n "$CXX" && break
872 test -n "$CXX" || CXX="gcc"
875 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
876 echo "configure:877: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
879 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
880 ac_cpp='$CXXCPP $CPPFLAGS'
881 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
882 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
883 cross_compiling=$ac_cv_prog_cxx_cross
885 cat > conftest.$ac_ext << EOF
887 #line 888 "configure"
888 #include "confdefs.h"
890 int main(){return(0);}
892 if { (eval echo configure:893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
893 ac_cv_prog_cxx_works=yes
894 # If we can't run a trivial program, we are probably using a cross compiler.
895 if (./conftest; exit) 2>/dev/null; then
896 ac_cv_prog_cxx_cross=no
898 ac_cv_prog_cxx_cross=yes
901 echo "configure: failed program was:" >&5
902 cat conftest.$ac_ext >&5
903 ac_cv_prog_cxx_works=no
907 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
908 ac_cpp='$CPP $CPPFLAGS'
909 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
910 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
911 cross_compiling=$ac_cv_prog_cc_cross
913 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
914 if test $ac_cv_prog_cxx_works = no; then
915 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
917 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
918 echo "configure:919: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
919 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
920 cross_compiling=$ac_cv_prog_cxx_cross
922 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
923 echo "configure:924: checking whether we are using GNU C++" >&5
924 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
925 echo $ac_n "(cached) $ac_c" 1>&6
927 cat > conftest.C <<EOF
932 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
939 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
941 if test $ac_cv_prog_gxx = yes; then
947 ac_test_CXXFLAGS="${CXXFLAGS+set}"
948 ac_save_CXXFLAGS="$CXXFLAGS"
950 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
951 echo "configure:952: checking whether ${CXX-g++} accepts -g" >&5
952 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
953 echo $ac_n "(cached) $ac_c" 1>&6
955 echo 'void f(){}' > conftest.cc
956 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
965 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
966 if test "$ac_test_CXXFLAGS" = set; then
967 CXXFLAGS="$ac_save_CXXFLAGS"
968 elif test $ac_cv_prog_cxx_g = yes; then
969 if test "$GXX" = yes; then
975 if test "$GXX" = yes; then
982 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
983 echo "configure:984: checking how to run the C preprocessor" >&5
984 # On Suns, sometimes $CPP names a directory.
985 if test -n "$CPP" && test -d "$CPP"; then
988 if test -z "$CPP"; then
989 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
990 echo $ac_n "(cached) $ac_c" 1>&6
992 # This must be in double quotes, not single quotes, because CPP may get
993 # substituted into the Makefile and "${CC-cc}" will confuse make.
995 # On the NeXT, cc -E runs the code through the compiler's parser,
996 # not just through cpp.
997 cat > conftest.$ac_ext <<EOF
998 #line 999 "configure"
999 #include "confdefs.h"
1003 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1004 { (eval echo configure:1005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1005 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1006 if test -z "$ac_err"; then
1010 echo "configure: failed program was:" >&5
1011 cat conftest.$ac_ext >&5
1013 CPP="${CC-cc} -E -traditional-cpp"
1014 cat > conftest.$ac_ext <<EOF
1015 #line 1016 "configure"
1016 #include "confdefs.h"
1020 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1021 { (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1022 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1023 if test -z "$ac_err"; then
1027 echo "configure: failed program was:" >&5
1028 cat conftest.$ac_ext >&5
1030 CPP="${CC-cc} -nologo -E"
1031 cat > conftest.$ac_ext <<EOF
1032 #line 1033 "configure"
1033 #include "confdefs.h"
1037 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1038 { (eval echo configure:1039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1039 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1040 if test -z "$ac_err"; then
1044 echo "configure: failed program was:" >&5
1045 cat conftest.$ac_ext >&5
1054 ac_cv_prog_CPP="$CPP"
1056 CPP="$ac_cv_prog_CPP"
1058 ac_cv_prog_CPP="$CPP"
1060 echo "$ac_t""$CPP" 1>&6
1063 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1064 if test -f $ac_dir/install-sh; then
1066 ac_install_sh="$ac_aux_dir/install-sh -c"
1068 elif test -f $ac_dir/install.sh; then
1070 ac_install_sh="$ac_aux_dir/install.sh -c"
1074 if test -z "$ac_aux_dir"; then
1075 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1077 ac_config_guess=$ac_aux_dir/config.guess
1078 ac_config_sub=$ac_aux_dir/config.sub
1079 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1081 # Find a good install program. We prefer a C program (faster),
1082 # so one script is as good as another. But avoid the broken or
1083 # incompatible versions:
1084 # SysV /etc/install, /usr/sbin/install
1085 # SunOS /usr/etc/install
1086 # IRIX /sbin/install
1088 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1089 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1090 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1091 # ./install, which can be erroneously created by make from ./install.sh.
1092 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1093 echo "configure:1094: checking for a BSD compatible install" >&5
1094 if test -z "$INSTALL"; then
1095 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1096 echo $ac_n "(cached) $ac_c" 1>&6
1098 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1099 for ac_dir in $PATH; do
1100 # Account for people who put trailing slashes in PATH elements.
1102 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1104 # OSF1 and SCO ODT 3.0 have their own names for install.
1105 # Don't use installbsd from OSF since it installs stuff as root
1107 for ac_prog in ginstall scoinst install; do
1108 if test -f $ac_dir/$ac_prog; then
1109 if test $ac_prog = install &&
1110 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1111 # AIX install. It has an incompatible calling convention.
1114 ac_cv_path_install="$ac_dir/$ac_prog -c"
1125 if test "${ac_cv_path_install+set}" = set; then
1126 INSTALL="$ac_cv_path_install"
1128 # As a last resort, use the slow shell script. We don't cache a
1129 # path for INSTALL within a source directory, because that will
1130 # break other packages using the cache if that directory is
1131 # removed, or if the path is relative.
1132 INSTALL="$ac_install_sh"
1135 echo "$ac_t""$INSTALL" 1>&6
1137 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1138 # It thinks the first close brace ends the variable substitution.
1139 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1141 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1143 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1145 # Extract the first word of "ranlib", so it can be a program name with args.
1146 set dummy ranlib; ac_word=$2
1147 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1148 echo "configure:1149: checking for $ac_word" >&5
1149 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1150 echo $ac_n "(cached) $ac_c" 1>&6
1152 if test -n "$RANLIB"; then
1153 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1155 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1157 for ac_dir in $ac_dummy; do
1158 test -z "$ac_dir" && ac_dir=.
1159 if test -f $ac_dir/$ac_word; then
1160 ac_cv_prog_RANLIB="ranlib"
1165 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1168 RANLIB="$ac_cv_prog_RANLIB"
1169 if test -n "$RANLIB"; then
1170 echo "$ac_t""$RANLIB" 1>&6
1172 echo "$ac_t""no" 1>&6
1175 # Extract the first word of "flex", so it can be a program name with args.
1176 set dummy flex; 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_LEX'+set}'`\" = set"; then
1180 echo $ac_n "(cached) $ac_c" 1>&6
1182 if test -n "$LEX"; then
1183 ac_cv_prog_LEX="$LEX" # 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_LEX="flex"
1195 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1198 LEX="$ac_cv_prog_LEX"
1199 if test -n "$LEX"; then
1200 echo "$ac_t""$LEX" 1>&6
1202 echo "$ac_t""no" 1>&6
1205 if test -z "$LEXLIB"
1211 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1212 echo "configure:1213: checking for yywrap in -l$ac_lib" >&5
1213 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1214 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1215 echo $ac_n "(cached) $ac_c" 1>&6
1217 ac_save_LIBS="$LIBS"
1218 LIBS="-l$ac_lib $LIBS"
1219 cat > conftest.$ac_ext <<EOF
1220 #line 1221 "configure"
1221 #include "confdefs.h"
1222 /* Override any gcc2 internal prototype to avoid an error. */
1223 /* We use char because int might match the return type of a gcc2
1224 builtin and then its argument prototype would still apply. */
1231 if { (eval echo configure:1232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1233 eval "ac_cv_lib_$ac_lib_var=yes"
1235 echo "configure: failed program was:" >&5
1236 cat conftest.$ac_ext >&5
1238 eval "ac_cv_lib_$ac_lib_var=no"
1241 LIBS="$ac_save_LIBS"
1244 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1245 echo "$ac_t""yes" 1>&6
1248 echo "$ac_t""no" 1>&6
1253 # Extract the first word of "bison", so it can be a program name with args.
1254 set dummy bison; ac_word=$2
1255 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1256 echo "configure:1257: checking for $ac_word" >&5
1257 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1258 echo $ac_n "(cached) $ac_c" 1>&6
1260 if test -n "$YACC"; then
1261 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1263 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1265 for ac_dir in $ac_dummy; do
1266 test -z "$ac_dir" && ac_dir=.
1267 if test -f $ac_dir/$ac_word; then
1268 ac_cv_prog_YACC="bison -y"
1273 test -z "$ac_cv_prog_YACC" && ac_cv_prog_YACC=":"
1276 YACC="$ac_cv_prog_YACC"
1277 if test -n "$YACC"; then
1278 echo "$ac_t""$YACC" 1>&6
1280 echo "$ac_t""no" 1>&6
1283 # Extract the first word of "autoconf", so it can be a program name with args.
1284 set dummy autoconf; 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_AUTOCONF'+set}'`\" = set"; then
1288 echo $ac_n "(cached) $ac_c" 1>&6
1290 if test -n "$AUTOCONF"; then
1291 ac_cv_prog_AUTOCONF="$AUTOCONF" # 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_AUTOCONF="autoconf"
1303 test -z "$ac_cv_prog_AUTOCONF" && ac_cv_prog_AUTOCONF=":"
1306 AUTOCONF="$ac_cv_prog_AUTOCONF"
1307 if test -n "$AUTOCONF"; then
1308 echo "$ac_t""$AUTOCONF" 1>&6
1310 echo "$ac_t""no" 1>&6
1313 # Extract the first word of "as", so it can be a program name with args.
1314 set dummy as; 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_AS'+set}'`\" = set"; then
1318 echo $ac_n "(cached) $ac_c" 1>&6
1320 if test -n "$AS"; then
1321 ac_cv_prog_AS="$AS" # 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
1333 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS=":"
1337 if test -n "$AS"; then
1338 echo "$ac_t""$AS" 1>&6
1340 echo "$ac_t""no" 1>&6
1343 # Extract the first word of "cp", so it can be a program name with args.
1344 set dummy cp; 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_CP'+set}'`\" = set"; then
1348 echo $ac_n "(cached) $ac_c" 1>&6
1350 if test -n "$CP"; then
1351 ac_cv_prog_CP="$CP" # 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
1363 test -z "$ac_cv_prog_CP" && ac_cv_prog_CP=":"
1367 if test -n "$CP"; then
1368 echo "$ac_t""$CP" 1>&6
1370 echo "$ac_t""no" 1>&6
1376 if test "$YACC" = ":"; then
1377 { echo "configure: error: Cannot find required program bison." 1>&2; exit 1; }
1380 if test "$LEX" = ":"; then
1381 { echo "configure: error: Cannot find required program lex." 1>&2; exit 1; }
1386 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1387 ac_cpp='$CPP $CPPFLAGS'
1388 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1389 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1390 cross_compiling=$ac_cv_prog_cc_cross
1393 # Checking for header files.
1394 # ===========================================================================
1395 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1396 echo "configure:1397: checking for ANSI C header files" >&5
1397 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1398 echo $ac_n "(cached) $ac_c" 1>&6
1400 cat > conftest.$ac_ext <<EOF
1401 #line 1402 "configure"
1402 #include "confdefs.h"
1408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1409 { (eval echo configure:1410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1410 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1411 if test -z "$ac_err"; then
1413 ac_cv_header_stdc=yes
1416 echo "configure: failed program was:" >&5
1417 cat conftest.$ac_ext >&5
1419 ac_cv_header_stdc=no
1423 if test $ac_cv_header_stdc = yes; then
1424 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1425 cat > conftest.$ac_ext <<EOF
1426 #line 1427 "configure"
1427 #include "confdefs.h"
1430 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1431 egrep "memchr" >/dev/null 2>&1; then
1435 ac_cv_header_stdc=no
1441 if test $ac_cv_header_stdc = yes; then
1442 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1443 cat > conftest.$ac_ext <<EOF
1444 #line 1445 "configure"
1445 #include "confdefs.h"
1448 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1449 egrep "free" >/dev/null 2>&1; then
1453 ac_cv_header_stdc=no
1459 if test $ac_cv_header_stdc = yes; then
1460 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1461 if test "$cross_compiling" = yes; then
1464 cat > conftest.$ac_ext <<EOF
1465 #line 1466 "configure"
1466 #include "confdefs.h"
1468 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1469 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1470 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1471 int main () { int i; for (i = 0; i < 256; i++)
1472 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1476 if { (eval echo configure:1477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1480 echo "configure: failed program was:" >&5
1481 cat conftest.$ac_ext >&5
1483 ac_cv_header_stdc=no
1491 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1492 if test $ac_cv_header_stdc = yes; then
1493 cat >> confdefs.h <<\EOF
1494 #define STDC_HEADERS 1
1499 for ac_hdr in getopt.h
1501 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1502 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1503 echo "configure:1504: checking for $ac_hdr" >&5
1504 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1505 echo $ac_n "(cached) $ac_c" 1>&6
1507 cat > conftest.$ac_ext <<EOF
1508 #line 1509 "configure"
1509 #include "confdefs.h"
1512 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1513 { (eval echo configure:1514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1514 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1515 if test -z "$ac_err"; then
1517 eval "ac_cv_header_$ac_safe=yes"
1520 echo "configure: failed program was:" >&5
1521 cat conftest.$ac_ext >&5
1523 eval "ac_cv_header_$ac_safe=no"
1527 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1528 echo "$ac_t""yes" 1>&6
1529 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1530 cat >> confdefs.h <<EOF
1531 #define $ac_tr_hdr 1
1535 echo "$ac_t""no" 1>&6
1539 for ac_hdr in unistd.h
1541 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1542 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1543 echo "configure:1544: checking for $ac_hdr" >&5
1544 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1545 echo $ac_n "(cached) $ac_c" 1>&6
1547 cat > conftest.$ac_ext <<EOF
1548 #line 1549 "configure"
1549 #include "confdefs.h"
1552 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1553 { (eval echo configure:1554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1554 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1555 if test -z "$ac_err"; then
1557 eval "ac_cv_header_$ac_safe=yes"
1560 echo "configure: failed program was:" >&5
1561 cat conftest.$ac_ext >&5
1563 eval "ac_cv_header_$ac_safe=no"
1567 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1568 echo "$ac_t""yes" 1>&6
1569 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1570 cat >> confdefs.h <<EOF
1571 #define $ac_tr_hdr 1
1575 echo "$ac_t""no" 1>&6
1579 for ac_hdr in endian.h
1581 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1582 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1583 echo "configure:1584: checking for $ac_hdr" >&5
1584 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1585 echo $ac_n "(cached) $ac_c" 1>&6
1587 cat > conftest.$ac_ext <<EOF
1588 #line 1589 "configure"
1589 #include "confdefs.h"
1592 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1593 { (eval echo configure:1594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1594 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1595 if test -z "$ac_err"; then
1597 eval "ac_cv_header_$ac_safe=yes"
1600 echo "configure: failed program was:" >&5
1601 cat conftest.$ac_ext >&5
1603 eval "ac_cv_header_$ac_safe=no"
1607 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1608 echo "$ac_t""yes" 1>&6
1609 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1610 cat >> confdefs.h <<EOF
1611 #define $ac_tr_hdr 1
1615 echo "$ac_t""no" 1>&6
1619 for ac_hdr in malloc.h
1621 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1622 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1623 echo "configure:1624: checking for $ac_hdr" >&5
1624 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1625 echo $ac_n "(cached) $ac_c" 1>&6
1627 cat > conftest.$ac_ext <<EOF
1628 #line 1629 "configure"
1629 #include "confdefs.h"
1632 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1633 { (eval echo configure:1634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1634 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1635 if test -z "$ac_err"; then
1637 eval "ac_cv_header_$ac_safe=yes"
1640 echo "configure: failed program was:" >&5
1641 cat conftest.$ac_ext >&5
1643 eval "ac_cv_header_$ac_safe=no"
1647 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1648 echo "$ac_t""yes" 1>&6
1649 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1650 cat >> confdefs.h <<EOF
1651 #define $ac_tr_hdr 1
1655 echo "$ac_t""no" 1>&6
1659 for ac_hdr in sys/isa_defs.h
1661 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1662 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1663 echo "configure:1664: checking for $ac_hdr" >&5
1664 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1665 echo $ac_n "(cached) $ac_c" 1>&6
1667 cat > conftest.$ac_ext <<EOF
1668 #line 1669 "configure"
1669 #include "confdefs.h"
1672 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1673 { (eval echo configure:1674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1674 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1675 if test -z "$ac_err"; then
1677 eval "ac_cv_header_$ac_safe=yes"
1680 echo "configure: failed program was:" >&5
1681 cat conftest.$ac_ext >&5
1683 eval "ac_cv_header_$ac_safe=no"
1687 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1688 echo "$ac_t""yes" 1>&6
1689 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1690 cat >> confdefs.h <<EOF
1691 #define $ac_tr_hdr 1
1695 echo "$ac_t""no" 1>&6
1699 for ac_hdr in sys/socket.h
1701 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1702 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1703 echo "configure:1704: checking for $ac_hdr" >&5
1704 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1705 echo $ac_n "(cached) $ac_c" 1>&6
1707 cat > conftest.$ac_ext <<EOF
1708 #line 1709 "configure"
1709 #include "confdefs.h"
1712 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1713 { (eval echo configure:1714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1714 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1715 if test -z "$ac_err"; then
1717 eval "ac_cv_header_$ac_safe=yes"
1720 echo "configure: failed program was:" >&5
1721 cat conftest.$ac_ext >&5
1723 eval "ac_cv_header_$ac_safe=no"
1727 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1728 echo "$ac_t""yes" 1>&6
1729 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1730 cat >> confdefs.h <<EOF
1731 #define $ac_tr_hdr 1
1735 echo "$ac_t""no" 1>&6
1740 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1742 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1743 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1744 echo "configure:1745: checking for $ac_hdr that defines DIR" >&5
1745 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1746 echo $ac_n "(cached) $ac_c" 1>&6
1748 cat > conftest.$ac_ext <<EOF
1749 #line 1750 "configure"
1750 #include "confdefs.h"
1751 #include <sys/types.h>
1757 if { (eval echo configure:1758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1759 eval "ac_cv_header_dirent_$ac_safe=yes"
1761 echo "configure: failed program was:" >&5
1762 cat conftest.$ac_ext >&5
1764 eval "ac_cv_header_dirent_$ac_safe=no"
1768 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1769 echo "$ac_t""yes" 1>&6
1770 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1771 cat >> confdefs.h <<EOF
1772 #define $ac_tr_hdr 1
1774 ac_header_dirent=$ac_hdr; break
1776 echo "$ac_t""no" 1>&6
1779 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1780 if test $ac_header_dirent = dirent.h; then
1781 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1782 echo "configure:1783: checking for opendir in -ldir" >&5
1783 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1784 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1785 echo $ac_n "(cached) $ac_c" 1>&6
1787 ac_save_LIBS="$LIBS"
1789 cat > conftest.$ac_ext <<EOF
1790 #line 1791 "configure"
1791 #include "confdefs.h"
1792 /* Override any gcc2 internal prototype to avoid an error. */
1793 /* We use char because int might match the return type of a gcc2
1794 builtin and then its argument prototype would still apply. */
1801 if { (eval echo configure:1802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1803 eval "ac_cv_lib_$ac_lib_var=yes"
1805 echo "configure: failed program was:" >&5
1806 cat conftest.$ac_ext >&5
1808 eval "ac_cv_lib_$ac_lib_var=no"
1811 LIBS="$ac_save_LIBS"
1814 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1815 echo "$ac_t""yes" 1>&6
1818 echo "$ac_t""no" 1>&6
1822 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1823 echo "configure:1824: checking for opendir in -lx" >&5
1824 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1825 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1826 echo $ac_n "(cached) $ac_c" 1>&6
1828 ac_save_LIBS="$LIBS"
1830 cat > conftest.$ac_ext <<EOF
1831 #line 1832 "configure"
1832 #include "confdefs.h"
1833 /* Override any gcc2 internal prototype to avoid an error. */
1834 /* We use char because int might match the return type of a gcc2
1835 builtin and then its argument prototype would still apply. */
1842 if { (eval echo configure:1843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1844 eval "ac_cv_lib_$ac_lib_var=yes"
1846 echo "configure: failed program was:" >&5
1847 cat conftest.$ac_ext >&5
1849 eval "ac_cv_lib_$ac_lib_var=no"
1852 LIBS="$ac_save_LIBS"
1855 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1856 echo "$ac_t""yes" 1>&6
1859 echo "$ac_t""no" 1>&6
1865 # This must be after CPP
1867 echo $ac_n "checking which header file defines FD_ macros""... $ac_c" 1>&6
1868 echo "configure:1869: checking which header file defines FD_ macros" >&5
1869 if eval "test \"`echo '$''{'s51_cv_fd'+set}'`\" = set"; then
1870 echo $ac_n "(cached) $ac_c" 1>&6
1872 sdcc_cv_fd="unknown"
1873 cat > conftest.$ac_ext <<EOF
1874 #line 1875 "configure"
1875 #include "confdefs.h"
1877 #include <sys/time.h>
1882 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1883 egrep "yes" >/dev/null 2>&1; then
1885 sdcc_cv_fd="<sys/time.h>"
1889 cat > conftest.$ac_ext <<EOF
1890 #line 1891 "configure"
1891 #include "confdefs.h"
1893 #include <sys/types.h>
1898 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1899 egrep "yes" >/dev/null 2>&1; then
1901 sdcc_cv_fd="<sys/types.h>"
1905 cat > conftest.$ac_ext <<EOF
1906 #line 1907 "configure"
1907 #include "confdefs.h"
1909 #include <sys/select.h>
1914 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1915 egrep "yes" >/dev/null 2>&1; then
1917 sdcc_cv_fd="<sys/types.h>"
1923 echo "$ac_t""$s51_cv_fd" 1>&6
1925 cat >> confdefs.h <<\EOF
1926 #define FD_HEADER_OK 0
1929 if echo $sdcc_cv_fd|grep time >/dev/null 2>&1; then
1930 cat >> confdefs.h <<\EOF
1931 #define FD_NEED_TIME_H 1
1934 cat >> confdefs.h <<\EOF
1935 #define FD_HEADER_OK 1
1939 cat >> confdefs.h <<\EOF
1940 #define FD_NEED_TIME_H 0
1944 if echo $sdcc_cv_fd|grep types >/dev/null 2>&1; then
1945 cat >> confdefs.h <<\EOF
1946 #define FD_NEED_TYPES_H 1
1949 cat >> confdefs.h <<\EOF
1950 #define FD_HEADER_OK 1
1954 cat >> confdefs.h <<\EOF
1955 #define FD_NEED_TYPES_H 0
1959 if echo $sdcc_cv_fd|grep select >/dev/null 2>&1; then
1960 cat >> confdefs.h <<\EOF
1961 #define FD_NEED_SELECT_H 1
1964 cat >> confdefs.h <<\EOF
1965 #define FD_HEADER_OK 1
1969 cat >> confdefs.h <<\EOF
1970 #define FD_NEED_SELECT_H 0
1975 cat >> confdefs.h <<EOF
1976 #define HEADER_FD ${sdcc_cv_fd}
1981 # Checking for functions
1982 # ===========================================================================
1983 for ac_func in strlen strcpy strcat strstr strcmp strerror strtok strdup
1985 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1986 echo "configure:1987: checking for $ac_func" >&5
1987 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1988 echo $ac_n "(cached) $ac_c" 1>&6
1990 cat > conftest.$ac_ext <<EOF
1991 #line 1992 "configure"
1992 #include "confdefs.h"
1993 /* System header to define __stub macros and hopefully few prototypes,
1994 which can conflict with char $ac_func(); below. */
1996 /* Override any gcc2 internal prototype to avoid an error. */
1997 /* We use char because int might match the return type of a gcc2
1998 builtin and then its argument prototype would still apply. */
2003 /* The GNU C library defines this for functions which it implements
2004 to always fail with ENOSYS. Some functions are actually named
2005 something starting with __ and the normal name is an alias. */
2006 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2014 if { (eval echo configure:2015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2016 eval "ac_cv_func_$ac_func=yes"
2018 echo "configure: failed program was:" >&5
2019 cat conftest.$ac_ext >&5
2021 eval "ac_cv_func_$ac_func=no"
2026 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2027 echo "$ac_t""yes" 1>&6
2028 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2029 cat >> confdefs.h <<EOF
2030 #define $ac_tr_func 1
2034 echo "$ac_t""no" 1>&6
2038 for ac_func in strchr memcpy
2040 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2041 echo "configure:2042: checking for $ac_func" >&5
2042 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2043 echo $ac_n "(cached) $ac_c" 1>&6
2045 cat > conftest.$ac_ext <<EOF
2046 #line 2047 "configure"
2047 #include "confdefs.h"
2048 /* System header to define __stub macros and hopefully few prototypes,
2049 which can conflict with char $ac_func(); below. */
2051 /* Override any gcc2 internal prototype to avoid an error. */
2052 /* We use char because int might match the return type of a gcc2
2053 builtin and then its argument prototype would still apply. */
2058 /* The GNU C library defines this for functions which it implements
2059 to always fail with ENOSYS. Some functions are actually named
2060 something starting with __ and the normal name is an alias. */
2061 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2069 if { (eval echo configure:2070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2071 eval "ac_cv_func_$ac_func=yes"
2073 echo "configure: failed program was:" >&5
2074 cat conftest.$ac_ext >&5
2076 eval "ac_cv_func_$ac_func=no"
2081 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2082 echo "$ac_t""yes" 1>&6
2083 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2084 cat >> confdefs.h <<EOF
2085 #define $ac_tr_func 1
2089 echo "$ac_t""no" 1>&6
2093 for ac_func in fgets
2095 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2096 echo "configure:2097: checking for $ac_func" >&5
2097 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2098 echo $ac_n "(cached) $ac_c" 1>&6
2100 cat > conftest.$ac_ext <<EOF
2101 #line 2102 "configure"
2102 #include "confdefs.h"
2103 /* System header to define __stub macros and hopefully few prototypes,
2104 which can conflict with char $ac_func(); below. */
2106 /* Override any gcc2 internal prototype to avoid an error. */
2107 /* We use char because int might match the return type of a gcc2
2108 builtin and then its argument prototype would still apply. */
2113 /* The GNU C library defines this for functions which it implements
2114 to always fail with ENOSYS. Some functions are actually named
2115 something starting with __ and the normal name is an alias. */
2116 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2124 if { (eval echo configure:2125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2126 eval "ac_cv_func_$ac_func=yes"
2128 echo "configure: failed program was:" >&5
2129 cat conftest.$ac_ext >&5
2131 eval "ac_cv_func_$ac_func=no"
2136 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2137 echo "$ac_t""yes" 1>&6
2138 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2139 cat >> confdefs.h <<EOF
2140 #define $ac_tr_func 1
2144 echo "$ac_t""no" 1>&6
2148 for ac_func in yylex
2150 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2151 echo "configure:2152: checking for $ac_func" >&5
2152 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2153 echo $ac_n "(cached) $ac_c" 1>&6
2155 cat > conftest.$ac_ext <<EOF
2156 #line 2157 "configure"
2157 #include "confdefs.h"
2158 /* System header to define __stub macros and hopefully few prototypes,
2159 which can conflict with char $ac_func(); below. */
2161 /* Override any gcc2 internal prototype to avoid an error. */
2162 /* We use char because int might match the return type of a gcc2
2163 builtin and then its argument prototype would still apply. */
2168 /* The GNU C library defines this for functions which it implements
2169 to always fail with ENOSYS. Some functions are actually named
2170 something starting with __ and the normal name is an alias. */
2171 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2179 if { (eval echo configure:2180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2181 eval "ac_cv_func_$ac_func=yes"
2183 echo "configure: failed program was:" >&5
2184 cat conftest.$ac_ext >&5
2186 eval "ac_cv_func_$ac_func=no"
2191 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2192 echo "$ac_t""yes" 1>&6
2193 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2194 cat >> confdefs.h <<EOF
2195 #define $ac_tr_func 1
2199 echo "$ac_t""no" 1>&6
2204 # check if -lsocket && -lxnet is required to compile socket stuff
2206 echo $ac_n "checking for library containing socket""... $ac_c" 1>&6
2207 echo "configure:2208: checking for library containing socket" >&5
2208 if eval "test \"`echo '$''{'ac_cv_search_socket'+set}'`\" = set"; then
2209 echo $ac_n "(cached) $ac_c" 1>&6
2211 ac_func_search_save_LIBS="$LIBS"
2212 ac_cv_search_socket="no"
2213 cat > conftest.$ac_ext <<EOF
2214 #line 2215 "configure"
2215 #include "confdefs.h"
2216 /* Override any gcc2 internal prototype to avoid an error. */
2217 /* We use char because int might match the return type of a gcc2
2218 builtin and then its argument prototype would still apply. */
2225 if { (eval echo configure:2226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2227 ac_cv_search_socket="none required"
2229 echo "configure: failed program was:" >&5
2230 cat conftest.$ac_ext >&5
2233 test "$ac_cv_search_socket" = "no" && for i in socket; do
2234 LIBS="-l$i $ac_func_search_save_LIBS"
2235 cat > conftest.$ac_ext <<EOF
2236 #line 2237 "configure"
2237 #include "confdefs.h"
2238 /* Override any gcc2 internal prototype to avoid an error. */
2239 /* We use char because int might match the return type of a gcc2
2240 builtin and then its argument prototype would still apply. */
2247 if { (eval echo configure:2248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2249 ac_cv_search_socket="-l$i"
2252 echo "configure: failed program was:" >&5
2253 cat conftest.$ac_ext >&5
2257 LIBS="$ac_func_search_save_LIBS"
2260 echo "$ac_t""$ac_cv_search_socket" 1>&6
2261 if test "$ac_cv_search_socket" != "no"; then
2262 test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
2268 echo $ac_n "checking for library containing inet_addr""... $ac_c" 1>&6
2269 echo "configure:2270: checking for library containing inet_addr" >&5
2270 if eval "test \"`echo '$''{'ac_cv_search_inet_addr'+set}'`\" = set"; then
2271 echo $ac_n "(cached) $ac_c" 1>&6
2273 ac_func_search_save_LIBS="$LIBS"
2274 ac_cv_search_inet_addr="no"
2275 cat > conftest.$ac_ext <<EOF
2276 #line 2277 "configure"
2277 #include "confdefs.h"
2278 /* Override any gcc2 internal prototype to avoid an error. */
2279 /* We use char because int might match the return type of a gcc2
2280 builtin and then its argument prototype would still apply. */
2287 if { (eval echo configure:2288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2289 ac_cv_search_inet_addr="none required"
2291 echo "configure: failed program was:" >&5
2292 cat conftest.$ac_ext >&5
2295 test "$ac_cv_search_inet_addr" = "no" && for i in nsl xnet; do
2296 LIBS="-l$i $ac_func_search_save_LIBS"
2297 cat > conftest.$ac_ext <<EOF
2298 #line 2299 "configure"
2299 #include "confdefs.h"
2300 /* Override any gcc2 internal prototype to avoid an error. */
2301 /* We use char because int might match the return type of a gcc2
2302 builtin and then its argument prototype would still apply. */
2309 if { (eval echo configure:2310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2311 ac_cv_search_inet_addr="-l$i"
2314 echo "configure: failed program was:" >&5
2315 cat conftest.$ac_ext >&5
2319 LIBS="$ac_func_search_save_LIBS"
2322 echo "$ac_t""$ac_cv_search_inet_addr" 1>&6
2323 if test "$ac_cv_search_inet_addr" != "no"; then
2324 test "$ac_cv_search_inet_addr" = "none required" || LIBS="$ac_cv_search_inet_addr $LIBS"
2333 # DD_COPT macro checks if the compiler specified as the 1st parameter
2334 # supports option specified as the 2nd parameter
2335 # For example: DD_CPORT(CXX, fPIC)
2340 # Checking characteristics of compilers and other programs
2341 # --------------------------------------------------------
2342 echo $ac_n "checking whether preprocessor accepts -MM or -M""... $ac_c" 1>&6
2343 echo "configure:2344: checking whether preprocessor accepts -MM or -M" >&5
2344 if eval "test \"`echo '$''{'sdcc_cv_MM'+set}'`\" = set"; then
2345 echo $ac_n "(cached) $ac_c" 1>&6
2347 echo "#include <stdio.h>" >_test_.c
2349 $CPP -v -MM _test_.c 1>&5 2>&5
2350 if test "$?" = "0"; then
2358 echo "$ac_t""$sdcc_cv_MM" 1>&6
2362 # This is the first time when CFLAGS are set/modified!!
2364 echo $ac_n "checking whether $CC accepts -ggdb""... $ac_c" 1>&6
2365 echo "configure:2366: checking whether $CC accepts -ggdb" >&5
2366 if eval "test \"`echo '$''{'sdcc_cv_CCggdb'+set}'`\" = set"; then
2367 echo $ac_n "(cached) $ac_c" 1>&6
2373 $CC -v -ggdb -c _test_.c 1>&5 2>&5
2374 if test "$?" = "0"; then
2375 sdcc_cv_CCggdb="yes"
2379 rm -f _test_.* a.out
2382 echo "$ac_t""$sdcc_cv_CCggdb" 1>&6
2384 if test "$sdcc_cv_CCggdb" = "yes"; then
2389 echo $ac_n "checking whether $CC accepts -pipe""... $ac_c" 1>&6
2390 echo "configure:2391: checking whether $CC accepts -pipe" >&5
2391 if eval "test \"`echo '$''{'sdcc_cv_CCpipe'+set}'`\" = set"; then
2392 echo $ac_n "(cached) $ac_c" 1>&6
2398 $CC -v -pipe -c _test_.c 1>&5 2>&5
2399 if test "$?" = "0"; then
2400 sdcc_cv_CCpipe="yes"
2404 rm -f _test_.* a.out
2407 echo "$ac_t""$sdcc_cv_CCpipe" 1>&6
2409 if test "$sdcc_cv_CCpipe" = "yes"; then
2410 CFLAGS="$CFLAGS -pipe"
2414 # Checks for typedefs, structures, and compiler characteristics.
2415 # ===========================================================================
2416 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2417 echo "configure:2418: checking return type of signal handlers" >&5
2418 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2419 echo $ac_n "(cached) $ac_c" 1>&6
2421 cat > conftest.$ac_ext <<EOF
2422 #line 2423 "configure"
2423 #include "confdefs.h"
2424 #include <sys/types.h>
2430 extern "C" void (*signal (int, void (*)(int)))(int);
2432 void (*signal ()) ();
2439 if { (eval echo configure:2440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2441 ac_cv_type_signal=void
2443 echo "configure: failed program was:" >&5
2444 cat conftest.$ac_ext >&5
2446 ac_cv_type_signal=int
2451 echo "$ac_t""$ac_cv_type_signal" 1>&6
2452 cat >> confdefs.h <<EOF
2453 #define RETSIGTYPE $ac_cv_type_signal
2460 if test "${prefix}" = "NONE"; then
2465 sdcc_datadir=${datadir}/sdcc
2468 # For some unknown reason, putting this assignment in a subshell
2469 # like this causes the rvalue to be fully substituted. We need this
2470 # for the defines below to generate the right thing. We keep this
2471 # separate from the substituted sdcc_datadir because we want the
2472 # latter for makefiles.
2473 if test "${datadir}" = "\${prefix}/share"; then
2474 sdcc_datadir_tmp=${prefix}/share/sdcc
2476 sdcc_datadir_tmp=${datadir}/sdcc
2480 cat >> confdefs.h <<EOF
2481 #define STANDARD_INCLUDE_DIR "${sdcc_datadir_tmp}/include"
2484 cat >> confdefs.h <<EOF
2485 #define SDCC_INCLUDE_DIR "${sdcc_datadir_tmp}/include"
2488 cat >> confdefs.h <<EOF
2489 #define SDCC_LIB_DIR "${sdcc_datadir_tmp}/lib"
2492 cat >> confdefs.h <<EOF
2493 #define STD_LIB "libsdcc"
2496 cat >> confdefs.h <<EOF
2497 #define STD_INT_LIB "libint"
2500 cat >> confdefs.h <<EOF
2501 #define STD_LONG_LIB "liblong"
2504 cat >> confdefs.h <<EOF
2505 #define STD_FP_LIB "libfloat"
2508 cat >> confdefs.h <<EOF
2509 #define STD_DS390_LIB "libds390"
2513 cat >> confdefs.h <<EOF
2514 #define PREFIX "${prefix}"
2517 cat >> confdefs.h <<EOF
2518 #define DATADIR "${sdcc_datadir_tmp}"
2521 cat >> confdefs.h <<EOF
2522 #define SRCDIR "${config_in}"
2528 # Now handle the port selection
2529 rm -f ports.all ports.build
2530 # Check whether --enable-mcs51-port or --disable-mcs51-port was given.
2531 if test "${enable_mcs51_port+set}" = set; then
2532 enableval="$enable_mcs51_port"
2536 echo mcs51 >>ports.all
2537 if test "$enable_mcs51_port" = "no"; then
2538 cat >> confdefs.h <<EOF
2539 #define OPT_DISABLE_MCS51 1
2543 echo mcs51 >>ports.build
2544 cat >> confdefs.h <<EOF
2545 #define OPT_DISABLE_MCS51 0
2550 # Check whether --enable-gbz80-port or --disable-gbz80-port was given.
2551 if test "${enable_gbz80_port+set}" = set; then
2552 enableval="$enable_gbz80_port"
2556 echo z80 >>ports.all
2557 if test "$enable_gbz80_port" = "no"; then
2558 cat >> confdefs.h <<EOF
2559 #define OPT_DISABLE_GBZ80 1
2563 echo z80 >>ports.build
2564 cat >> confdefs.h <<EOF
2565 #define OPT_DISABLE_GBZ80 0
2570 # Check whether --enable-z80-port or --disable-z80-port was given.
2571 if test "${enable_z80_port+set}" = set; then
2572 enableval="$enable_z80_port"
2576 echo z80 >>ports.all
2577 if test "$enable_z80_port" = "no"; then
2578 cat >> confdefs.h <<EOF
2579 #define OPT_DISABLE_Z80 1
2583 echo z80 >>ports.build
2584 cat >> confdefs.h <<EOF
2585 #define OPT_DISABLE_Z80 0
2590 # Check whether --enable-avr-port or --disable-avr-port was given.
2591 if test "${enable_avr_port+set}" = set; then
2592 enableval="$enable_avr_port"
2596 echo avr >>ports.all
2597 if test "$enable_avr_port" = "no"; then
2598 cat >> confdefs.h <<EOF
2599 #define OPT_DISABLE_AVR 1
2603 echo avr >>ports.build
2604 cat >> confdefs.h <<EOF
2605 #define OPT_DISABLE_AVR 0
2610 # Check whether --enable-ds390-port or --disable-ds390-port was given.
2611 if test "${enable_ds390_port+set}" = set; then
2612 enableval="$enable_ds390_port"
2616 echo ds390 >>ports.all
2617 if test "$enable_ds390_port" = "no"; then
2618 cat >> confdefs.h <<EOF
2619 #define OPT_DISABLE_DS390 1
2623 echo ds390 >>ports.build
2624 cat >> confdefs.h <<EOF
2625 #define OPT_DISABLE_DS390 0
2630 # Check whether --enable-pic-port or --disable-pic-port was given.
2631 if test "${enable_pic_port+set}" = set; then
2632 enableval="$enable_pic_port"
2636 echo pic >>ports.all
2637 if test "$enable_pic_port" = "no"; then
2638 cat >> confdefs.h <<EOF
2639 #define OPT_DISABLE_PIC 1
2643 echo pic >>ports.build
2644 cat >> confdefs.h <<EOF
2645 #define OPT_DISABLE_PIC 0
2650 # Check whether --enable-i186-port or --disable-i186-port was given.
2651 if test "${enable_i186_port+set}" = set; then
2652 enableval="$enable_i186_port"
2656 echo izt >>ports.all
2657 if test "$enable_i186_port" = "no"; then
2658 cat >> confdefs.h <<EOF
2659 #define OPT_DISABLE_I186 1
2663 echo izt >>ports.build
2664 cat >> confdefs.h <<EOF
2665 #define OPT_DISABLE_I186 0
2670 # Check whether --enable-tlcs900h-port or --disable-tlcs900h-port was given.
2671 if test "${enable_tlcs900h_port+set}" = set; then
2672 enableval="$enable_tlcs900h_port"
2676 echo izt >>ports.all
2677 if test "$enable_tlcs900h_port" = "no"; then
2678 cat >> confdefs.h <<EOF
2679 #define OPT_DISABLE_TLCS900H 1
2683 echo izt >>ports.build
2684 cat >> confdefs.h <<EOF
2685 #define OPT_DISABLE_TLCS900H 0
2691 cat ports.all | uniq >ports
2693 cat ports.build | uniq >ports
2694 mv ports ports.build
2696 # Generating output files
2697 # ===========================================================================
2700 subdirs="sim/ucsim packihx"
2702 # MLH: removed as the rules are already in Makefile.common
2706 cat > confcache <<\EOF
2707 # This file is a shell script that caches the results of configure
2708 # tests run on this system so they can be shared between configure
2709 # scripts and configure runs. It is not useful on other systems.
2710 # If it contains results you don't want to keep, you may remove or edit it.
2712 # By default, configure uses ./config.cache as the cache file,
2713 # creating it if it does not exist already. You can give configure
2714 # the --cache-file=FILE option to use a different cache file; that is
2715 # what configure does when it calls configure scripts in
2716 # subdirectories, so they share the cache.
2717 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2718 # config.status only pays attention to the cache file if you give it the
2719 # --recheck option to rerun configure.
2722 # The following way of writing the cache mishandles newlines in values,
2723 # but we know of no workaround that is simple, portable, and efficient.
2724 # So, don't put newlines in cache variables' values.
2725 # Ultrix sh set writes to stderr and can't be redirected directly,
2726 # and sets the high bit in the cache file unless we assign to the vars.
2728 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2730 # `set' does not quote correctly, so add quotes (double-quote substitution
2731 # turns \\\\ into \\, and sed turns \\ into \).
2733 -e "s/'/'\\\\''/g" \
2734 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2737 # `set' quotes correctly as required by POSIX, so do not add quotes.
2738 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2741 if cmp -s $cache_file confcache; then
2744 if test -w $cache_file; then
2745 echo "updating cache $cache_file"
2746 cat confcache > $cache_file
2748 echo "not updating unwritable cache $cache_file"
2753 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2755 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2756 # Let make expand exec_prefix.
2757 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2759 # Any assignment to VPATH causes Sun make to only execute
2760 # the first set of double-colon rules, so remove it if not needed.
2761 # If there is a colon in the path, we need to keep it.
2762 if test "x$srcdir" = x.; then
2763 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2766 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2768 DEFS=-DHAVE_CONFIG_H
2770 # Without the "./", some shells look in PATH for config.status.
2771 : ${CONFIG_STATUS=./config.status}
2773 echo creating $CONFIG_STATUS
2774 rm -f $CONFIG_STATUS
2775 cat > $CONFIG_STATUS <<EOF
2777 # Generated automatically by configure.
2778 # Run this file to recreate the current configuration.
2779 # This directory was configured as follows,
2780 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2782 # $0 $ac_configure_args
2784 # Compiler output produced by configure, useful for debugging
2785 # configure, is in ./config.log if it exists.
2787 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2790 case "\$ac_option" in
2791 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2792 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2793 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2794 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2795 echo "$CONFIG_STATUS generated by autoconf version 2.13"
2797 -help | --help | --hel | --he | --h)
2798 echo "\$ac_cs_usage"; exit 0 ;;
2799 *) echo "\$ac_cs_usage"; exit 1 ;;
2803 ac_given_srcdir=$srcdir
2804 ac_given_INSTALL="$INSTALL"
2806 trap 'rm -fr `echo "main.mk:main_in.mk
2809 support/cpp/Makefile
2810 device/include/Makefile
2812 debugger/mcs51/Makefile
2813 Makefile.common:Makefile.common.in
2814 sdccconf.h:sdccconf_in.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2816 cat >> $CONFIG_STATUS <<EOF
2818 # Protect against being on the right side of a sed subst in config.status.
2819 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2820 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2824 s%@CFLAGS@%$CFLAGS%g
2825 s%@CPPFLAGS@%$CPPFLAGS%g
2826 s%@CXXFLAGS@%$CXXFLAGS%g
2827 s%@FFLAGS@%$FFLAGS%g
2829 s%@LDFLAGS@%$LDFLAGS%g
2831 s%@exec_prefix@%$exec_prefix%g
2832 s%@prefix@%$prefix%g
2833 s%@program_transform_name@%$program_transform_name%g
2834 s%@bindir@%$bindir%g
2835 s%@sbindir@%$sbindir%g
2836 s%@libexecdir@%$libexecdir%g
2837 s%@datadir@%$datadir%g
2838 s%@sysconfdir@%$sysconfdir%g
2839 s%@sharedstatedir@%$sharedstatedir%g
2840 s%@localstatedir@%$localstatedir%g
2841 s%@libdir@%$libdir%g
2842 s%@includedir@%$includedir%g
2843 s%@oldincludedir@%$oldincludedir%g
2844 s%@infodir@%$infodir%g
2845 s%@mandir@%$mandir%g
2847 s%@VERSION@%$VERSION%g
2848 s%@VERSIONHI@%$VERSIONHI%g
2849 s%@VERSIONLO@%$VERSIONLO%g
2850 s%@VERSIONP@%$VERSIONP%g
2854 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2855 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2856 s%@INSTALL_DATA@%$INSTALL_DATA%g
2857 s%@RANLIB@%$RANLIB%g
2859 s%@LEXLIB@%$LEXLIB%g
2861 s%@AUTOCONF@%$AUTOCONF%g
2864 s%@M_OR_MM@%$M_OR_MM%g
2865 s%@sdcc_datadir@%$sdcc_datadir%g
2866 s%@subdirs@%$subdirs%g
2871 cat >> $CONFIG_STATUS <<\EOF
2873 # Split the substitutions into bite-sized pieces for seds with
2874 # small command number limits, like on Digital OSF/1 and HP-UX.
2875 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2876 ac_file=1 # Number of current file.
2877 ac_beg=1 # First line for current file.
2878 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2881 while $ac_more_lines; do
2882 if test $ac_beg -gt 1; then
2883 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2885 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2887 if test ! -s conftest.s$ac_file; then
2889 rm -f conftest.s$ac_file
2891 if test -z "$ac_sed_cmds"; then
2892 ac_sed_cmds="sed -f conftest.s$ac_file"
2894 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2896 ac_file=`expr $ac_file + 1`
2898 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2901 if test -z "$ac_sed_cmds"; then
2906 cat >> $CONFIG_STATUS <<EOF
2908 CONFIG_FILES=\${CONFIG_FILES-"main.mk:main_in.mk
2911 support/cpp/Makefile
2912 device/include/Makefile
2914 debugger/mcs51/Makefile
2915 Makefile.common:Makefile.common.in
2918 cat >> $CONFIG_STATUS <<\EOF
2919 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2920 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2922 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2923 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2924 *) ac_file_in="${ac_file}.in" ;;
2927 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2929 # Remove last slash and all that follows it. Not all systems have dirname.
2930 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2931 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2932 # The file is in a subdirectory.
2933 test ! -d "$ac_dir" && mkdir "$ac_dir"
2934 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2935 # A "../" for each directory in $ac_dir_suffix.
2936 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2938 ac_dir_suffix= ac_dots=
2941 case "$ac_given_srcdir" in
2943 if test -z "$ac_dots"; then top_srcdir=.
2944 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2945 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2947 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2948 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2951 case "$ac_given_INSTALL" in
2952 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2953 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2956 echo creating "$ac_file"
2958 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2960 *Makefile*) ac_comsub="1i\\
2961 # $configure_input" ;;
2965 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2967 s%@configure_input@%$configure_input%g
2968 s%@srcdir@%$srcdir%g
2969 s%@top_srcdir@%$top_srcdir%g
2970 s%@INSTALL@%$INSTALL%g
2971 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2975 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2976 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2978 # ac_d sets the value in "#define NAME VALUE" lines.
2979 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2980 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2983 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2984 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2985 ac_uB='\([ ]\)%\1#\2define\3'
2988 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2989 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2990 ac_eB='$%\1#\2define\3'
2994 if test "${CONFIG_HEADERS+set}" != set; then
2996 cat >> $CONFIG_STATUS <<EOF
2997 CONFIG_HEADERS="sdccconf.h:sdccconf_in.h"
2999 cat >> $CONFIG_STATUS <<\EOF
3001 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3002 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3004 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3005 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3006 *) ac_file_in="${ac_file}.in" ;;
3009 echo creating $ac_file
3011 rm -f conftest.frag conftest.in conftest.out
3012 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3013 cat $ac_file_inputs > conftest.in
3017 # Transform confdefs.h into a sed script conftest.vals that substitutes
3018 # the proper values into config.h.in to produce config.h. And first:
3019 # Protect against being on the right side of a sed subst in config.status.
3020 # Protect against being in an unquoted here document in config.status.
3022 cat > conftest.hdr <<\EOF
3025 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3029 sed -n -f conftest.hdr confdefs.h > conftest.vals
3032 # This sed command replaces #undef with comments. This is necessary, for
3033 # example, in the case of _POSIX_SOURCE, which is predefined and required
3034 # on some systems where configure will not decide to define it.
3035 cat >> conftest.vals <<\EOF
3036 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3039 # Break up conftest.vals because some shells have a limit on
3040 # the size of here documents, and old seds have small limits too.
3045 ac_lines=`grep -c . conftest.vals`
3046 # grep -c gives empty output for an empty file on some AIX systems.
3047 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3048 # Write a limited-size here document to conftest.frag.
3049 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3050 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3052 sed -f conftest.frag conftest.in > conftest.out
3054 mv conftest.out conftest.in
3056 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3058 mv conftest.tail conftest.vals
3062 cat >> $CONFIG_STATUS <<\EOF
3063 rm -f conftest.frag conftest.h
3064 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3065 cat conftest.in >> conftest.h
3067 if cmp -s $ac_file conftest.h 2>/dev/null; then
3068 echo "$ac_file is unchanged"
3071 # Remove last slash and all that follows it. Not all systems have dirname.
3072 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3073 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3074 # The file is in a subdirectory.
3075 test ! -d "$ac_dir" && mkdir "$ac_dir"
3078 mv conftest.h $ac_file
3083 cat >> $CONFIG_STATUS <<EOF
3086 cat >> $CONFIG_STATUS <<\EOF
3090 chmod +x $CONFIG_STATUS
3091 rm -fr confdefs* $ac_clean_files
3092 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3094 if test "$no_recursion" != yes; then
3096 # Remove --cache-file and --srcdir arguments so they do not pile up.
3097 ac_sub_configure_args=
3099 for ac_arg in $ac_configure_args; do
3100 if test -n "$ac_prev"; then
3105 -cache-file | --cache-file | --cache-fil | --cache-fi \
3106 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
3107 ac_prev=cache_file ;;
3108 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
3109 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
3111 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
3113 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
3115 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
3119 for ac_config_dir in sim/ucsim packihx; do
3121 # Do not complain, so a configure script can configure whichever
3122 # parts of a large source tree are present.
3123 if test ! -d $srcdir/$ac_config_dir; then
3127 echo configuring in $ac_config_dir
3132 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
3134 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
3142 # A "../" for each directory in /$ac_config_dir.
3143 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
3146 .) # No --srcdir option. We are building in place.
3147 ac_sub_srcdir=$srcdir ;;
3148 /*) # Absolute path.
3149 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
3151 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
3154 # Check for guested configure; otherwise get Cygnus style configure.
3155 if test -f $ac_sub_srcdir/configure; then
3156 ac_sub_configure=$ac_sub_srcdir/configure
3157 elif test -f $ac_sub_srcdir/configure.in; then
3158 ac_sub_configure=$ac_configure
3160 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
3164 # The recursion is here.
3165 if test -n "$ac_sub_configure"; then
3167 # Make the cache file name correct relative to the subdirectory.
3168 case "$cache_file" in
3169 /*) ac_sub_cache_file=$cache_file ;;
3171 ac_sub_cache_file="$ac_dots$cache_file" ;;
3173 case "$ac_given_INSTALL" in
3174 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3175 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3178 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
3179 # The eval makes quoting arguments work.
3180 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
3183 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
3192 # End of configure/configure.in