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 gawk mawk 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 malloc.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/isa_defs.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
1691 for ac_hdr in sys/socket.h
1693 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1694 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1695 echo "configure:1696: checking for $ac_hdr" >&5
1696 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1697 echo $ac_n "(cached) $ac_c" 1>&6
1699 cat > conftest.$ac_ext <<EOF
1700 #line 1701 "configure"
1701 #include "confdefs.h"
1704 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1705 { (eval echo configure:1706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1706 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1707 if test -z "$ac_err"; then
1709 eval "ac_cv_header_$ac_safe=yes"
1712 echo "configure: failed program was:" >&5
1713 cat conftest.$ac_ext >&5
1715 eval "ac_cv_header_$ac_safe=no"
1719 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1720 echo "$ac_t""yes" 1>&6
1721 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1722 cat >> confdefs.h <<EOF
1723 #define $ac_tr_hdr 1
1727 echo "$ac_t""no" 1>&6
1732 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1734 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1735 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1736 echo "configure:1737: checking for $ac_hdr that defines DIR" >&5
1737 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1738 echo $ac_n "(cached) $ac_c" 1>&6
1740 cat > conftest.$ac_ext <<EOF
1741 #line 1742 "configure"
1742 #include "confdefs.h"
1743 #include <sys/types.h>
1749 if { (eval echo configure:1750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1751 eval "ac_cv_header_dirent_$ac_safe=yes"
1753 echo "configure: failed program was:" >&5
1754 cat conftest.$ac_ext >&5
1756 eval "ac_cv_header_dirent_$ac_safe=no"
1760 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1761 echo "$ac_t""yes" 1>&6
1762 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1763 cat >> confdefs.h <<EOF
1764 #define $ac_tr_hdr 1
1766 ac_header_dirent=$ac_hdr; break
1768 echo "$ac_t""no" 1>&6
1771 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1772 if test $ac_header_dirent = dirent.h; then
1773 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1774 echo "configure:1775: checking for opendir in -ldir" >&5
1775 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1776 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1777 echo $ac_n "(cached) $ac_c" 1>&6
1779 ac_save_LIBS="$LIBS"
1781 cat > conftest.$ac_ext <<EOF
1782 #line 1783 "configure"
1783 #include "confdefs.h"
1784 /* Override any gcc2 internal prototype to avoid an error. */
1785 /* We use char because int might match the return type of a gcc2
1786 builtin and then its argument prototype would still apply. */
1793 if { (eval echo configure:1794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1795 eval "ac_cv_lib_$ac_lib_var=yes"
1797 echo "configure: failed program was:" >&5
1798 cat conftest.$ac_ext >&5
1800 eval "ac_cv_lib_$ac_lib_var=no"
1803 LIBS="$ac_save_LIBS"
1806 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1807 echo "$ac_t""yes" 1>&6
1810 echo "$ac_t""no" 1>&6
1814 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1815 echo "configure:1816: checking for opendir in -lx" >&5
1816 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1817 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1818 echo $ac_n "(cached) $ac_c" 1>&6
1820 ac_save_LIBS="$LIBS"
1822 cat > conftest.$ac_ext <<EOF
1823 #line 1824 "configure"
1824 #include "confdefs.h"
1825 /* Override any gcc2 internal prototype to avoid an error. */
1826 /* We use char because int might match the return type of a gcc2
1827 builtin and then its argument prototype would still apply. */
1834 if { (eval echo configure:1835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1836 eval "ac_cv_lib_$ac_lib_var=yes"
1838 echo "configure: failed program was:" >&5
1839 cat conftest.$ac_ext >&5
1841 eval "ac_cv_lib_$ac_lib_var=no"
1844 LIBS="$ac_save_LIBS"
1847 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1848 echo "$ac_t""yes" 1>&6
1851 echo "$ac_t""no" 1>&6
1857 # This must be after CPP
1859 echo $ac_n "checking which header file defines FD_ macros""... $ac_c" 1>&6
1860 echo "configure:1861: checking which header file defines FD_ macros" >&5
1861 if eval "test \"`echo '$''{'s51_cv_fd'+set}'`\" = set"; then
1862 echo $ac_n "(cached) $ac_c" 1>&6
1864 sdcc_cv_fd="unknown"
1865 cat > conftest.$ac_ext <<EOF
1866 #line 1867 "configure"
1867 #include "confdefs.h"
1869 #include <sys/time.h>
1874 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1875 egrep "yes" >/dev/null 2>&1; then
1877 sdcc_cv_fd="<sys/time.h>"
1881 cat > conftest.$ac_ext <<EOF
1882 #line 1883 "configure"
1883 #include "confdefs.h"
1885 #include <sys/types.h>
1890 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1891 egrep "yes" >/dev/null 2>&1; then
1893 sdcc_cv_fd="<sys/types.h>"
1897 cat > conftest.$ac_ext <<EOF
1898 #line 1899 "configure"
1899 #include "confdefs.h"
1901 #include <sys/select.h>
1906 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1907 egrep "yes" >/dev/null 2>&1; then
1909 sdcc_cv_fd="<sys/types.h>"
1915 echo "$ac_t""$s51_cv_fd" 1>&6
1917 cat >> confdefs.h <<\EOF
1918 #define FD_HEADER_OK 0
1921 if echo $sdcc_cv_fd|grep time >/dev/null 2>&1; then
1922 cat >> confdefs.h <<\EOF
1923 #define FD_NEED_TIME_H 1
1926 cat >> confdefs.h <<\EOF
1927 #define FD_HEADER_OK 1
1931 cat >> confdefs.h <<\EOF
1932 #define FD_NEED_TIME_H 0
1936 if echo $sdcc_cv_fd|grep types >/dev/null 2>&1; then
1937 cat >> confdefs.h <<\EOF
1938 #define FD_NEED_TYPES_H 1
1941 cat >> confdefs.h <<\EOF
1942 #define FD_HEADER_OK 1
1946 cat >> confdefs.h <<\EOF
1947 #define FD_NEED_TYPES_H 0
1951 if echo $sdcc_cv_fd|grep select >/dev/null 2>&1; then
1952 cat >> confdefs.h <<\EOF
1953 #define FD_NEED_SELECT_H 1
1956 cat >> confdefs.h <<\EOF
1957 #define FD_HEADER_OK 1
1961 cat >> confdefs.h <<\EOF
1962 #define FD_NEED_SELECT_H 0
1967 cat >> confdefs.h <<EOF
1968 #define HEADER_FD ${sdcc_cv_fd}
1973 # Checking for functions
1974 # ===========================================================================
1975 for ac_func in strlen strcpy strcat strstr strcmp strerror strtok strdup
1977 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1978 echo "configure:1979: checking for $ac_func" >&5
1979 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1980 echo $ac_n "(cached) $ac_c" 1>&6
1982 cat > conftest.$ac_ext <<EOF
1983 #line 1984 "configure"
1984 #include "confdefs.h"
1985 /* System header to define __stub macros and hopefully few prototypes,
1986 which can conflict with char $ac_func(); below. */
1988 /* Override any gcc2 internal prototype to avoid an error. */
1989 /* We use char because int might match the return type of a gcc2
1990 builtin and then its argument prototype would still apply. */
1995 /* The GNU C library defines this for functions which it implements
1996 to always fail with ENOSYS. Some functions are actually named
1997 something starting with __ and the normal name is an alias. */
1998 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2006 if { (eval echo configure:2007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2008 eval "ac_cv_func_$ac_func=yes"
2010 echo "configure: failed program was:" >&5
2011 cat conftest.$ac_ext >&5
2013 eval "ac_cv_func_$ac_func=no"
2018 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2019 echo "$ac_t""yes" 1>&6
2020 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2021 cat >> confdefs.h <<EOF
2022 #define $ac_tr_func 1
2026 echo "$ac_t""no" 1>&6
2030 for ac_func in strchr memcpy
2032 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2033 echo "configure:2034: checking for $ac_func" >&5
2034 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2035 echo $ac_n "(cached) $ac_c" 1>&6
2037 cat > conftest.$ac_ext <<EOF
2038 #line 2039 "configure"
2039 #include "confdefs.h"
2040 /* System header to define __stub macros and hopefully few prototypes,
2041 which can conflict with char $ac_func(); below. */
2043 /* Override any gcc2 internal prototype to avoid an error. */
2044 /* We use char because int might match the return type of a gcc2
2045 builtin and then its argument prototype would still apply. */
2050 /* The GNU C library defines this for functions which it implements
2051 to always fail with ENOSYS. Some functions are actually named
2052 something starting with __ and the normal name is an alias. */
2053 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2061 if { (eval echo configure:2062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2063 eval "ac_cv_func_$ac_func=yes"
2065 echo "configure: failed program was:" >&5
2066 cat conftest.$ac_ext >&5
2068 eval "ac_cv_func_$ac_func=no"
2073 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2074 echo "$ac_t""yes" 1>&6
2075 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2076 cat >> confdefs.h <<EOF
2077 #define $ac_tr_func 1
2081 echo "$ac_t""no" 1>&6
2085 for ac_func in fgets
2087 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2088 echo "configure:2089: checking for $ac_func" >&5
2089 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2090 echo $ac_n "(cached) $ac_c" 1>&6
2092 cat > conftest.$ac_ext <<EOF
2093 #line 2094 "configure"
2094 #include "confdefs.h"
2095 /* System header to define __stub macros and hopefully few prototypes,
2096 which can conflict with char $ac_func(); below. */
2098 /* Override any gcc2 internal prototype to avoid an error. */
2099 /* We use char because int might match the return type of a gcc2
2100 builtin and then its argument prototype would still apply. */
2105 /* The GNU C library defines this for functions which it implements
2106 to always fail with ENOSYS. Some functions are actually named
2107 something starting with __ and the normal name is an alias. */
2108 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2116 if { (eval echo configure:2117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2118 eval "ac_cv_func_$ac_func=yes"
2120 echo "configure: failed program was:" >&5
2121 cat conftest.$ac_ext >&5
2123 eval "ac_cv_func_$ac_func=no"
2128 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2129 echo "$ac_t""yes" 1>&6
2130 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2131 cat >> confdefs.h <<EOF
2132 #define $ac_tr_func 1
2136 echo "$ac_t""no" 1>&6
2140 for ac_func in yylex
2142 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2143 echo "configure:2144: checking for $ac_func" >&5
2144 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2145 echo $ac_n "(cached) $ac_c" 1>&6
2147 cat > conftest.$ac_ext <<EOF
2148 #line 2149 "configure"
2149 #include "confdefs.h"
2150 /* System header to define __stub macros and hopefully few prototypes,
2151 which can conflict with char $ac_func(); below. */
2153 /* Override any gcc2 internal prototype to avoid an error. */
2154 /* We use char because int might match the return type of a gcc2
2155 builtin and then its argument prototype would still apply. */
2160 /* The GNU C library defines this for functions which it implements
2161 to always fail with ENOSYS. Some functions are actually named
2162 something starting with __ and the normal name is an alias. */
2163 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2171 if { (eval echo configure:2172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2173 eval "ac_cv_func_$ac_func=yes"
2175 echo "configure: failed program was:" >&5
2176 cat conftest.$ac_ext >&5
2178 eval "ac_cv_func_$ac_func=no"
2183 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2184 echo "$ac_t""yes" 1>&6
2185 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2186 cat >> confdefs.h <<EOF
2187 #define $ac_tr_func 1
2191 echo "$ac_t""no" 1>&6
2196 # check if -lsocket && -lxnet is required to compile socket stuff
2198 echo $ac_n "checking for library containing socket""... $ac_c" 1>&6
2199 echo "configure:2200: checking for library containing socket" >&5
2200 if eval "test \"`echo '$''{'ac_cv_search_socket'+set}'`\" = set"; then
2201 echo $ac_n "(cached) $ac_c" 1>&6
2203 ac_func_search_save_LIBS="$LIBS"
2204 ac_cv_search_socket="no"
2205 cat > conftest.$ac_ext <<EOF
2206 #line 2207 "configure"
2207 #include "confdefs.h"
2208 /* Override any gcc2 internal prototype to avoid an error. */
2209 /* We use char because int might match the return type of a gcc2
2210 builtin and then its argument prototype would still apply. */
2217 if { (eval echo configure:2218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2219 ac_cv_search_socket="none required"
2221 echo "configure: failed program was:" >&5
2222 cat conftest.$ac_ext >&5
2225 test "$ac_cv_search_socket" = "no" && for i in socket; do
2226 LIBS="-l$i $ac_func_search_save_LIBS"
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_socket="-l$i"
2244 echo "configure: failed program was:" >&5
2245 cat conftest.$ac_ext >&5
2249 LIBS="$ac_func_search_save_LIBS"
2252 echo "$ac_t""$ac_cv_search_socket" 1>&6
2253 if test "$ac_cv_search_socket" != "no"; then
2254 test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
2260 echo $ac_n "checking for library containing inet_addr""... $ac_c" 1>&6
2261 echo "configure:2262: checking for library containing inet_addr" >&5
2262 if eval "test \"`echo '$''{'ac_cv_search_inet_addr'+set}'`\" = set"; then
2263 echo $ac_n "(cached) $ac_c" 1>&6
2265 ac_func_search_save_LIBS="$LIBS"
2266 ac_cv_search_inet_addr="no"
2267 cat > conftest.$ac_ext <<EOF
2268 #line 2269 "configure"
2269 #include "confdefs.h"
2270 /* Override any gcc2 internal prototype to avoid an error. */
2271 /* We use char because int might match the return type of a gcc2
2272 builtin and then its argument prototype would still apply. */
2279 if { (eval echo configure:2280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2281 ac_cv_search_inet_addr="none required"
2283 echo "configure: failed program was:" >&5
2284 cat conftest.$ac_ext >&5
2287 test "$ac_cv_search_inet_addr" = "no" && for i in nsl xnet; do
2288 LIBS="-l$i $ac_func_search_save_LIBS"
2289 cat > conftest.$ac_ext <<EOF
2290 #line 2291 "configure"
2291 #include "confdefs.h"
2292 /* Override any gcc2 internal prototype to avoid an error. */
2293 /* We use char because int might match the return type of a gcc2
2294 builtin and then its argument prototype would still apply. */
2301 if { (eval echo configure:2302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2303 ac_cv_search_inet_addr="-l$i"
2306 echo "configure: failed program was:" >&5
2307 cat conftest.$ac_ext >&5
2311 LIBS="$ac_func_search_save_LIBS"
2314 echo "$ac_t""$ac_cv_search_inet_addr" 1>&6
2315 if test "$ac_cv_search_inet_addr" != "no"; then
2316 test "$ac_cv_search_inet_addr" = "none required" || LIBS="$ac_cv_search_inet_addr $LIBS"
2325 # DD_COPT macro checks if the compiler specified as the 1st parameter
2326 # supports option specified as the 2nd parameter
2327 # For example: DD_CPORT(CXX, fPIC)
2332 # Checking characteristics of compilers and other programs
2333 # --------------------------------------------------------
2334 echo $ac_n "checking whether preprocessor accepts -MM or -M""... $ac_c" 1>&6
2335 echo "configure:2336: checking whether preprocessor accepts -MM or -M" >&5
2336 if eval "test \"`echo '$''{'sdcc_cv_MM'+set}'`\" = set"; then
2337 echo $ac_n "(cached) $ac_c" 1>&6
2339 echo "#include <stdio.h>" >_test_.c
2341 $CPP -v -MM _test_.c 1>&5 2>&5
2342 if test "$?" = "0"; then
2350 echo "$ac_t""$sdcc_cv_MM" 1>&6
2354 # This is the first time when CFLAGS are set/modified!!
2356 echo $ac_n "checking whether $CC accepts -ggdb""... $ac_c" 1>&6
2357 echo "configure:2358: checking whether $CC accepts -ggdb" >&5
2358 if eval "test \"`echo '$''{'sdcc_cv_CCggdb'+set}'`\" = set"; then
2359 echo $ac_n "(cached) $ac_c" 1>&6
2365 $CC -v -ggdb -c _test_.c 1>&5 2>&5
2366 if test "$?" = "0"; then
2367 sdcc_cv_CCggdb="yes"
2371 rm -f _test_.* a.out
2374 echo "$ac_t""$sdcc_cv_CCggdb" 1>&6
2376 if test "$sdcc_cv_CCggdb" = "yes"; then
2381 echo $ac_n "checking whether $CC accepts -pipe""... $ac_c" 1>&6
2382 echo "configure:2383: checking whether $CC accepts -pipe" >&5
2383 if eval "test \"`echo '$''{'sdcc_cv_CCpipe'+set}'`\" = set"; then
2384 echo $ac_n "(cached) $ac_c" 1>&6
2390 $CC -v -pipe -c _test_.c 1>&5 2>&5
2391 if test "$?" = "0"; then
2392 sdcc_cv_CCpipe="yes"
2396 rm -f _test_.* a.out
2399 echo "$ac_t""$sdcc_cv_CCpipe" 1>&6
2401 if test "$sdcc_cv_CCpipe" = "yes"; then
2402 CFLAGS="$CFLAGS -pipe"
2406 # Checks for typedefs, structures, and compiler characteristics.
2407 # ===========================================================================
2408 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2409 echo "configure:2410: checking return type of signal handlers" >&5
2410 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2411 echo $ac_n "(cached) $ac_c" 1>&6
2413 cat > conftest.$ac_ext <<EOF
2414 #line 2415 "configure"
2415 #include "confdefs.h"
2416 #include <sys/types.h>
2422 extern "C" void (*signal (int, void (*)(int)))(int);
2424 void (*signal ()) ();
2431 if { (eval echo configure:2432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2433 ac_cv_type_signal=void
2435 echo "configure: failed program was:" >&5
2436 cat conftest.$ac_ext >&5
2438 ac_cv_type_signal=int
2443 echo "$ac_t""$ac_cv_type_signal" 1>&6
2444 cat >> confdefs.h <<EOF
2445 #define RETSIGTYPE $ac_cv_type_signal
2452 if test "${prefix}" = "NONE"; then
2457 if test "${datadir}" = "\${prefix}/share"; then
2458 sdcc_datadir=${prefix}/share
2460 sdcc_datadir=${datadir}
2462 cat >> confdefs.h <<EOF
2463 #define STANDARD_INCLUDE_DIR "${sdcc_datadir}/include"
2466 cat >> confdefs.h <<EOF
2467 #define SDCC_INCLUDE_DIR "${sdcc_datadir}/include"
2470 cat >> confdefs.h <<EOF
2471 #define SDCC_LIB_DIR "${sdcc_datadir}/lib"
2474 cat >> confdefs.h <<EOF
2475 #define STD_LIB "libsdcc"
2478 cat >> confdefs.h <<EOF
2479 #define STD_INT_LIB "libint"
2482 cat >> confdefs.h <<EOF
2483 #define STD_LONG_LIB "liblong"
2486 cat >> confdefs.h <<EOF
2487 #define STD_FP_LIB "libfloat"
2490 cat >> confdefs.h <<EOF
2491 #define STD_DS390_LIB "libds390"
2495 cat >> confdefs.h <<EOF
2496 #define PREFIX "${prefix}"
2499 cat >> confdefs.h <<EOF
2500 #define DATADIR "${sdcc_datadir}"
2503 cat >> confdefs.h <<EOF
2504 #define SRCDIR "${config_in}"
2509 # Now handle the port selection
2510 # Check whether --enable-z80-port or --disable-z80-port was given.
2511 if test "${enable_z80_port+set}" = set; then
2512 enableval="$enable_z80_port"
2516 if test "$enable_z80_port" = "no"; then
2517 cat >> confdefs.h <<EOF
2518 #define OPT_DISABLE_Z80 1
2522 cat >> confdefs.h <<EOF
2523 #define OPT_DISABLE_Z80 0
2528 # Check whether --enable-gbz80-port or --disable-gbz80-port was given.
2529 if test "${enable_gbz80_port+set}" = set; then
2530 enableval="$enable_gbz80_port"
2534 if test "$enable_gbz80_port" = "no"; then
2535 cat >> confdefs.h <<EOF
2536 #define OPT_DISABLE_GBZ80 1
2540 cat >> confdefs.h <<EOF
2541 #define OPT_DISABLE_GBZ80 0
2546 # Check whether --enable-mcs51-port or --disable-mcs51-port was given.
2547 if test "${enable_mcs51_port+set}" = set; then
2548 enableval="$enable_mcs51_port"
2552 if test "$enable_mcs51_port" = "no"; then
2553 cat >> confdefs.h <<EOF
2554 #define OPT_DISABLE_MCS51 1
2558 cat >> confdefs.h <<EOF
2559 #define OPT_DISABLE_MCS51 0
2564 # Check whether --enable-avr-port or --disable-avr-port was given.
2565 if test "${enable_avr_port+set}" = set; then
2566 enableval="$enable_avr_port"
2570 if test "$enable_avr_port" = "no"; then
2571 cat >> confdefs.h <<EOF
2572 #define OPT_DISABLE_AVR 1
2576 cat >> confdefs.h <<EOF
2577 #define OPT_DISABLE_AVR 0
2582 # Generating output files
2583 # ===========================================================================
2586 subdirs="sim/ucsim packihx"
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
2695 support/cpp/Makefile
2696 device/include/Makefile
2698 debugger/mcs51/Makefile
2699 Makefile.common:Makefile.common.in
2700 sdccconf.h:sdccconf_in.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2702 cat >> $CONFIG_STATUS <<EOF
2704 # Protect against being on the right side of a sed subst in config.status.
2705 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2706 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2710 s%@CFLAGS@%$CFLAGS%g
2711 s%@CPPFLAGS@%$CPPFLAGS%g
2712 s%@CXXFLAGS@%$CXXFLAGS%g
2713 s%@FFLAGS@%$FFLAGS%g
2715 s%@LDFLAGS@%$LDFLAGS%g
2717 s%@exec_prefix@%$exec_prefix%g
2718 s%@prefix@%$prefix%g
2719 s%@program_transform_name@%$program_transform_name%g
2720 s%@bindir@%$bindir%g
2721 s%@sbindir@%$sbindir%g
2722 s%@libexecdir@%$libexecdir%g
2723 s%@datadir@%$datadir%g
2724 s%@sysconfdir@%$sysconfdir%g
2725 s%@sharedstatedir@%$sharedstatedir%g
2726 s%@localstatedir@%$localstatedir%g
2727 s%@libdir@%$libdir%g
2728 s%@includedir@%$includedir%g
2729 s%@oldincludedir@%$oldincludedir%g
2730 s%@infodir@%$infodir%g
2731 s%@mandir@%$mandir%g
2733 s%@VERSION@%$VERSION%g
2734 s%@VERSIONHI@%$VERSIONHI%g
2735 s%@VERSIONLO@%$VERSIONLO%g
2736 s%@VERSIONP@%$VERSIONP%g
2740 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2741 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2742 s%@INSTALL_DATA@%$INSTALL_DATA%g
2743 s%@RANLIB@%$RANLIB%g
2745 s%@LEXLIB@%$LEXLIB%g
2747 s%@AUTOCONF@%$AUTOCONF%g
2750 s%@M_OR_MM@%$M_OR_MM%g
2751 s%@subdirs@%$subdirs%g
2756 cat >> $CONFIG_STATUS <<\EOF
2758 # Split the substitutions into bite-sized pieces for seds with
2759 # small command number limits, like on Digital OSF/1 and HP-UX.
2760 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2761 ac_file=1 # Number of current file.
2762 ac_beg=1 # First line for current file.
2763 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2766 while $ac_more_lines; do
2767 if test $ac_beg -gt 1; then
2768 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2770 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2772 if test ! -s conftest.s$ac_file; then
2774 rm -f conftest.s$ac_file
2776 if test -z "$ac_sed_cmds"; then
2777 ac_sed_cmds="sed -f conftest.s$ac_file"
2779 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2781 ac_file=`expr $ac_file + 1`
2783 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2786 if test -z "$ac_sed_cmds"; then
2791 cat >> $CONFIG_STATUS <<EOF
2793 CONFIG_FILES=\${CONFIG_FILES-"main.mk:main_in.mk
2796 support/cpp/Makefile
2797 device/include/Makefile
2799 debugger/mcs51/Makefile
2800 Makefile.common:Makefile.common.in
2803 cat >> $CONFIG_STATUS <<\EOF
2804 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2805 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2807 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2808 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2809 *) ac_file_in="${ac_file}.in" ;;
2812 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2814 # Remove last slash and all that follows it. Not all systems have dirname.
2815 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2816 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2817 # The file is in a subdirectory.
2818 test ! -d "$ac_dir" && mkdir "$ac_dir"
2819 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2820 # A "../" for each directory in $ac_dir_suffix.
2821 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2823 ac_dir_suffix= ac_dots=
2826 case "$ac_given_srcdir" in
2828 if test -z "$ac_dots"; then top_srcdir=.
2829 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2830 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2832 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2833 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2836 case "$ac_given_INSTALL" in
2837 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2838 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2841 echo creating "$ac_file"
2843 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2845 *Makefile*) ac_comsub="1i\\
2846 # $configure_input" ;;
2850 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2852 s%@configure_input@%$configure_input%g
2853 s%@srcdir@%$srcdir%g
2854 s%@top_srcdir@%$top_srcdir%g
2855 s%@INSTALL@%$INSTALL%g
2856 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2860 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2861 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2863 # ac_d sets the value in "#define NAME VALUE" lines.
2864 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2865 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2868 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2869 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2870 ac_uB='\([ ]\)%\1#\2define\3'
2873 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2874 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2875 ac_eB='$%\1#\2define\3'
2879 if test "${CONFIG_HEADERS+set}" != set; then
2881 cat >> $CONFIG_STATUS <<EOF
2882 CONFIG_HEADERS="sdccconf.h:sdccconf_in.h"
2884 cat >> $CONFIG_STATUS <<\EOF
2886 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2887 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2889 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2890 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2891 *) ac_file_in="${ac_file}.in" ;;
2894 echo creating $ac_file
2896 rm -f conftest.frag conftest.in conftest.out
2897 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2898 cat $ac_file_inputs > conftest.in
2902 # Transform confdefs.h into a sed script conftest.vals that substitutes
2903 # the proper values into config.h.in to produce config.h. And first:
2904 # Protect against being on the right side of a sed subst in config.status.
2905 # Protect against being in an unquoted here document in config.status.
2907 cat > conftest.hdr <<\EOF
2910 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2914 sed -n -f conftest.hdr confdefs.h > conftest.vals
2917 # This sed command replaces #undef with comments. This is necessary, for
2918 # example, in the case of _POSIX_SOURCE, which is predefined and required
2919 # on some systems where configure will not decide to define it.
2920 cat >> conftest.vals <<\EOF
2921 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2924 # Break up conftest.vals because some shells have a limit on
2925 # the size of here documents, and old seds have small limits too.
2930 ac_lines=`grep -c . conftest.vals`
2931 # grep -c gives empty output for an empty file on some AIX systems.
2932 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2933 # Write a limited-size here document to conftest.frag.
2934 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2935 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2937 sed -f conftest.frag conftest.in > conftest.out
2939 mv conftest.out conftest.in
2941 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2943 mv conftest.tail conftest.vals
2947 cat >> $CONFIG_STATUS <<\EOF
2948 rm -f conftest.frag conftest.h
2949 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2950 cat conftest.in >> conftest.h
2952 if cmp -s $ac_file conftest.h 2>/dev/null; then
2953 echo "$ac_file is unchanged"
2956 # Remove last slash and all that follows it. Not all systems have dirname.
2957 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2958 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2959 # The file is in a subdirectory.
2960 test ! -d "$ac_dir" && mkdir "$ac_dir"
2963 mv conftest.h $ac_file
2968 cat >> $CONFIG_STATUS <<EOF
2971 cat >> $CONFIG_STATUS <<\EOF
2975 chmod +x $CONFIG_STATUS
2976 rm -fr confdefs* $ac_clean_files
2977 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2979 if test "$no_recursion" != yes; then
2981 # Remove --cache-file and --srcdir arguments so they do not pile up.
2982 ac_sub_configure_args=
2984 for ac_arg in $ac_configure_args; do
2985 if test -n "$ac_prev"; then
2990 -cache-file | --cache-file | --cache-fil | --cache-fi \
2991 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2992 ac_prev=cache_file ;;
2993 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2994 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2996 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2998 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
3000 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
3004 for ac_config_dir in sim/ucsim packihx; do
3006 # Do not complain, so a configure script can configure whichever
3007 # parts of a large source tree are present.
3008 if test ! -d $srcdir/$ac_config_dir; then
3012 echo configuring in $ac_config_dir
3017 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
3019 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
3027 # A "../" for each directory in /$ac_config_dir.
3028 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
3031 .) # No --srcdir option. We are building in place.
3032 ac_sub_srcdir=$srcdir ;;
3033 /*) # Absolute path.
3034 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
3036 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
3039 # Check for guested configure; otherwise get Cygnus style configure.
3040 if test -f $ac_sub_srcdir/configure; then
3041 ac_sub_configure=$ac_sub_srcdir/configure
3042 elif test -f $ac_sub_srcdir/configure.in; then
3043 ac_sub_configure=$ac_configure
3045 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
3049 # The recursion is here.
3050 if test -n "$ac_sub_configure"; then
3052 # Make the cache file name correct relative to the subdirectory.
3053 case "$cache_file" in
3054 /*) ac_sub_cache_file=$cache_file ;;
3056 ac_sub_cache_file="$ac_dots$cache_file" ;;
3058 case "$ac_given_INSTALL" in
3059 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3060 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3063 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
3064 # The eval makes quoting arguments work.
3065 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
3068 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
3077 # End of configure/configure.in