3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
15 --disable-z80-port: Excludes the z80 port"
17 --disable-gbz80-port: Excludes the Gameboy gbz80 port"
19 --disable-mcs51-port: Excludes the Intel mcs51 port"
21 --disable-avr-port: Excludes the AVR port"
23 # Initialize some variables set by options.
24 # The variables have the same names as the options, with
25 # dashes changed to underlines.
27 cache_file=./config.cache
36 program_transform_name=s,x,x,
44 bindir='${exec_prefix}/bin'
45 sbindir='${exec_prefix}/sbin'
46 libexecdir='${exec_prefix}/libexec'
47 datadir='${prefix}/share'
48 sysconfdir='${prefix}/etc'
49 sharedstatedir='${prefix}/com'
50 localstatedir='${prefix}/var'
51 libdir='${exec_prefix}/lib'
52 includedir='${prefix}/include'
53 oldincludedir='/usr/include'
54 infodir='${prefix}/info'
55 mandir='${prefix}/man'
57 # Initialize some other variables.
60 SHELL=${CONFIG_SHELL-/bin/sh}
61 # Maximum number of lines to put in a shell here document.
68 # If the previous option needs an argument, assign it.
69 if test -n "$ac_prev"; then
70 eval "$ac_prev=\$ac_option"
76 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
80 # Accept the important Cygnus configure options, so we can diagnose typos.
84 -bindir | --bindir | --bindi | --bind | --bin | --bi)
86 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
87 bindir="$ac_optarg" ;;
89 -build | --build | --buil | --bui | --bu)
91 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
94 -cache-file | --cache-file | --cache-fil | --cache-fi \
95 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
97 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
98 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
99 cache_file="$ac_optarg" ;;
101 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
103 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
105 datadir="$ac_optarg" ;;
107 -disable-* | --disable-*)
108 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
109 # Reject names that are not valid shell variable names.
110 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
111 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
113 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
114 eval "enable_${ac_feature}=no" ;;
116 -enable-* | --enable-*)
117 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
118 # Reject names that are not valid shell variable names.
119 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
120 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
122 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
127 eval "enable_${ac_feature}='$ac_optarg'" ;;
129 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
130 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
131 | --exec | --exe | --ex)
132 ac_prev=exec_prefix ;;
133 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
134 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
135 | --exec=* | --exe=* | --ex=*)
136 exec_prefix="$ac_optarg" ;;
138 -gas | --gas | --ga | --g)
139 # Obsolete; use --with-gas.
142 -help | --help | --hel | --he)
143 # Omit some internal or obsolete options to make the list less imposing.
144 # This message is too long to be a string in the A/UX 3.1 sh.
146 Usage: configure [options] [host]
147 Options: [defaults in brackets after descriptions]
149 --cache-file=FILE cache test results in FILE
150 --help print this message
151 --no-create do not create output files
152 --quiet, --silent do not print \`checking...' messages
153 --version print the version of autoconf that created configure
154 Directory and file names:
155 --prefix=PREFIX install architecture-independent files in PREFIX
157 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
159 --bindir=DIR user executables in DIR [EPREFIX/bin]
160 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
161 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
162 --datadir=DIR read-only architecture-independent data in DIR
164 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
165 --sharedstatedir=DIR modifiable architecture-independent data in DIR
167 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
168 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
169 --includedir=DIR C header files in DIR [PREFIX/include]
170 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
171 --infodir=DIR info documentation in DIR [PREFIX/info]
172 --mandir=DIR man documentation in DIR [PREFIX/man]
173 --srcdir=DIR find the sources in DIR [configure dir or ..]
174 --program-prefix=PREFIX prepend PREFIX to installed program names
175 --program-suffix=SUFFIX append SUFFIX to installed program names
176 --program-transform-name=PROGRAM
177 run sed PROGRAM on installed program names
181 --build=BUILD configure for building on BUILD [BUILD=HOST]
182 --host=HOST configure for HOST [guessed]
183 --target=TARGET configure for TARGET [TARGET=HOST]
184 Features and packages:
185 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
186 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
187 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
188 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
189 --x-includes=DIR X include files are in DIR
190 --x-libraries=DIR X library files are in DIR
192 if test -n "$ac_help"; then
193 echo "--enable and --with options recognized:$ac_help"
197 -host | --host | --hos | --ho)
199 -host=* | --host=* | --hos=* | --ho=*)
202 -includedir | --includedir | --includedi | --included | --include \
203 | --includ | --inclu | --incl | --inc)
204 ac_prev=includedir ;;
205 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
206 | --includ=* | --inclu=* | --incl=* | --inc=*)
207 includedir="$ac_optarg" ;;
209 -infodir | --infodir | --infodi | --infod | --info | --inf)
211 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
212 infodir="$ac_optarg" ;;
214 -libdir | --libdir | --libdi | --libd)
216 -libdir=* | --libdir=* | --libdi=* | --libd=*)
217 libdir="$ac_optarg" ;;
219 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
220 | --libexe | --libex | --libe)
221 ac_prev=libexecdir ;;
222 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
223 | --libexe=* | --libex=* | --libe=*)
224 libexecdir="$ac_optarg" ;;
226 -localstatedir | --localstatedir | --localstatedi | --localstated \
227 | --localstate | --localstat | --localsta | --localst \
228 | --locals | --local | --loca | --loc | --lo)
229 ac_prev=localstatedir ;;
230 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
231 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
232 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
233 localstatedir="$ac_optarg" ;;
235 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
237 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
238 mandir="$ac_optarg" ;;
241 # Obsolete; use --without-fp.
244 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
248 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
249 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
252 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
253 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
254 | --oldin | --oldi | --old | --ol | --o)
255 ac_prev=oldincludedir ;;
256 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
257 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
258 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
259 oldincludedir="$ac_optarg" ;;
261 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
263 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
264 prefix="$ac_optarg" ;;
266 -program-prefix | --program-prefix | --program-prefi | --program-pref \
267 | --program-pre | --program-pr | --program-p)
268 ac_prev=program_prefix ;;
269 -program-prefix=* | --program-prefix=* | --program-prefi=* \
270 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
271 program_prefix="$ac_optarg" ;;
273 -program-suffix | --program-suffix | --program-suffi | --program-suff \
274 | --program-suf | --program-su | --program-s)
275 ac_prev=program_suffix ;;
276 -program-suffix=* | --program-suffix=* | --program-suffi=* \
277 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
278 program_suffix="$ac_optarg" ;;
280 -program-transform-name | --program-transform-name \
281 | --program-transform-nam | --program-transform-na \
282 | --program-transform-n | --program-transform- \
283 | --program-transform | --program-transfor \
284 | --program-transfo | --program-transf \
285 | --program-trans | --program-tran \
286 | --progr-tra | --program-tr | --program-t)
287 ac_prev=program_transform_name ;;
288 -program-transform-name=* | --program-transform-name=* \
289 | --program-transform-nam=* | --program-transform-na=* \
290 | --program-transform-n=* | --program-transform-=* \
291 | --program-transform=* | --program-transfor=* \
292 | --program-transfo=* | --program-transf=* \
293 | --program-trans=* | --program-tran=* \
294 | --progr-tra=* | --program-tr=* | --program-t=*)
295 program_transform_name="$ac_optarg" ;;
297 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
298 | -silent | --silent | --silen | --sile | --sil)
301 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
303 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
305 sbindir="$ac_optarg" ;;
307 -sharedstatedir | --sharedstatedir | --sharedstatedi \
308 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
309 | --sharedst | --shareds | --shared | --share | --shar \
311 ac_prev=sharedstatedir ;;
312 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
313 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
314 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
316 sharedstatedir="$ac_optarg" ;;
318 -site | --site | --sit)
320 -site=* | --site=* | --sit=*)
323 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
325 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
326 srcdir="$ac_optarg" ;;
328 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
329 | --syscon | --sysco | --sysc | --sys | --sy)
330 ac_prev=sysconfdir ;;
331 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
332 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
333 sysconfdir="$ac_optarg" ;;
335 -target | --target | --targe | --targ | --tar | --ta | --t)
337 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
338 target="$ac_optarg" ;;
340 -v | -verbose | --verbose | --verbos | --verbo | --verb)
343 -version | --version | --versio | --versi | --vers)
344 echo "configure generated by autoconf version 2.13"
348 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
349 # Reject names that are not valid shell variable names.
350 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
351 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
353 ac_package=`echo $ac_package| sed 's/-/_/g'`
358 eval "with_${ac_package}='$ac_optarg'" ;;
360 -without-* | --without-*)
361 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
362 # Reject names that are not valid shell variable names.
363 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
364 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
366 ac_package=`echo $ac_package| sed 's/-/_/g'`
367 eval "with_${ac_package}=no" ;;
370 # Obsolete; use --with-x.
373 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
374 | --x-incl | --x-inc | --x-in | --x-i)
375 ac_prev=x_includes ;;
376 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
377 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
378 x_includes="$ac_optarg" ;;
380 -x-libraries | --x-libraries | --x-librarie | --x-librari \
381 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
382 ac_prev=x_libraries ;;
383 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
384 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
385 x_libraries="$ac_optarg" ;;
387 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
391 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
392 echo "configure: warning: $ac_option: invalid host type" 1>&2
394 if test "x$nonopt" != xNONE; then
395 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
403 if test -n "$ac_prev"; then
404 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
407 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
409 # File descriptor usage:
412 # 2 errors and warnings
413 # 3 some systems may open it to /dev/tty
414 # 4 used on the Kubota Titan
415 # 6 checking for... messages and results
416 # 5 compiler messages saved in config.log
417 if test "$silent" = yes; then
425 This file contains any messages produced by compilers while
426 running configure, to aid debugging if configure makes a mistake.
429 # Strip out --no-create and --no-recursion so they do not pile up.
430 # Also quote any args containing shell metacharacters.
435 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
436 | --no-cr | --no-c) ;;
437 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
438 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
439 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
440 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
441 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
446 # Only set these to C if already set. These must not be set unconditionally
447 # because not all systems understand e.g. LANG=C (notably SCO).
448 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
449 # Non-C LC_CTYPE values break the ctype check.
450 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
451 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
452 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
453 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
455 # confdefs.h avoids OS command line length limits that DEFS can exceed.
456 rm -rf conftest* confdefs.h
457 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
460 # A filename unique to this package, relative to the directory that
461 # configure is in, which we can look for to find out if srcdir is correct.
462 ac_unique_file=Makefile
464 # Find the source files, if location was not specified.
465 if test -z "$srcdir"; then
466 ac_srcdir_defaulted=yes
467 # Try the directory containing this script, then its parent.
469 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
470 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
472 if test ! -r $srcdir/$ac_unique_file; then
476 ac_srcdir_defaulted=no
478 if test ! -r $srcdir/$ac_unique_file; then
479 if test "$ac_srcdir_defaulted" = yes; then
480 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
482 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
485 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
487 # Prefer explicitly selected file to automatically selected ones.
488 if test -z "$CONFIG_SITE"; then
489 if test "x$prefix" != xNONE; then
490 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
492 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
495 for ac_site_file in $CONFIG_SITE; do
496 if test -r "$ac_site_file"; then
497 echo "loading site script $ac_site_file"
502 if test -r "$cache_file"; then
503 echo "loading cache $cache_file"
506 echo "creating cache $cache_file"
511 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
512 ac_cpp='$CPP $CPPFLAGS'
513 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
514 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
515 cross_compiling=$ac_cv_prog_cc_cross
519 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
520 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
521 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
528 ac_n= ac_c='\c' ac_t=
534 for ac_prog in mawk gawk nawk awk
536 # Extract the first word of "$ac_prog", so it can be a program name with args.
537 set dummy $ac_prog; ac_word=$2
538 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
539 echo "configure:540: checking for $ac_word" >&5
540 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
541 echo $ac_n "(cached) $ac_c" 1>&6
543 if test -n "$AWK"; then
544 ac_cv_prog_AWK="$AWK" # Let the user override the test.
546 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
548 for ac_dir in $ac_dummy; do
549 test -z "$ac_dir" && ac_dir=.
550 if test -f $ac_dir/$ac_word; then
551 ac_cv_prog_AWK="$ac_prog"
558 AWK="$ac_cv_prog_AWK"
559 if test -n "$AWK"; then
560 echo "$ac_t""$AWK" 1>&6
562 echo "$ac_t""no" 1>&6
565 test -n "$AWK" && break
569 echo $ac_n "checking version of the package""... $ac_c" 1>&6
570 echo "configure:571: checking version of the package" >&5
571 if test -f .version; then
572 VERSION=`cat .version`
573 elif test -f ../.version; then
574 VERSION=`cat ../.version`
578 VERSIONHI=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $1}'`
579 VERSIONLO=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $2}'`
580 VERSIONP=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $3}'`
581 echo "$ac_t""${VERSION}" 1>&6
586 cat >> confdefs.h <<EOF
587 #define SDCC_VERSION_LO ${VERSIONLO}
590 cat >> confdefs.h <<EOF
591 #define SDCC_VERSION_HI ${VERSIONHI}
594 cat >> confdefs.h <<EOF
595 #define SDCC_VERSION_P ${VERSIONP}
598 cat >> confdefs.h <<EOF
599 #define SDCC_VERSION_STR "${VERSION}"
602 sdcc_cv_version=$VERSION
603 sdcc_cv_versionhi=$VERSIONHI
604 sdcc_cv_versionlo=$VERSIONLO
605 sdcc_cv_versionp=$VERSIONP
609 # Extract the first word of "gcc", so it can be a program name with args.
610 set dummy gcc; ac_word=$2
611 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
612 echo "configure:613: checking for $ac_word" >&5
613 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
614 echo $ac_n "(cached) $ac_c" 1>&6
616 if test -n "$CC"; then
617 ac_cv_prog_CC="$CC" # Let the user override the test.
619 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
621 for ac_dir in $ac_dummy; do
622 test -z "$ac_dir" && ac_dir=.
623 if test -f $ac_dir/$ac_word; then
632 if test -n "$CC"; then
633 echo "$ac_t""$CC" 1>&6
635 echo "$ac_t""no" 1>&6
638 if test -z "$CC"; then
639 # Extract the first word of "cc", so it can be a program name with args.
640 set dummy cc; ac_word=$2
641 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
642 echo "configure:643: checking for $ac_word" >&5
643 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
644 echo $ac_n "(cached) $ac_c" 1>&6
646 if test -n "$CC"; then
647 ac_cv_prog_CC="$CC" # Let the user override the test.
649 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
652 for ac_dir in $ac_dummy; do
653 test -z "$ac_dir" && ac_dir=.
654 if test -f $ac_dir/$ac_word; then
655 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
664 if test $ac_prog_rejected = yes; then
665 # We found a bogon in the path, so make sure we never use it.
666 set dummy $ac_cv_prog_CC
668 if test $# -gt 0; then
669 # We chose a different compiler from the bogus one.
670 # However, it has the same basename, so the bogon will be chosen
671 # first if we set CC to just the basename; use the full file name.
673 set dummy "$ac_dir/$ac_word" "$@"
681 if test -n "$CC"; then
682 echo "$ac_t""$CC" 1>&6
684 echo "$ac_t""no" 1>&6
687 if test -z "$CC"; then
690 # Extract the first word of "cl", so it can be a program name with args.
691 set dummy cl; ac_word=$2
692 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
693 echo "configure:694: checking for $ac_word" >&5
694 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
695 echo $ac_n "(cached) $ac_c" 1>&6
697 if test -n "$CC"; then
698 ac_cv_prog_CC="$CC" # Let the user override the test.
700 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
702 for ac_dir in $ac_dummy; do
703 test -z "$ac_dir" && ac_dir=.
704 if test -f $ac_dir/$ac_word; then
713 if test -n "$CC"; then
714 echo "$ac_t""$CC" 1>&6
716 echo "$ac_t""no" 1>&6
721 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
724 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
725 echo "configure:726: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
728 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
729 ac_cpp='$CPP $CPPFLAGS'
730 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
731 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
732 cross_compiling=$ac_cv_prog_cc_cross
734 cat > conftest.$ac_ext << EOF
736 #line 737 "configure"
737 #include "confdefs.h"
741 if { (eval echo configure:742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
742 ac_cv_prog_cc_works=yes
743 # If we can't run a trivial program, we are probably using a cross compiler.
744 if (./conftest; exit) 2>/dev/null; then
745 ac_cv_prog_cc_cross=no
747 ac_cv_prog_cc_cross=yes
750 echo "configure: failed program was:" >&5
751 cat conftest.$ac_ext >&5
752 ac_cv_prog_cc_works=no
756 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
757 ac_cpp='$CPP $CPPFLAGS'
758 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
759 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
760 cross_compiling=$ac_cv_prog_cc_cross
762 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
763 if test $ac_cv_prog_cc_works = no; then
764 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
766 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
767 echo "configure:768: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
768 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
769 cross_compiling=$ac_cv_prog_cc_cross
771 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
772 echo "configure:773: checking whether we are using GNU C" >&5
773 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
774 echo $ac_n "(cached) $ac_c" 1>&6
776 cat > conftest.c <<EOF
781 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
788 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
790 if test $ac_cv_prog_gcc = yes; then
796 ac_test_CFLAGS="${CFLAGS+set}"
797 ac_save_CFLAGS="$CFLAGS"
799 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
800 echo "configure:801: checking whether ${CC-cc} accepts -g" >&5
801 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
802 echo $ac_n "(cached) $ac_c" 1>&6
804 echo 'void f(){}' > conftest.c
805 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
814 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
815 if test "$ac_test_CFLAGS" = set; then
816 CFLAGS="$ac_save_CFLAGS"
817 elif test $ac_cv_prog_cc_g = yes; then
818 if test "$GCC" = yes; then
824 if test "$GCC" = yes; then
831 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
833 # Extract the first word of "$ac_prog", so it can be a program name with args.
834 set dummy $ac_prog; ac_word=$2
835 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
836 echo "configure:837: checking for $ac_word" >&5
837 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
838 echo $ac_n "(cached) $ac_c" 1>&6
840 if test -n "$CXX"; then
841 ac_cv_prog_CXX="$CXX" # Let the user override the test.
843 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
845 for ac_dir in $ac_dummy; do
846 test -z "$ac_dir" && ac_dir=.
847 if test -f $ac_dir/$ac_word; then
848 ac_cv_prog_CXX="$ac_prog"
855 CXX="$ac_cv_prog_CXX"
856 if test -n "$CXX"; then
857 echo "$ac_t""$CXX" 1>&6
859 echo "$ac_t""no" 1>&6
862 test -n "$CXX" && break
864 test -n "$CXX" || CXX="gcc"
867 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
868 echo "configure:869: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
871 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
872 ac_cpp='$CXXCPP $CPPFLAGS'
873 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
874 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
875 cross_compiling=$ac_cv_prog_cxx_cross
877 cat > conftest.$ac_ext << EOF
879 #line 880 "configure"
880 #include "confdefs.h"
882 int main(){return(0);}
884 if { (eval echo configure:885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
885 ac_cv_prog_cxx_works=yes
886 # If we can't run a trivial program, we are probably using a cross compiler.
887 if (./conftest; exit) 2>/dev/null; then
888 ac_cv_prog_cxx_cross=no
890 ac_cv_prog_cxx_cross=yes
893 echo "configure: failed program was:" >&5
894 cat conftest.$ac_ext >&5
895 ac_cv_prog_cxx_works=no
899 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
900 ac_cpp='$CPP $CPPFLAGS'
901 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
902 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
903 cross_compiling=$ac_cv_prog_cc_cross
905 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
906 if test $ac_cv_prog_cxx_works = no; then
907 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
909 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
910 echo "configure:911: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
911 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
912 cross_compiling=$ac_cv_prog_cxx_cross
914 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
915 echo "configure:916: checking whether we are using GNU C++" >&5
916 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
917 echo $ac_n "(cached) $ac_c" 1>&6
919 cat > conftest.C <<EOF
924 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
931 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
933 if test $ac_cv_prog_gxx = yes; then
939 ac_test_CXXFLAGS="${CXXFLAGS+set}"
940 ac_save_CXXFLAGS="$CXXFLAGS"
942 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
943 echo "configure:944: checking whether ${CXX-g++} accepts -g" >&5
944 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
945 echo $ac_n "(cached) $ac_c" 1>&6
947 echo 'void f(){}' > conftest.cc
948 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
957 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
958 if test "$ac_test_CXXFLAGS" = set; then
959 CXXFLAGS="$ac_save_CXXFLAGS"
960 elif test $ac_cv_prog_cxx_g = yes; then
961 if test "$GXX" = yes; then
967 if test "$GXX" = yes; then
974 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
975 echo "configure:976: checking how to run the C preprocessor" >&5
976 # On Suns, sometimes $CPP names a directory.
977 if test -n "$CPP" && test -d "$CPP"; then
980 if test -z "$CPP"; then
981 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
982 echo $ac_n "(cached) $ac_c" 1>&6
984 # This must be in double quotes, not single quotes, because CPP may get
985 # substituted into the Makefile and "${CC-cc}" will confuse make.
987 # On the NeXT, cc -E runs the code through the compiler's parser,
988 # not just through cpp.
989 cat > conftest.$ac_ext <<EOF
990 #line 991 "configure"
991 #include "confdefs.h"
995 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
996 { (eval echo configure:997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
997 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
998 if test -z "$ac_err"; then
1002 echo "configure: failed program was:" >&5
1003 cat conftest.$ac_ext >&5
1005 CPP="${CC-cc} -E -traditional-cpp"
1006 cat > conftest.$ac_ext <<EOF
1007 #line 1008 "configure"
1008 #include "confdefs.h"
1012 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1013 { (eval echo configure:1014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1014 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1015 if test -z "$ac_err"; then
1019 echo "configure: failed program was:" >&5
1020 cat conftest.$ac_ext >&5
1022 CPP="${CC-cc} -nologo -E"
1023 cat > conftest.$ac_ext <<EOF
1024 #line 1025 "configure"
1025 #include "confdefs.h"
1029 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1030 { (eval echo configure:1031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1031 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1032 if test -z "$ac_err"; then
1036 echo "configure: failed program was:" >&5
1037 cat conftest.$ac_ext >&5
1046 ac_cv_prog_CPP="$CPP"
1048 CPP="$ac_cv_prog_CPP"
1050 ac_cv_prog_CPP="$CPP"
1052 echo "$ac_t""$CPP" 1>&6
1055 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1056 if test -f $ac_dir/install-sh; then
1058 ac_install_sh="$ac_aux_dir/install-sh -c"
1060 elif test -f $ac_dir/install.sh; then
1062 ac_install_sh="$ac_aux_dir/install.sh -c"
1066 if test -z "$ac_aux_dir"; then
1067 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1069 ac_config_guess=$ac_aux_dir/config.guess
1070 ac_config_sub=$ac_aux_dir/config.sub
1071 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1073 # Find a good install program. We prefer a C program (faster),
1074 # so one script is as good as another. But avoid the broken or
1075 # incompatible versions:
1076 # SysV /etc/install, /usr/sbin/install
1077 # SunOS /usr/etc/install
1078 # IRIX /sbin/install
1080 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1081 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1082 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1083 # ./install, which can be erroneously created by make from ./install.sh.
1084 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1085 echo "configure:1086: checking for a BSD compatible install" >&5
1086 if test -z "$INSTALL"; then
1087 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1088 echo $ac_n "(cached) $ac_c" 1>&6
1090 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1091 for ac_dir in $PATH; do
1092 # Account for people who put trailing slashes in PATH elements.
1094 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1096 # OSF1 and SCO ODT 3.0 have their own names for install.
1097 # Don't use installbsd from OSF since it installs stuff as root
1099 for ac_prog in ginstall scoinst install; do
1100 if test -f $ac_dir/$ac_prog; then
1101 if test $ac_prog = install &&
1102 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1103 # AIX install. It has an incompatible calling convention.
1106 ac_cv_path_install="$ac_dir/$ac_prog -c"
1117 if test "${ac_cv_path_install+set}" = set; then
1118 INSTALL="$ac_cv_path_install"
1120 # As a last resort, use the slow shell script. We don't cache a
1121 # path for INSTALL within a source directory, because that will
1122 # break other packages using the cache if that directory is
1123 # removed, or if the path is relative.
1124 INSTALL="$ac_install_sh"
1127 echo "$ac_t""$INSTALL" 1>&6
1129 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1130 # It thinks the first close brace ends the variable substitution.
1131 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1133 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1135 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1137 # Extract the first word of "ranlib", so it can be a program name with args.
1138 set dummy ranlib; ac_word=$2
1139 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1140 echo "configure:1141: checking for $ac_word" >&5
1141 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1142 echo $ac_n "(cached) $ac_c" 1>&6
1144 if test -n "$RANLIB"; then
1145 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1147 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1149 for ac_dir in $ac_dummy; do
1150 test -z "$ac_dir" && ac_dir=.
1151 if test -f $ac_dir/$ac_word; then
1152 ac_cv_prog_RANLIB="ranlib"
1157 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1160 RANLIB="$ac_cv_prog_RANLIB"
1161 if test -n "$RANLIB"; then
1162 echo "$ac_t""$RANLIB" 1>&6
1164 echo "$ac_t""no" 1>&6
1167 for ac_prog in 'bison -y' byacc
1169 # Extract the first word of "$ac_prog", so it can be a program name with args.
1170 set dummy $ac_prog; ac_word=$2
1171 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1172 echo "configure:1173: checking for $ac_word" >&5
1173 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1174 echo $ac_n "(cached) $ac_c" 1>&6
1176 if test -n "$YACC"; then
1177 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1179 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1181 for ac_dir in $ac_dummy; do
1182 test -z "$ac_dir" && ac_dir=.
1183 if test -f $ac_dir/$ac_word; then
1184 ac_cv_prog_YACC="$ac_prog"
1191 YACC="$ac_cv_prog_YACC"
1192 if test -n "$YACC"; then
1193 echo "$ac_t""$YACC" 1>&6
1195 echo "$ac_t""no" 1>&6
1198 test -n "$YACC" && break
1200 test -n "$YACC" || YACC="yacc"
1202 # Extract the first word of "flex", so it can be a program name with args.
1203 set dummy flex; ac_word=$2
1204 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1205 echo "configure:1206: checking for $ac_word" >&5
1206 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1207 echo $ac_n "(cached) $ac_c" 1>&6
1209 if test -n "$LEX"; then
1210 ac_cv_prog_LEX="$LEX" # Let the user override the test.
1212 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1214 for ac_dir in $ac_dummy; do
1215 test -z "$ac_dir" && ac_dir=.
1216 if test -f $ac_dir/$ac_word; then
1217 ac_cv_prog_LEX="flex"
1222 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1225 LEX="$ac_cv_prog_LEX"
1226 if test -n "$LEX"; then
1227 echo "$ac_t""$LEX" 1>&6
1229 echo "$ac_t""no" 1>&6
1232 if test -z "$LEXLIB"
1238 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1239 echo "configure:1240: checking for yywrap in -l$ac_lib" >&5
1240 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1241 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1242 echo $ac_n "(cached) $ac_c" 1>&6
1244 ac_save_LIBS="$LIBS"
1245 LIBS="-l$ac_lib $LIBS"
1246 cat > conftest.$ac_ext <<EOF
1247 #line 1248 "configure"
1248 #include "confdefs.h"
1249 /* Override any gcc2 internal prototype to avoid an error. */
1250 /* We use char because int might match the return type of a gcc2
1251 builtin and then its argument prototype would still apply. */
1258 if { (eval echo configure:1259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1260 eval "ac_cv_lib_$ac_lib_var=yes"
1262 echo "configure: failed program was:" >&5
1263 cat conftest.$ac_ext >&5
1265 eval "ac_cv_lib_$ac_lib_var=no"
1268 LIBS="$ac_save_LIBS"
1271 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1272 echo "$ac_t""yes" 1>&6
1275 echo "$ac_t""no" 1>&6
1280 # Extract the first word of "autoconf", so it can be a program name with args.
1281 set dummy autoconf; ac_word=$2
1282 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1283 echo "configure:1284: checking for $ac_word" >&5
1284 if eval "test \"`echo '$''{'ac_cv_prog_AUTOCONF'+set}'`\" = set"; then
1285 echo $ac_n "(cached) $ac_c" 1>&6
1287 if test -n "$AUTOCONF"; then
1288 ac_cv_prog_AUTOCONF="$AUTOCONF" # Let the user override the test.
1290 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1292 for ac_dir in $ac_dummy; do
1293 test -z "$ac_dir" && ac_dir=.
1294 if test -f $ac_dir/$ac_word; then
1295 ac_cv_prog_AUTOCONF="autoconf"
1300 test -z "$ac_cv_prog_AUTOCONF" && ac_cv_prog_AUTOCONF=":"
1303 AUTOCONF="$ac_cv_prog_AUTOCONF"
1304 if test -n "$AUTOCONF"; then
1305 echo "$ac_t""$AUTOCONF" 1>&6
1307 echo "$ac_t""no" 1>&6
1310 # Extract the first word of "as", so it can be a program name with args.
1311 set dummy as; ac_word=$2
1312 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1313 echo "configure:1314: checking for $ac_word" >&5
1314 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1315 echo $ac_n "(cached) $ac_c" 1>&6
1317 if test -n "$AS"; then
1318 ac_cv_prog_AS="$AS" # Let the user override the test.
1320 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1322 for ac_dir in $ac_dummy; do
1323 test -z "$ac_dir" && ac_dir=.
1324 if test -f $ac_dir/$ac_word; then
1330 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS=":"
1334 if test -n "$AS"; then
1335 echo "$ac_t""$AS" 1>&6
1337 echo "$ac_t""no" 1>&6
1340 # Extract the first word of "cp", so it can be a program name with args.
1341 set dummy cp; ac_word=$2
1342 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1343 echo "configure:1344: checking for $ac_word" >&5
1344 if eval "test \"`echo '$''{'ac_cv_prog_CP'+set}'`\" = set"; then
1345 echo $ac_n "(cached) $ac_c" 1>&6
1347 if test -n "$CP"; then
1348 ac_cv_prog_CP="$CP" # Let the user override the test.
1350 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1352 for ac_dir in $ac_dummy; do
1353 test -z "$ac_dir" && ac_dir=.
1354 if test -f $ac_dir/$ac_word; then
1360 test -z "$ac_cv_prog_CP" && ac_cv_prog_CP=":"
1364 if test -n "$CP"; then
1365 echo "$ac_t""$CP" 1>&6
1367 echo "$ac_t""no" 1>&6
1372 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1373 ac_cpp='$CPP $CPPFLAGS'
1374 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1375 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1376 cross_compiling=$ac_cv_prog_cc_cross
1379 # Checking for header files.
1380 # ===========================================================================
1381 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1382 echo "configure:1383: checking for ANSI C header files" >&5
1383 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1384 echo $ac_n "(cached) $ac_c" 1>&6
1386 cat > conftest.$ac_ext <<EOF
1387 #line 1388 "configure"
1388 #include "confdefs.h"
1394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1395 { (eval echo configure:1396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1397 if test -z "$ac_err"; then
1399 ac_cv_header_stdc=yes
1402 echo "configure: failed program was:" >&5
1403 cat conftest.$ac_ext >&5
1405 ac_cv_header_stdc=no
1409 if test $ac_cv_header_stdc = yes; then
1410 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1411 cat > conftest.$ac_ext <<EOF
1412 #line 1413 "configure"
1413 #include "confdefs.h"
1416 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1417 egrep "memchr" >/dev/null 2>&1; then
1421 ac_cv_header_stdc=no
1427 if test $ac_cv_header_stdc = yes; then
1428 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1429 cat > conftest.$ac_ext <<EOF
1430 #line 1431 "configure"
1431 #include "confdefs.h"
1434 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1435 egrep "free" >/dev/null 2>&1; then
1439 ac_cv_header_stdc=no
1445 if test $ac_cv_header_stdc = yes; then
1446 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1447 if test "$cross_compiling" = yes; then
1450 cat > conftest.$ac_ext <<EOF
1451 #line 1452 "configure"
1452 #include "confdefs.h"
1454 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1455 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1456 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1457 int main () { int i; for (i = 0; i < 256; i++)
1458 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1462 if { (eval echo configure:1463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1466 echo "configure: failed program was:" >&5
1467 cat conftest.$ac_ext >&5
1469 ac_cv_header_stdc=no
1477 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1478 if test $ac_cv_header_stdc = yes; then
1479 cat >> confdefs.h <<\EOF
1480 #define STDC_HEADERS 1
1485 for ac_hdr in getopt.h
1487 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1488 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1489 echo "configure:1490: checking for $ac_hdr" >&5
1490 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1491 echo $ac_n "(cached) $ac_c" 1>&6
1493 cat > conftest.$ac_ext <<EOF
1494 #line 1495 "configure"
1495 #include "confdefs.h"
1498 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1499 { (eval echo configure:1500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1500 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1501 if test -z "$ac_err"; then
1503 eval "ac_cv_header_$ac_safe=yes"
1506 echo "configure: failed program was:" >&5
1507 cat conftest.$ac_ext >&5
1509 eval "ac_cv_header_$ac_safe=no"
1513 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1514 echo "$ac_t""yes" 1>&6
1515 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1516 cat >> confdefs.h <<EOF
1517 #define $ac_tr_hdr 1
1521 echo "$ac_t""no" 1>&6
1525 for ac_hdr in unistd.h
1527 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1528 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1529 echo "configure:1530: checking for $ac_hdr" >&5
1530 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1531 echo $ac_n "(cached) $ac_c" 1>&6
1533 cat > conftest.$ac_ext <<EOF
1534 #line 1535 "configure"
1535 #include "confdefs.h"
1538 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1539 { (eval echo configure:1540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1540 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1541 if test -z "$ac_err"; then
1543 eval "ac_cv_header_$ac_safe=yes"
1546 echo "configure: failed program was:" >&5
1547 cat conftest.$ac_ext >&5
1549 eval "ac_cv_header_$ac_safe=no"
1553 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1554 echo "$ac_t""yes" 1>&6
1555 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1556 cat >> confdefs.h <<EOF
1557 #define $ac_tr_hdr 1
1561 echo "$ac_t""no" 1>&6
1565 for ac_hdr in endian.h
1567 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1568 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1569 echo "configure:1570: checking for $ac_hdr" >&5
1570 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1571 echo $ac_n "(cached) $ac_c" 1>&6
1573 cat > conftest.$ac_ext <<EOF
1574 #line 1575 "configure"
1575 #include "confdefs.h"
1578 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1579 { (eval echo configure:1580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1580 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1581 if test -z "$ac_err"; then
1583 eval "ac_cv_header_$ac_safe=yes"
1586 echo "configure: failed program was:" >&5
1587 cat conftest.$ac_ext >&5
1589 eval "ac_cv_header_$ac_safe=no"
1593 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1594 echo "$ac_t""yes" 1>&6
1595 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1596 cat >> confdefs.h <<EOF
1597 #define $ac_tr_hdr 1
1601 echo "$ac_t""no" 1>&6
1605 for ac_hdr in sys/isa_defs.h
1607 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1608 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1609 echo "configure:1610: checking for $ac_hdr" >&5
1610 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1611 echo $ac_n "(cached) $ac_c" 1>&6
1613 cat > conftest.$ac_ext <<EOF
1614 #line 1615 "configure"
1615 #include "confdefs.h"
1618 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1619 { (eval echo configure:1620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1620 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1621 if test -z "$ac_err"; then
1623 eval "ac_cv_header_$ac_safe=yes"
1626 echo "configure: failed program was:" >&5
1627 cat conftest.$ac_ext >&5
1629 eval "ac_cv_header_$ac_safe=no"
1633 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1634 echo "$ac_t""yes" 1>&6
1635 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1636 cat >> confdefs.h <<EOF
1637 #define $ac_tr_hdr 1
1641 echo "$ac_t""no" 1>&6
1645 for ac_hdr in sys/socket.h
1647 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1648 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1649 echo "configure:1650: checking for $ac_hdr" >&5
1650 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1651 echo $ac_n "(cached) $ac_c" 1>&6
1653 cat > conftest.$ac_ext <<EOF
1654 #line 1655 "configure"
1655 #include "confdefs.h"
1658 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1659 { (eval echo configure:1660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1660 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1661 if test -z "$ac_err"; then
1663 eval "ac_cv_header_$ac_safe=yes"
1666 echo "configure: failed program was:" >&5
1667 cat conftest.$ac_ext >&5
1669 eval "ac_cv_header_$ac_safe=no"
1673 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1674 echo "$ac_t""yes" 1>&6
1675 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1676 cat >> confdefs.h <<EOF
1677 #define $ac_tr_hdr 1
1681 echo "$ac_t""no" 1>&6
1686 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1688 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1689 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1690 echo "configure:1691: checking for $ac_hdr that defines DIR" >&5
1691 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1692 echo $ac_n "(cached) $ac_c" 1>&6
1694 cat > conftest.$ac_ext <<EOF
1695 #line 1696 "configure"
1696 #include "confdefs.h"
1697 #include <sys/types.h>
1703 if { (eval echo configure:1704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1705 eval "ac_cv_header_dirent_$ac_safe=yes"
1707 echo "configure: failed program was:" >&5
1708 cat conftest.$ac_ext >&5
1710 eval "ac_cv_header_dirent_$ac_safe=no"
1714 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1715 echo "$ac_t""yes" 1>&6
1716 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1717 cat >> confdefs.h <<EOF
1718 #define $ac_tr_hdr 1
1720 ac_header_dirent=$ac_hdr; break
1722 echo "$ac_t""no" 1>&6
1725 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1726 if test $ac_header_dirent = dirent.h; then
1727 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1728 echo "configure:1729: checking for opendir in -ldir" >&5
1729 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1730 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1731 echo $ac_n "(cached) $ac_c" 1>&6
1733 ac_save_LIBS="$LIBS"
1735 cat > conftest.$ac_ext <<EOF
1736 #line 1737 "configure"
1737 #include "confdefs.h"
1738 /* Override any gcc2 internal prototype to avoid an error. */
1739 /* We use char because int might match the return type of a gcc2
1740 builtin and then its argument prototype would still apply. */
1747 if { (eval echo configure:1748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1749 eval "ac_cv_lib_$ac_lib_var=yes"
1751 echo "configure: failed program was:" >&5
1752 cat conftest.$ac_ext >&5
1754 eval "ac_cv_lib_$ac_lib_var=no"
1757 LIBS="$ac_save_LIBS"
1760 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1761 echo "$ac_t""yes" 1>&6
1764 echo "$ac_t""no" 1>&6
1768 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1769 echo "configure:1770: checking for opendir in -lx" >&5
1770 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1771 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1772 echo $ac_n "(cached) $ac_c" 1>&6
1774 ac_save_LIBS="$LIBS"
1776 cat > conftest.$ac_ext <<EOF
1777 #line 1778 "configure"
1778 #include "confdefs.h"
1779 /* Override any gcc2 internal prototype to avoid an error. */
1780 /* We use char because int might match the return type of a gcc2
1781 builtin and then its argument prototype would still apply. */
1788 if { (eval echo configure:1789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1790 eval "ac_cv_lib_$ac_lib_var=yes"
1792 echo "configure: failed program was:" >&5
1793 cat conftest.$ac_ext >&5
1795 eval "ac_cv_lib_$ac_lib_var=no"
1798 LIBS="$ac_save_LIBS"
1801 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1802 echo "$ac_t""yes" 1>&6
1805 echo "$ac_t""no" 1>&6
1811 # This must be after CPP
1813 echo $ac_n "checking which header file defines FD_ macros""... $ac_c" 1>&6
1814 echo "configure:1815: checking which header file defines FD_ macros" >&5
1815 if eval "test \"`echo '$''{'s51_cv_fd'+set}'`\" = set"; then
1816 echo $ac_n "(cached) $ac_c" 1>&6
1818 sdcc_cv_fd="unknown"
1819 cat > conftest.$ac_ext <<EOF
1820 #line 1821 "configure"
1821 #include "confdefs.h"
1823 #include <sys/time.h>
1828 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1829 egrep "yes" >/dev/null 2>&1; then
1831 sdcc_cv_fd="<sys/time.h>"
1835 cat > conftest.$ac_ext <<EOF
1836 #line 1837 "configure"
1837 #include "confdefs.h"
1839 #include <sys/types.h>
1844 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1845 egrep "yes" >/dev/null 2>&1; then
1847 sdcc_cv_fd="<sys/types.h>"
1851 cat > conftest.$ac_ext <<EOF
1852 #line 1853 "configure"
1853 #include "confdefs.h"
1855 #include <sys/select.h>
1860 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1861 egrep "yes" >/dev/null 2>&1; then
1863 sdcc_cv_fd="<sys/types.h>"
1869 echo "$ac_t""$s51_cv_fd" 1>&6
1871 cat >> confdefs.h <<\EOF
1872 #define FD_HEADER_OK 0
1875 if echo $sdcc_cv_fd|grep time >/dev/null 2>&1; then
1876 cat >> confdefs.h <<\EOF
1877 #define FD_NEED_TIME_H 1
1880 cat >> confdefs.h <<\EOF
1881 #define FD_HEADER_OK 1
1885 cat >> confdefs.h <<\EOF
1886 #define FD_NEED_TIME_H 0
1890 if echo $sdcc_cv_fd|grep types >/dev/null 2>&1; then
1891 cat >> confdefs.h <<\EOF
1892 #define FD_NEED_TYPES_H 1
1895 cat >> confdefs.h <<\EOF
1896 #define FD_HEADER_OK 1
1900 cat >> confdefs.h <<\EOF
1901 #define FD_NEED_TYPES_H 0
1905 if echo $sdcc_cv_fd|grep select >/dev/null 2>&1; then
1906 cat >> confdefs.h <<\EOF
1907 #define FD_NEED_SELECT_H 1
1910 cat >> confdefs.h <<\EOF
1911 #define FD_HEADER_OK 1
1915 cat >> confdefs.h <<\EOF
1916 #define FD_NEED_SELECT_H 0
1921 cat >> confdefs.h <<EOF
1922 #define HEADER_FD ${sdcc_cv_fd}
1927 # Checking for functions
1928 # ===========================================================================
1929 for ac_func in strlen strcpy strcat strstr strcmp strerror strtok strdup
1931 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1932 echo "configure:1933: checking for $ac_func" >&5
1933 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1934 echo $ac_n "(cached) $ac_c" 1>&6
1936 cat > conftest.$ac_ext <<EOF
1937 #line 1938 "configure"
1938 #include "confdefs.h"
1939 /* System header to define __stub macros and hopefully few prototypes,
1940 which can conflict with char $ac_func(); below. */
1942 /* Override any gcc2 internal prototype to avoid an error. */
1943 /* We use char because int might match the return type of a gcc2
1944 builtin and then its argument prototype would still apply. */
1949 /* The GNU C library defines this for functions which it implements
1950 to always fail with ENOSYS. Some functions are actually named
1951 something starting with __ and the normal name is an alias. */
1952 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1960 if { (eval echo configure:1961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1962 eval "ac_cv_func_$ac_func=yes"
1964 echo "configure: failed program was:" >&5
1965 cat conftest.$ac_ext >&5
1967 eval "ac_cv_func_$ac_func=no"
1972 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1973 echo "$ac_t""yes" 1>&6
1974 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1975 cat >> confdefs.h <<EOF
1976 #define $ac_tr_func 1
1980 echo "$ac_t""no" 1>&6
1984 for ac_func in strchr memcpy
1986 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1987 echo "configure:1988: checking for $ac_func" >&5
1988 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1989 echo $ac_n "(cached) $ac_c" 1>&6
1991 cat > conftest.$ac_ext <<EOF
1992 #line 1993 "configure"
1993 #include "confdefs.h"
1994 /* System header to define __stub macros and hopefully few prototypes,
1995 which can conflict with char $ac_func(); below. */
1997 /* Override any gcc2 internal prototype to avoid an error. */
1998 /* We use char because int might match the return type of a gcc2
1999 builtin and then its argument prototype would still apply. */
2004 /* The GNU C library defines this for functions which it implements
2005 to always fail with ENOSYS. Some functions are actually named
2006 something starting with __ and the normal name is an alias. */
2007 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2015 if { (eval echo configure:2016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2017 eval "ac_cv_func_$ac_func=yes"
2019 echo "configure: failed program was:" >&5
2020 cat conftest.$ac_ext >&5
2022 eval "ac_cv_func_$ac_func=no"
2027 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2028 echo "$ac_t""yes" 1>&6
2029 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2030 cat >> confdefs.h <<EOF
2031 #define $ac_tr_func 1
2035 echo "$ac_t""no" 1>&6
2039 for ac_func in fgets
2041 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2042 echo "configure:2043: checking for $ac_func" >&5
2043 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2044 echo $ac_n "(cached) $ac_c" 1>&6
2046 cat > conftest.$ac_ext <<EOF
2047 #line 2048 "configure"
2048 #include "confdefs.h"
2049 /* System header to define __stub macros and hopefully few prototypes,
2050 which can conflict with char $ac_func(); below. */
2052 /* Override any gcc2 internal prototype to avoid an error. */
2053 /* We use char because int might match the return type of a gcc2
2054 builtin and then its argument prototype would still apply. */
2059 /* The GNU C library defines this for functions which it implements
2060 to always fail with ENOSYS. Some functions are actually named
2061 something starting with __ and the normal name is an alias. */
2062 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2070 if { (eval echo configure:2071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2072 eval "ac_cv_func_$ac_func=yes"
2074 echo "configure: failed program was:" >&5
2075 cat conftest.$ac_ext >&5
2077 eval "ac_cv_func_$ac_func=no"
2082 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2083 echo "$ac_t""yes" 1>&6
2084 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2085 cat >> confdefs.h <<EOF
2086 #define $ac_tr_func 1
2090 echo "$ac_t""no" 1>&6
2094 for ac_func in yylex
2096 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2097 echo "configure:2098: checking for $ac_func" >&5
2098 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2099 echo $ac_n "(cached) $ac_c" 1>&6
2101 cat > conftest.$ac_ext <<EOF
2102 #line 2103 "configure"
2103 #include "confdefs.h"
2104 /* System header to define __stub macros and hopefully few prototypes,
2105 which can conflict with char $ac_func(); below. */
2107 /* Override any gcc2 internal prototype to avoid an error. */
2108 /* We use char because int might match the return type of a gcc2
2109 builtin and then its argument prototype would still apply. */
2114 /* The GNU C library defines this for functions which it implements
2115 to always fail with ENOSYS. Some functions are actually named
2116 something starting with __ and the normal name is an alias. */
2117 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2125 if { (eval echo configure:2126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2127 eval "ac_cv_func_$ac_func=yes"
2129 echo "configure: failed program was:" >&5
2130 cat conftest.$ac_ext >&5
2132 eval "ac_cv_func_$ac_func=no"
2137 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2138 echo "$ac_t""yes" 1>&6
2139 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2140 cat >> confdefs.h <<EOF
2141 #define $ac_tr_func 1
2145 echo "$ac_t""no" 1>&6
2150 # check if -lsocket && -lxnet is required to compile socket stuff
2152 echo $ac_n "checking for library containing socket""... $ac_c" 1>&6
2153 echo "configure:2154: checking for library containing socket" >&5
2154 if eval "test \"`echo '$''{'ac_cv_search_socket'+set}'`\" = set"; then
2155 echo $ac_n "(cached) $ac_c" 1>&6
2157 ac_func_search_save_LIBS="$LIBS"
2158 ac_cv_search_socket="no"
2159 cat > conftest.$ac_ext <<EOF
2160 #line 2161 "configure"
2161 #include "confdefs.h"
2162 /* Override any gcc2 internal prototype to avoid an error. */
2163 /* We use char because int might match the return type of a gcc2
2164 builtin and then its argument prototype would still apply. */
2171 if { (eval echo configure:2172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2173 ac_cv_search_socket="none required"
2175 echo "configure: failed program was:" >&5
2176 cat conftest.$ac_ext >&5
2179 test "$ac_cv_search_socket" = "no" && for i in socket; do
2180 LIBS="-l$i $ac_func_search_save_LIBS"
2181 cat > conftest.$ac_ext <<EOF
2182 #line 2183 "configure"
2183 #include "confdefs.h"
2184 /* Override any gcc2 internal prototype to avoid an error. */
2185 /* We use char because int might match the return type of a gcc2
2186 builtin and then its argument prototype would still apply. */
2193 if { (eval echo configure:2194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2195 ac_cv_search_socket="-l$i"
2198 echo "configure: failed program was:" >&5
2199 cat conftest.$ac_ext >&5
2203 LIBS="$ac_func_search_save_LIBS"
2206 echo "$ac_t""$ac_cv_search_socket" 1>&6
2207 if test "$ac_cv_search_socket" != "no"; then
2208 test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
2214 echo $ac_n "checking for library containing inet_addr""... $ac_c" 1>&6
2215 echo "configure:2216: checking for library containing inet_addr" >&5
2216 if eval "test \"`echo '$''{'ac_cv_search_inet_addr'+set}'`\" = set"; then
2217 echo $ac_n "(cached) $ac_c" 1>&6
2219 ac_func_search_save_LIBS="$LIBS"
2220 ac_cv_search_inet_addr="no"
2221 cat > conftest.$ac_ext <<EOF
2222 #line 2223 "configure"
2223 #include "confdefs.h"
2224 /* Override any gcc2 internal prototype to avoid an error. */
2225 /* We use char because int might match the return type of a gcc2
2226 builtin and then its argument prototype would still apply. */
2233 if { (eval echo configure:2234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2235 ac_cv_search_inet_addr="none required"
2237 echo "configure: failed program was:" >&5
2238 cat conftest.$ac_ext >&5
2241 test "$ac_cv_search_inet_addr" = "no" && for i in nsl xnet; do
2242 LIBS="-l$i $ac_func_search_save_LIBS"
2243 cat > conftest.$ac_ext <<EOF
2244 #line 2245 "configure"
2245 #include "confdefs.h"
2246 /* Override any gcc2 internal prototype to avoid an error. */
2247 /* We use char because int might match the return type of a gcc2
2248 builtin and then its argument prototype would still apply. */
2255 if { (eval echo configure:2256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2257 ac_cv_search_inet_addr="-l$i"
2260 echo "configure: failed program was:" >&5
2261 cat conftest.$ac_ext >&5
2265 LIBS="$ac_func_search_save_LIBS"
2268 echo "$ac_t""$ac_cv_search_inet_addr" 1>&6
2269 if test "$ac_cv_search_inet_addr" != "no"; then
2270 test "$ac_cv_search_inet_addr" = "none required" || LIBS="$ac_cv_search_inet_addr $LIBS"
2279 # DD_COPT macro checks if the compiler specified as the 1st parameter
2280 # supports option specified as the 2nd parameter
2281 # For example: DD_CPORT(CXX, fPIC)
2286 # Checking characteristics of compilers and other programs
2287 # --------------------------------------------------------
2288 echo $ac_n "checking whether preprocessor accepts -MM or -M""... $ac_c" 1>&6
2289 echo "configure:2290: checking whether preprocessor accepts -MM or -M" >&5
2290 if eval "test \"`echo '$''{'sdcc_cv_MM'+set}'`\" = set"; then
2291 echo $ac_n "(cached) $ac_c" 1>&6
2293 echo "#include <stdio.h>" >_test_.c
2295 $CPP -v -MM _test_.c 1>&5 2>&5
2296 if test "$?" = "0"; then
2304 echo "$ac_t""$sdcc_cv_MM" 1>&6
2308 # This is the first time when CFLAGS are set/modified!!
2310 echo $ac_n "checking whether $CC accepts -ggdb""... $ac_c" 1>&6
2311 echo "configure:2312: checking whether $CC accepts -ggdb" >&5
2312 if eval "test \"`echo '$''{'sdcc_cv_CCggdb'+set}'`\" = set"; then
2313 echo $ac_n "(cached) $ac_c" 1>&6
2319 $CC -v -ggdb -c _test_.c 1>&5 2>&5
2320 if test "$?" = "0"; then
2321 sdcc_cv_CCggdb="yes"
2325 rm -f _test_.* a.out
2328 echo "$ac_t""$sdcc_cv_CCggdb" 1>&6
2330 if test "$sdcc_cv_CCggdb" = "yes"; then
2335 echo $ac_n "checking whether $CC accepts -pipe""... $ac_c" 1>&6
2336 echo "configure:2337: checking whether $CC accepts -pipe" >&5
2337 if eval "test \"`echo '$''{'sdcc_cv_CCpipe'+set}'`\" = set"; then
2338 echo $ac_n "(cached) $ac_c" 1>&6
2344 $CC -v -pipe -c _test_.c 1>&5 2>&5
2345 if test "$?" = "0"; then
2346 sdcc_cv_CCpipe="yes"
2350 rm -f _test_.* a.out
2353 echo "$ac_t""$sdcc_cv_CCpipe" 1>&6
2355 if test "$sdcc_cv_CCpipe" = "yes"; then
2356 CFLAGS="$CFLAGS -pipe"
2360 # Checks for typedefs, structures, and compiler characteristics.
2361 # ===========================================================================
2362 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2363 echo "configure:2364: checking return type of signal handlers" >&5
2364 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2365 echo $ac_n "(cached) $ac_c" 1>&6
2367 cat > conftest.$ac_ext <<EOF
2368 #line 2369 "configure"
2369 #include "confdefs.h"
2370 #include <sys/types.h>
2376 extern "C" void (*signal (int, void (*)(int)))(int);
2378 void (*signal ()) ();
2385 if { (eval echo configure:2386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2387 ac_cv_type_signal=void
2389 echo "configure: failed program was:" >&5
2390 cat conftest.$ac_ext >&5
2392 ac_cv_type_signal=int
2397 echo "$ac_t""$ac_cv_type_signal" 1>&6
2398 cat >> confdefs.h <<EOF
2399 #define RETSIGTYPE $ac_cv_type_signal
2406 if test "${prefix}" = "NONE"; then
2411 if test "${datadir}" = "\${prefix}/share"; then
2412 sdcc_datadir=${prefix}/share
2414 sdcc_datadir=${datadir}
2416 cat >> confdefs.h <<EOF
2417 #define STANDARD_INCLUDE_DIR "${sdcc_datadir}/include"
2420 cat >> confdefs.h <<EOF
2421 #define SDCC_INCLUDE_DIR "${sdcc_datadir}/include"
2424 cat >> confdefs.h <<EOF
2425 #define SDCC_LIB_DIR "${sdcc_datadir}/lib"
2428 cat >> confdefs.h <<EOF
2429 #define STD_LIB "libsdcc"
2432 cat >> confdefs.h <<EOF
2433 #define STD_INT_LIB "libint"
2436 cat >> confdefs.h <<EOF
2437 #define STD_LONG_LIB "liblong"
2440 cat >> confdefs.h <<EOF
2441 #define STD_FP_LIB "libfloat"
2444 cat >> confdefs.h <<EOF
2445 #define STD_DS390_LIB "libds390"
2448 cat >> confdefs.h <<EOF
2449 #define PREFIX "${prefix}"
2452 cat >> confdefs.h <<EOF
2453 #define DATADIR "${sdcc_datadir}"
2456 cat >> confdefs.h <<EOF
2457 #define SRCDIR "${config_in}"
2461 # mlh: dont compile libgc if it's available locally
2462 echo $ac_n "checking for GC_malloc in -lgc""... $ac_c" 1>&6
2463 echo "configure:2461: checking for GC_malloc in -lgc" >&5
2464 ac_lib_var=`echo gc'_'GC_malloc | sed 'y%./+-%__p_%'`
2465 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2466 echo $ac_n "(cached) $ac_c" 1>&6
2468 ac_save_LIBS="$LIBS"
2470 cat > conftest.$ac_ext <<EOF
2471 #line 2469 "configure"
2472 #include "confdefs.h"
2473 /* Override any gcc2 internal prototype to avoid an error. */
2474 /* We use char because int might match the return type of a gcc2
2475 builtin and then its argument prototype would still apply. */
2482 if { (eval echo configure:2480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2484 eval "ac_cv_lib_$ac_lib_var=yes"
2486 echo "configure: failed program was:" >&5
2487 cat conftest.$ac_ext >&5
2489 eval "ac_cv_lib_$ac_lib_var=no"
2492 LIBS="$ac_save_LIBS"
2495 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2496 echo "$ac_t""yes" 1>&6
2499 echo "$ac_t""no" 1>&6
2504 # Now handle the port selection
2505 # Check whether --enable-z80-port or --disable-z80-port was given.
2506 if test "${enable_z80_port+set}" = set; then
2507 enableval="$enable_z80_port"
2511 if test "$enable_z80_port" = "no"; then
2512 cat >> confdefs.h <<EOF
2513 #define OPT_DISABLE_Z80 1
2517 cat >> confdefs.h <<EOF
2518 #define OPT_DISABLE_Z80 0
2523 # Check whether --enable-gbz80-port or --disable-gbz80-port was given.
2524 if test "${enable_gbz80_port+set}" = set; then
2525 enableval="$enable_gbz80_port"
2529 if test "$enable_gbz80_port" = "no"; then
2530 cat >> confdefs.h <<EOF
2531 #define OPT_DISABLE_GBZ80 1
2535 cat >> confdefs.h <<EOF
2536 #define OPT_DISABLE_GBZ80 0
2541 # Check whether --enable-mcs51-port or --disable-mcs51-port was given.
2542 if test "${enable_mcs51_port+set}" = set; then
2543 enableval="$enable_mcs51_port"
2547 if test "$enable_mcs51_port" = "no"; then
2548 cat >> confdefs.h <<EOF
2549 #define OPT_DISABLE_MCS51 1
2553 cat >> confdefs.h <<EOF
2554 #define OPT_DISABLE_MCS51 0
2559 # Check whether --enable-avr-port or --disable-avr-port was given.
2560 if test "${enable_avr_port+set}" = set; then
2561 enableval="$enable_avr_port"
2565 if test "$enable_avr_port" = "no"; then
2566 cat >> confdefs.h <<EOF
2567 #define OPT_DISABLE_AVR 1
2571 cat >> confdefs.h <<EOF
2572 #define OPT_DISABLE_AVR 0
2577 # Generating output files
2578 # ===========================================================================
2581 # MLH: removed as the rules are already in Makefile.common
2585 cat > confcache <<\EOF
2586 # This file is a shell script that caches the results of configure
2587 # tests run on this system so they can be shared between configure
2588 # scripts and configure runs. It is not useful on other systems.
2589 # If it contains results you don't want to keep, you may remove or edit it.
2591 # By default, configure uses ./config.cache as the cache file,
2592 # creating it if it does not exist already. You can give configure
2593 # the --cache-file=FILE option to use a different cache file; that is
2594 # what configure does when it calls configure scripts in
2595 # subdirectories, so they share the cache.
2596 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2597 # config.status only pays attention to the cache file if you give it the
2598 # --recheck option to rerun configure.
2601 # The following way of writing the cache mishandles newlines in values,
2602 # but we know of no workaround that is simple, portable, and efficient.
2603 # So, don't put newlines in cache variables' values.
2604 # Ultrix sh set writes to stderr and can't be redirected directly,
2605 # and sets the high bit in the cache file unless we assign to the vars.
2607 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2609 # `set' does not quote correctly, so add quotes (double-quote substitution
2610 # turns \\\\ into \\, and sed turns \\ into \).
2612 -e "s/'/'\\\\''/g" \
2613 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2616 # `set' quotes correctly as required by POSIX, so do not add quotes.
2617 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2620 if cmp -s $cache_file confcache; then
2623 if test -w $cache_file; then
2624 echo "updating cache $cache_file"
2625 cat confcache > $cache_file
2627 echo "not updating unwritable cache $cache_file"
2632 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2634 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2635 # Let make expand exec_prefix.
2636 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2638 # Any assignment to VPATH causes Sun make to only execute
2639 # the first set of double-colon rules, so remove it if not needed.
2640 # If there is a colon in the path, we need to keep it.
2641 if test "x$srcdir" = x.; then
2642 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2645 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2647 DEFS=-DHAVE_CONFIG_H
2649 # Without the "./", some shells look in PATH for config.status.
2650 : ${CONFIG_STATUS=./config.status}
2652 echo creating $CONFIG_STATUS
2653 rm -f $CONFIG_STATUS
2654 cat > $CONFIG_STATUS <<EOF
2656 # Generated automatically by configure.
2657 # Run this file to recreate the current configuration.
2658 # This directory was configured as follows,
2659 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2661 # $0 $ac_configure_args
2663 # Compiler output produced by configure, useful for debugging
2664 # configure, is in ./config.log if it exists.
2666 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2669 case "\$ac_option" in
2670 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2671 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2672 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2673 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2674 echo "$CONFIG_STATUS generated by autoconf version 2.13"
2676 -help | --help | --hel | --he | --h)
2677 echo "\$ac_cs_usage"; exit 0 ;;
2678 *) echo "\$ac_cs_usage"; exit 1 ;;
2682 ac_given_srcdir=$srcdir
2683 ac_given_INSTALL="$INSTALL"
2685 trap 'rm -fr `echo "main.mk:main_in.mk
2687 support/gc/Makefile.cross
2690 support/cpp/Makefile
2691 device/include/Makefile
2693 debugger/mcs51/Makefile
2694 Makefile.common:Makefile.common.in
2695 sdccconf.h:sdccconf_in.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2697 cat >> $CONFIG_STATUS <<EOF
2699 # Protect against being on the right side of a sed subst in config.status.
2700 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2701 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2705 s%@CFLAGS@%$CFLAGS%g
2706 s%@CPPFLAGS@%$CPPFLAGS%g
2707 s%@CXXFLAGS@%$CXXFLAGS%g
2708 s%@FFLAGS@%$FFLAGS%g
2710 s%@LDFLAGS@%$LDFLAGS%g
2712 s%@exec_prefix@%$exec_prefix%g
2713 s%@prefix@%$prefix%g
2714 s%@program_transform_name@%$program_transform_name%g
2715 s%@bindir@%$bindir%g
2716 s%@sbindir@%$sbindir%g
2717 s%@libexecdir@%$libexecdir%g
2718 s%@datadir@%$datadir%g
2719 s%@sysconfdir@%$sysconfdir%g
2720 s%@sharedstatedir@%$sharedstatedir%g
2721 s%@localstatedir@%$localstatedir%g
2722 s%@libdir@%$libdir%g
2723 s%@includedir@%$includedir%g
2724 s%@oldincludedir@%$oldincludedir%g
2725 s%@infodir@%$infodir%g
2726 s%@mandir@%$mandir%g
2728 s%@VERSION@%$VERSION%g
2729 s%@VERSIONHI@%$VERSIONHI%g
2730 s%@VERSIONLO@%$VERSIONLO%g
2731 s%@VERSIONP@%$VERSIONP%g
2735 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2736 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2737 s%@INSTALL_DATA@%$INSTALL_DATA%g
2738 s%@RANLIB@%$RANLIB%g
2741 s%@LEXLIB@%$LEXLIB%g
2742 s%@AUTOCONF@%$AUTOCONF%g
2745 s%@M_OR_MM@%$M_OR_MM%g
2746 s%@HAVE_LIBGC@%$HAVE_LIBGC%g
2747 s%@subdirs@%$subdirs%g
2752 cat >> $CONFIG_STATUS <<\EOF
2754 # Split the substitutions into bite-sized pieces for seds with
2755 # small command number limits, like on Digital OSF/1 and HP-UX.
2756 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2757 ac_file=1 # Number of current file.
2758 ac_beg=1 # First line for current file.
2759 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2762 while $ac_more_lines; do
2763 if test $ac_beg -gt 1; then
2764 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2766 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2768 if test ! -s conftest.s$ac_file; then
2770 rm -f conftest.s$ac_file
2772 if test -z "$ac_sed_cmds"; then
2773 ac_sed_cmds="sed -f conftest.s$ac_file"
2775 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2777 ac_file=`expr $ac_file + 1`
2779 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2782 if test -z "$ac_sed_cmds"; then
2787 cat >> $CONFIG_STATUS <<EOF
2789 CONFIG_FILES=\${CONFIG_FILES-"main.mk:main_in.mk
2791 support/gc/Makefile.cross
2794 support/cpp/Makefile
2795 device/include/Makefile
2797 debugger/mcs51/Makefile
2798 Makefile.common:Makefile.common.in
2801 cat >> $CONFIG_STATUS <<\EOF
2802 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2803 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2805 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2806 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2807 *) ac_file_in="${ac_file}.in" ;;
2810 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2812 # Remove last slash and all that follows it. Not all systems have dirname.
2813 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2814 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2815 # The file is in a subdirectory.
2816 test ! -d "$ac_dir" && mkdir "$ac_dir"
2817 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2818 # A "../" for each directory in $ac_dir_suffix.
2819 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2821 ac_dir_suffix= ac_dots=
2824 case "$ac_given_srcdir" in
2826 if test -z "$ac_dots"; then top_srcdir=.
2827 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2828 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2830 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2831 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2834 case "$ac_given_INSTALL" in
2835 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2836 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2839 echo creating "$ac_file"
2841 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2843 *Makefile*) ac_comsub="1i\\
2844 # $configure_input" ;;
2848 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2850 s%@configure_input@%$configure_input%g
2851 s%@srcdir@%$srcdir%g
2852 s%@top_srcdir@%$top_srcdir%g
2853 s%@INSTALL@%$INSTALL%g
2854 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2858 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2859 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2861 # ac_d sets the value in "#define NAME VALUE" lines.
2862 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2863 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2866 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2867 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2868 ac_uB='\([ ]\)%\1#\2define\3'
2871 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2872 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2873 ac_eB='$%\1#\2define\3'
2877 if test "${CONFIG_HEADERS+set}" != set; then
2879 cat >> $CONFIG_STATUS <<EOF
2880 CONFIG_HEADERS="sdccconf.h:sdccconf_in.h"
2882 cat >> $CONFIG_STATUS <<\EOF
2884 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2885 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2887 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2888 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2889 *) ac_file_in="${ac_file}.in" ;;
2892 echo creating $ac_file
2894 rm -f conftest.frag conftest.in conftest.out
2895 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2896 cat $ac_file_inputs > conftest.in
2900 # Transform confdefs.h into a sed script conftest.vals that substitutes
2901 # the proper values into config.h.in to produce config.h. And first:
2902 # Protect against being on the right side of a sed subst in config.status.
2903 # Protect against being in an unquoted here document in config.status.
2905 cat > conftest.hdr <<\EOF
2908 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2912 sed -n -f conftest.hdr confdefs.h > conftest.vals
2915 # This sed command replaces #undef with comments. This is necessary, for
2916 # example, in the case of _POSIX_SOURCE, which is predefined and required
2917 # on some systems where configure will not decide to define it.
2918 cat >> conftest.vals <<\EOF
2919 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2922 # Break up conftest.vals because some shells have a limit on
2923 # the size of here documents, and old seds have small limits too.
2928 ac_lines=`grep -c . conftest.vals`
2929 # grep -c gives empty output for an empty file on some AIX systems.
2930 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2931 # Write a limited-size here document to conftest.frag.
2932 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2933 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2935 sed -f conftest.frag conftest.in > conftest.out
2937 mv conftest.out conftest.in
2939 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2941 mv conftest.tail conftest.vals
2945 cat >> $CONFIG_STATUS <<\EOF
2946 rm -f conftest.frag conftest.h
2947 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2948 cat conftest.in >> conftest.h
2950 if cmp -s $ac_file conftest.h 2>/dev/null; then
2951 echo "$ac_file is unchanged"
2954 # Remove last slash and all that follows it. Not all systems have dirname.
2955 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2956 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2957 # The file is in a subdirectory.
2958 test ! -d "$ac_dir" && mkdir "$ac_dir"
2961 mv conftest.h $ac_file
2966 cat >> $CONFIG_STATUS <<EOF
2969 cat >> $CONFIG_STATUS <<\EOF
2973 chmod +x $CONFIG_STATUS
2974 rm -fr confdefs* $ac_clean_files
2975 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2977 if test "$no_recursion" != yes; then
2979 # Remove --cache-file and --srcdir arguments so they do not pile up.
2980 ac_sub_configure_args=
2982 for ac_arg in $ac_configure_args; do
2983 if test -n "$ac_prev"; then
2988 -cache-file | --cache-file | --cache-fil | --cache-fi \
2989 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2990 ac_prev=cache_file ;;
2991 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2992 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2994 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2996 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2998 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
3002 for ac_config_dir in sim/ucsim; do
3004 # Do not complain, so a configure script can configure whichever
3005 # parts of a large source tree are present.
3006 if test ! -d $srcdir/$ac_config_dir; then
3010 echo configuring in $ac_config_dir
3015 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
3017 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
3025 # A "../" for each directory in /$ac_config_dir.
3026 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
3029 .) # No --srcdir option. We are building in place.
3030 ac_sub_srcdir=$srcdir ;;
3031 /*) # Absolute path.
3032 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
3034 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
3037 # Check for guested configure; otherwise get Cygnus style configure.
3038 if test -f $ac_sub_srcdir/configure; then
3039 ac_sub_configure=$ac_sub_srcdir/configure
3040 elif test -f $ac_sub_srcdir/configure.in; then
3041 ac_sub_configure=$ac_configure
3043 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
3047 # The recursion is here.
3048 if test -n "$ac_sub_configure"; then
3050 # Make the cache file name correct relative to the subdirectory.
3051 case "$cache_file" in
3052 /*) ac_sub_cache_file=$cache_file ;;
3054 ac_sub_cache_file="$ac_dots$cache_file" ;;
3056 case "$ac_given_INSTALL" in
3057 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3058 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3061 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
3062 # The eval makes quoting arguments work.
3063 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
3066 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
3075 # End of configure/configure.in