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-z80-port: Excludes the z80 port"
17 --disable-gbz80-port: Excludes the Gameboy gbz80 port"
19 --disable-mcs51-port: Excludes the Intel mcs51 port"
21 --disable-avr-port: Excludes the AVR port"
23 # Initialize some variables set by options.
24 # The variables have the same names as the options, with
25 # dashes changed to underlines.
27 cache_file=./config.cache
36 program_transform_name=s,x,x,
44 bindir='${exec_prefix}/bin'
45 sbindir='${exec_prefix}/sbin'
46 libexecdir='${exec_prefix}/libexec'
47 datadir='${prefix}/share'
48 sysconfdir='${prefix}/etc'
49 sharedstatedir='${prefix}/com'
50 localstatedir='${prefix}/var'
51 libdir='${exec_prefix}/lib'
52 includedir='${prefix}/include'
53 oldincludedir='/usr/include'
54 infodir='${prefix}/info'
55 mandir='${prefix}/man'
57 # Initialize some other variables.
60 SHELL=${CONFIG_SHELL-/bin/sh}
61 # Maximum number of lines to put in a shell here document.
68 # If the previous option needs an argument, assign it.
69 if test -n "$ac_prev"; then
70 eval "$ac_prev=\$ac_option"
76 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
80 # Accept the important Cygnus configure options, so we can diagnose typos.
84 -bindir | --bindir | --bindi | --bind | --bin | --bi)
86 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
87 bindir="$ac_optarg" ;;
89 -build | --build | --buil | --bui | --bu)
91 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
94 -cache-file | --cache-file | --cache-fil | --cache-fi \
95 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
97 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
98 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
99 cache_file="$ac_optarg" ;;
101 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
103 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
105 datadir="$ac_optarg" ;;
107 -disable-* | --disable-*)
108 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
109 # Reject names that are not valid shell variable names.
110 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
111 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
113 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
114 eval "enable_${ac_feature}=no" ;;
116 -enable-* | --enable-*)
117 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
118 # Reject names that are not valid shell variable names.
119 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
120 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
122 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
127 eval "enable_${ac_feature}='$ac_optarg'" ;;
129 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
130 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
131 | --exec | --exe | --ex)
132 ac_prev=exec_prefix ;;
133 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
134 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
135 | --exec=* | --exe=* | --ex=*)
136 exec_prefix="$ac_optarg" ;;
138 -gas | --gas | --ga | --g)
139 # Obsolete; use --with-gas.
142 -help | --help | --hel | --he)
143 # Omit some internal or obsolete options to make the list less imposing.
144 # This message is too long to be a string in the A/UX 3.1 sh.
146 Usage: configure [options] [host]
147 Options: [defaults in brackets after descriptions]
149 --cache-file=FILE cache test results in FILE
150 --help print this message
151 --no-create do not create output files
152 --quiet, --silent do not print \`checking...' messages
153 --version print the version of autoconf that created configure
154 Directory and file names:
155 --prefix=PREFIX install architecture-independent files in PREFIX
157 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
159 --bindir=DIR user executables in DIR [EPREFIX/bin]
160 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
161 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
162 --datadir=DIR read-only architecture-independent data in DIR
164 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
165 --sharedstatedir=DIR modifiable architecture-independent data in DIR
167 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
168 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
169 --includedir=DIR C header files in DIR [PREFIX/include]
170 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
171 --infodir=DIR info documentation in DIR [PREFIX/info]
172 --mandir=DIR man documentation in DIR [PREFIX/man]
173 --srcdir=DIR find the sources in DIR [configure dir or ..]
174 --program-prefix=PREFIX prepend PREFIX to installed program names
175 --program-suffix=SUFFIX append SUFFIX to installed program names
176 --program-transform-name=PROGRAM
177 run sed PROGRAM on installed program names
181 --build=BUILD configure for building on BUILD [BUILD=HOST]
182 --host=HOST configure for HOST [guessed]
183 --target=TARGET configure for TARGET [TARGET=HOST]
184 Features and packages:
185 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
186 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
187 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
188 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
189 --x-includes=DIR X include files are in DIR
190 --x-libraries=DIR X library files are in DIR
192 if test -n "$ac_help"; then
193 echo "--enable and --with options recognized:$ac_help"
197 -host | --host | --hos | --ho)
199 -host=* | --host=* | --hos=* | --ho=*)
202 -includedir | --includedir | --includedi | --included | --include \
203 | --includ | --inclu | --incl | --inc)
204 ac_prev=includedir ;;
205 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
206 | --includ=* | --inclu=* | --incl=* | --inc=*)
207 includedir="$ac_optarg" ;;
209 -infodir | --infodir | --infodi | --infod | --info | --inf)
211 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
212 infodir="$ac_optarg" ;;
214 -libdir | --libdir | --libdi | --libd)
216 -libdir=* | --libdir=* | --libdi=* | --libd=*)
217 libdir="$ac_optarg" ;;
219 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
220 | --libexe | --libex | --libe)
221 ac_prev=libexecdir ;;
222 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
223 | --libexe=* | --libex=* | --libe=*)
224 libexecdir="$ac_optarg" ;;
226 -localstatedir | --localstatedir | --localstatedi | --localstated \
227 | --localstate | --localstat | --localsta | --localst \
228 | --locals | --local | --loca | --loc | --lo)
229 ac_prev=localstatedir ;;
230 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
231 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
232 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
233 localstatedir="$ac_optarg" ;;
235 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
237 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
238 mandir="$ac_optarg" ;;
241 # Obsolete; use --without-fp.
244 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
248 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
249 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
252 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
253 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
254 | --oldin | --oldi | --old | --ol | --o)
255 ac_prev=oldincludedir ;;
256 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
257 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
258 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
259 oldincludedir="$ac_optarg" ;;
261 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
263 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
264 prefix="$ac_optarg" ;;
266 -program-prefix | --program-prefix | --program-prefi | --program-pref \
267 | --program-pre | --program-pr | --program-p)
268 ac_prev=program_prefix ;;
269 -program-prefix=* | --program-prefix=* | --program-prefi=* \
270 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
271 program_prefix="$ac_optarg" ;;
273 -program-suffix | --program-suffix | --program-suffi | --program-suff \
274 | --program-suf | --program-su | --program-s)
275 ac_prev=program_suffix ;;
276 -program-suffix=* | --program-suffix=* | --program-suffi=* \
277 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
278 program_suffix="$ac_optarg" ;;
280 -program-transform-name | --program-transform-name \
281 | --program-transform-nam | --program-transform-na \
282 | --program-transform-n | --program-transform- \
283 | --program-transform | --program-transfor \
284 | --program-transfo | --program-transf \
285 | --program-trans | --program-tran \
286 | --progr-tra | --program-tr | --program-t)
287 ac_prev=program_transform_name ;;
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 program_transform_name="$ac_optarg" ;;
297 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
298 | -silent | --silent | --silen | --sile | --sil)
301 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
303 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
305 sbindir="$ac_optarg" ;;
307 -sharedstatedir | --sharedstatedir | --sharedstatedi \
308 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
309 | --sharedst | --shareds | --shared | --share | --shar \
311 ac_prev=sharedstatedir ;;
312 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
313 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
314 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
316 sharedstatedir="$ac_optarg" ;;
318 -site | --site | --sit)
320 -site=* | --site=* | --sit=*)
323 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
325 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
326 srcdir="$ac_optarg" ;;
328 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
329 | --syscon | --sysco | --sysc | --sys | --sy)
330 ac_prev=sysconfdir ;;
331 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
332 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
333 sysconfdir="$ac_optarg" ;;
335 -target | --target | --targe | --targ | --tar | --ta | --t)
337 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
338 target="$ac_optarg" ;;
340 -v | -verbose | --verbose | --verbos | --verbo | --verb)
343 -version | --version | --versio | --versi | --vers)
344 echo "configure generated by autoconf version 2.13"
348 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
349 # Reject names that are not valid shell variable names.
350 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
351 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
353 ac_package=`echo $ac_package| sed 's/-/_/g'`
358 eval "with_${ac_package}='$ac_optarg'" ;;
360 -without-* | --without-*)
361 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
362 # Reject names that are not valid shell variable names.
363 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
364 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
366 ac_package=`echo $ac_package| sed 's/-/_/g'`
367 eval "with_${ac_package}=no" ;;
370 # Obsolete; use --with-x.
373 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
374 | --x-incl | --x-inc | --x-in | --x-i)
375 ac_prev=x_includes ;;
376 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
377 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
378 x_includes="$ac_optarg" ;;
380 -x-libraries | --x-libraries | --x-librarie | --x-librari \
381 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
382 ac_prev=x_libraries ;;
383 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
384 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
385 x_libraries="$ac_optarg" ;;
387 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
391 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
392 echo "configure: warning: $ac_option: invalid host type" 1>&2
394 if test "x$nonopt" != xNONE; then
395 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
403 if test -n "$ac_prev"; then
404 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
407 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
409 # File descriptor usage:
412 # 2 errors and warnings
413 # 3 some systems may open it to /dev/tty
414 # 4 used on the Kubota Titan
415 # 6 checking for... messages and results
416 # 5 compiler messages saved in config.log
417 if test "$silent" = yes; then
425 This file contains any messages produced by compilers while
426 running configure, to aid debugging if configure makes a mistake.
429 # Strip out --no-create and --no-recursion so they do not pile up.
430 # Also quote any args containing shell metacharacters.
435 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
436 | --no-cr | --no-c) ;;
437 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
438 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
439 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
440 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
441 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
446 # Only set these to C if already set. These must not be set unconditionally
447 # because not all systems understand e.g. LANG=C (notably SCO).
448 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
449 # Non-C LC_CTYPE values break the ctype check.
450 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
451 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
452 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
453 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
455 # confdefs.h avoids OS command line length limits that DEFS can exceed.
456 rm -rf conftest* confdefs.h
457 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
460 # A filename unique to this package, relative to the directory that
461 # configure is in, which we can look for to find out if srcdir is correct.
462 ac_unique_file=Makefile
464 # Find the source files, if location was not specified.
465 if test -z "$srcdir"; then
466 ac_srcdir_defaulted=yes
467 # Try the directory containing this script, then its parent.
469 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
470 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
472 if test ! -r $srcdir/$ac_unique_file; then
476 ac_srcdir_defaulted=no
478 if test ! -r $srcdir/$ac_unique_file; then
479 if test "$ac_srcdir_defaulted" = yes; then
480 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
482 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
485 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
487 # Prefer explicitly selected file to automatically selected ones.
488 if test -z "$CONFIG_SITE"; then
489 if test "x$prefix" != xNONE; then
490 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
492 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
495 for ac_site_file in $CONFIG_SITE; do
496 if test -r "$ac_site_file"; then
497 echo "loading site script $ac_site_file"
502 if test -r "$cache_file"; then
503 echo "loading cache $cache_file"
506 echo "creating cache $cache_file"
511 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
512 ac_cpp='$CPP $CPPFLAGS'
513 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
514 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
515 cross_compiling=$ac_cv_prog_cc_cross
519 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
520 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
521 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
528 ac_n= ac_c='\c' ac_t=
534 for ac_prog in mawk gawk nawk awk
536 # Extract the first word of "$ac_prog", so it can be a program name with args.
537 set dummy $ac_prog; ac_word=$2
538 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
539 echo "configure:540: checking for $ac_word" >&5
540 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
541 echo $ac_n "(cached) $ac_c" 1>&6
543 if test -n "$AWK"; then
544 ac_cv_prog_AWK="$AWK" # Let the user override the test.
546 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
548 for ac_dir in $ac_dummy; do
549 test -z "$ac_dir" && ac_dir=.
550 if test -f $ac_dir/$ac_word; then
551 ac_cv_prog_AWK="$ac_prog"
558 AWK="$ac_cv_prog_AWK"
559 if test -n "$AWK"; then
560 echo "$ac_t""$AWK" 1>&6
562 echo "$ac_t""no" 1>&6
565 test -n "$AWK" && break
569 echo $ac_n "checking version of the package""... $ac_c" 1>&6
570 echo "configure:571: checking version of the package" >&5
571 if test -f .version; then
572 VERSION=`cat .version`
573 elif test -f ../.version; then
574 VERSION=`cat ../.version`
578 VERSIONHI=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $1}'`
579 VERSIONLO=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $2}'`
580 VERSIONP=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $3}'`
581 echo "$ac_t""${VERSION}" 1>&6
586 cat >> confdefs.h <<EOF
587 #define SDCC_VERSION_LO ${VERSIONLO}
590 cat >> confdefs.h <<EOF
591 #define SDCC_VERSION_HI ${VERSIONHI}
594 cat >> confdefs.h <<EOF
595 #define SDCC_VERSION_P ${VERSIONP}
598 cat >> confdefs.h <<EOF
599 #define SDCC_VERSION_STR "${VERSION}"
602 sdcc_cv_version=$VERSION
603 sdcc_cv_versionhi=$VERSIONHI
604 sdcc_cv_versionlo=$VERSIONLO
605 sdcc_cv_versionp=$VERSIONP
609 # Extract the first word of "gcc", so it can be a program name with args.
610 set dummy gcc; ac_word=$2
611 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
612 echo "configure:613: checking for $ac_word" >&5
613 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
614 echo $ac_n "(cached) $ac_c" 1>&6
616 if test -n "$CC"; then
617 ac_cv_prog_CC="$CC" # Let the user override the test.
619 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
621 for ac_dir in $ac_dummy; do
622 test -z "$ac_dir" && ac_dir=.
623 if test -f $ac_dir/$ac_word; then
632 if test -n "$CC"; then
633 echo "$ac_t""$CC" 1>&6
635 echo "$ac_t""no" 1>&6
638 if test -z "$CC"; then
639 # Extract the first word of "cc", so it can be a program name with args.
640 set dummy cc; ac_word=$2
641 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
642 echo "configure:643: checking for $ac_word" >&5
643 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
644 echo $ac_n "(cached) $ac_c" 1>&6
646 if test -n "$CC"; then
647 ac_cv_prog_CC="$CC" # Let the user override the test.
649 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
652 for ac_dir in $ac_dummy; do
653 test -z "$ac_dir" && ac_dir=.
654 if test -f $ac_dir/$ac_word; then
655 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
664 if test $ac_prog_rejected = yes; then
665 # We found a bogon in the path, so make sure we never use it.
666 set dummy $ac_cv_prog_CC
668 if test $# -gt 0; then
669 # We chose a different compiler from the bogus one.
670 # However, it has the same basename, so the bogon will be chosen
671 # first if we set CC to just the basename; use the full file name.
673 set dummy "$ac_dir/$ac_word" "$@"
681 if test -n "$CC"; then
682 echo "$ac_t""$CC" 1>&6
684 echo "$ac_t""no" 1>&6
687 if test -z "$CC"; then
690 # Extract the first word of "cl", so it can be a program name with args.
691 set dummy cl; ac_word=$2
692 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
693 echo "configure:694: checking for $ac_word" >&5
694 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
695 echo $ac_n "(cached) $ac_c" 1>&6
697 if test -n "$CC"; then
698 ac_cv_prog_CC="$CC" # Let the user override the test.
700 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
702 for ac_dir in $ac_dummy; do
703 test -z "$ac_dir" && ac_dir=.
704 if test -f $ac_dir/$ac_word; then
713 if test -n "$CC"; then
714 echo "$ac_t""$CC" 1>&6
716 echo "$ac_t""no" 1>&6
721 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
724 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
725 echo "configure:726: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
728 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
729 ac_cpp='$CPP $CPPFLAGS'
730 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
731 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
732 cross_compiling=$ac_cv_prog_cc_cross
734 cat > conftest.$ac_ext << EOF
736 #line 737 "configure"
737 #include "confdefs.h"
741 if { (eval echo configure:742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
742 ac_cv_prog_cc_works=yes
743 # If we can't run a trivial program, we are probably using a cross compiler.
744 if (./conftest; exit) 2>/dev/null; then
745 ac_cv_prog_cc_cross=no
747 ac_cv_prog_cc_cross=yes
750 echo "configure: failed program was:" >&5
751 cat conftest.$ac_ext >&5
752 ac_cv_prog_cc_works=no
756 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
757 ac_cpp='$CPP $CPPFLAGS'
758 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
759 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
760 cross_compiling=$ac_cv_prog_cc_cross
762 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
763 if test $ac_cv_prog_cc_works = no; then
764 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
766 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
767 echo "configure:768: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
768 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
769 cross_compiling=$ac_cv_prog_cc_cross
771 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
772 echo "configure:773: checking whether we are using GNU C" >&5
773 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
774 echo $ac_n "(cached) $ac_c" 1>&6
776 cat > conftest.c <<EOF
781 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
788 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
790 if test $ac_cv_prog_gcc = yes; then
796 ac_test_CFLAGS="${CFLAGS+set}"
797 ac_save_CFLAGS="$CFLAGS"
799 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
800 echo "configure:801: checking whether ${CC-cc} accepts -g" >&5
801 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
802 echo $ac_n "(cached) $ac_c" 1>&6
804 echo 'void f(){}' > conftest.c
805 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
814 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
815 if test "$ac_test_CFLAGS" = set; then
816 CFLAGS="$ac_save_CFLAGS"
817 elif test $ac_cv_prog_cc_g = yes; then
818 if test "$GCC" = yes; then
824 if test "$GCC" = yes; then
831 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
833 # Extract the first word of "$ac_prog", so it can be a program name with args.
834 set dummy $ac_prog; ac_word=$2
835 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
836 echo "configure:837: checking for $ac_word" >&5
837 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
838 echo $ac_n "(cached) $ac_c" 1>&6
840 if test -n "$CXX"; then
841 ac_cv_prog_CXX="$CXX" # Let the user override the test.
843 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
845 for ac_dir in $ac_dummy; do
846 test -z "$ac_dir" && ac_dir=.
847 if test -f $ac_dir/$ac_word; then
848 ac_cv_prog_CXX="$ac_prog"
855 CXX="$ac_cv_prog_CXX"
856 if test -n "$CXX"; then
857 echo "$ac_t""$CXX" 1>&6
859 echo "$ac_t""no" 1>&6
862 test -n "$CXX" && break
864 test -n "$CXX" || CXX="gcc"
867 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
868 echo "configure:869: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
871 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
872 ac_cpp='$CXXCPP $CPPFLAGS'
873 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
874 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
875 cross_compiling=$ac_cv_prog_cxx_cross
877 cat > conftest.$ac_ext << EOF
879 #line 880 "configure"
880 #include "confdefs.h"
882 int main(){return(0);}
884 if { (eval echo configure:885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
885 ac_cv_prog_cxx_works=yes
886 # If we can't run a trivial program, we are probably using a cross compiler.
887 if (./conftest; exit) 2>/dev/null; then
888 ac_cv_prog_cxx_cross=no
890 ac_cv_prog_cxx_cross=yes
893 echo "configure: failed program was:" >&5
894 cat conftest.$ac_ext >&5
895 ac_cv_prog_cxx_works=no
899 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
900 ac_cpp='$CPP $CPPFLAGS'
901 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
902 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
903 cross_compiling=$ac_cv_prog_cc_cross
905 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
906 if test $ac_cv_prog_cxx_works = no; then
907 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
909 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
910 echo "configure:911: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
911 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
912 cross_compiling=$ac_cv_prog_cxx_cross
914 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
915 echo "configure:916: checking whether we are using GNU C++" >&5
916 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
917 echo $ac_n "(cached) $ac_c" 1>&6
919 cat > conftest.C <<EOF
924 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
931 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
933 if test $ac_cv_prog_gxx = yes; then
939 ac_test_CXXFLAGS="${CXXFLAGS+set}"
940 ac_save_CXXFLAGS="$CXXFLAGS"
942 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
943 echo "configure:944: checking whether ${CXX-g++} accepts -g" >&5
944 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
945 echo $ac_n "(cached) $ac_c" 1>&6
947 echo 'void f(){}' > conftest.cc
948 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
957 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
958 if test "$ac_test_CXXFLAGS" = set; then
959 CXXFLAGS="$ac_save_CXXFLAGS"
960 elif test $ac_cv_prog_cxx_g = yes; then
961 if test "$GXX" = yes; then
967 if test "$GXX" = yes; then
974 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
975 echo "configure:976: checking how to run the C preprocessor" >&5
976 # On Suns, sometimes $CPP names a directory.
977 if test -n "$CPP" && test -d "$CPP"; then
980 if test -z "$CPP"; then
981 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
982 echo $ac_n "(cached) $ac_c" 1>&6
984 # This must be in double quotes, not single quotes, because CPP may get
985 # substituted into the Makefile and "${CC-cc}" will confuse make.
987 # On the NeXT, cc -E runs the code through the compiler's parser,
988 # not just through cpp.
989 cat > conftest.$ac_ext <<EOF
990 #line 991 "configure"
991 #include "confdefs.h"
995 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
996 { (eval echo configure:997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
997 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
998 if test -z "$ac_err"; then
1002 echo "configure: failed program was:" >&5
1003 cat conftest.$ac_ext >&5
1005 CPP="${CC-cc} -E -traditional-cpp"
1006 cat > conftest.$ac_ext <<EOF
1007 #line 1008 "configure"
1008 #include "confdefs.h"
1012 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1013 { (eval echo configure:1014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1014 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1015 if test -z "$ac_err"; then
1019 echo "configure: failed program was:" >&5
1020 cat conftest.$ac_ext >&5
1022 CPP="${CC-cc} -nologo -E"
1023 cat > conftest.$ac_ext <<EOF
1024 #line 1025 "configure"
1025 #include "confdefs.h"
1029 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1030 { (eval echo configure:1031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1031 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1032 if test -z "$ac_err"; then
1036 echo "configure: failed program was:" >&5
1037 cat conftest.$ac_ext >&5
1046 ac_cv_prog_CPP="$CPP"
1048 CPP="$ac_cv_prog_CPP"
1050 ac_cv_prog_CPP="$CPP"
1052 echo "$ac_t""$CPP" 1>&6
1055 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1056 if test -f $ac_dir/install-sh; then
1058 ac_install_sh="$ac_aux_dir/install-sh -c"
1060 elif test -f $ac_dir/install.sh; then
1062 ac_install_sh="$ac_aux_dir/install.sh -c"
1066 if test -z "$ac_aux_dir"; then
1067 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1069 ac_config_guess=$ac_aux_dir/config.guess
1070 ac_config_sub=$ac_aux_dir/config.sub
1071 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1073 # Find a good install program. We prefer a C program (faster),
1074 # so one script is as good as another. But avoid the broken or
1075 # incompatible versions:
1076 # SysV /etc/install, /usr/sbin/install
1077 # SunOS /usr/etc/install
1078 # IRIX /sbin/install
1080 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1081 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1082 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1083 # ./install, which can be erroneously created by make from ./install.sh.
1084 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1085 echo "configure:1086: checking for a BSD compatible install" >&5
1086 if test -z "$INSTALL"; then
1087 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1088 echo $ac_n "(cached) $ac_c" 1>&6
1090 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1091 for ac_dir in $PATH; do
1092 # Account for people who put trailing slashes in PATH elements.
1094 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1096 # OSF1 and SCO ODT 3.0 have their own names for install.
1097 # Don't use installbsd from OSF since it installs stuff as root
1099 for ac_prog in ginstall scoinst install; do
1100 if test -f $ac_dir/$ac_prog; then
1101 if test $ac_prog = install &&
1102 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1103 # AIX install. It has an incompatible calling convention.
1106 ac_cv_path_install="$ac_dir/$ac_prog -c"
1117 if test "${ac_cv_path_install+set}" = set; then
1118 INSTALL="$ac_cv_path_install"
1120 # As a last resort, use the slow shell script. We don't cache a
1121 # path for INSTALL within a source directory, because that will
1122 # break other packages using the cache if that directory is
1123 # removed, or if the path is relative.
1124 INSTALL="$ac_install_sh"
1127 echo "$ac_t""$INSTALL" 1>&6
1129 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1130 # It thinks the first close brace ends the variable substitution.
1131 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1133 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1135 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1137 # Extract the first word of "ranlib", so it can be a program name with args.
1138 set dummy ranlib; ac_word=$2
1139 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1140 echo "configure:1141: checking for $ac_word" >&5
1141 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1142 echo $ac_n "(cached) $ac_c" 1>&6
1144 if test -n "$RANLIB"; then
1145 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1147 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1149 for ac_dir in $ac_dummy; do
1150 test -z "$ac_dir" && ac_dir=.
1151 if test -f $ac_dir/$ac_word; then
1152 ac_cv_prog_RANLIB="ranlib"
1157 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1160 RANLIB="$ac_cv_prog_RANLIB"
1161 if test -n "$RANLIB"; then
1162 echo "$ac_t""$RANLIB" 1>&6
1164 echo "$ac_t""no" 1>&6
1167 # Extract the first word of "flex", so it can be a program name with args.
1168 set dummy flex; ac_word=$2
1169 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1170 echo "configure:1171: checking for $ac_word" >&5
1171 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1172 echo $ac_n "(cached) $ac_c" 1>&6
1174 if test -n "$LEX"; then
1175 ac_cv_prog_LEX="$LEX" # Let the user override the test.
1177 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1179 for ac_dir in $ac_dummy; do
1180 test -z "$ac_dir" && ac_dir=.
1181 if test -f $ac_dir/$ac_word; then
1182 ac_cv_prog_LEX="flex"
1187 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1190 LEX="$ac_cv_prog_LEX"
1191 if test -n "$LEX"; then
1192 echo "$ac_t""$LEX" 1>&6
1194 echo "$ac_t""no" 1>&6
1197 if test -z "$LEXLIB"
1203 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1204 echo "configure:1205: checking for yywrap in -l$ac_lib" >&5
1205 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1206 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1207 echo $ac_n "(cached) $ac_c" 1>&6
1209 ac_save_LIBS="$LIBS"
1210 LIBS="-l$ac_lib $LIBS"
1211 cat > conftest.$ac_ext <<EOF
1212 #line 1213 "configure"
1213 #include "confdefs.h"
1214 /* Override any gcc2 internal prototype to avoid an error. */
1215 /* We use char because int might match the return type of a gcc2
1216 builtin and then its argument prototype would still apply. */
1223 if { (eval echo configure:1224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1225 eval "ac_cv_lib_$ac_lib_var=yes"
1227 echo "configure: failed program was:" >&5
1228 cat conftest.$ac_ext >&5
1230 eval "ac_cv_lib_$ac_lib_var=no"
1233 LIBS="$ac_save_LIBS"
1236 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1237 echo "$ac_t""yes" 1>&6
1240 echo "$ac_t""no" 1>&6
1245 # Extract the first word of "bison", so it can be a program name with args.
1246 set dummy bison; ac_word=$2
1247 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1248 echo "configure:1249: checking for $ac_word" >&5
1249 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1250 echo $ac_n "(cached) $ac_c" 1>&6
1252 if test -n "$YACC"; then
1253 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1255 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1257 for ac_dir in $ac_dummy; do
1258 test -z "$ac_dir" && ac_dir=.
1259 if test -f $ac_dir/$ac_word; then
1260 ac_cv_prog_YACC="bison -y"
1265 test -z "$ac_cv_prog_YACC" && ac_cv_prog_YACC=":"
1268 YACC="$ac_cv_prog_YACC"
1269 if test -n "$YACC"; then
1270 echo "$ac_t""$YACC" 1>&6
1272 echo "$ac_t""no" 1>&6
1275 # Extract the first word of "autoconf", so it can be a program name with args.
1276 set dummy autoconf; ac_word=$2
1277 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1278 echo "configure:1279: checking for $ac_word" >&5
1279 if eval "test \"`echo '$''{'ac_cv_prog_AUTOCONF'+set}'`\" = set"; then
1280 echo $ac_n "(cached) $ac_c" 1>&6
1282 if test -n "$AUTOCONF"; then
1283 ac_cv_prog_AUTOCONF="$AUTOCONF" # Let the user override the test.
1285 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1287 for ac_dir in $ac_dummy; do
1288 test -z "$ac_dir" && ac_dir=.
1289 if test -f $ac_dir/$ac_word; then
1290 ac_cv_prog_AUTOCONF="autoconf"
1295 test -z "$ac_cv_prog_AUTOCONF" && ac_cv_prog_AUTOCONF=":"
1298 AUTOCONF="$ac_cv_prog_AUTOCONF"
1299 if test -n "$AUTOCONF"; then
1300 echo "$ac_t""$AUTOCONF" 1>&6
1302 echo "$ac_t""no" 1>&6
1305 # Extract the first word of "as", so it can be a program name with args.
1306 set dummy as; ac_word=$2
1307 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1308 echo "configure:1309: checking for $ac_word" >&5
1309 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1310 echo $ac_n "(cached) $ac_c" 1>&6
1312 if test -n "$AS"; then
1313 ac_cv_prog_AS="$AS" # Let the user override the test.
1315 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1317 for ac_dir in $ac_dummy; do
1318 test -z "$ac_dir" && ac_dir=.
1319 if test -f $ac_dir/$ac_word; then
1325 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS=":"
1329 if test -n "$AS"; then
1330 echo "$ac_t""$AS" 1>&6
1332 echo "$ac_t""no" 1>&6
1335 # Extract the first word of "cp", so it can be a program name with args.
1336 set dummy cp; ac_word=$2
1337 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1338 echo "configure:1339: checking for $ac_word" >&5
1339 if eval "test \"`echo '$''{'ac_cv_prog_CP'+set}'`\" = set"; then
1340 echo $ac_n "(cached) $ac_c" 1>&6
1342 if test -n "$CP"; then
1343 ac_cv_prog_CP="$CP" # Let the user override the test.
1345 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1347 for ac_dir in $ac_dummy; do
1348 test -z "$ac_dir" && ac_dir=.
1349 if test -f $ac_dir/$ac_word; then
1355 test -z "$ac_cv_prog_CP" && ac_cv_prog_CP=":"
1359 if test -n "$CP"; then
1360 echo "$ac_t""$CP" 1>&6
1362 echo "$ac_t""no" 1>&6
1368 if test "$YACC" = ":"; then
1369 { echo "configure: error: Cannot find required program bison." 1>&2; exit 1; }
1372 if test "$LEX" = ":"; then
1373 { echo "configure: error: Cannot find required program lex." 1>&2; exit 1; }
1378 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1379 ac_cpp='$CPP $CPPFLAGS'
1380 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1381 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1382 cross_compiling=$ac_cv_prog_cc_cross
1385 # Checking for header files.
1386 # ===========================================================================
1387 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1388 echo "configure:1389: checking for ANSI C header files" >&5
1389 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1390 echo $ac_n "(cached) $ac_c" 1>&6
1392 cat > conftest.$ac_ext <<EOF
1393 #line 1394 "configure"
1394 #include "confdefs.h"
1400 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1401 { (eval echo configure:1402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1402 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1403 if test -z "$ac_err"; then
1405 ac_cv_header_stdc=yes
1408 echo "configure: failed program was:" >&5
1409 cat conftest.$ac_ext >&5
1411 ac_cv_header_stdc=no
1415 if test $ac_cv_header_stdc = yes; then
1416 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1417 cat > conftest.$ac_ext <<EOF
1418 #line 1419 "configure"
1419 #include "confdefs.h"
1422 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1423 egrep "memchr" >/dev/null 2>&1; then
1427 ac_cv_header_stdc=no
1433 if test $ac_cv_header_stdc = yes; then
1434 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1435 cat > conftest.$ac_ext <<EOF
1436 #line 1437 "configure"
1437 #include "confdefs.h"
1440 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1441 egrep "free" >/dev/null 2>&1; then
1445 ac_cv_header_stdc=no
1451 if test $ac_cv_header_stdc = yes; then
1452 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1453 if test "$cross_compiling" = yes; then
1456 cat > conftest.$ac_ext <<EOF
1457 #line 1458 "configure"
1458 #include "confdefs.h"
1460 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1461 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1462 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1463 int main () { int i; for (i = 0; i < 256; i++)
1464 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1468 if { (eval echo configure:1469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1472 echo "configure: failed program was:" >&5
1473 cat conftest.$ac_ext >&5
1475 ac_cv_header_stdc=no
1483 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1484 if test $ac_cv_header_stdc = yes; then
1485 cat >> confdefs.h <<\EOF
1486 #define STDC_HEADERS 1
1491 for ac_hdr in getopt.h
1493 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1494 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1495 echo "configure:1496: checking for $ac_hdr" >&5
1496 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1497 echo $ac_n "(cached) $ac_c" 1>&6
1499 cat > conftest.$ac_ext <<EOF
1500 #line 1501 "configure"
1501 #include "confdefs.h"
1504 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1505 { (eval echo configure:1506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1506 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1507 if test -z "$ac_err"; then
1509 eval "ac_cv_header_$ac_safe=yes"
1512 echo "configure: failed program was:" >&5
1513 cat conftest.$ac_ext >&5
1515 eval "ac_cv_header_$ac_safe=no"
1519 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1520 echo "$ac_t""yes" 1>&6
1521 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1522 cat >> confdefs.h <<EOF
1523 #define $ac_tr_hdr 1
1527 echo "$ac_t""no" 1>&6
1531 for ac_hdr in unistd.h
1533 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1534 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1535 echo "configure:1536: checking for $ac_hdr" >&5
1536 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1537 echo $ac_n "(cached) $ac_c" 1>&6
1539 cat > conftest.$ac_ext <<EOF
1540 #line 1541 "configure"
1541 #include "confdefs.h"
1544 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1545 { (eval echo configure:1546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1546 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1547 if test -z "$ac_err"; then
1549 eval "ac_cv_header_$ac_safe=yes"
1552 echo "configure: failed program was:" >&5
1553 cat conftest.$ac_ext >&5
1555 eval "ac_cv_header_$ac_safe=no"
1559 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1560 echo "$ac_t""yes" 1>&6
1561 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1562 cat >> confdefs.h <<EOF
1563 #define $ac_tr_hdr 1
1567 echo "$ac_t""no" 1>&6
1571 for ac_hdr in endian.h
1573 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1574 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1575 echo "configure:1576: checking for $ac_hdr" >&5
1576 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1577 echo $ac_n "(cached) $ac_c" 1>&6
1579 cat > conftest.$ac_ext <<EOF
1580 #line 1581 "configure"
1581 #include "confdefs.h"
1584 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1585 { (eval echo configure:1586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1586 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1587 if test -z "$ac_err"; then
1589 eval "ac_cv_header_$ac_safe=yes"
1592 echo "configure: failed program was:" >&5
1593 cat conftest.$ac_ext >&5
1595 eval "ac_cv_header_$ac_safe=no"
1599 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1600 echo "$ac_t""yes" 1>&6
1601 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1602 cat >> confdefs.h <<EOF
1603 #define $ac_tr_hdr 1
1607 echo "$ac_t""no" 1>&6
1611 for ac_hdr in sys/isa_defs.h
1613 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1614 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1615 echo "configure:1616: checking for $ac_hdr" >&5
1616 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1617 echo $ac_n "(cached) $ac_c" 1>&6
1619 cat > conftest.$ac_ext <<EOF
1620 #line 1621 "configure"
1621 #include "confdefs.h"
1624 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1625 { (eval echo configure:1626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1626 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1627 if test -z "$ac_err"; then
1629 eval "ac_cv_header_$ac_safe=yes"
1632 echo "configure: failed program was:" >&5
1633 cat conftest.$ac_ext >&5
1635 eval "ac_cv_header_$ac_safe=no"
1639 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1640 echo "$ac_t""yes" 1>&6
1641 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1642 cat >> confdefs.h <<EOF
1643 #define $ac_tr_hdr 1
1647 echo "$ac_t""no" 1>&6
1651 for ac_hdr in sys/socket.h
1653 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1654 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1655 echo "configure:1656: checking for $ac_hdr" >&5
1656 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1657 echo $ac_n "(cached) $ac_c" 1>&6
1659 cat > conftest.$ac_ext <<EOF
1660 #line 1661 "configure"
1661 #include "confdefs.h"
1664 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1665 { (eval echo configure:1666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1666 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1667 if test -z "$ac_err"; then
1669 eval "ac_cv_header_$ac_safe=yes"
1672 echo "configure: failed program was:" >&5
1673 cat conftest.$ac_ext >&5
1675 eval "ac_cv_header_$ac_safe=no"
1679 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1680 echo "$ac_t""yes" 1>&6
1681 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1682 cat >> confdefs.h <<EOF
1683 #define $ac_tr_hdr 1
1687 echo "$ac_t""no" 1>&6
1692 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1694 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1695 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1696 echo "configure:1697: checking for $ac_hdr that defines DIR" >&5
1697 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1698 echo $ac_n "(cached) $ac_c" 1>&6
1700 cat > conftest.$ac_ext <<EOF
1701 #line 1702 "configure"
1702 #include "confdefs.h"
1703 #include <sys/types.h>
1709 if { (eval echo configure:1710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1711 eval "ac_cv_header_dirent_$ac_safe=yes"
1713 echo "configure: failed program was:" >&5
1714 cat conftest.$ac_ext >&5
1716 eval "ac_cv_header_dirent_$ac_safe=no"
1720 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1721 echo "$ac_t""yes" 1>&6
1722 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1723 cat >> confdefs.h <<EOF
1724 #define $ac_tr_hdr 1
1726 ac_header_dirent=$ac_hdr; break
1728 echo "$ac_t""no" 1>&6
1731 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1732 if test $ac_header_dirent = dirent.h; then
1733 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1734 echo "configure:1735: checking for opendir in -ldir" >&5
1735 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1736 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1737 echo $ac_n "(cached) $ac_c" 1>&6
1739 ac_save_LIBS="$LIBS"
1741 cat > conftest.$ac_ext <<EOF
1742 #line 1743 "configure"
1743 #include "confdefs.h"
1744 /* Override any gcc2 internal prototype to avoid an error. */
1745 /* We use char because int might match the return type of a gcc2
1746 builtin and then its argument prototype would still apply. */
1753 if { (eval echo configure:1754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1755 eval "ac_cv_lib_$ac_lib_var=yes"
1757 echo "configure: failed program was:" >&5
1758 cat conftest.$ac_ext >&5
1760 eval "ac_cv_lib_$ac_lib_var=no"
1763 LIBS="$ac_save_LIBS"
1766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1767 echo "$ac_t""yes" 1>&6
1770 echo "$ac_t""no" 1>&6
1774 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1775 echo "configure:1776: checking for opendir in -lx" >&5
1776 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1777 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1778 echo $ac_n "(cached) $ac_c" 1>&6
1780 ac_save_LIBS="$LIBS"
1782 cat > conftest.$ac_ext <<EOF
1783 #line 1784 "configure"
1784 #include "confdefs.h"
1785 /* Override any gcc2 internal prototype to avoid an error. */
1786 /* We use char because int might match the return type of a gcc2
1787 builtin and then its argument prototype would still apply. */
1794 if { (eval echo configure:1795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1796 eval "ac_cv_lib_$ac_lib_var=yes"
1798 echo "configure: failed program was:" >&5
1799 cat conftest.$ac_ext >&5
1801 eval "ac_cv_lib_$ac_lib_var=no"
1804 LIBS="$ac_save_LIBS"
1807 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1808 echo "$ac_t""yes" 1>&6
1811 echo "$ac_t""no" 1>&6
1817 # This must be after CPP
1819 echo $ac_n "checking which header file defines FD_ macros""... $ac_c" 1>&6
1820 echo "configure:1821: checking which header file defines FD_ macros" >&5
1821 if eval "test \"`echo '$''{'s51_cv_fd'+set}'`\" = set"; then
1822 echo $ac_n "(cached) $ac_c" 1>&6
1824 sdcc_cv_fd="unknown"
1825 cat > conftest.$ac_ext <<EOF
1826 #line 1827 "configure"
1827 #include "confdefs.h"
1829 #include <sys/time.h>
1834 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1835 egrep "yes" >/dev/null 2>&1; then
1837 sdcc_cv_fd="<sys/time.h>"
1841 cat > conftest.$ac_ext <<EOF
1842 #line 1843 "configure"
1843 #include "confdefs.h"
1845 #include <sys/types.h>
1850 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1851 egrep "yes" >/dev/null 2>&1; then
1853 sdcc_cv_fd="<sys/types.h>"
1857 cat > conftest.$ac_ext <<EOF
1858 #line 1859 "configure"
1859 #include "confdefs.h"
1861 #include <sys/select.h>
1866 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1867 egrep "yes" >/dev/null 2>&1; then
1869 sdcc_cv_fd="<sys/types.h>"
1875 echo "$ac_t""$s51_cv_fd" 1>&6
1877 cat >> confdefs.h <<\EOF
1878 #define FD_HEADER_OK 0
1881 if echo $sdcc_cv_fd|grep time >/dev/null 2>&1; then
1882 cat >> confdefs.h <<\EOF
1883 #define FD_NEED_TIME_H 1
1886 cat >> confdefs.h <<\EOF
1887 #define FD_HEADER_OK 1
1891 cat >> confdefs.h <<\EOF
1892 #define FD_NEED_TIME_H 0
1896 if echo $sdcc_cv_fd|grep types >/dev/null 2>&1; then
1897 cat >> confdefs.h <<\EOF
1898 #define FD_NEED_TYPES_H 1
1901 cat >> confdefs.h <<\EOF
1902 #define FD_HEADER_OK 1
1906 cat >> confdefs.h <<\EOF
1907 #define FD_NEED_TYPES_H 0
1911 if echo $sdcc_cv_fd|grep select >/dev/null 2>&1; then
1912 cat >> confdefs.h <<\EOF
1913 #define FD_NEED_SELECT_H 1
1916 cat >> confdefs.h <<\EOF
1917 #define FD_HEADER_OK 1
1921 cat >> confdefs.h <<\EOF
1922 #define FD_NEED_SELECT_H 0
1927 cat >> confdefs.h <<EOF
1928 #define HEADER_FD ${sdcc_cv_fd}
1933 # Checking for functions
1934 # ===========================================================================
1935 for ac_func in strlen strcpy strcat strstr strcmp strerror strtok strdup
1937 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1938 echo "configure:1939: checking for $ac_func" >&5
1939 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1940 echo $ac_n "(cached) $ac_c" 1>&6
1942 cat > conftest.$ac_ext <<EOF
1943 #line 1944 "configure"
1944 #include "confdefs.h"
1945 /* System header to define __stub macros and hopefully few prototypes,
1946 which can conflict with char $ac_func(); below. */
1948 /* Override any gcc2 internal prototype to avoid an error. */
1949 /* We use char because int might match the return type of a gcc2
1950 builtin and then its argument prototype would still apply. */
1955 /* The GNU C library defines this for functions which it implements
1956 to always fail with ENOSYS. Some functions are actually named
1957 something starting with __ and the normal name is an alias. */
1958 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1966 if { (eval echo configure:1967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1968 eval "ac_cv_func_$ac_func=yes"
1970 echo "configure: failed program was:" >&5
1971 cat conftest.$ac_ext >&5
1973 eval "ac_cv_func_$ac_func=no"
1978 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1979 echo "$ac_t""yes" 1>&6
1980 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1981 cat >> confdefs.h <<EOF
1982 #define $ac_tr_func 1
1986 echo "$ac_t""no" 1>&6
1990 for ac_func in strchr memcpy
1992 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1993 echo "configure:1994: checking for $ac_func" >&5
1994 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1995 echo $ac_n "(cached) $ac_c" 1>&6
1997 cat > conftest.$ac_ext <<EOF
1998 #line 1999 "configure"
1999 #include "confdefs.h"
2000 /* System header to define __stub macros and hopefully few prototypes,
2001 which can conflict with char $ac_func(); below. */
2003 /* Override any gcc2 internal prototype to avoid an error. */
2004 /* We use char because int might match the return type of a gcc2
2005 builtin and then its argument prototype would still apply. */
2010 /* The GNU C library defines this for functions which it implements
2011 to always fail with ENOSYS. Some functions are actually named
2012 something starting with __ and the normal name is an alias. */
2013 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2021 if { (eval echo configure:2022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2023 eval "ac_cv_func_$ac_func=yes"
2025 echo "configure: failed program was:" >&5
2026 cat conftest.$ac_ext >&5
2028 eval "ac_cv_func_$ac_func=no"
2033 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2034 echo "$ac_t""yes" 1>&6
2035 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2036 cat >> confdefs.h <<EOF
2037 #define $ac_tr_func 1
2041 echo "$ac_t""no" 1>&6
2045 for ac_func in fgets
2047 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2048 echo "configure:2049: checking for $ac_func" >&5
2049 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2050 echo $ac_n "(cached) $ac_c" 1>&6
2052 cat > conftest.$ac_ext <<EOF
2053 #line 2054 "configure"
2054 #include "confdefs.h"
2055 /* System header to define __stub macros and hopefully few prototypes,
2056 which can conflict with char $ac_func(); below. */
2058 /* Override any gcc2 internal prototype to avoid an error. */
2059 /* We use char because int might match the return type of a gcc2
2060 builtin and then its argument prototype would still apply. */
2065 /* The GNU C library defines this for functions which it implements
2066 to always fail with ENOSYS. Some functions are actually named
2067 something starting with __ and the normal name is an alias. */
2068 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2076 if { (eval echo configure:2077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2078 eval "ac_cv_func_$ac_func=yes"
2080 echo "configure: failed program was:" >&5
2081 cat conftest.$ac_ext >&5
2083 eval "ac_cv_func_$ac_func=no"
2088 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2089 echo "$ac_t""yes" 1>&6
2090 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2091 cat >> confdefs.h <<EOF
2092 #define $ac_tr_func 1
2096 echo "$ac_t""no" 1>&6
2100 for ac_func in yylex
2102 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2103 echo "configure:2104: checking for $ac_func" >&5
2104 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2105 echo $ac_n "(cached) $ac_c" 1>&6
2107 cat > conftest.$ac_ext <<EOF
2108 #line 2109 "configure"
2109 #include "confdefs.h"
2110 /* System header to define __stub macros and hopefully few prototypes,
2111 which can conflict with char $ac_func(); below. */
2113 /* Override any gcc2 internal prototype to avoid an error. */
2114 /* We use char because int might match the return type of a gcc2
2115 builtin and then its argument prototype would still apply. */
2120 /* The GNU C library defines this for functions which it implements
2121 to always fail with ENOSYS. Some functions are actually named
2122 something starting with __ and the normal name is an alias. */
2123 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2131 if { (eval echo configure:2132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2133 eval "ac_cv_func_$ac_func=yes"
2135 echo "configure: failed program was:" >&5
2136 cat conftest.$ac_ext >&5
2138 eval "ac_cv_func_$ac_func=no"
2143 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2144 echo "$ac_t""yes" 1>&6
2145 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2146 cat >> confdefs.h <<EOF
2147 #define $ac_tr_func 1
2151 echo "$ac_t""no" 1>&6
2156 # check if -lsocket && -lxnet is required to compile socket stuff
2158 echo $ac_n "checking for library containing socket""... $ac_c" 1>&6
2159 echo "configure:2160: checking for library containing socket" >&5
2160 if eval "test \"`echo '$''{'ac_cv_search_socket'+set}'`\" = set"; then
2161 echo $ac_n "(cached) $ac_c" 1>&6
2163 ac_func_search_save_LIBS="$LIBS"
2164 ac_cv_search_socket="no"
2165 cat > conftest.$ac_ext <<EOF
2166 #line 2167 "configure"
2167 #include "confdefs.h"
2168 /* Override any gcc2 internal prototype to avoid an error. */
2169 /* We use char because int might match the return type of a gcc2
2170 builtin and then its argument prototype would still apply. */
2177 if { (eval echo configure:2178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2179 ac_cv_search_socket="none required"
2181 echo "configure: failed program was:" >&5
2182 cat conftest.$ac_ext >&5
2185 test "$ac_cv_search_socket" = "no" && for i in socket; do
2186 LIBS="-l$i $ac_func_search_save_LIBS"
2187 cat > conftest.$ac_ext <<EOF
2188 #line 2189 "configure"
2189 #include "confdefs.h"
2190 /* Override any gcc2 internal prototype to avoid an error. */
2191 /* We use char because int might match the return type of a gcc2
2192 builtin and then its argument prototype would still apply. */
2199 if { (eval echo configure:2200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2201 ac_cv_search_socket="-l$i"
2204 echo "configure: failed program was:" >&5
2205 cat conftest.$ac_ext >&5
2209 LIBS="$ac_func_search_save_LIBS"
2212 echo "$ac_t""$ac_cv_search_socket" 1>&6
2213 if test "$ac_cv_search_socket" != "no"; then
2214 test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
2220 echo $ac_n "checking for library containing inet_addr""... $ac_c" 1>&6
2221 echo "configure:2222: checking for library containing inet_addr" >&5
2222 if eval "test \"`echo '$''{'ac_cv_search_inet_addr'+set}'`\" = set"; then
2223 echo $ac_n "(cached) $ac_c" 1>&6
2225 ac_func_search_save_LIBS="$LIBS"
2226 ac_cv_search_inet_addr="no"
2227 cat > conftest.$ac_ext <<EOF
2228 #line 2229 "configure"
2229 #include "confdefs.h"
2230 /* Override any gcc2 internal prototype to avoid an error. */
2231 /* We use char because int might match the return type of a gcc2
2232 builtin and then its argument prototype would still apply. */
2239 if { (eval echo configure:2240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2241 ac_cv_search_inet_addr="none required"
2243 echo "configure: failed program was:" >&5
2244 cat conftest.$ac_ext >&5
2247 test "$ac_cv_search_inet_addr" = "no" && for i in nsl xnet; do
2248 LIBS="-l$i $ac_func_search_save_LIBS"
2249 cat > conftest.$ac_ext <<EOF
2250 #line 2251 "configure"
2251 #include "confdefs.h"
2252 /* Override any gcc2 internal prototype to avoid an error. */
2253 /* We use char because int might match the return type of a gcc2
2254 builtin and then its argument prototype would still apply. */
2261 if { (eval echo configure:2262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2263 ac_cv_search_inet_addr="-l$i"
2266 echo "configure: failed program was:" >&5
2267 cat conftest.$ac_ext >&5
2271 LIBS="$ac_func_search_save_LIBS"
2274 echo "$ac_t""$ac_cv_search_inet_addr" 1>&6
2275 if test "$ac_cv_search_inet_addr" != "no"; then
2276 test "$ac_cv_search_inet_addr" = "none required" || LIBS="$ac_cv_search_inet_addr $LIBS"
2285 # DD_COPT macro checks if the compiler specified as the 1st parameter
2286 # supports option specified as the 2nd parameter
2287 # For example: DD_CPORT(CXX, fPIC)
2292 # Checking characteristics of compilers and other programs
2293 # --------------------------------------------------------
2294 echo $ac_n "checking whether preprocessor accepts -MM or -M""... $ac_c" 1>&6
2295 echo "configure:2296: checking whether preprocessor accepts -MM or -M" >&5
2296 if eval "test \"`echo '$''{'sdcc_cv_MM'+set}'`\" = set"; then
2297 echo $ac_n "(cached) $ac_c" 1>&6
2299 echo "#include <stdio.h>" >_test_.c
2301 $CPP -v -MM _test_.c 1>&5 2>&5
2302 if test "$?" = "0"; then
2310 echo "$ac_t""$sdcc_cv_MM" 1>&6
2314 # This is the first time when CFLAGS are set/modified!!
2316 echo $ac_n "checking whether $CC accepts -ggdb""... $ac_c" 1>&6
2317 echo "configure:2318: checking whether $CC accepts -ggdb" >&5
2318 if eval "test \"`echo '$''{'sdcc_cv_CCggdb'+set}'`\" = set"; then
2319 echo $ac_n "(cached) $ac_c" 1>&6
2325 $CC -v -ggdb -c _test_.c 1>&5 2>&5
2326 if test "$?" = "0"; then
2327 sdcc_cv_CCggdb="yes"
2331 rm -f _test_.* a.out
2334 echo "$ac_t""$sdcc_cv_CCggdb" 1>&6
2336 if test "$sdcc_cv_CCggdb" = "yes"; then
2341 echo $ac_n "checking whether $CC accepts -pipe""... $ac_c" 1>&6
2342 echo "configure:2343: checking whether $CC accepts -pipe" >&5
2343 if eval "test \"`echo '$''{'sdcc_cv_CCpipe'+set}'`\" = set"; then
2344 echo $ac_n "(cached) $ac_c" 1>&6
2350 $CC -v -pipe -c _test_.c 1>&5 2>&5
2351 if test "$?" = "0"; then
2352 sdcc_cv_CCpipe="yes"
2356 rm -f _test_.* a.out
2359 echo "$ac_t""$sdcc_cv_CCpipe" 1>&6
2361 if test "$sdcc_cv_CCpipe" = "yes"; then
2362 CFLAGS="$CFLAGS -pipe"
2366 # Checks for typedefs, structures, and compiler characteristics.
2367 # ===========================================================================
2368 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2369 echo "configure:2370: checking return type of signal handlers" >&5
2370 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2371 echo $ac_n "(cached) $ac_c" 1>&6
2373 cat > conftest.$ac_ext <<EOF
2374 #line 2375 "configure"
2375 #include "confdefs.h"
2376 #include <sys/types.h>
2382 extern "C" void (*signal (int, void (*)(int)))(int);
2384 void (*signal ()) ();
2391 if { (eval echo configure:2392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2393 ac_cv_type_signal=void
2395 echo "configure: failed program was:" >&5
2396 cat conftest.$ac_ext >&5
2398 ac_cv_type_signal=int
2403 echo "$ac_t""$ac_cv_type_signal" 1>&6
2404 cat >> confdefs.h <<EOF
2405 #define RETSIGTYPE $ac_cv_type_signal
2412 if test "${prefix}" = "NONE"; then
2417 if test "${datadir}" = "\${prefix}/share"; then
2418 sdcc_datadir=${prefix}/share
2420 sdcc_datadir=${datadir}
2422 cat >> confdefs.h <<EOF
2423 #define STANDARD_INCLUDE_DIR "${sdcc_datadir}/include"
2426 cat >> confdefs.h <<EOF
2427 #define SDCC_INCLUDE_DIR "${sdcc_datadir}/include"
2430 cat >> confdefs.h <<EOF
2431 #define SDCC_LIB_DIR "${sdcc_datadir}/lib"
2434 cat >> confdefs.h <<EOF
2435 #define STD_LIB "libsdcc"
2438 cat >> confdefs.h <<EOF
2439 #define STD_INT_LIB "libint"
2442 cat >> confdefs.h <<EOF
2443 #define STD_LONG_LIB "liblong"
2446 cat >> confdefs.h <<EOF
2447 #define STD_FP_LIB "libfloat"
2450 cat >> confdefs.h <<EOF
2451 #define STD_DS390_LIB "libds390"
2455 cat >> confdefs.h <<EOF
2456 #define PREFIX "${prefix}"
2459 cat >> confdefs.h <<EOF
2460 #define DATADIR "${sdcc_datadir}"
2463 cat >> confdefs.h <<EOF
2464 #define SRCDIR "${config_in}"
2468 # mlh: dont compile libgc if it's available locally
2469 echo $ac_n "checking for GC_malloc in -lgc""... $ac_c" 1>&6
2470 echo "configure:2471: checking for GC_malloc in -lgc" >&5
2471 ac_lib_var=`echo gc'_'GC_malloc | sed 'y%./+-%__p_%'`
2472 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2473 echo $ac_n "(cached) $ac_c" 1>&6
2475 ac_save_LIBS="$LIBS"
2477 cat > conftest.$ac_ext <<EOF
2478 #line 2479 "configure"
2479 #include "confdefs.h"
2480 /* Override any gcc2 internal prototype to avoid an error. */
2481 /* We use char because int might match the return type of a gcc2
2482 builtin and then its argument prototype would still apply. */
2489 if { (eval echo configure:2490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2491 eval "ac_cv_lib_$ac_lib_var=yes"
2493 echo "configure: failed program was:" >&5
2494 cat conftest.$ac_ext >&5
2496 eval "ac_cv_lib_$ac_lib_var=no"
2499 LIBS="$ac_save_LIBS"
2502 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2503 echo "$ac_t""yes" 1>&6
2506 echo "$ac_t""no" 1>&6
2511 # Now handle the port selection
2512 # Check whether --enable-z80-port or --disable-z80-port was given.
2513 if test "${enable_z80_port+set}" = set; then
2514 enableval="$enable_z80_port"
2518 if test "$enable_z80_port" = "no"; then
2519 cat >> confdefs.h <<EOF
2520 #define OPT_DISABLE_Z80 1
2524 cat >> confdefs.h <<EOF
2525 #define OPT_DISABLE_Z80 0
2530 # Check whether --enable-gbz80-port or --disable-gbz80-port was given.
2531 if test "${enable_gbz80_port+set}" = set; then
2532 enableval="$enable_gbz80_port"
2536 if test "$enable_gbz80_port" = "no"; then
2537 cat >> confdefs.h <<EOF
2538 #define OPT_DISABLE_GBZ80 1
2542 cat >> confdefs.h <<EOF
2543 #define OPT_DISABLE_GBZ80 0
2548 # Check whether --enable-mcs51-port or --disable-mcs51-port was given.
2549 if test "${enable_mcs51_port+set}" = set; then
2550 enableval="$enable_mcs51_port"
2554 if test "$enable_mcs51_port" = "no"; then
2555 cat >> confdefs.h <<EOF
2556 #define OPT_DISABLE_MCS51 1
2560 cat >> confdefs.h <<EOF
2561 #define OPT_DISABLE_MCS51 0
2566 # Check whether --enable-avr-port or --disable-avr-port was given.
2567 if test "${enable_avr_port+set}" = set; then
2568 enableval="$enable_avr_port"
2572 if test "$enable_avr_port" = "no"; then
2573 cat >> confdefs.h <<EOF
2574 #define OPT_DISABLE_AVR 1
2578 cat >> confdefs.h <<EOF
2579 #define OPT_DISABLE_AVR 0
2584 # Generating output files
2585 # ===========================================================================
2588 # MLH: removed as the rules are already in Makefile.common
2592 cat > confcache <<\EOF
2593 # This file is a shell script that caches the results of configure
2594 # tests run on this system so they can be shared between configure
2595 # scripts and configure runs. It is not useful on other systems.
2596 # If it contains results you don't want to keep, you may remove or edit it.
2598 # By default, configure uses ./config.cache as the cache file,
2599 # creating it if it does not exist already. You can give configure
2600 # the --cache-file=FILE option to use a different cache file; that is
2601 # what configure does when it calls configure scripts in
2602 # subdirectories, so they share the cache.
2603 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2604 # config.status only pays attention to the cache file if you give it the
2605 # --recheck option to rerun configure.
2608 # The following way of writing the cache mishandles newlines in values,
2609 # but we know of no workaround that is simple, portable, and efficient.
2610 # So, don't put newlines in cache variables' values.
2611 # Ultrix sh set writes to stderr and can't be redirected directly,
2612 # and sets the high bit in the cache file unless we assign to the vars.
2614 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2616 # `set' does not quote correctly, so add quotes (double-quote substitution
2617 # turns \\\\ into \\, and sed turns \\ into \).
2619 -e "s/'/'\\\\''/g" \
2620 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2623 # `set' quotes correctly as required by POSIX, so do not add quotes.
2624 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2627 if cmp -s $cache_file confcache; then
2630 if test -w $cache_file; then
2631 echo "updating cache $cache_file"
2632 cat confcache > $cache_file
2634 echo "not updating unwritable cache $cache_file"
2639 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2641 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2642 # Let make expand exec_prefix.
2643 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2645 # Any assignment to VPATH causes Sun make to only execute
2646 # the first set of double-colon rules, so remove it if not needed.
2647 # If there is a colon in the path, we need to keep it.
2648 if test "x$srcdir" = x.; then
2649 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2652 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2654 DEFS=-DHAVE_CONFIG_H
2656 # Without the "./", some shells look in PATH for config.status.
2657 : ${CONFIG_STATUS=./config.status}
2659 echo creating $CONFIG_STATUS
2660 rm -f $CONFIG_STATUS
2661 cat > $CONFIG_STATUS <<EOF
2663 # Generated automatically by configure.
2664 # Run this file to recreate the current configuration.
2665 # This directory was configured as follows,
2666 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2668 # $0 $ac_configure_args
2670 # Compiler output produced by configure, useful for debugging
2671 # configure, is in ./config.log if it exists.
2673 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2676 case "\$ac_option" in
2677 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2678 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2679 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2680 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2681 echo "$CONFIG_STATUS generated by autoconf version 2.13"
2683 -help | --help | --hel | --he | --h)
2684 echo "\$ac_cs_usage"; exit 0 ;;
2685 *) echo "\$ac_cs_usage"; exit 1 ;;
2689 ac_given_srcdir=$srcdir
2690 ac_given_INSTALL="$INSTALL"
2692 trap 'rm -fr `echo "main.mk:main_in.mk
2694 support/gc/Makefile.cross
2697 support/cpp/Makefile
2698 device/include/Makefile
2700 debugger/mcs51/Makefile
2701 Makefile.common:Makefile.common.in
2702 sdccconf.h:sdccconf_in.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2704 cat >> $CONFIG_STATUS <<EOF
2706 # Protect against being on the right side of a sed subst in config.status.
2707 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2708 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2712 s%@CFLAGS@%$CFLAGS%g
2713 s%@CPPFLAGS@%$CPPFLAGS%g
2714 s%@CXXFLAGS@%$CXXFLAGS%g
2715 s%@FFLAGS@%$FFLAGS%g
2717 s%@LDFLAGS@%$LDFLAGS%g
2719 s%@exec_prefix@%$exec_prefix%g
2720 s%@prefix@%$prefix%g
2721 s%@program_transform_name@%$program_transform_name%g
2722 s%@bindir@%$bindir%g
2723 s%@sbindir@%$sbindir%g
2724 s%@libexecdir@%$libexecdir%g
2725 s%@datadir@%$datadir%g
2726 s%@sysconfdir@%$sysconfdir%g
2727 s%@sharedstatedir@%$sharedstatedir%g
2728 s%@localstatedir@%$localstatedir%g
2729 s%@libdir@%$libdir%g
2730 s%@includedir@%$includedir%g
2731 s%@oldincludedir@%$oldincludedir%g
2732 s%@infodir@%$infodir%g
2733 s%@mandir@%$mandir%g
2735 s%@VERSION@%$VERSION%g
2736 s%@VERSIONHI@%$VERSIONHI%g
2737 s%@VERSIONLO@%$VERSIONLO%g
2738 s%@VERSIONP@%$VERSIONP%g
2742 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2743 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2744 s%@INSTALL_DATA@%$INSTALL_DATA%g
2745 s%@RANLIB@%$RANLIB%g
2747 s%@LEXLIB@%$LEXLIB%g
2749 s%@AUTOCONF@%$AUTOCONF%g
2752 s%@M_OR_MM@%$M_OR_MM%g
2753 s%@HAVE_LIBGC@%$HAVE_LIBGC%g
2754 s%@subdirs@%$subdirs%g
2759 cat >> $CONFIG_STATUS <<\EOF
2761 # Split the substitutions into bite-sized pieces for seds with
2762 # small command number limits, like on Digital OSF/1 and HP-UX.
2763 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2764 ac_file=1 # Number of current file.
2765 ac_beg=1 # First line for current file.
2766 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2769 while $ac_more_lines; do
2770 if test $ac_beg -gt 1; then
2771 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2773 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2775 if test ! -s conftest.s$ac_file; then
2777 rm -f conftest.s$ac_file
2779 if test -z "$ac_sed_cmds"; then
2780 ac_sed_cmds="sed -f conftest.s$ac_file"
2782 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2784 ac_file=`expr $ac_file + 1`
2786 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2789 if test -z "$ac_sed_cmds"; then
2794 cat >> $CONFIG_STATUS <<EOF
2796 CONFIG_FILES=\${CONFIG_FILES-"main.mk:main_in.mk
2798 support/gc/Makefile.cross
2801 support/cpp/Makefile
2802 device/include/Makefile
2804 debugger/mcs51/Makefile
2805 Makefile.common:Makefile.common.in
2808 cat >> $CONFIG_STATUS <<\EOF
2809 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2810 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2812 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2813 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2814 *) ac_file_in="${ac_file}.in" ;;
2817 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2819 # Remove last slash and all that follows it. Not all systems have dirname.
2820 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2821 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2822 # The file is in a subdirectory.
2823 test ! -d "$ac_dir" && mkdir "$ac_dir"
2824 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2825 # A "../" for each directory in $ac_dir_suffix.
2826 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2828 ac_dir_suffix= ac_dots=
2831 case "$ac_given_srcdir" in
2833 if test -z "$ac_dots"; then top_srcdir=.
2834 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2835 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2837 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2838 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2841 case "$ac_given_INSTALL" in
2842 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2843 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2846 echo creating "$ac_file"
2848 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2850 *Makefile*) ac_comsub="1i\\
2851 # $configure_input" ;;
2855 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2857 s%@configure_input@%$configure_input%g
2858 s%@srcdir@%$srcdir%g
2859 s%@top_srcdir@%$top_srcdir%g
2860 s%@INSTALL@%$INSTALL%g
2861 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2865 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2866 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2868 # ac_d sets the value in "#define NAME VALUE" lines.
2869 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2870 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2873 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2874 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2875 ac_uB='\([ ]\)%\1#\2define\3'
2878 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2879 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2880 ac_eB='$%\1#\2define\3'
2884 if test "${CONFIG_HEADERS+set}" != set; then
2886 cat >> $CONFIG_STATUS <<EOF
2887 CONFIG_HEADERS="sdccconf.h:sdccconf_in.h"
2889 cat >> $CONFIG_STATUS <<\EOF
2891 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2892 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2894 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2895 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2896 *) ac_file_in="${ac_file}.in" ;;
2899 echo creating $ac_file
2901 rm -f conftest.frag conftest.in conftest.out
2902 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2903 cat $ac_file_inputs > conftest.in
2907 # Transform confdefs.h into a sed script conftest.vals that substitutes
2908 # the proper values into config.h.in to produce config.h. And first:
2909 # Protect against being on the right side of a sed subst in config.status.
2910 # Protect against being in an unquoted here document in config.status.
2912 cat > conftest.hdr <<\EOF
2915 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2919 sed -n -f conftest.hdr confdefs.h > conftest.vals
2922 # This sed command replaces #undef with comments. This is necessary, for
2923 # example, in the case of _POSIX_SOURCE, which is predefined and required
2924 # on some systems where configure will not decide to define it.
2925 cat >> conftest.vals <<\EOF
2926 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2929 # Break up conftest.vals because some shells have a limit on
2930 # the size of here documents, and old seds have small limits too.
2935 ac_lines=`grep -c . conftest.vals`
2936 # grep -c gives empty output for an empty file on some AIX systems.
2937 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2938 # Write a limited-size here document to conftest.frag.
2939 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2940 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2942 sed -f conftest.frag conftest.in > conftest.out
2944 mv conftest.out conftest.in
2946 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2948 mv conftest.tail conftest.vals
2952 cat >> $CONFIG_STATUS <<\EOF
2953 rm -f conftest.frag conftest.h
2954 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2955 cat conftest.in >> conftest.h
2957 if cmp -s $ac_file conftest.h 2>/dev/null; then
2958 echo "$ac_file is unchanged"
2961 # Remove last slash and all that follows it. Not all systems have dirname.
2962 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2963 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2964 # The file is in a subdirectory.
2965 test ! -d "$ac_dir" && mkdir "$ac_dir"
2968 mv conftest.h $ac_file
2973 cat >> $CONFIG_STATUS <<EOF
2976 cat >> $CONFIG_STATUS <<\EOF
2980 chmod +x $CONFIG_STATUS
2981 rm -fr confdefs* $ac_clean_files
2982 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2984 if test "$no_recursion" != yes; then
2986 # Remove --cache-file and --srcdir arguments so they do not pile up.
2987 ac_sub_configure_args=
2989 for ac_arg in $ac_configure_args; do
2990 if test -n "$ac_prev"; then
2995 -cache-file | --cache-file | --cache-fil | --cache-fi \
2996 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2997 ac_prev=cache_file ;;
2998 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2999 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
3001 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
3003 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
3005 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
3009 for ac_config_dir in sim/ucsim; do
3011 # Do not complain, so a configure script can configure whichever
3012 # parts of a large source tree are present.
3013 if test ! -d $srcdir/$ac_config_dir; then
3017 echo configuring in $ac_config_dir
3022 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
3024 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
3032 # A "../" for each directory in /$ac_config_dir.
3033 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
3036 .) # No --srcdir option. We are building in place.
3037 ac_sub_srcdir=$srcdir ;;
3038 /*) # Absolute path.
3039 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
3041 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
3044 # Check for guested configure; otherwise get Cygnus style configure.
3045 if test -f $ac_sub_srcdir/configure; then
3046 ac_sub_configure=$ac_sub_srcdir/configure
3047 elif test -f $ac_sub_srcdir/configure.in; then
3048 ac_sub_configure=$ac_configure
3050 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
3054 # The recursion is here.
3055 if test -n "$ac_sub_configure"; then
3057 # Make the cache file name correct relative to the subdirectory.
3058 case "$cache_file" in
3059 /*) ac_sub_cache_file=$cache_file ;;
3061 ac_sub_cache_file="$ac_dots$cache_file" ;;
3063 case "$ac_given_INSTALL" in
3064 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3065 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3068 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
3069 # The eval makes quoting arguments work.
3070 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
3073 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
3082 # End of configure/configure.in