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 # Initialize some variables set by options.
16 # The variables have the same names as the options, with
17 # dashes changed to underlines.
19 cache_file=./config.cache
28 program_transform_name=s,x,x,
36 bindir='${exec_prefix}/bin'
37 sbindir='${exec_prefix}/sbin'
38 libexecdir='${exec_prefix}/libexec'
39 datadir='${prefix}/share'
40 sysconfdir='${prefix}/etc'
41 sharedstatedir='${prefix}/com'
42 localstatedir='${prefix}/var'
43 libdir='${exec_prefix}/lib'
44 includedir='${prefix}/include'
45 oldincludedir='/usr/include'
46 infodir='${prefix}/info'
47 mandir='${prefix}/man'
49 # Initialize some other variables.
52 SHELL=${CONFIG_SHELL-/bin/sh}
53 # Maximum number of lines to put in a shell here document.
60 # If the previous option needs an argument, assign it.
61 if test -n "$ac_prev"; then
62 eval "$ac_prev=\$ac_option"
68 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
72 # Accept the important Cygnus configure options, so we can diagnose typos.
76 -bindir | --bindir | --bindi | --bind | --bin | --bi)
78 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
79 bindir="$ac_optarg" ;;
81 -build | --build | --buil | --bui | --bu)
83 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
86 -cache-file | --cache-file | --cache-fil | --cache-fi \
87 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
89 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
90 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
91 cache_file="$ac_optarg" ;;
93 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
95 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
97 datadir="$ac_optarg" ;;
99 -disable-* | --disable-*)
100 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
101 # Reject names that are not valid shell variable names.
102 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
103 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
105 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
106 eval "enable_${ac_feature}=no" ;;
108 -enable-* | --enable-*)
109 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
110 # Reject names that are not valid shell variable names.
111 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
112 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
114 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
119 eval "enable_${ac_feature}='$ac_optarg'" ;;
121 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
122 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
123 | --exec | --exe | --ex)
124 ac_prev=exec_prefix ;;
125 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
126 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
127 | --exec=* | --exe=* | --ex=*)
128 exec_prefix="$ac_optarg" ;;
130 -gas | --gas | --ga | --g)
131 # Obsolete; use --with-gas.
134 -help | --help | --hel | --he)
135 # Omit some internal or obsolete options to make the list less imposing.
136 # This message is too long to be a string in the A/UX 3.1 sh.
138 Usage: configure [options] [host]
139 Options: [defaults in brackets after descriptions]
141 --cache-file=FILE cache test results in FILE
142 --help print this message
143 --no-create do not create output files
144 --quiet, --silent do not print \`checking...' messages
145 --version print the version of autoconf that created configure
146 Directory and file names:
147 --prefix=PREFIX install architecture-independent files in PREFIX
149 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
151 --bindir=DIR user executables in DIR [EPREFIX/bin]
152 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
153 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
154 --datadir=DIR read-only architecture-independent data in DIR
156 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
157 --sharedstatedir=DIR modifiable architecture-independent data in DIR
159 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
160 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
161 --includedir=DIR C header files in DIR [PREFIX/include]
162 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
163 --infodir=DIR info documentation in DIR [PREFIX/info]
164 --mandir=DIR man documentation in DIR [PREFIX/man]
165 --srcdir=DIR find the sources in DIR [configure dir or ..]
166 --program-prefix=PREFIX prepend PREFIX to installed program names
167 --program-suffix=SUFFIX append SUFFIX to installed program names
168 --program-transform-name=PROGRAM
169 run sed PROGRAM on installed program names
173 --build=BUILD configure for building on BUILD [BUILD=HOST]
174 --host=HOST configure for HOST [guessed]
175 --target=TARGET configure for TARGET [TARGET=HOST]
176 Features and packages:
177 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
178 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
179 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
180 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
181 --x-includes=DIR X include files are in DIR
182 --x-libraries=DIR X library files are in DIR
184 if test -n "$ac_help"; then
185 echo "--enable and --with options recognized:$ac_help"
189 -host | --host | --hos | --ho)
191 -host=* | --host=* | --hos=* | --ho=*)
194 -includedir | --includedir | --includedi | --included | --include \
195 | --includ | --inclu | --incl | --inc)
196 ac_prev=includedir ;;
197 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
198 | --includ=* | --inclu=* | --incl=* | --inc=*)
199 includedir="$ac_optarg" ;;
201 -infodir | --infodir | --infodi | --infod | --info | --inf)
203 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
204 infodir="$ac_optarg" ;;
206 -libdir | --libdir | --libdi | --libd)
208 -libdir=* | --libdir=* | --libdi=* | --libd=*)
209 libdir="$ac_optarg" ;;
211 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
212 | --libexe | --libex | --libe)
213 ac_prev=libexecdir ;;
214 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
215 | --libexe=* | --libex=* | --libe=*)
216 libexecdir="$ac_optarg" ;;
218 -localstatedir | --localstatedir | --localstatedi | --localstated \
219 | --localstate | --localstat | --localsta | --localst \
220 | --locals | --local | --loca | --loc | --lo)
221 ac_prev=localstatedir ;;
222 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
223 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
224 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
225 localstatedir="$ac_optarg" ;;
227 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
229 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
230 mandir="$ac_optarg" ;;
233 # Obsolete; use --without-fp.
236 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
240 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
241 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
244 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
245 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
246 | --oldin | --oldi | --old | --ol | --o)
247 ac_prev=oldincludedir ;;
248 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
249 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
250 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
251 oldincludedir="$ac_optarg" ;;
253 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
255 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
256 prefix="$ac_optarg" ;;
258 -program-prefix | --program-prefix | --program-prefi | --program-pref \
259 | --program-pre | --program-pr | --program-p)
260 ac_prev=program_prefix ;;
261 -program-prefix=* | --program-prefix=* | --program-prefi=* \
262 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
263 program_prefix="$ac_optarg" ;;
265 -program-suffix | --program-suffix | --program-suffi | --program-suff \
266 | --program-suf | --program-su | --program-s)
267 ac_prev=program_suffix ;;
268 -program-suffix=* | --program-suffix=* | --program-suffi=* \
269 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
270 program_suffix="$ac_optarg" ;;
272 -program-transform-name | --program-transform-name \
273 | --program-transform-nam | --program-transform-na \
274 | --program-transform-n | --program-transform- \
275 | --program-transform | --program-transfor \
276 | --program-transfo | --program-transf \
277 | --program-trans | --program-tran \
278 | --progr-tra | --program-tr | --program-t)
279 ac_prev=program_transform_name ;;
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 program_transform_name="$ac_optarg" ;;
289 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
290 | -silent | --silent | --silen | --sile | --sil)
293 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
295 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
297 sbindir="$ac_optarg" ;;
299 -sharedstatedir | --sharedstatedir | --sharedstatedi \
300 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
301 | --sharedst | --shareds | --shared | --share | --shar \
303 ac_prev=sharedstatedir ;;
304 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
305 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
306 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
308 sharedstatedir="$ac_optarg" ;;
310 -site | --site | --sit)
312 -site=* | --site=* | --sit=*)
315 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
317 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
318 srcdir="$ac_optarg" ;;
320 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
321 | --syscon | --sysco | --sysc | --sys | --sy)
322 ac_prev=sysconfdir ;;
323 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
324 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
325 sysconfdir="$ac_optarg" ;;
327 -target | --target | --targe | --targ | --tar | --ta | --t)
329 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
330 target="$ac_optarg" ;;
332 -v | -verbose | --verbose | --verbos | --verbo | --verb)
335 -version | --version | --versio | --versi | --vers)
336 echo "configure generated by autoconf version 2.13"
340 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
341 # Reject names that are not valid shell variable names.
342 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
343 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
345 ac_package=`echo $ac_package| sed 's/-/_/g'`
350 eval "with_${ac_package}='$ac_optarg'" ;;
352 -without-* | --without-*)
353 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
354 # Reject names that are not valid shell variable names.
355 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
356 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
358 ac_package=`echo $ac_package| sed 's/-/_/g'`
359 eval "with_${ac_package}=no" ;;
362 # Obsolete; use --with-x.
365 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
366 | --x-incl | --x-inc | --x-in | --x-i)
367 ac_prev=x_includes ;;
368 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
369 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
370 x_includes="$ac_optarg" ;;
372 -x-libraries | --x-libraries | --x-librarie | --x-librari \
373 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
374 ac_prev=x_libraries ;;
375 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
376 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
377 x_libraries="$ac_optarg" ;;
379 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
383 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
384 echo "configure: warning: $ac_option: invalid host type" 1>&2
386 if test "x$nonopt" != xNONE; then
387 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
395 if test -n "$ac_prev"; then
396 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
399 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
401 # File descriptor usage:
404 # 2 errors and warnings
405 # 3 some systems may open it to /dev/tty
406 # 4 used on the Kubota Titan
407 # 6 checking for... messages and results
408 # 5 compiler messages saved in config.log
409 if test "$silent" = yes; then
417 This file contains any messages produced by compilers while
418 running configure, to aid debugging if configure makes a mistake.
421 # Strip out --no-create and --no-recursion so they do not pile up.
422 # Also quote any args containing shell metacharacters.
427 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
428 | --no-cr | --no-c) ;;
429 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
430 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
431 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
432 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
433 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
438 # Only set these to C if already set. These must not be set unconditionally
439 # because not all systems understand e.g. LANG=C (notably SCO).
440 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
441 # Non-C LC_CTYPE values break the ctype check.
442 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
443 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
444 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
445 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
447 # confdefs.h avoids OS command line length limits that DEFS can exceed.
448 rm -rf conftest* confdefs.h
449 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
452 # A filename unique to this package, relative to the directory that
453 # configure is in, which we can look for to find out if srcdir is correct.
454 ac_unique_file=Makefile
456 # Find the source files, if location was not specified.
457 if test -z "$srcdir"; then
458 ac_srcdir_defaulted=yes
459 # Try the directory containing this script, then its parent.
461 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
462 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
464 if test ! -r $srcdir/$ac_unique_file; then
468 ac_srcdir_defaulted=no
470 if test ! -r $srcdir/$ac_unique_file; then
471 if test "$ac_srcdir_defaulted" = yes; then
472 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
474 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
477 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
479 # Prefer explicitly selected file to automatically selected ones.
480 if test -z "$CONFIG_SITE"; then
481 if test "x$prefix" != xNONE; then
482 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
484 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
487 for ac_site_file in $CONFIG_SITE; do
488 if test -r "$ac_site_file"; then
489 echo "loading site script $ac_site_file"
494 if test -r "$cache_file"; then
495 echo "loading cache $cache_file"
498 echo "creating cache $cache_file"
503 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
504 ac_cpp='$CPP $CPPFLAGS'
505 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
506 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
507 cross_compiling=$ac_cv_prog_cc_cross
511 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
512 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
513 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
520 ac_n= ac_c='\c' ac_t=
526 for ac_prog in gawk mawk nawk awk
528 # Extract the first word of "$ac_prog", so it can be a program name with args.
529 set dummy $ac_prog; ac_word=$2
530 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
531 echo "configure:532: checking for $ac_word" >&5
532 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
533 echo $ac_n "(cached) $ac_c" 1>&6
535 if test -n "$AWK"; then
536 ac_cv_prog_AWK="$AWK" # Let the user override the test.
538 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
540 for ac_dir in $ac_dummy; do
541 test -z "$ac_dir" && ac_dir=.
542 if test -f $ac_dir/$ac_word; then
543 ac_cv_prog_AWK="$ac_prog"
550 AWK="$ac_cv_prog_AWK"
551 if test -n "$AWK"; then
552 echo "$ac_t""$AWK" 1>&6
554 echo "$ac_t""no" 1>&6
557 test -n "$AWK" && break
561 echo $ac_n "checking version of the package""... $ac_c" 1>&6
562 echo "configure:563: checking version of the package" >&5
563 if test -f .version; then
564 VERSION=`cat .version`
565 elif test -f ../.version; then
566 VERSION=`cat ../.version`
570 VERSIONHI=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $1}'`
571 VERSIONLO=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $2}'`
572 VERSIONP=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $3}'`
573 echo "$ac_t""${VERSION}" 1>&6
578 cat >> confdefs.h <<EOF
579 #define SDCC_VERSION_LO ${VERSIONLO}
582 cat >> confdefs.h <<EOF
583 #define SDCC_VERSION_HI ${VERSIONHI}
586 cat >> confdefs.h <<EOF
587 #define SDCC_VERSION_P ${VERSIONP}
590 cat >> confdefs.h <<EOF
591 #define SDCC_VERSION_STR "${VERSION}"
594 sdcc_cv_version=$VERSION
595 sdcc_cv_versionhi=$VERSIONHI
596 sdcc_cv_versionlo=$VERSIONLO
597 sdcc_cv_versionp=$VERSIONP
601 # Extract the first word of "gcc", so it can be a program name with args.
602 set dummy gcc; ac_word=$2
603 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
604 echo "configure:605: checking for $ac_word" >&5
605 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
606 echo $ac_n "(cached) $ac_c" 1>&6
608 if test -n "$CC"; then
609 ac_cv_prog_CC="$CC" # Let the user override the test.
611 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
613 for ac_dir in $ac_dummy; do
614 test -z "$ac_dir" && ac_dir=.
615 if test -f $ac_dir/$ac_word; then
624 if test -n "$CC"; then
625 echo "$ac_t""$CC" 1>&6
627 echo "$ac_t""no" 1>&6
630 if test -z "$CC"; then
631 # Extract the first word of "cc", so it can be a program name with args.
632 set dummy cc; ac_word=$2
633 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
634 echo "configure:635: checking for $ac_word" >&5
635 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
636 echo $ac_n "(cached) $ac_c" 1>&6
638 if test -n "$CC"; then
639 ac_cv_prog_CC="$CC" # Let the user override the test.
641 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
644 for ac_dir in $ac_dummy; do
645 test -z "$ac_dir" && ac_dir=.
646 if test -f $ac_dir/$ac_word; then
647 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
656 if test $ac_prog_rejected = yes; then
657 # We found a bogon in the path, so make sure we never use it.
658 set dummy $ac_cv_prog_CC
660 if test $# -gt 0; then
661 # We chose a different compiler from the bogus one.
662 # However, it has the same basename, so the bogon will be chosen
663 # first if we set CC to just the basename; use the full file name.
665 set dummy "$ac_dir/$ac_word" "$@"
673 if test -n "$CC"; then
674 echo "$ac_t""$CC" 1>&6
676 echo "$ac_t""no" 1>&6
679 if test -z "$CC"; then
682 # Extract the first word of "cl", so it can be a program name with args.
683 set dummy cl; ac_word=$2
684 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
685 echo "configure:686: checking for $ac_word" >&5
686 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
687 echo $ac_n "(cached) $ac_c" 1>&6
689 if test -n "$CC"; then
690 ac_cv_prog_CC="$CC" # Let the user override the test.
692 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
694 for ac_dir in $ac_dummy; do
695 test -z "$ac_dir" && ac_dir=.
696 if test -f $ac_dir/$ac_word; then
705 if test -n "$CC"; then
706 echo "$ac_t""$CC" 1>&6
708 echo "$ac_t""no" 1>&6
713 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
716 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
717 echo "configure:718: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
720 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
721 ac_cpp='$CPP $CPPFLAGS'
722 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
723 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
724 cross_compiling=$ac_cv_prog_cc_cross
726 cat > conftest.$ac_ext << EOF
728 #line 729 "configure"
729 #include "confdefs.h"
733 if { (eval echo configure:734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
734 ac_cv_prog_cc_works=yes
735 # If we can't run a trivial program, we are probably using a cross compiler.
736 if (./conftest; exit) 2>/dev/null; then
737 ac_cv_prog_cc_cross=no
739 ac_cv_prog_cc_cross=yes
742 echo "configure: failed program was:" >&5
743 cat conftest.$ac_ext >&5
744 ac_cv_prog_cc_works=no
748 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
749 ac_cpp='$CPP $CPPFLAGS'
750 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
751 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
752 cross_compiling=$ac_cv_prog_cc_cross
754 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
755 if test $ac_cv_prog_cc_works = no; then
756 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
758 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
759 echo "configure:760: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
760 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
761 cross_compiling=$ac_cv_prog_cc_cross
763 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
764 echo "configure:765: checking whether we are using GNU C" >&5
765 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
766 echo $ac_n "(cached) $ac_c" 1>&6
768 cat > conftest.c <<EOF
773 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
780 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
782 if test $ac_cv_prog_gcc = yes; then
788 ac_test_CFLAGS="${CFLAGS+set}"
789 ac_save_CFLAGS="$CFLAGS"
791 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
792 echo "configure:793: checking whether ${CC-cc} accepts -g" >&5
793 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
794 echo $ac_n "(cached) $ac_c" 1>&6
796 echo 'void f(){}' > conftest.c
797 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
806 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
807 if test "$ac_test_CFLAGS" = set; then
808 CFLAGS="$ac_save_CFLAGS"
809 elif test $ac_cv_prog_cc_g = yes; then
810 if test "$GCC" = yes; then
816 if test "$GCC" = yes; then
823 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
825 # Extract the first word of "$ac_prog", so it can be a program name with args.
826 set dummy $ac_prog; ac_word=$2
827 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
828 echo "configure:829: checking for $ac_word" >&5
829 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
830 echo $ac_n "(cached) $ac_c" 1>&6
832 if test -n "$CXX"; then
833 ac_cv_prog_CXX="$CXX" # Let the user override the test.
835 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
837 for ac_dir in $ac_dummy; do
838 test -z "$ac_dir" && ac_dir=.
839 if test -f $ac_dir/$ac_word; then
840 ac_cv_prog_CXX="$ac_prog"
847 CXX="$ac_cv_prog_CXX"
848 if test -n "$CXX"; then
849 echo "$ac_t""$CXX" 1>&6
851 echo "$ac_t""no" 1>&6
854 test -n "$CXX" && break
856 test -n "$CXX" || CXX="gcc"
859 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
860 echo "configure:861: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
863 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
864 ac_cpp='$CXXCPP $CPPFLAGS'
865 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
866 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
867 cross_compiling=$ac_cv_prog_cxx_cross
869 cat > conftest.$ac_ext << EOF
871 #line 872 "configure"
872 #include "confdefs.h"
874 int main(){return(0);}
876 if { (eval echo configure:877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
877 ac_cv_prog_cxx_works=yes
878 # If we can't run a trivial program, we are probably using a cross compiler.
879 if (./conftest; exit) 2>/dev/null; then
880 ac_cv_prog_cxx_cross=no
882 ac_cv_prog_cxx_cross=yes
885 echo "configure: failed program was:" >&5
886 cat conftest.$ac_ext >&5
887 ac_cv_prog_cxx_works=no
891 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
892 ac_cpp='$CPP $CPPFLAGS'
893 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
894 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
895 cross_compiling=$ac_cv_prog_cc_cross
897 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
898 if test $ac_cv_prog_cxx_works = no; then
899 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
901 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
902 echo "configure:903: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
903 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
904 cross_compiling=$ac_cv_prog_cxx_cross
906 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
907 echo "configure:908: checking whether we are using GNU C++" >&5
908 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
909 echo $ac_n "(cached) $ac_c" 1>&6
911 cat > conftest.C <<EOF
916 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
923 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
925 if test $ac_cv_prog_gxx = yes; then
931 ac_test_CXXFLAGS="${CXXFLAGS+set}"
932 ac_save_CXXFLAGS="$CXXFLAGS"
934 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
935 echo "configure:936: checking whether ${CXX-g++} accepts -g" >&5
936 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
937 echo $ac_n "(cached) $ac_c" 1>&6
939 echo 'void f(){}' > conftest.cc
940 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
949 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
950 if test "$ac_test_CXXFLAGS" = set; then
951 CXXFLAGS="$ac_save_CXXFLAGS"
952 elif test $ac_cv_prog_cxx_g = yes; then
953 if test "$GXX" = yes; then
959 if test "$GXX" = yes; then
966 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
967 echo "configure:968: checking how to run the C preprocessor" >&5
968 # On Suns, sometimes $CPP names a directory.
969 if test -n "$CPP" && test -d "$CPP"; then
972 if test -z "$CPP"; then
973 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
974 echo $ac_n "(cached) $ac_c" 1>&6
976 # This must be in double quotes, not single quotes, because CPP may get
977 # substituted into the Makefile and "${CC-cc}" will confuse make.
979 # On the NeXT, cc -E runs the code through the compiler's parser,
980 # not just through cpp.
981 cat > conftest.$ac_ext <<EOF
982 #line 983 "configure"
983 #include "confdefs.h"
987 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
988 { (eval echo configure:989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
989 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
990 if test -z "$ac_err"; then
994 echo "configure: failed program was:" >&5
995 cat conftest.$ac_ext >&5
997 CPP="${CC-cc} -E -traditional-cpp"
998 cat > conftest.$ac_ext <<EOF
999 #line 1000 "configure"
1000 #include "confdefs.h"
1004 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1005 { (eval echo configure:1006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1006 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1007 if test -z "$ac_err"; then
1011 echo "configure: failed program was:" >&5
1012 cat conftest.$ac_ext >&5
1014 CPP="${CC-cc} -nologo -E"
1015 cat > conftest.$ac_ext <<EOF
1016 #line 1017 "configure"
1017 #include "confdefs.h"
1021 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1022 { (eval echo configure:1023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1023 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1024 if test -z "$ac_err"; then
1028 echo "configure: failed program was:" >&5
1029 cat conftest.$ac_ext >&5
1038 ac_cv_prog_CPP="$CPP"
1040 CPP="$ac_cv_prog_CPP"
1042 ac_cv_prog_CPP="$CPP"
1044 echo "$ac_t""$CPP" 1>&6
1047 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1048 if test -f $ac_dir/install-sh; then
1050 ac_install_sh="$ac_aux_dir/install-sh -c"
1052 elif test -f $ac_dir/install.sh; then
1054 ac_install_sh="$ac_aux_dir/install.sh -c"
1058 if test -z "$ac_aux_dir"; then
1059 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1061 ac_config_guess=$ac_aux_dir/config.guess
1062 ac_config_sub=$ac_aux_dir/config.sub
1063 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1065 # Find a good install program. We prefer a C program (faster),
1066 # so one script is as good as another. But avoid the broken or
1067 # incompatible versions:
1068 # SysV /etc/install, /usr/sbin/install
1069 # SunOS /usr/etc/install
1070 # IRIX /sbin/install
1072 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1073 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1074 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1075 # ./install, which can be erroneously created by make from ./install.sh.
1076 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1077 echo "configure:1078: checking for a BSD compatible install" >&5
1078 if test -z "$INSTALL"; then
1079 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1080 echo $ac_n "(cached) $ac_c" 1>&6
1082 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1083 for ac_dir in $PATH; do
1084 # Account for people who put trailing slashes in PATH elements.
1086 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1088 # OSF1 and SCO ODT 3.0 have their own names for install.
1089 # Don't use installbsd from OSF since it installs stuff as root
1091 for ac_prog in ginstall scoinst install; do
1092 if test -f $ac_dir/$ac_prog; then
1093 if test $ac_prog = install &&
1094 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1095 # AIX install. It has an incompatible calling convention.
1098 ac_cv_path_install="$ac_dir/$ac_prog -c"
1109 if test "${ac_cv_path_install+set}" = set; then
1110 INSTALL="$ac_cv_path_install"
1112 # As a last resort, use the slow shell script. We don't cache a
1113 # path for INSTALL within a source directory, because that will
1114 # break other packages using the cache if that directory is
1115 # removed, or if the path is relative.
1116 INSTALL="$ac_install_sh"
1119 echo "$ac_t""$INSTALL" 1>&6
1121 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1122 # It thinks the first close brace ends the variable substitution.
1123 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1125 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1127 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1129 # Extract the first word of "ranlib", so it can be a program name with args.
1130 set dummy ranlib; ac_word=$2
1131 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1132 echo "configure:1133: checking for $ac_word" >&5
1133 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1134 echo $ac_n "(cached) $ac_c" 1>&6
1136 if test -n "$RANLIB"; then
1137 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1139 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1141 for ac_dir in $ac_dummy; do
1142 test -z "$ac_dir" && ac_dir=.
1143 if test -f $ac_dir/$ac_word; then
1144 ac_cv_prog_RANLIB="ranlib"
1149 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1152 RANLIB="$ac_cv_prog_RANLIB"
1153 if test -n "$RANLIB"; then
1154 echo "$ac_t""$RANLIB" 1>&6
1156 echo "$ac_t""no" 1>&6
1159 for ac_prog in 'bison -y' byacc
1161 # Extract the first word of "$ac_prog", so it can be a program name with args.
1162 set dummy $ac_prog; ac_word=$2
1163 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1164 echo "configure:1165: checking for $ac_word" >&5
1165 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1166 echo $ac_n "(cached) $ac_c" 1>&6
1168 if test -n "$YACC"; then
1169 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1171 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1173 for ac_dir in $ac_dummy; do
1174 test -z "$ac_dir" && ac_dir=.
1175 if test -f $ac_dir/$ac_word; then
1176 ac_cv_prog_YACC="$ac_prog"
1183 YACC="$ac_cv_prog_YACC"
1184 if test -n "$YACC"; then
1185 echo "$ac_t""$YACC" 1>&6
1187 echo "$ac_t""no" 1>&6
1190 test -n "$YACC" && break
1192 test -n "$YACC" || YACC="yacc"
1194 # Extract the first word of "flex", so it can be a program name with args.
1195 set dummy flex; ac_word=$2
1196 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1197 echo "configure:1198: checking for $ac_word" >&5
1198 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1199 echo $ac_n "(cached) $ac_c" 1>&6
1201 if test -n "$LEX"; then
1202 ac_cv_prog_LEX="$LEX" # Let the user override the test.
1204 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1206 for ac_dir in $ac_dummy; do
1207 test -z "$ac_dir" && ac_dir=.
1208 if test -f $ac_dir/$ac_word; then
1209 ac_cv_prog_LEX="flex"
1214 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1217 LEX="$ac_cv_prog_LEX"
1218 if test -n "$LEX"; then
1219 echo "$ac_t""$LEX" 1>&6
1221 echo "$ac_t""no" 1>&6
1224 if test -z "$LEXLIB"
1230 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1231 echo "configure:1232: checking for yywrap in -l$ac_lib" >&5
1232 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1233 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1234 echo $ac_n "(cached) $ac_c" 1>&6
1236 ac_save_LIBS="$LIBS"
1237 LIBS="-l$ac_lib $LIBS"
1238 cat > conftest.$ac_ext <<EOF
1239 #line 1240 "configure"
1240 #include "confdefs.h"
1241 /* Override any gcc2 internal prototype to avoid an error. */
1242 /* We use char because int might match the return type of a gcc2
1243 builtin and then its argument prototype would still apply. */
1250 if { (eval echo configure:1251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1252 eval "ac_cv_lib_$ac_lib_var=yes"
1254 echo "configure: failed program was:" >&5
1255 cat conftest.$ac_ext >&5
1257 eval "ac_cv_lib_$ac_lib_var=no"
1260 LIBS="$ac_save_LIBS"
1263 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1264 echo "$ac_t""yes" 1>&6
1267 echo "$ac_t""no" 1>&6
1272 # Extract the first word of "autoconf", so it can be a program name with args.
1273 set dummy autoconf; ac_word=$2
1274 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1275 echo "configure:1276: checking for $ac_word" >&5
1276 if eval "test \"`echo '$''{'ac_cv_prog_AUTOCONF'+set}'`\" = set"; then
1277 echo $ac_n "(cached) $ac_c" 1>&6
1279 if test -n "$AUTOCONF"; then
1280 ac_cv_prog_AUTOCONF="$AUTOCONF" # Let the user override the test.
1282 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1284 for ac_dir in $ac_dummy; do
1285 test -z "$ac_dir" && ac_dir=.
1286 if test -f $ac_dir/$ac_word; then
1287 ac_cv_prog_AUTOCONF="autoconf"
1292 test -z "$ac_cv_prog_AUTOCONF" && ac_cv_prog_AUTOCONF=":"
1295 AUTOCONF="$ac_cv_prog_AUTOCONF"
1296 if test -n "$AUTOCONF"; then
1297 echo "$ac_t""$AUTOCONF" 1>&6
1299 echo "$ac_t""no" 1>&6
1302 # Extract the first word of "as", so it can be a program name with args.
1303 set dummy as; ac_word=$2
1304 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1305 echo "configure:1306: checking for $ac_word" >&5
1306 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1307 echo $ac_n "(cached) $ac_c" 1>&6
1309 if test -n "$AS"; then
1310 ac_cv_prog_AS="$AS" # Let the user override the test.
1312 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1314 for ac_dir in $ac_dummy; do
1315 test -z "$ac_dir" && ac_dir=.
1316 if test -f $ac_dir/$ac_word; then
1322 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS=":"
1326 if test -n "$AS"; then
1327 echo "$ac_t""$AS" 1>&6
1329 echo "$ac_t""no" 1>&6
1332 # Extract the first word of "cp", so it can be a program name with args.
1333 set dummy cp; ac_word=$2
1334 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1335 echo "configure:1336: checking for $ac_word" >&5
1336 if eval "test \"`echo '$''{'ac_cv_prog_CP'+set}'`\" = set"; then
1337 echo $ac_n "(cached) $ac_c" 1>&6
1339 if test -n "$CP"; then
1340 ac_cv_prog_CP="$CP" # Let the user override the test.
1342 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1344 for ac_dir in $ac_dummy; do
1345 test -z "$ac_dir" && ac_dir=.
1346 if test -f $ac_dir/$ac_word; then
1352 test -z "$ac_cv_prog_CP" && ac_cv_prog_CP=":"
1356 if test -n "$CP"; then
1357 echo "$ac_t""$CP" 1>&6
1359 echo "$ac_t""no" 1>&6
1364 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1365 ac_cpp='$CPP $CPPFLAGS'
1366 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1367 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1368 cross_compiling=$ac_cv_prog_cc_cross
1371 # Checking for header files.
1372 # ===========================================================================
1373 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1374 echo "configure:1375: checking for ANSI C header files" >&5
1375 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1376 echo $ac_n "(cached) $ac_c" 1>&6
1378 cat > conftest.$ac_ext <<EOF
1379 #line 1380 "configure"
1380 #include "confdefs.h"
1386 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1387 { (eval echo configure:1388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1388 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1389 if test -z "$ac_err"; then
1391 ac_cv_header_stdc=yes
1394 echo "configure: failed program was:" >&5
1395 cat conftest.$ac_ext >&5
1397 ac_cv_header_stdc=no
1401 if test $ac_cv_header_stdc = yes; then
1402 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1403 cat > conftest.$ac_ext <<EOF
1404 #line 1405 "configure"
1405 #include "confdefs.h"
1408 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1409 egrep "memchr" >/dev/null 2>&1; then
1413 ac_cv_header_stdc=no
1419 if test $ac_cv_header_stdc = yes; then
1420 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1421 cat > conftest.$ac_ext <<EOF
1422 #line 1423 "configure"
1423 #include "confdefs.h"
1426 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1427 egrep "free" >/dev/null 2>&1; then
1431 ac_cv_header_stdc=no
1437 if test $ac_cv_header_stdc = yes; then
1438 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1439 if test "$cross_compiling" = yes; then
1442 cat > conftest.$ac_ext <<EOF
1443 #line 1444 "configure"
1444 #include "confdefs.h"
1446 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1447 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1448 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1449 int main () { int i; for (i = 0; i < 256; i++)
1450 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1454 if { (eval echo configure:1455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1458 echo "configure: failed program was:" >&5
1459 cat conftest.$ac_ext >&5
1461 ac_cv_header_stdc=no
1469 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1470 if test $ac_cv_header_stdc = yes; then
1471 cat >> confdefs.h <<\EOF
1472 #define STDC_HEADERS 1
1477 for ac_hdr in getopt.h
1479 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1480 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1481 echo "configure:1482: checking for $ac_hdr" >&5
1482 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1483 echo $ac_n "(cached) $ac_c" 1>&6
1485 cat > conftest.$ac_ext <<EOF
1486 #line 1487 "configure"
1487 #include "confdefs.h"
1490 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1491 { (eval echo configure:1492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1492 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1493 if test -z "$ac_err"; then
1495 eval "ac_cv_header_$ac_safe=yes"
1498 echo "configure: failed program was:" >&5
1499 cat conftest.$ac_ext >&5
1501 eval "ac_cv_header_$ac_safe=no"
1505 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1506 echo "$ac_t""yes" 1>&6
1507 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1508 cat >> confdefs.h <<EOF
1509 #define $ac_tr_hdr 1
1513 echo "$ac_t""no" 1>&6
1517 for ac_hdr in unistd.h
1519 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1520 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1521 echo "configure:1522: checking for $ac_hdr" >&5
1522 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1523 echo $ac_n "(cached) $ac_c" 1>&6
1525 cat > conftest.$ac_ext <<EOF
1526 #line 1527 "configure"
1527 #include "confdefs.h"
1530 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1531 { (eval echo configure:1532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1532 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1533 if test -z "$ac_err"; then
1535 eval "ac_cv_header_$ac_safe=yes"
1538 echo "configure: failed program was:" >&5
1539 cat conftest.$ac_ext >&5
1541 eval "ac_cv_header_$ac_safe=no"
1545 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1546 echo "$ac_t""yes" 1>&6
1547 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1548 cat >> confdefs.h <<EOF
1549 #define $ac_tr_hdr 1
1553 echo "$ac_t""no" 1>&6
1557 for ac_hdr in endian.h
1559 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1560 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1561 echo "configure:1562: checking for $ac_hdr" >&5
1562 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1563 echo $ac_n "(cached) $ac_c" 1>&6
1565 cat > conftest.$ac_ext <<EOF
1566 #line 1567 "configure"
1567 #include "confdefs.h"
1570 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1571 { (eval echo configure:1572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1572 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1573 if test -z "$ac_err"; then
1575 eval "ac_cv_header_$ac_safe=yes"
1578 echo "configure: failed program was:" >&5
1579 cat conftest.$ac_ext >&5
1581 eval "ac_cv_header_$ac_safe=no"
1585 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1586 echo "$ac_t""yes" 1>&6
1587 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1588 cat >> confdefs.h <<EOF
1589 #define $ac_tr_hdr 1
1593 echo "$ac_t""no" 1>&6
1597 for ac_hdr in sys/isa_defs.h
1599 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1600 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1601 echo "configure:1602: checking for $ac_hdr" >&5
1602 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1603 echo $ac_n "(cached) $ac_c" 1>&6
1605 cat > conftest.$ac_ext <<EOF
1606 #line 1607 "configure"
1607 #include "confdefs.h"
1610 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1611 { (eval echo configure:1612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1612 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1613 if test -z "$ac_err"; then
1615 eval "ac_cv_header_$ac_safe=yes"
1618 echo "configure: failed program was:" >&5
1619 cat conftest.$ac_ext >&5
1621 eval "ac_cv_header_$ac_safe=no"
1625 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1626 echo "$ac_t""yes" 1>&6
1627 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1628 cat >> confdefs.h <<EOF
1629 #define $ac_tr_hdr 1
1633 echo "$ac_t""no" 1>&6
1637 for ac_hdr in sys/socket.h
1639 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1640 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1641 echo "configure:1642: checking for $ac_hdr" >&5
1642 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1643 echo $ac_n "(cached) $ac_c" 1>&6
1645 cat > conftest.$ac_ext <<EOF
1646 #line 1647 "configure"
1647 #include "confdefs.h"
1650 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1651 { (eval echo configure:1652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1652 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1653 if test -z "$ac_err"; then
1655 eval "ac_cv_header_$ac_safe=yes"
1658 echo "configure: failed program was:" >&5
1659 cat conftest.$ac_ext >&5
1661 eval "ac_cv_header_$ac_safe=no"
1665 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1666 echo "$ac_t""yes" 1>&6
1667 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1668 cat >> confdefs.h <<EOF
1669 #define $ac_tr_hdr 1
1673 echo "$ac_t""no" 1>&6
1678 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1680 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1681 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1682 echo "configure:1683: checking for $ac_hdr that defines DIR" >&5
1683 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1684 echo $ac_n "(cached) $ac_c" 1>&6
1686 cat > conftest.$ac_ext <<EOF
1687 #line 1688 "configure"
1688 #include "confdefs.h"
1689 #include <sys/types.h>
1695 if { (eval echo configure:1696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1697 eval "ac_cv_header_dirent_$ac_safe=yes"
1699 echo "configure: failed program was:" >&5
1700 cat conftest.$ac_ext >&5
1702 eval "ac_cv_header_dirent_$ac_safe=no"
1706 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1707 echo "$ac_t""yes" 1>&6
1708 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1709 cat >> confdefs.h <<EOF
1710 #define $ac_tr_hdr 1
1712 ac_header_dirent=$ac_hdr; break
1714 echo "$ac_t""no" 1>&6
1717 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1718 if test $ac_header_dirent = dirent.h; then
1719 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1720 echo "configure:1721: checking for opendir in -ldir" >&5
1721 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1722 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1723 echo $ac_n "(cached) $ac_c" 1>&6
1725 ac_save_LIBS="$LIBS"
1727 cat > conftest.$ac_ext <<EOF
1728 #line 1729 "configure"
1729 #include "confdefs.h"
1730 /* Override any gcc2 internal prototype to avoid an error. */
1731 /* We use char because int might match the return type of a gcc2
1732 builtin and then its argument prototype would still apply. */
1739 if { (eval echo configure:1740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1741 eval "ac_cv_lib_$ac_lib_var=yes"
1743 echo "configure: failed program was:" >&5
1744 cat conftest.$ac_ext >&5
1746 eval "ac_cv_lib_$ac_lib_var=no"
1749 LIBS="$ac_save_LIBS"
1752 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1753 echo "$ac_t""yes" 1>&6
1756 echo "$ac_t""no" 1>&6
1760 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1761 echo "configure:1762: checking for opendir in -lx" >&5
1762 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1763 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1764 echo $ac_n "(cached) $ac_c" 1>&6
1766 ac_save_LIBS="$LIBS"
1768 cat > conftest.$ac_ext <<EOF
1769 #line 1770 "configure"
1770 #include "confdefs.h"
1771 /* Override any gcc2 internal prototype to avoid an error. */
1772 /* We use char because int might match the return type of a gcc2
1773 builtin and then its argument prototype would still apply. */
1780 if { (eval echo configure:1781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1782 eval "ac_cv_lib_$ac_lib_var=yes"
1784 echo "configure: failed program was:" >&5
1785 cat conftest.$ac_ext >&5
1787 eval "ac_cv_lib_$ac_lib_var=no"
1790 LIBS="$ac_save_LIBS"
1793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1794 echo "$ac_t""yes" 1>&6
1797 echo "$ac_t""no" 1>&6
1803 # This must be after CPP
1805 echo $ac_n "checking which header file defines FD_ macros""... $ac_c" 1>&6
1806 echo "configure:1807: checking which header file defines FD_ macros" >&5
1807 if eval "test \"`echo '$''{'s51_cv_fd'+set}'`\" = set"; then
1808 echo $ac_n "(cached) $ac_c" 1>&6
1810 sdcc_cv_fd="unknown"
1811 cat > conftest.$ac_ext <<EOF
1812 #line 1813 "configure"
1813 #include "confdefs.h"
1815 #include <sys/time.h>
1820 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1821 egrep "yes" >/dev/null 2>&1; then
1823 sdcc_cv_fd="<sys/time.h>"
1827 cat > conftest.$ac_ext <<EOF
1828 #line 1829 "configure"
1829 #include "confdefs.h"
1831 #include <sys/types.h>
1836 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1837 egrep "yes" >/dev/null 2>&1; then
1839 sdcc_cv_fd="<sys/types.h>"
1843 cat > conftest.$ac_ext <<EOF
1844 #line 1845 "configure"
1845 #include "confdefs.h"
1847 #include <sys/select.h>
1852 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1853 egrep "yes" >/dev/null 2>&1; then
1855 sdcc_cv_fd="<sys/types.h>"
1861 echo "$ac_t""$s51_cv_fd" 1>&6
1863 cat >> confdefs.h <<\EOF
1864 #define FD_HEADER_OK 0
1867 if echo $sdcc_cv_fd|grep time >/dev/null 2>&1; then
1868 cat >> confdefs.h <<\EOF
1869 #define FD_NEED_TIME_H 1
1872 cat >> confdefs.h <<\EOF
1873 #define FD_HEADER_OK 1
1877 cat >> confdefs.h <<\EOF
1878 #define FD_NEED_TIME_H 0
1882 if echo $sdcc_cv_fd|grep types >/dev/null 2>&1; then
1883 cat >> confdefs.h <<\EOF
1884 #define FD_NEED_TYPES_H 1
1887 cat >> confdefs.h <<\EOF
1888 #define FD_HEADER_OK 1
1892 cat >> confdefs.h <<\EOF
1893 #define FD_NEED_TYPES_H 0
1897 if echo $sdcc_cv_fd|grep select >/dev/null 2>&1; then
1898 cat >> confdefs.h <<\EOF
1899 #define FD_NEED_SELECT_H 1
1902 cat >> confdefs.h <<\EOF
1903 #define FD_HEADER_OK 1
1907 cat >> confdefs.h <<\EOF
1908 #define FD_NEED_SELECT_H 0
1913 cat >> confdefs.h <<EOF
1914 #define HEADER_FD ${sdcc_cv_fd}
1919 # Checking for functions
1920 # ===========================================================================
1921 for ac_func in strlen strcpy strcat strstr strcmp strerror strtok strdup
1923 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1924 echo "configure:1925: checking for $ac_func" >&5
1925 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1926 echo $ac_n "(cached) $ac_c" 1>&6
1928 cat > conftest.$ac_ext <<EOF
1929 #line 1930 "configure"
1930 #include "confdefs.h"
1931 /* System header to define __stub macros and hopefully few prototypes,
1932 which can conflict with char $ac_func(); below. */
1934 /* Override any gcc2 internal prototype to avoid an error. */
1935 /* We use char because int might match the return type of a gcc2
1936 builtin and then its argument prototype would still apply. */
1941 /* The GNU C library defines this for functions which it implements
1942 to always fail with ENOSYS. Some functions are actually named
1943 something starting with __ and the normal name is an alias. */
1944 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1952 if { (eval echo configure:1953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1954 eval "ac_cv_func_$ac_func=yes"
1956 echo "configure: failed program was:" >&5
1957 cat conftest.$ac_ext >&5
1959 eval "ac_cv_func_$ac_func=no"
1964 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1965 echo "$ac_t""yes" 1>&6
1966 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1967 cat >> confdefs.h <<EOF
1968 #define $ac_tr_func 1
1972 echo "$ac_t""no" 1>&6
1976 for ac_func in strchr memcpy
1978 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1979 echo "configure:1980: checking for $ac_func" >&5
1980 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1981 echo $ac_n "(cached) $ac_c" 1>&6
1983 cat > conftest.$ac_ext <<EOF
1984 #line 1985 "configure"
1985 #include "confdefs.h"
1986 /* System header to define __stub macros and hopefully few prototypes,
1987 which can conflict with char $ac_func(); below. */
1989 /* Override any gcc2 internal prototype to avoid an error. */
1990 /* We use char because int might match the return type of a gcc2
1991 builtin and then its argument prototype would still apply. */
1996 /* The GNU C library defines this for functions which it implements
1997 to always fail with ENOSYS. Some functions are actually named
1998 something starting with __ and the normal name is an alias. */
1999 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2007 if { (eval echo configure:2008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2009 eval "ac_cv_func_$ac_func=yes"
2011 echo "configure: failed program was:" >&5
2012 cat conftest.$ac_ext >&5
2014 eval "ac_cv_func_$ac_func=no"
2019 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2020 echo "$ac_t""yes" 1>&6
2021 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2022 cat >> confdefs.h <<EOF
2023 #define $ac_tr_func 1
2027 echo "$ac_t""no" 1>&6
2031 for ac_func in fgets
2033 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2034 echo "configure:2035: checking for $ac_func" >&5
2035 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2036 echo $ac_n "(cached) $ac_c" 1>&6
2038 cat > conftest.$ac_ext <<EOF
2039 #line 2040 "configure"
2040 #include "confdefs.h"
2041 /* System header to define __stub macros and hopefully few prototypes,
2042 which can conflict with char $ac_func(); below. */
2044 /* Override any gcc2 internal prototype to avoid an error. */
2045 /* We use char because int might match the return type of a gcc2
2046 builtin and then its argument prototype would still apply. */
2051 /* The GNU C library defines this for functions which it implements
2052 to always fail with ENOSYS. Some functions are actually named
2053 something starting with __ and the normal name is an alias. */
2054 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2062 if { (eval echo configure:2063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2064 eval "ac_cv_func_$ac_func=yes"
2066 echo "configure: failed program was:" >&5
2067 cat conftest.$ac_ext >&5
2069 eval "ac_cv_func_$ac_func=no"
2074 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2075 echo "$ac_t""yes" 1>&6
2076 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2077 cat >> confdefs.h <<EOF
2078 #define $ac_tr_func 1
2082 echo "$ac_t""no" 1>&6
2086 for ac_func in yylex
2088 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2089 echo "configure:2090: checking for $ac_func" >&5
2090 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2091 echo $ac_n "(cached) $ac_c" 1>&6
2093 cat > conftest.$ac_ext <<EOF
2094 #line 2095 "configure"
2095 #include "confdefs.h"
2096 /* System header to define __stub macros and hopefully few prototypes,
2097 which can conflict with char $ac_func(); below. */
2099 /* Override any gcc2 internal prototype to avoid an error. */
2100 /* We use char because int might match the return type of a gcc2
2101 builtin and then its argument prototype would still apply. */
2106 /* The GNU C library defines this for functions which it implements
2107 to always fail with ENOSYS. Some functions are actually named
2108 something starting with __ and the normal name is an alias. */
2109 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2117 if { (eval echo configure:2118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2119 eval "ac_cv_func_$ac_func=yes"
2121 echo "configure: failed program was:" >&5
2122 cat conftest.$ac_ext >&5
2124 eval "ac_cv_func_$ac_func=no"
2129 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2130 echo "$ac_t""yes" 1>&6
2131 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2132 cat >> confdefs.h <<EOF
2133 #define $ac_tr_func 1
2137 echo "$ac_t""no" 1>&6
2142 # check if -lsocket && -lxnet is required to compile socket stuff
2144 echo $ac_n "checking for library containing socket""... $ac_c" 1>&6
2145 echo "configure:2146: checking for library containing socket" >&5
2146 if eval "test \"`echo '$''{'ac_cv_search_socket'+set}'`\" = set"; then
2147 echo $ac_n "(cached) $ac_c" 1>&6
2149 ac_func_search_save_LIBS="$LIBS"
2150 ac_cv_search_socket="no"
2151 cat > conftest.$ac_ext <<EOF
2152 #line 2153 "configure"
2153 #include "confdefs.h"
2154 /* Override any gcc2 internal prototype to avoid an error. */
2155 /* We use char because int might match the return type of a gcc2
2156 builtin and then its argument prototype would still apply. */
2163 if { (eval echo configure:2164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2165 ac_cv_search_socket="none required"
2167 echo "configure: failed program was:" >&5
2168 cat conftest.$ac_ext >&5
2171 test "$ac_cv_search_socket" = "no" && for i in socket; do
2172 LIBS="-l$i $ac_func_search_save_LIBS"
2173 cat > conftest.$ac_ext <<EOF
2174 #line 2175 "configure"
2175 #include "confdefs.h"
2176 /* Override any gcc2 internal prototype to avoid an error. */
2177 /* We use char because int might match the return type of a gcc2
2178 builtin and then its argument prototype would still apply. */
2185 if { (eval echo configure:2186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2187 ac_cv_search_socket="-l$i"
2190 echo "configure: failed program was:" >&5
2191 cat conftest.$ac_ext >&5
2195 LIBS="$ac_func_search_save_LIBS"
2198 echo "$ac_t""$ac_cv_search_socket" 1>&6
2199 if test "$ac_cv_search_socket" != "no"; then
2200 test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
2206 echo $ac_n "checking for library containing inet_addr""... $ac_c" 1>&6
2207 echo "configure:2208: checking for library containing inet_addr" >&5
2208 if eval "test \"`echo '$''{'ac_cv_search_inet_addr'+set}'`\" = set"; then
2209 echo $ac_n "(cached) $ac_c" 1>&6
2211 ac_func_search_save_LIBS="$LIBS"
2212 ac_cv_search_inet_addr="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_inet_addr="none required"
2229 echo "configure: failed program was:" >&5
2230 cat conftest.$ac_ext >&5
2233 test "$ac_cv_search_inet_addr" = "no" && for i in nsl xnet; 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_inet_addr="-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_inet_addr" 1>&6
2261 if test "$ac_cv_search_inet_addr" != "no"; then
2262 test "$ac_cv_search_inet_addr" = "none required" || LIBS="$ac_cv_search_inet_addr $LIBS"
2271 # DD_COPT macro checks if the compiler specified as the 1st parameter
2272 # supports option specified as the 2nd parameter
2273 # For example: DD_CPORT(CXX, fPIC)
2278 # Checking characteristics of compilers and other programs
2279 # --------------------------------------------------------
2280 echo $ac_n "checking whether preprocessor accepts -MM or -M""... $ac_c" 1>&6
2281 echo "configure:2282: checking whether preprocessor accepts -MM or -M" >&5
2282 if eval "test \"`echo '$''{'sdcc_cv_MM'+set}'`\" = set"; then
2283 echo $ac_n "(cached) $ac_c" 1>&6
2285 echo "#include <stdio.h>" >_test_.c
2287 $CPP -v -MM _test_.c 1>&5 2>&5
2288 if test "$?" = "0"; then
2296 echo "$ac_t""$sdcc_cv_MM" 1>&6
2300 # This is the first time when CFLAGS are set/modified!!
2302 echo $ac_n "checking whether $CC accepts -ggdb""... $ac_c" 1>&6
2303 echo "configure:2304: checking whether $CC accepts -ggdb" >&5
2304 if eval "test \"`echo '$''{'sdcc_cv_CCggdb'+set}'`\" = set"; then
2305 echo $ac_n "(cached) $ac_c" 1>&6
2311 $CC -v -ggdb -c _test_.c 1>&5 2>&5
2312 if test "$?" = "0"; then
2313 sdcc_cv_CCggdb="yes"
2317 rm -f _test_.* a.out
2320 echo "$ac_t""$sdcc_cv_CCggdb" 1>&6
2322 if test "$sdcc_cv_CCggdb" = "yes"; then
2327 echo $ac_n "checking whether $CC accepts -pipe""... $ac_c" 1>&6
2328 echo "configure:2329: checking whether $CC accepts -pipe" >&5
2329 if eval "test \"`echo '$''{'sdcc_cv_CCpipe'+set}'`\" = set"; then
2330 echo $ac_n "(cached) $ac_c" 1>&6
2336 $CC -v -pipe -c _test_.c 1>&5 2>&5
2337 if test "$?" = "0"; then
2338 sdcc_cv_CCpipe="yes"
2342 rm -f _test_.* a.out
2345 echo "$ac_t""$sdcc_cv_CCpipe" 1>&6
2347 if test "$sdcc_cv_CCpipe" = "yes"; then
2348 CFLAGS="$CFLAGS -pipe"
2352 # Checks for typedefs, structures, and compiler characteristics.
2353 # ===========================================================================
2354 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2355 echo "configure:2356: checking return type of signal handlers" >&5
2356 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2357 echo $ac_n "(cached) $ac_c" 1>&6
2359 cat > conftest.$ac_ext <<EOF
2360 #line 2361 "configure"
2361 #include "confdefs.h"
2362 #include <sys/types.h>
2368 extern "C" void (*signal (int, void (*)(int)))(int);
2370 void (*signal ()) ();
2377 if { (eval echo configure:2378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2379 ac_cv_type_signal=void
2381 echo "configure: failed program was:" >&5
2382 cat conftest.$ac_ext >&5
2384 ac_cv_type_signal=int
2389 echo "$ac_t""$ac_cv_type_signal" 1>&6
2390 cat >> confdefs.h <<EOF
2391 #define RETSIGTYPE $ac_cv_type_signal
2398 if test "${prefix}" = "NONE"; then
2403 if test "${datadir}" = "\${prefix}/share"; then
2404 sdcc_datadir=${prefix}/share
2406 sdcc_datadir=${datadir}
2408 cat >> confdefs.h <<EOF
2409 #define STANDARD_INCLUDE_DIR "${sdcc_datadir}/sdcc51inc"
2412 cat >> confdefs.h <<EOF
2413 #define SDCC_INCLUDE_DIR "${sdcc_datadir}/sdcc51inc"
2416 cat >> confdefs.h <<EOF
2417 #define SDCC_LIB_DIR "${sdcc_datadir}/sdcc51lib"
2420 cat >> confdefs.h <<EOF
2421 #define STD_LIB "libsdcc"
2424 cat >> confdefs.h <<EOF
2425 #define STD_INT_LIB "libint"
2428 cat >> confdefs.h <<EOF
2429 #define STD_LONG_LIB "liblong"
2432 cat >> confdefs.h <<EOF
2433 #define STD_FP_LIB "libfloat"
2437 cat >> confdefs.h <<EOF
2438 #define PREFIX "${prefix}"
2441 cat >> confdefs.h <<EOF
2442 #define DATADIR "${sdcc_datadir}"
2445 cat >> confdefs.h <<EOF
2446 #define SRCDIR "${config_in}"
2451 # Generating output files
2452 # ===========================================================================
2456 cat > confcache <<\EOF
2457 # This file is a shell script that caches the results of configure
2458 # tests run on this system so they can be shared between configure
2459 # scripts and configure runs. It is not useful on other systems.
2460 # If it contains results you don't want to keep, you may remove or edit it.
2462 # By default, configure uses ./config.cache as the cache file,
2463 # creating it if it does not exist already. You can give configure
2464 # the --cache-file=FILE option to use a different cache file; that is
2465 # what configure does when it calls configure scripts in
2466 # subdirectories, so they share the cache.
2467 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2468 # config.status only pays attention to the cache file if you give it the
2469 # --recheck option to rerun configure.
2472 # The following way of writing the cache mishandles newlines in values,
2473 # but we know of no workaround that is simple, portable, and efficient.
2474 # So, don't put newlines in cache variables' values.
2475 # Ultrix sh set writes to stderr and can't be redirected directly,
2476 # and sets the high bit in the cache file unless we assign to the vars.
2478 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2480 # `set' does not quote correctly, so add quotes (double-quote substitution
2481 # turns \\\\ into \\, and sed turns \\ into \).
2483 -e "s/'/'\\\\''/g" \
2484 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2487 # `set' quotes correctly as required by POSIX, so do not add quotes.
2488 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2491 if cmp -s $cache_file confcache; then
2494 if test -w $cache_file; then
2495 echo "updating cache $cache_file"
2496 cat confcache > $cache_file
2498 echo "not updating unwritable cache $cache_file"
2503 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2505 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2506 # Let make expand exec_prefix.
2507 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2509 # Any assignment to VPATH causes Sun make to only execute
2510 # the first set of double-colon rules, so remove it if not needed.
2511 # If there is a colon in the path, we need to keep it.
2512 if test "x$srcdir" = x.; then
2513 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2516 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2518 DEFS=-DHAVE_CONFIG_H
2520 # Without the "./", some shells look in PATH for config.status.
2521 : ${CONFIG_STATUS=./config.status}
2523 echo creating $CONFIG_STATUS
2524 rm -f $CONFIG_STATUS
2525 cat > $CONFIG_STATUS <<EOF
2527 # Generated automatically by configure.
2528 # Run this file to recreate the current configuration.
2529 # This directory was configured as follows,
2530 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2532 # $0 $ac_configure_args
2534 # Compiler output produced by configure, useful for debugging
2535 # configure, is in ./config.log if it exists.
2537 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2540 case "\$ac_option" in
2541 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2542 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2543 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2544 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2545 echo "$CONFIG_STATUS generated by autoconf version 2.13"
2547 -help | --help | --hel | --he | --h)
2548 echo "\$ac_cs_usage"; exit 0 ;;
2549 *) echo "\$ac_cs_usage"; exit 1 ;;
2553 ac_given_srcdir=$srcdir
2554 ac_given_INSTALL="$INSTALL"
2556 trap 'rm -fr `echo "main.mk:main_in.mk
2560 support/cpp/Makefile
2561 device/include/Makefile
2563 debugger/mcs51/Makefile
2564 Makefile.common:Makefile.common.in
2565 sdccconf.h:sdccconf_in.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2567 cat >> $CONFIG_STATUS <<EOF
2569 # Protect against being on the right side of a sed subst in config.status.
2570 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2571 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2575 s%@CFLAGS@%$CFLAGS%g
2576 s%@CPPFLAGS@%$CPPFLAGS%g
2577 s%@CXXFLAGS@%$CXXFLAGS%g
2578 s%@FFLAGS@%$FFLAGS%g
2580 s%@LDFLAGS@%$LDFLAGS%g
2582 s%@exec_prefix@%$exec_prefix%g
2583 s%@prefix@%$prefix%g
2584 s%@program_transform_name@%$program_transform_name%g
2585 s%@bindir@%$bindir%g
2586 s%@sbindir@%$sbindir%g
2587 s%@libexecdir@%$libexecdir%g
2588 s%@datadir@%$datadir%g
2589 s%@sysconfdir@%$sysconfdir%g
2590 s%@sharedstatedir@%$sharedstatedir%g
2591 s%@localstatedir@%$localstatedir%g
2592 s%@libdir@%$libdir%g
2593 s%@includedir@%$includedir%g
2594 s%@oldincludedir@%$oldincludedir%g
2595 s%@infodir@%$infodir%g
2596 s%@mandir@%$mandir%g
2598 s%@VERSION@%$VERSION%g
2599 s%@VERSIONHI@%$VERSIONHI%g
2600 s%@VERSIONLO@%$VERSIONLO%g
2601 s%@VERSIONP@%$VERSIONP%g
2605 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2606 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2607 s%@INSTALL_DATA@%$INSTALL_DATA%g
2608 s%@RANLIB@%$RANLIB%g
2611 s%@LEXLIB@%$LEXLIB%g
2612 s%@AUTOCONF@%$AUTOCONF%g
2615 s%@M_OR_MM@%$M_OR_MM%g
2616 s%@subdirs@%$subdirs%g
2621 cat >> $CONFIG_STATUS <<\EOF
2623 # Split the substitutions into bite-sized pieces for seds with
2624 # small command number limits, like on Digital OSF/1 and HP-UX.
2625 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2626 ac_file=1 # Number of current file.
2627 ac_beg=1 # First line for current file.
2628 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2631 while $ac_more_lines; do
2632 if test $ac_beg -gt 1; then
2633 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2635 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2637 if test ! -s conftest.s$ac_file; then
2639 rm -f conftest.s$ac_file
2641 if test -z "$ac_sed_cmds"; then
2642 ac_sed_cmds="sed -f conftest.s$ac_file"
2644 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2646 ac_file=`expr $ac_file + 1`
2648 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2651 if test -z "$ac_sed_cmds"; then
2656 cat >> $CONFIG_STATUS <<EOF
2658 CONFIG_FILES=\${CONFIG_FILES-"main.mk:main_in.mk
2662 support/cpp/Makefile
2663 device/include/Makefile
2665 debugger/mcs51/Makefile
2666 Makefile.common:Makefile.common.in
2669 cat >> $CONFIG_STATUS <<\EOF
2670 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2671 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2673 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2674 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2675 *) ac_file_in="${ac_file}.in" ;;
2678 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2680 # Remove last slash and all that follows it. Not all systems have dirname.
2681 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2682 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2683 # The file is in a subdirectory.
2684 test ! -d "$ac_dir" && mkdir "$ac_dir"
2685 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2686 # A "../" for each directory in $ac_dir_suffix.
2687 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2689 ac_dir_suffix= ac_dots=
2692 case "$ac_given_srcdir" in
2694 if test -z "$ac_dots"; then top_srcdir=.
2695 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2696 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2698 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2699 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2702 case "$ac_given_INSTALL" in
2703 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2704 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2707 echo creating "$ac_file"
2709 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2711 *Makefile*) ac_comsub="1i\\
2712 # $configure_input" ;;
2716 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2718 s%@configure_input@%$configure_input%g
2719 s%@srcdir@%$srcdir%g
2720 s%@top_srcdir@%$top_srcdir%g
2721 s%@INSTALL@%$INSTALL%g
2722 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2726 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2727 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2729 # ac_d sets the value in "#define NAME VALUE" lines.
2730 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2731 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2734 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2735 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2736 ac_uB='\([ ]\)%\1#\2define\3'
2739 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2740 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2741 ac_eB='$%\1#\2define\3'
2745 if test "${CONFIG_HEADERS+set}" != set; then
2747 cat >> $CONFIG_STATUS <<EOF
2748 CONFIG_HEADERS="sdccconf.h:sdccconf_in.h"
2750 cat >> $CONFIG_STATUS <<\EOF
2752 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2753 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2755 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2756 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2757 *) ac_file_in="${ac_file}.in" ;;
2760 echo creating $ac_file
2762 rm -f conftest.frag conftest.in conftest.out
2763 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2764 cat $ac_file_inputs > conftest.in
2768 # Transform confdefs.h into a sed script conftest.vals that substitutes
2769 # the proper values into config.h.in to produce config.h. And first:
2770 # Protect against being on the right side of a sed subst in config.status.
2771 # Protect against being in an unquoted here document in config.status.
2773 cat > conftest.hdr <<\EOF
2776 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2780 sed -n -f conftest.hdr confdefs.h > conftest.vals
2783 # This sed command replaces #undef with comments. This is necessary, for
2784 # example, in the case of _POSIX_SOURCE, which is predefined and required
2785 # on some systems where configure will not decide to define it.
2786 cat >> conftest.vals <<\EOF
2787 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2790 # Break up conftest.vals because some shells have a limit on
2791 # the size of here documents, and old seds have small limits too.
2796 ac_lines=`grep -c . conftest.vals`
2797 # grep -c gives empty output for an empty file on some AIX systems.
2798 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2799 # Write a limited-size here document to conftest.frag.
2800 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2801 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2803 sed -f conftest.frag conftest.in > conftest.out
2805 mv conftest.out conftest.in
2807 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2809 mv conftest.tail conftest.vals
2813 cat >> $CONFIG_STATUS <<\EOF
2814 rm -f conftest.frag conftest.h
2815 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2816 cat conftest.in >> conftest.h
2818 if cmp -s $ac_file conftest.h 2>/dev/null; then
2819 echo "$ac_file is unchanged"
2822 # Remove last slash and all that follows it. Not all systems have dirname.
2823 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2824 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2825 # The file is in a subdirectory.
2826 test ! -d "$ac_dir" && mkdir "$ac_dir"
2829 mv conftest.h $ac_file
2834 cat >> $CONFIG_STATUS <<EOF
2837 cat >> $CONFIG_STATUS <<\EOF
2841 chmod +x $CONFIG_STATUS
2842 rm -fr confdefs* $ac_clean_files
2843 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2845 if test "$no_recursion" != yes; then
2847 # Remove --cache-file and --srcdir arguments so they do not pile up.
2848 ac_sub_configure_args=
2850 for ac_arg in $ac_configure_args; do
2851 if test -n "$ac_prev"; then
2856 -cache-file | --cache-file | --cache-fil | --cache-fi \
2857 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2858 ac_prev=cache_file ;;
2859 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2860 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2862 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2864 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2866 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
2870 for ac_config_dir in sim/mcs51; do
2872 # Do not complain, so a configure script can configure whichever
2873 # parts of a large source tree are present.
2874 if test ! -d $srcdir/$ac_config_dir; then
2878 echo configuring in $ac_config_dir
2883 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
2885 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
2893 # A "../" for each directory in /$ac_config_dir.
2894 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
2897 .) # No --srcdir option. We are building in place.
2898 ac_sub_srcdir=$srcdir ;;
2899 /*) # Absolute path.
2900 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
2902 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
2905 # Check for guested configure; otherwise get Cygnus style configure.
2906 if test -f $ac_sub_srcdir/configure; then
2907 ac_sub_configure=$ac_sub_srcdir/configure
2908 elif test -f $ac_sub_srcdir/configure.in; then
2909 ac_sub_configure=$ac_configure
2911 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
2915 # The recursion is here.
2916 if test -n "$ac_sub_configure"; then
2918 # Make the cache file name correct relative to the subdirectory.
2919 case "$cache_file" in
2920 /*) ac_sub_cache_file=$cache_file ;;
2922 ac_sub_cache_file="$ac_dots$cache_file" ;;
2924 case "$ac_given_INSTALL" in
2925 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2926 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2929 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
2930 # The eval makes quoting arguments work.
2931 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
2934 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
2943 # End of configure/configure.in