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 --disable-boehm-gc: Excludes sdcc use of libgc."
25 # Initialize some variables set by options.
26 # The variables have the same names as the options, with
27 # dashes changed to underlines.
29 cache_file=./config.cache
38 program_transform_name=s,x,x,
46 bindir='${exec_prefix}/bin'
47 sbindir='${exec_prefix}/sbin'
48 libexecdir='${exec_prefix}/libexec'
49 datadir='${prefix}/share'
50 sysconfdir='${prefix}/etc'
51 sharedstatedir='${prefix}/com'
52 localstatedir='${prefix}/var'
53 libdir='${exec_prefix}/lib'
54 includedir='${prefix}/include'
55 oldincludedir='/usr/include'
56 infodir='${prefix}/info'
57 mandir='${prefix}/man'
59 # Initialize some other variables.
62 SHELL=${CONFIG_SHELL-/bin/sh}
63 # Maximum number of lines to put in a shell here document.
70 # If the previous option needs an argument, assign it.
71 if test -n "$ac_prev"; then
72 eval "$ac_prev=\$ac_option"
78 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
82 # Accept the important Cygnus configure options, so we can diagnose typos.
86 -bindir | --bindir | --bindi | --bind | --bin | --bi)
88 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
89 bindir="$ac_optarg" ;;
91 -build | --build | --buil | --bui | --bu)
93 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
96 -cache-file | --cache-file | --cache-fil | --cache-fi \
97 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
99 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
100 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
101 cache_file="$ac_optarg" ;;
103 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
105 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
107 datadir="$ac_optarg" ;;
109 -disable-* | --disable-*)
110 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
111 # Reject names that are not valid shell variable names.
112 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
113 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
115 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
116 eval "enable_${ac_feature}=no" ;;
118 -enable-* | --enable-*)
119 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
120 # Reject names that are not valid shell variable names.
121 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
122 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
124 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
129 eval "enable_${ac_feature}='$ac_optarg'" ;;
131 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
132 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
133 | --exec | --exe | --ex)
134 ac_prev=exec_prefix ;;
135 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
136 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
137 | --exec=* | --exe=* | --ex=*)
138 exec_prefix="$ac_optarg" ;;
140 -gas | --gas | --ga | --g)
141 # Obsolete; use --with-gas.
144 -help | --help | --hel | --he)
145 # Omit some internal or obsolete options to make the list less imposing.
146 # This message is too long to be a string in the A/UX 3.1 sh.
148 Usage: configure [options] [host]
149 Options: [defaults in brackets after descriptions]
151 --cache-file=FILE cache test results in FILE
152 --help print this message
153 --no-create do not create output files
154 --quiet, --silent do not print \`checking...' messages
155 --version print the version of autoconf that created configure
156 Directory and file names:
157 --prefix=PREFIX install architecture-independent files in PREFIX
159 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
161 --bindir=DIR user executables in DIR [EPREFIX/bin]
162 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
163 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
164 --datadir=DIR read-only architecture-independent data in DIR
166 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
167 --sharedstatedir=DIR modifiable architecture-independent data in DIR
169 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
170 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
171 --includedir=DIR C header files in DIR [PREFIX/include]
172 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
173 --infodir=DIR info documentation in DIR [PREFIX/info]
174 --mandir=DIR man documentation in DIR [PREFIX/man]
175 --srcdir=DIR find the sources in DIR [configure dir or ..]
176 --program-prefix=PREFIX prepend PREFIX to installed program names
177 --program-suffix=SUFFIX append SUFFIX to installed program names
178 --program-transform-name=PROGRAM
179 run sed PROGRAM on installed program names
183 --build=BUILD configure for building on BUILD [BUILD=HOST]
184 --host=HOST configure for HOST [guessed]
185 --target=TARGET configure for TARGET [TARGET=HOST]
186 Features and packages:
187 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
188 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
189 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
190 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
191 --x-includes=DIR X include files are in DIR
192 --x-libraries=DIR X library files are in DIR
194 if test -n "$ac_help"; then
195 echo "--enable and --with options recognized:$ac_help"
199 -host | --host | --hos | --ho)
201 -host=* | --host=* | --hos=* | --ho=*)
204 -includedir | --includedir | --includedi | --included | --include \
205 | --includ | --inclu | --incl | --inc)
206 ac_prev=includedir ;;
207 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
208 | --includ=* | --inclu=* | --incl=* | --inc=*)
209 includedir="$ac_optarg" ;;
211 -infodir | --infodir | --infodi | --infod | --info | --inf)
213 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
214 infodir="$ac_optarg" ;;
216 -libdir | --libdir | --libdi | --libd)
218 -libdir=* | --libdir=* | --libdi=* | --libd=*)
219 libdir="$ac_optarg" ;;
221 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
222 | --libexe | --libex | --libe)
223 ac_prev=libexecdir ;;
224 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
225 | --libexe=* | --libex=* | --libe=*)
226 libexecdir="$ac_optarg" ;;
228 -localstatedir | --localstatedir | --localstatedi | --localstated \
229 | --localstate | --localstat | --localsta | --localst \
230 | --locals | --local | --loca | --loc | --lo)
231 ac_prev=localstatedir ;;
232 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
233 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
234 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
235 localstatedir="$ac_optarg" ;;
237 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
239 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
240 mandir="$ac_optarg" ;;
243 # Obsolete; use --without-fp.
246 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
250 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
251 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
254 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
255 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
256 | --oldin | --oldi | --old | --ol | --o)
257 ac_prev=oldincludedir ;;
258 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
259 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
260 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
261 oldincludedir="$ac_optarg" ;;
263 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
265 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
266 prefix="$ac_optarg" ;;
268 -program-prefix | --program-prefix | --program-prefi | --program-pref \
269 | --program-pre | --program-pr | --program-p)
270 ac_prev=program_prefix ;;
271 -program-prefix=* | --program-prefix=* | --program-prefi=* \
272 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
273 program_prefix="$ac_optarg" ;;
275 -program-suffix | --program-suffix | --program-suffi | --program-suff \
276 | --program-suf | --program-su | --program-s)
277 ac_prev=program_suffix ;;
278 -program-suffix=* | --program-suffix=* | --program-suffi=* \
279 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
280 program_suffix="$ac_optarg" ;;
282 -program-transform-name | --program-transform-name \
283 | --program-transform-nam | --program-transform-na \
284 | --program-transform-n | --program-transform- \
285 | --program-transform | --program-transfor \
286 | --program-transfo | --program-transf \
287 | --program-trans | --program-tran \
288 | --progr-tra | --program-tr | --program-t)
289 ac_prev=program_transform_name ;;
290 -program-transform-name=* | --program-transform-name=* \
291 | --program-transform-nam=* | --program-transform-na=* \
292 | --program-transform-n=* | --program-transform-=* \
293 | --program-transform=* | --program-transfor=* \
294 | --program-transfo=* | --program-transf=* \
295 | --program-trans=* | --program-tran=* \
296 | --progr-tra=* | --program-tr=* | --program-t=*)
297 program_transform_name="$ac_optarg" ;;
299 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
300 | -silent | --silent | --silen | --sile | --sil)
303 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
305 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
307 sbindir="$ac_optarg" ;;
309 -sharedstatedir | --sharedstatedir | --sharedstatedi \
310 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
311 | --sharedst | --shareds | --shared | --share | --shar \
313 ac_prev=sharedstatedir ;;
314 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
315 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
316 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
318 sharedstatedir="$ac_optarg" ;;
320 -site | --site | --sit)
322 -site=* | --site=* | --sit=*)
325 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
327 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
328 srcdir="$ac_optarg" ;;
330 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
331 | --syscon | --sysco | --sysc | --sys | --sy)
332 ac_prev=sysconfdir ;;
333 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
334 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
335 sysconfdir="$ac_optarg" ;;
337 -target | --target | --targe | --targ | --tar | --ta | --t)
339 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
340 target="$ac_optarg" ;;
342 -v | -verbose | --verbose | --verbos | --verbo | --verb)
345 -version | --version | --versio | --versi | --vers)
346 echo "configure generated by autoconf version 2.13"
350 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
351 # Reject names that are not valid shell variable names.
352 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
353 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
355 ac_package=`echo $ac_package| sed 's/-/_/g'`
360 eval "with_${ac_package}='$ac_optarg'" ;;
362 -without-* | --without-*)
363 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
364 # Reject names that are not valid shell variable names.
365 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
366 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
368 ac_package=`echo $ac_package| sed 's/-/_/g'`
369 eval "with_${ac_package}=no" ;;
372 # Obsolete; use --with-x.
375 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
376 | --x-incl | --x-inc | --x-in | --x-i)
377 ac_prev=x_includes ;;
378 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
379 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
380 x_includes="$ac_optarg" ;;
382 -x-libraries | --x-libraries | --x-librarie | --x-librari \
383 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
384 ac_prev=x_libraries ;;
385 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
386 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
387 x_libraries="$ac_optarg" ;;
389 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
393 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
394 echo "configure: warning: $ac_option: invalid host type" 1>&2
396 if test "x$nonopt" != xNONE; then
397 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
405 if test -n "$ac_prev"; then
406 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
409 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
411 # File descriptor usage:
414 # 2 errors and warnings
415 # 3 some systems may open it to /dev/tty
416 # 4 used on the Kubota Titan
417 # 6 checking for... messages and results
418 # 5 compiler messages saved in config.log
419 if test "$silent" = yes; then
427 This file contains any messages produced by compilers while
428 running configure, to aid debugging if configure makes a mistake.
431 # Strip out --no-create and --no-recursion so they do not pile up.
432 # Also quote any args containing shell metacharacters.
437 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
438 | --no-cr | --no-c) ;;
439 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
440 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
441 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
442 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
443 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
448 # Only set these to C if already set. These must not be set unconditionally
449 # because not all systems understand e.g. LANG=C (notably SCO).
450 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
451 # Non-C LC_CTYPE values break the ctype check.
452 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
453 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
454 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
455 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
457 # confdefs.h avoids OS command line length limits that DEFS can exceed.
458 rm -rf conftest* confdefs.h
459 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
462 # A filename unique to this package, relative to the directory that
463 # configure is in, which we can look for to find out if srcdir is correct.
464 ac_unique_file=Makefile
466 # Find the source files, if location was not specified.
467 if test -z "$srcdir"; then
468 ac_srcdir_defaulted=yes
469 # Try the directory containing this script, then its parent.
471 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
472 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
474 if test ! -r $srcdir/$ac_unique_file; then
478 ac_srcdir_defaulted=no
480 if test ! -r $srcdir/$ac_unique_file; then
481 if test "$ac_srcdir_defaulted" = yes; then
482 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
484 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
487 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
489 # Prefer explicitly selected file to automatically selected ones.
490 if test -z "$CONFIG_SITE"; then
491 if test "x$prefix" != xNONE; then
492 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
494 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
497 for ac_site_file in $CONFIG_SITE; do
498 if test -r "$ac_site_file"; then
499 echo "loading site script $ac_site_file"
504 if test -r "$cache_file"; then
505 echo "loading cache $cache_file"
508 echo "creating cache $cache_file"
513 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
514 ac_cpp='$CPP $CPPFLAGS'
515 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
516 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
517 cross_compiling=$ac_cv_prog_cc_cross
521 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
522 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
523 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
530 ac_n= ac_c='\c' ac_t=
536 for ac_prog in gawk mawk nawk awk
538 # Extract the first word of "$ac_prog", so it can be a program name with args.
539 set dummy $ac_prog; ac_word=$2
540 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
541 echo "configure:542: checking for $ac_word" >&5
542 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
543 echo $ac_n "(cached) $ac_c" 1>&6
545 if test -n "$AWK"; then
546 ac_cv_prog_AWK="$AWK" # Let the user override the test.
548 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
550 for ac_dir in $ac_dummy; do
551 test -z "$ac_dir" && ac_dir=.
552 if test -f $ac_dir/$ac_word; then
553 ac_cv_prog_AWK="$ac_prog"
560 AWK="$ac_cv_prog_AWK"
561 if test -n "$AWK"; then
562 echo "$ac_t""$AWK" 1>&6
564 echo "$ac_t""no" 1>&6
567 test -n "$AWK" && break
571 echo $ac_n "checking version of the package""... $ac_c" 1>&6
572 echo "configure:573: checking version of the package" >&5
573 if test -f .version; then
574 VERSION=`cat .version`
575 elif test -f ../.version; then
576 VERSION=`cat ../.version`
580 VERSIONHI=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $1}'`
581 VERSIONLO=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $2}'`
582 VERSIONP=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $3}'`
583 echo "$ac_t""${VERSION}" 1>&6
588 cat >> confdefs.h <<EOF
589 #define SDCC_VERSION_LO ${VERSIONLO}
592 cat >> confdefs.h <<EOF
593 #define SDCC_VERSION_HI ${VERSIONHI}
596 cat >> confdefs.h <<EOF
597 #define SDCC_VERSION_P ${VERSIONP}
600 cat >> confdefs.h <<EOF
601 #define SDCC_VERSION_STR "${VERSION}"
604 sdcc_cv_version=$VERSION
605 sdcc_cv_versionhi=$VERSIONHI
606 sdcc_cv_versionlo=$VERSIONLO
607 sdcc_cv_versionp=$VERSIONP
611 # Extract the first word of "gcc", so it can be a program name with args.
612 set dummy gcc; ac_word=$2
613 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
614 echo "configure:615: checking for $ac_word" >&5
615 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
616 echo $ac_n "(cached) $ac_c" 1>&6
618 if test -n "$CC"; then
619 ac_cv_prog_CC="$CC" # Let the user override the test.
621 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
623 for ac_dir in $ac_dummy; do
624 test -z "$ac_dir" && ac_dir=.
625 if test -f $ac_dir/$ac_word; then
634 if test -n "$CC"; then
635 echo "$ac_t""$CC" 1>&6
637 echo "$ac_t""no" 1>&6
640 if test -z "$CC"; then
641 # Extract the first word of "cc", so it can be a program name with args.
642 set dummy cc; ac_word=$2
643 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
644 echo "configure:645: checking for $ac_word" >&5
645 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
646 echo $ac_n "(cached) $ac_c" 1>&6
648 if test -n "$CC"; then
649 ac_cv_prog_CC="$CC" # Let the user override the test.
651 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
654 for ac_dir in $ac_dummy; do
655 test -z "$ac_dir" && ac_dir=.
656 if test -f $ac_dir/$ac_word; then
657 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
666 if test $ac_prog_rejected = yes; then
667 # We found a bogon in the path, so make sure we never use it.
668 set dummy $ac_cv_prog_CC
670 if test $# -gt 0; then
671 # We chose a different compiler from the bogus one.
672 # However, it has the same basename, so the bogon will be chosen
673 # first if we set CC to just the basename; use the full file name.
675 set dummy "$ac_dir/$ac_word" "$@"
683 if test -n "$CC"; then
684 echo "$ac_t""$CC" 1>&6
686 echo "$ac_t""no" 1>&6
689 if test -z "$CC"; then
692 # Extract the first word of "cl", so it can be a program name with args.
693 set dummy cl; ac_word=$2
694 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
695 echo "configure:696: checking for $ac_word" >&5
696 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
697 echo $ac_n "(cached) $ac_c" 1>&6
699 if test -n "$CC"; then
700 ac_cv_prog_CC="$CC" # Let the user override the test.
702 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
704 for ac_dir in $ac_dummy; do
705 test -z "$ac_dir" && ac_dir=.
706 if test -f $ac_dir/$ac_word; then
715 if test -n "$CC"; then
716 echo "$ac_t""$CC" 1>&6
718 echo "$ac_t""no" 1>&6
723 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
726 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
727 echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
730 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
731 ac_cpp='$CPP $CPPFLAGS'
732 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
733 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
734 cross_compiling=$ac_cv_prog_cc_cross
736 cat > conftest.$ac_ext << EOF
738 #line 739 "configure"
739 #include "confdefs.h"
743 if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
744 ac_cv_prog_cc_works=yes
745 # If we can't run a trivial program, we are probably using a cross compiler.
746 if (./conftest; exit) 2>/dev/null; then
747 ac_cv_prog_cc_cross=no
749 ac_cv_prog_cc_cross=yes
752 echo "configure: failed program was:" >&5
753 cat conftest.$ac_ext >&5
754 ac_cv_prog_cc_works=no
758 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
759 ac_cpp='$CPP $CPPFLAGS'
760 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
761 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
762 cross_compiling=$ac_cv_prog_cc_cross
764 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
765 if test $ac_cv_prog_cc_works = no; then
766 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
768 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
769 echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
770 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
771 cross_compiling=$ac_cv_prog_cc_cross
773 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
774 echo "configure:775: checking whether we are using GNU C" >&5
775 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
776 echo $ac_n "(cached) $ac_c" 1>&6
778 cat > conftest.c <<EOF
783 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
790 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
792 if test $ac_cv_prog_gcc = yes; then
798 ac_test_CFLAGS="${CFLAGS+set}"
799 ac_save_CFLAGS="$CFLAGS"
801 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
802 echo "configure:803: checking whether ${CC-cc} accepts -g" >&5
803 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
804 echo $ac_n "(cached) $ac_c" 1>&6
806 echo 'void f(){}' > conftest.c
807 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
816 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
817 if test "$ac_test_CFLAGS" = set; then
818 CFLAGS="$ac_save_CFLAGS"
819 elif test $ac_cv_prog_cc_g = yes; then
820 if test "$GCC" = yes; then
826 if test "$GCC" = yes; then
833 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
835 # Extract the first word of "$ac_prog", so it can be a program name with args.
836 set dummy $ac_prog; ac_word=$2
837 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
838 echo "configure:839: checking for $ac_word" >&5
839 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
840 echo $ac_n "(cached) $ac_c" 1>&6
842 if test -n "$CXX"; then
843 ac_cv_prog_CXX="$CXX" # Let the user override the test.
845 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
847 for ac_dir in $ac_dummy; do
848 test -z "$ac_dir" && ac_dir=.
849 if test -f $ac_dir/$ac_word; then
850 ac_cv_prog_CXX="$ac_prog"
857 CXX="$ac_cv_prog_CXX"
858 if test -n "$CXX"; then
859 echo "$ac_t""$CXX" 1>&6
861 echo "$ac_t""no" 1>&6
864 test -n "$CXX" && break
866 test -n "$CXX" || CXX="gcc"
869 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
870 echo "configure:871: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
873 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
874 ac_cpp='$CXXCPP $CPPFLAGS'
875 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
876 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
877 cross_compiling=$ac_cv_prog_cxx_cross
879 cat > conftest.$ac_ext << EOF
881 #line 882 "configure"
882 #include "confdefs.h"
884 int main(){return(0);}
886 if { (eval echo configure:887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
887 ac_cv_prog_cxx_works=yes
888 # If we can't run a trivial program, we are probably using a cross compiler.
889 if (./conftest; exit) 2>/dev/null; then
890 ac_cv_prog_cxx_cross=no
892 ac_cv_prog_cxx_cross=yes
895 echo "configure: failed program was:" >&5
896 cat conftest.$ac_ext >&5
897 ac_cv_prog_cxx_works=no
901 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
902 ac_cpp='$CPP $CPPFLAGS'
903 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
904 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
905 cross_compiling=$ac_cv_prog_cc_cross
907 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
908 if test $ac_cv_prog_cxx_works = no; then
909 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
911 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
912 echo "configure:913: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
913 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
914 cross_compiling=$ac_cv_prog_cxx_cross
916 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
917 echo "configure:918: checking whether we are using GNU C++" >&5
918 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
919 echo $ac_n "(cached) $ac_c" 1>&6
921 cat > conftest.C <<EOF
926 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
933 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
935 if test $ac_cv_prog_gxx = yes; then
941 ac_test_CXXFLAGS="${CXXFLAGS+set}"
942 ac_save_CXXFLAGS="$CXXFLAGS"
944 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
945 echo "configure:946: checking whether ${CXX-g++} accepts -g" >&5
946 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
947 echo $ac_n "(cached) $ac_c" 1>&6
949 echo 'void f(){}' > conftest.cc
950 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
959 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
960 if test "$ac_test_CXXFLAGS" = set; then
961 CXXFLAGS="$ac_save_CXXFLAGS"
962 elif test $ac_cv_prog_cxx_g = yes; then
963 if test "$GXX" = yes; then
969 if test "$GXX" = yes; then
976 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
977 echo "configure:978: checking how to run the C preprocessor" >&5
978 # On Suns, sometimes $CPP names a directory.
979 if test -n "$CPP" && test -d "$CPP"; then
982 if test -z "$CPP"; then
983 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
984 echo $ac_n "(cached) $ac_c" 1>&6
986 # This must be in double quotes, not single quotes, because CPP may get
987 # substituted into the Makefile and "${CC-cc}" will confuse make.
989 # On the NeXT, cc -E runs the code through the compiler's parser,
990 # not just through cpp.
991 cat > conftest.$ac_ext <<EOF
992 #line 993 "configure"
993 #include "confdefs.h"
997 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
998 { (eval echo configure:999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
999 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1000 if test -z "$ac_err"; then
1004 echo "configure: failed program was:" >&5
1005 cat conftest.$ac_ext >&5
1007 CPP="${CC-cc} -E -traditional-cpp"
1008 cat > conftest.$ac_ext <<EOF
1009 #line 1010 "configure"
1010 #include "confdefs.h"
1014 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1015 { (eval echo configure:1016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1016 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1017 if test -z "$ac_err"; then
1021 echo "configure: failed program was:" >&5
1022 cat conftest.$ac_ext >&5
1024 CPP="${CC-cc} -nologo -E"
1025 cat > conftest.$ac_ext <<EOF
1026 #line 1027 "configure"
1027 #include "confdefs.h"
1031 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1032 { (eval echo configure:1033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1033 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1034 if test -z "$ac_err"; then
1038 echo "configure: failed program was:" >&5
1039 cat conftest.$ac_ext >&5
1048 ac_cv_prog_CPP="$CPP"
1050 CPP="$ac_cv_prog_CPP"
1052 ac_cv_prog_CPP="$CPP"
1054 echo "$ac_t""$CPP" 1>&6
1057 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1058 if test -f $ac_dir/install-sh; then
1060 ac_install_sh="$ac_aux_dir/install-sh -c"
1062 elif test -f $ac_dir/install.sh; then
1064 ac_install_sh="$ac_aux_dir/install.sh -c"
1068 if test -z "$ac_aux_dir"; then
1069 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1071 ac_config_guess=$ac_aux_dir/config.guess
1072 ac_config_sub=$ac_aux_dir/config.sub
1073 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1075 # Find a good install program. We prefer a C program (faster),
1076 # so one script is as good as another. But avoid the broken or
1077 # incompatible versions:
1078 # SysV /etc/install, /usr/sbin/install
1079 # SunOS /usr/etc/install
1080 # IRIX /sbin/install
1082 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1083 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1084 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1085 # ./install, which can be erroneously created by make from ./install.sh.
1086 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1087 echo "configure:1088: checking for a BSD compatible install" >&5
1088 if test -z "$INSTALL"; then
1089 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1090 echo $ac_n "(cached) $ac_c" 1>&6
1092 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1093 for ac_dir in $PATH; do
1094 # Account for people who put trailing slashes in PATH elements.
1096 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1098 # OSF1 and SCO ODT 3.0 have their own names for install.
1099 # Don't use installbsd from OSF since it installs stuff as root
1101 for ac_prog in ginstall scoinst install; do
1102 if test -f $ac_dir/$ac_prog; then
1103 if test $ac_prog = install &&
1104 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1105 # AIX install. It has an incompatible calling convention.
1108 ac_cv_path_install="$ac_dir/$ac_prog -c"
1119 if test "${ac_cv_path_install+set}" = set; then
1120 INSTALL="$ac_cv_path_install"
1122 # As a last resort, use the slow shell script. We don't cache a
1123 # path for INSTALL within a source directory, because that will
1124 # break other packages using the cache if that directory is
1125 # removed, or if the path is relative.
1126 INSTALL="$ac_install_sh"
1129 echo "$ac_t""$INSTALL" 1>&6
1131 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1132 # It thinks the first close brace ends the variable substitution.
1133 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1135 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1137 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1139 # Extract the first word of "ranlib", so it can be a program name with args.
1140 set dummy ranlib; ac_word=$2
1141 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1142 echo "configure:1143: checking for $ac_word" >&5
1143 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1144 echo $ac_n "(cached) $ac_c" 1>&6
1146 if test -n "$RANLIB"; then
1147 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1149 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1151 for ac_dir in $ac_dummy; do
1152 test -z "$ac_dir" && ac_dir=.
1153 if test -f $ac_dir/$ac_word; then
1154 ac_cv_prog_RANLIB="ranlib"
1159 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1162 RANLIB="$ac_cv_prog_RANLIB"
1163 if test -n "$RANLIB"; then
1164 echo "$ac_t""$RANLIB" 1>&6
1166 echo "$ac_t""no" 1>&6
1169 # Extract the first word of "flex", so it can be a program name with args.
1170 set dummy flex; 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_LEX'+set}'`\" = set"; then
1174 echo $ac_n "(cached) $ac_c" 1>&6
1176 if test -n "$LEX"; then
1177 ac_cv_prog_LEX="$LEX" # 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_LEX="flex"
1189 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1192 LEX="$ac_cv_prog_LEX"
1193 if test -n "$LEX"; then
1194 echo "$ac_t""$LEX" 1>&6
1196 echo "$ac_t""no" 1>&6
1199 if test -z "$LEXLIB"
1205 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1206 echo "configure:1207: checking for yywrap in -l$ac_lib" >&5
1207 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1208 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1209 echo $ac_n "(cached) $ac_c" 1>&6
1211 ac_save_LIBS="$LIBS"
1212 LIBS="-l$ac_lib $LIBS"
1213 cat > conftest.$ac_ext <<EOF
1214 #line 1215 "configure"
1215 #include "confdefs.h"
1216 /* Override any gcc2 internal prototype to avoid an error. */
1217 /* We use char because int might match the return type of a gcc2
1218 builtin and then its argument prototype would still apply. */
1225 if { (eval echo configure:1226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1227 eval "ac_cv_lib_$ac_lib_var=yes"
1229 echo "configure: failed program was:" >&5
1230 cat conftest.$ac_ext >&5
1232 eval "ac_cv_lib_$ac_lib_var=no"
1235 LIBS="$ac_save_LIBS"
1238 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1239 echo "$ac_t""yes" 1>&6
1242 echo "$ac_t""no" 1>&6
1247 # Extract the first word of "bison", so it can be a program name with args.
1248 set dummy bison; ac_word=$2
1249 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1250 echo "configure:1251: checking for $ac_word" >&5
1251 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1252 echo $ac_n "(cached) $ac_c" 1>&6
1254 if test -n "$YACC"; then
1255 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1257 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1259 for ac_dir in $ac_dummy; do
1260 test -z "$ac_dir" && ac_dir=.
1261 if test -f $ac_dir/$ac_word; then
1262 ac_cv_prog_YACC="bison -y"
1267 test -z "$ac_cv_prog_YACC" && ac_cv_prog_YACC=":"
1270 YACC="$ac_cv_prog_YACC"
1271 if test -n "$YACC"; then
1272 echo "$ac_t""$YACC" 1>&6
1274 echo "$ac_t""no" 1>&6
1277 # Extract the first word of "autoconf", so it can be a program name with args.
1278 set dummy autoconf; ac_word=$2
1279 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1280 echo "configure:1281: checking for $ac_word" >&5
1281 if eval "test \"`echo '$''{'ac_cv_prog_AUTOCONF'+set}'`\" = set"; then
1282 echo $ac_n "(cached) $ac_c" 1>&6
1284 if test -n "$AUTOCONF"; then
1285 ac_cv_prog_AUTOCONF="$AUTOCONF" # Let the user override the test.
1287 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1289 for ac_dir in $ac_dummy; do
1290 test -z "$ac_dir" && ac_dir=.
1291 if test -f $ac_dir/$ac_word; then
1292 ac_cv_prog_AUTOCONF="autoconf"
1297 test -z "$ac_cv_prog_AUTOCONF" && ac_cv_prog_AUTOCONF=":"
1300 AUTOCONF="$ac_cv_prog_AUTOCONF"
1301 if test -n "$AUTOCONF"; then
1302 echo "$ac_t""$AUTOCONF" 1>&6
1304 echo "$ac_t""no" 1>&6
1307 # Extract the first word of "as", so it can be a program name with args.
1308 set dummy as; ac_word=$2
1309 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1310 echo "configure:1311: checking for $ac_word" >&5
1311 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1312 echo $ac_n "(cached) $ac_c" 1>&6
1314 if test -n "$AS"; then
1315 ac_cv_prog_AS="$AS" # Let the user override the test.
1317 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1319 for ac_dir in $ac_dummy; do
1320 test -z "$ac_dir" && ac_dir=.
1321 if test -f $ac_dir/$ac_word; then
1327 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS=":"
1331 if test -n "$AS"; then
1332 echo "$ac_t""$AS" 1>&6
1334 echo "$ac_t""no" 1>&6
1337 # Extract the first word of "cp", so it can be a program name with args.
1338 set dummy cp; ac_word=$2
1339 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1340 echo "configure:1341: checking for $ac_word" >&5
1341 if eval "test \"`echo '$''{'ac_cv_prog_CP'+set}'`\" = set"; then
1342 echo $ac_n "(cached) $ac_c" 1>&6
1344 if test -n "$CP"; then
1345 ac_cv_prog_CP="$CP" # Let the user override the test.
1347 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1349 for ac_dir in $ac_dummy; do
1350 test -z "$ac_dir" && ac_dir=.
1351 if test -f $ac_dir/$ac_word; then
1357 test -z "$ac_cv_prog_CP" && ac_cv_prog_CP=":"
1361 if test -n "$CP"; then
1362 echo "$ac_t""$CP" 1>&6
1364 echo "$ac_t""no" 1>&6
1370 if test "$YACC" = ":"; then
1371 { echo "configure: error: Cannot find required program bison." 1>&2; exit 1; }
1374 if test "$LEX" = ":"; then
1375 { echo "configure: error: Cannot find required program lex." 1>&2; exit 1; }
1380 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1381 ac_cpp='$CPP $CPPFLAGS'
1382 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1383 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1384 cross_compiling=$ac_cv_prog_cc_cross
1387 # Checking for header files.
1388 # ===========================================================================
1389 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1390 echo "configure:1391: checking for ANSI C header files" >&5
1391 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1392 echo $ac_n "(cached) $ac_c" 1>&6
1394 cat > conftest.$ac_ext <<EOF
1395 #line 1396 "configure"
1396 #include "confdefs.h"
1402 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1403 { (eval echo configure:1404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1404 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1405 if test -z "$ac_err"; then
1407 ac_cv_header_stdc=yes
1410 echo "configure: failed program was:" >&5
1411 cat conftest.$ac_ext >&5
1413 ac_cv_header_stdc=no
1417 if test $ac_cv_header_stdc = yes; then
1418 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1419 cat > conftest.$ac_ext <<EOF
1420 #line 1421 "configure"
1421 #include "confdefs.h"
1424 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1425 egrep "memchr" >/dev/null 2>&1; then
1429 ac_cv_header_stdc=no
1435 if test $ac_cv_header_stdc = yes; then
1436 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1437 cat > conftest.$ac_ext <<EOF
1438 #line 1439 "configure"
1439 #include "confdefs.h"
1442 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1443 egrep "free" >/dev/null 2>&1; then
1447 ac_cv_header_stdc=no
1453 if test $ac_cv_header_stdc = yes; then
1454 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1455 if test "$cross_compiling" = yes; then
1458 cat > conftest.$ac_ext <<EOF
1459 #line 1460 "configure"
1460 #include "confdefs.h"
1462 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1463 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1464 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1465 int main () { int i; for (i = 0; i < 256; i++)
1466 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1470 if { (eval echo configure:1471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1474 echo "configure: failed program was:" >&5
1475 cat conftest.$ac_ext >&5
1477 ac_cv_header_stdc=no
1485 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1486 if test $ac_cv_header_stdc = yes; then
1487 cat >> confdefs.h <<\EOF
1488 #define STDC_HEADERS 1
1493 for ac_hdr in getopt.h
1495 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1496 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1497 echo "configure:1498: checking for $ac_hdr" >&5
1498 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1499 echo $ac_n "(cached) $ac_c" 1>&6
1501 cat > conftest.$ac_ext <<EOF
1502 #line 1503 "configure"
1503 #include "confdefs.h"
1506 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1507 { (eval echo configure:1508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1508 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1509 if test -z "$ac_err"; then
1511 eval "ac_cv_header_$ac_safe=yes"
1514 echo "configure: failed program was:" >&5
1515 cat conftest.$ac_ext >&5
1517 eval "ac_cv_header_$ac_safe=no"
1521 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1522 echo "$ac_t""yes" 1>&6
1523 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1524 cat >> confdefs.h <<EOF
1525 #define $ac_tr_hdr 1
1529 echo "$ac_t""no" 1>&6
1533 for ac_hdr in unistd.h
1535 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1536 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1537 echo "configure:1538: checking for $ac_hdr" >&5
1538 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1539 echo $ac_n "(cached) $ac_c" 1>&6
1541 cat > conftest.$ac_ext <<EOF
1542 #line 1543 "configure"
1543 #include "confdefs.h"
1546 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1547 { (eval echo configure:1548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1548 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1549 if test -z "$ac_err"; then
1551 eval "ac_cv_header_$ac_safe=yes"
1554 echo "configure: failed program was:" >&5
1555 cat conftest.$ac_ext >&5
1557 eval "ac_cv_header_$ac_safe=no"
1561 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1562 echo "$ac_t""yes" 1>&6
1563 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1564 cat >> confdefs.h <<EOF
1565 #define $ac_tr_hdr 1
1569 echo "$ac_t""no" 1>&6
1573 for ac_hdr in endian.h
1575 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1576 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1577 echo "configure:1578: checking for $ac_hdr" >&5
1578 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1579 echo $ac_n "(cached) $ac_c" 1>&6
1581 cat > conftest.$ac_ext <<EOF
1582 #line 1583 "configure"
1583 #include "confdefs.h"
1586 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1587 { (eval echo configure:1588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1588 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1589 if test -z "$ac_err"; then
1591 eval "ac_cv_header_$ac_safe=yes"
1594 echo "configure: failed program was:" >&5
1595 cat conftest.$ac_ext >&5
1597 eval "ac_cv_header_$ac_safe=no"
1601 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1602 echo "$ac_t""yes" 1>&6
1603 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1604 cat >> confdefs.h <<EOF
1605 #define $ac_tr_hdr 1
1609 echo "$ac_t""no" 1>&6
1613 for ac_hdr in sys/isa_defs.h
1615 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1616 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1617 echo "configure:1618: checking for $ac_hdr" >&5
1618 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1619 echo $ac_n "(cached) $ac_c" 1>&6
1621 cat > conftest.$ac_ext <<EOF
1622 #line 1623 "configure"
1623 #include "confdefs.h"
1626 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1627 { (eval echo configure:1628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1628 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1629 if test -z "$ac_err"; then
1631 eval "ac_cv_header_$ac_safe=yes"
1634 echo "configure: failed program was:" >&5
1635 cat conftest.$ac_ext >&5
1637 eval "ac_cv_header_$ac_safe=no"
1641 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1642 echo "$ac_t""yes" 1>&6
1643 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1644 cat >> confdefs.h <<EOF
1645 #define $ac_tr_hdr 1
1649 echo "$ac_t""no" 1>&6
1653 for ac_hdr in sys/socket.h
1655 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1656 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1657 echo "configure:1658: checking for $ac_hdr" >&5
1658 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1659 echo $ac_n "(cached) $ac_c" 1>&6
1661 cat > conftest.$ac_ext <<EOF
1662 #line 1663 "configure"
1663 #include "confdefs.h"
1666 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1667 { (eval echo configure:1668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1668 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1669 if test -z "$ac_err"; then
1671 eval "ac_cv_header_$ac_safe=yes"
1674 echo "configure: failed program was:" >&5
1675 cat conftest.$ac_ext >&5
1677 eval "ac_cv_header_$ac_safe=no"
1681 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1682 echo "$ac_t""yes" 1>&6
1683 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1684 cat >> confdefs.h <<EOF
1685 #define $ac_tr_hdr 1
1689 echo "$ac_t""no" 1>&6
1694 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1696 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1697 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1698 echo "configure:1699: checking for $ac_hdr that defines DIR" >&5
1699 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1700 echo $ac_n "(cached) $ac_c" 1>&6
1702 cat > conftest.$ac_ext <<EOF
1703 #line 1704 "configure"
1704 #include "confdefs.h"
1705 #include <sys/types.h>
1711 if { (eval echo configure:1712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1713 eval "ac_cv_header_dirent_$ac_safe=yes"
1715 echo "configure: failed program was:" >&5
1716 cat conftest.$ac_ext >&5
1718 eval "ac_cv_header_dirent_$ac_safe=no"
1722 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1723 echo "$ac_t""yes" 1>&6
1724 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1725 cat >> confdefs.h <<EOF
1726 #define $ac_tr_hdr 1
1728 ac_header_dirent=$ac_hdr; break
1730 echo "$ac_t""no" 1>&6
1733 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1734 if test $ac_header_dirent = dirent.h; then
1735 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1736 echo "configure:1737: checking for opendir in -ldir" >&5
1737 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1738 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1739 echo $ac_n "(cached) $ac_c" 1>&6
1741 ac_save_LIBS="$LIBS"
1743 cat > conftest.$ac_ext <<EOF
1744 #line 1745 "configure"
1745 #include "confdefs.h"
1746 /* Override any gcc2 internal prototype to avoid an error. */
1747 /* We use char because int might match the return type of a gcc2
1748 builtin and then its argument prototype would still apply. */
1755 if { (eval echo configure:1756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1757 eval "ac_cv_lib_$ac_lib_var=yes"
1759 echo "configure: failed program was:" >&5
1760 cat conftest.$ac_ext >&5
1762 eval "ac_cv_lib_$ac_lib_var=no"
1765 LIBS="$ac_save_LIBS"
1768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1769 echo "$ac_t""yes" 1>&6
1772 echo "$ac_t""no" 1>&6
1776 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1777 echo "configure:1778: checking for opendir in -lx" >&5
1778 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1779 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1780 echo $ac_n "(cached) $ac_c" 1>&6
1782 ac_save_LIBS="$LIBS"
1784 cat > conftest.$ac_ext <<EOF
1785 #line 1786 "configure"
1786 #include "confdefs.h"
1787 /* Override any gcc2 internal prototype to avoid an error. */
1788 /* We use char because int might match the return type of a gcc2
1789 builtin and then its argument prototype would still apply. */
1796 if { (eval echo configure:1797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1798 eval "ac_cv_lib_$ac_lib_var=yes"
1800 echo "configure: failed program was:" >&5
1801 cat conftest.$ac_ext >&5
1803 eval "ac_cv_lib_$ac_lib_var=no"
1806 LIBS="$ac_save_LIBS"
1809 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1810 echo "$ac_t""yes" 1>&6
1813 echo "$ac_t""no" 1>&6
1819 # This must be after CPP
1821 echo $ac_n "checking which header file defines FD_ macros""... $ac_c" 1>&6
1822 echo "configure:1823: checking which header file defines FD_ macros" >&5
1823 if eval "test \"`echo '$''{'s51_cv_fd'+set}'`\" = set"; then
1824 echo $ac_n "(cached) $ac_c" 1>&6
1826 sdcc_cv_fd="unknown"
1827 cat > conftest.$ac_ext <<EOF
1828 #line 1829 "configure"
1829 #include "confdefs.h"
1831 #include <sys/time.h>
1836 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1837 egrep "yes" >/dev/null 2>&1; then
1839 sdcc_cv_fd="<sys/time.h>"
1843 cat > conftest.$ac_ext <<EOF
1844 #line 1845 "configure"
1845 #include "confdefs.h"
1847 #include <sys/types.h>
1852 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1853 egrep "yes" >/dev/null 2>&1; then
1855 sdcc_cv_fd="<sys/types.h>"
1859 cat > conftest.$ac_ext <<EOF
1860 #line 1861 "configure"
1861 #include "confdefs.h"
1863 #include <sys/select.h>
1868 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1869 egrep "yes" >/dev/null 2>&1; then
1871 sdcc_cv_fd="<sys/types.h>"
1877 echo "$ac_t""$s51_cv_fd" 1>&6
1879 cat >> confdefs.h <<\EOF
1880 #define FD_HEADER_OK 0
1883 if echo $sdcc_cv_fd|grep time >/dev/null 2>&1; then
1884 cat >> confdefs.h <<\EOF
1885 #define FD_NEED_TIME_H 1
1888 cat >> confdefs.h <<\EOF
1889 #define FD_HEADER_OK 1
1893 cat >> confdefs.h <<\EOF
1894 #define FD_NEED_TIME_H 0
1898 if echo $sdcc_cv_fd|grep types >/dev/null 2>&1; then
1899 cat >> confdefs.h <<\EOF
1900 #define FD_NEED_TYPES_H 1
1903 cat >> confdefs.h <<\EOF
1904 #define FD_HEADER_OK 1
1908 cat >> confdefs.h <<\EOF
1909 #define FD_NEED_TYPES_H 0
1913 if echo $sdcc_cv_fd|grep select >/dev/null 2>&1; then
1914 cat >> confdefs.h <<\EOF
1915 #define FD_NEED_SELECT_H 1
1918 cat >> confdefs.h <<\EOF
1919 #define FD_HEADER_OK 1
1923 cat >> confdefs.h <<\EOF
1924 #define FD_NEED_SELECT_H 0
1929 cat >> confdefs.h <<EOF
1930 #define HEADER_FD ${sdcc_cv_fd}
1935 # Checking for functions
1936 # ===========================================================================
1937 for ac_func in strlen strcpy strcat strstr strcmp strerror strtok strdup
1939 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1940 echo "configure:1941: checking for $ac_func" >&5
1941 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1942 echo $ac_n "(cached) $ac_c" 1>&6
1944 cat > conftest.$ac_ext <<EOF
1945 #line 1946 "configure"
1946 #include "confdefs.h"
1947 /* System header to define __stub macros and hopefully few prototypes,
1948 which can conflict with char $ac_func(); below. */
1950 /* Override any gcc2 internal prototype to avoid an error. */
1951 /* We use char because int might match the return type of a gcc2
1952 builtin and then its argument prototype would still apply. */
1957 /* The GNU C library defines this for functions which it implements
1958 to always fail with ENOSYS. Some functions are actually named
1959 something starting with __ and the normal name is an alias. */
1960 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1968 if { (eval echo configure:1969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1970 eval "ac_cv_func_$ac_func=yes"
1972 echo "configure: failed program was:" >&5
1973 cat conftest.$ac_ext >&5
1975 eval "ac_cv_func_$ac_func=no"
1980 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1981 echo "$ac_t""yes" 1>&6
1982 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1983 cat >> confdefs.h <<EOF
1984 #define $ac_tr_func 1
1988 echo "$ac_t""no" 1>&6
1992 for ac_func in strchr memcpy
1994 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1995 echo "configure:1996: checking for $ac_func" >&5
1996 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1997 echo $ac_n "(cached) $ac_c" 1>&6
1999 cat > conftest.$ac_ext <<EOF
2000 #line 2001 "configure"
2001 #include "confdefs.h"
2002 /* System header to define __stub macros and hopefully few prototypes,
2003 which can conflict with char $ac_func(); below. */
2005 /* Override any gcc2 internal prototype to avoid an error. */
2006 /* We use char because int might match the return type of a gcc2
2007 builtin and then its argument prototype would still apply. */
2012 /* The GNU C library defines this for functions which it implements
2013 to always fail with ENOSYS. Some functions are actually named
2014 something starting with __ and the normal name is an alias. */
2015 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2023 if { (eval echo configure:2024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2025 eval "ac_cv_func_$ac_func=yes"
2027 echo "configure: failed program was:" >&5
2028 cat conftest.$ac_ext >&5
2030 eval "ac_cv_func_$ac_func=no"
2035 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2036 echo "$ac_t""yes" 1>&6
2037 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2038 cat >> confdefs.h <<EOF
2039 #define $ac_tr_func 1
2043 echo "$ac_t""no" 1>&6
2047 for ac_func in fgets
2049 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2050 echo "configure:2051: checking for $ac_func" >&5
2051 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2052 echo $ac_n "(cached) $ac_c" 1>&6
2054 cat > conftest.$ac_ext <<EOF
2055 #line 2056 "configure"
2056 #include "confdefs.h"
2057 /* System header to define __stub macros and hopefully few prototypes,
2058 which can conflict with char $ac_func(); below. */
2060 /* Override any gcc2 internal prototype to avoid an error. */
2061 /* We use char because int might match the return type of a gcc2
2062 builtin and then its argument prototype would still apply. */
2067 /* The GNU C library defines this for functions which it implements
2068 to always fail with ENOSYS. Some functions are actually named
2069 something starting with __ and the normal name is an alias. */
2070 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2078 if { (eval echo configure:2079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2080 eval "ac_cv_func_$ac_func=yes"
2082 echo "configure: failed program was:" >&5
2083 cat conftest.$ac_ext >&5
2085 eval "ac_cv_func_$ac_func=no"
2090 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2091 echo "$ac_t""yes" 1>&6
2092 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2093 cat >> confdefs.h <<EOF
2094 #define $ac_tr_func 1
2098 echo "$ac_t""no" 1>&6
2102 for ac_func in yylex
2104 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2105 echo "configure:2106: checking for $ac_func" >&5
2106 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2107 echo $ac_n "(cached) $ac_c" 1>&6
2109 cat > conftest.$ac_ext <<EOF
2110 #line 2111 "configure"
2111 #include "confdefs.h"
2112 /* System header to define __stub macros and hopefully few prototypes,
2113 which can conflict with char $ac_func(); below. */
2115 /* Override any gcc2 internal prototype to avoid an error. */
2116 /* We use char because int might match the return type of a gcc2
2117 builtin and then its argument prototype would still apply. */
2122 /* The GNU C library defines this for functions which it implements
2123 to always fail with ENOSYS. Some functions are actually named
2124 something starting with __ and the normal name is an alias. */
2125 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2133 if { (eval echo configure:2134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2135 eval "ac_cv_func_$ac_func=yes"
2137 echo "configure: failed program was:" >&5
2138 cat conftest.$ac_ext >&5
2140 eval "ac_cv_func_$ac_func=no"
2145 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2146 echo "$ac_t""yes" 1>&6
2147 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2148 cat >> confdefs.h <<EOF
2149 #define $ac_tr_func 1
2153 echo "$ac_t""no" 1>&6
2158 # check if -lsocket && -lxnet is required to compile socket stuff
2160 echo $ac_n "checking for library containing socket""... $ac_c" 1>&6
2161 echo "configure:2162: checking for library containing socket" >&5
2162 if eval "test \"`echo '$''{'ac_cv_search_socket'+set}'`\" = set"; then
2163 echo $ac_n "(cached) $ac_c" 1>&6
2165 ac_func_search_save_LIBS="$LIBS"
2166 ac_cv_search_socket="no"
2167 cat > conftest.$ac_ext <<EOF
2168 #line 2169 "configure"
2169 #include "confdefs.h"
2170 /* Override any gcc2 internal prototype to avoid an error. */
2171 /* We use char because int might match the return type of a gcc2
2172 builtin and then its argument prototype would still apply. */
2179 if { (eval echo configure:2180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2181 ac_cv_search_socket="none required"
2183 echo "configure: failed program was:" >&5
2184 cat conftest.$ac_ext >&5
2187 test "$ac_cv_search_socket" = "no" && for i in socket; do
2188 LIBS="-l$i $ac_func_search_save_LIBS"
2189 cat > conftest.$ac_ext <<EOF
2190 #line 2191 "configure"
2191 #include "confdefs.h"
2192 /* Override any gcc2 internal prototype to avoid an error. */
2193 /* We use char because int might match the return type of a gcc2
2194 builtin and then its argument prototype would still apply. */
2201 if { (eval echo configure:2202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2203 ac_cv_search_socket="-l$i"
2206 echo "configure: failed program was:" >&5
2207 cat conftest.$ac_ext >&5
2211 LIBS="$ac_func_search_save_LIBS"
2214 echo "$ac_t""$ac_cv_search_socket" 1>&6
2215 if test "$ac_cv_search_socket" != "no"; then
2216 test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
2222 echo $ac_n "checking for library containing inet_addr""... $ac_c" 1>&6
2223 echo "configure:2224: checking for library containing inet_addr" >&5
2224 if eval "test \"`echo '$''{'ac_cv_search_inet_addr'+set}'`\" = set"; then
2225 echo $ac_n "(cached) $ac_c" 1>&6
2227 ac_func_search_save_LIBS="$LIBS"
2228 ac_cv_search_inet_addr="no"
2229 cat > conftest.$ac_ext <<EOF
2230 #line 2231 "configure"
2231 #include "confdefs.h"
2232 /* Override any gcc2 internal prototype to avoid an error. */
2233 /* We use char because int might match the return type of a gcc2
2234 builtin and then its argument prototype would still apply. */
2241 if { (eval echo configure:2242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2243 ac_cv_search_inet_addr="none required"
2245 echo "configure: failed program was:" >&5
2246 cat conftest.$ac_ext >&5
2249 test "$ac_cv_search_inet_addr" = "no" && for i in nsl xnet; do
2250 LIBS="-l$i $ac_func_search_save_LIBS"
2251 cat > conftest.$ac_ext <<EOF
2252 #line 2253 "configure"
2253 #include "confdefs.h"
2254 /* Override any gcc2 internal prototype to avoid an error. */
2255 /* We use char because int might match the return type of a gcc2
2256 builtin and then its argument prototype would still apply. */
2263 if { (eval echo configure:2264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2265 ac_cv_search_inet_addr="-l$i"
2268 echo "configure: failed program was:" >&5
2269 cat conftest.$ac_ext >&5
2273 LIBS="$ac_func_search_save_LIBS"
2276 echo "$ac_t""$ac_cv_search_inet_addr" 1>&6
2277 if test "$ac_cv_search_inet_addr" != "no"; then
2278 test "$ac_cv_search_inet_addr" = "none required" || LIBS="$ac_cv_search_inet_addr $LIBS"
2287 # DD_COPT macro checks if the compiler specified as the 1st parameter
2288 # supports option specified as the 2nd parameter
2289 # For example: DD_CPORT(CXX, fPIC)
2294 # Checking characteristics of compilers and other programs
2295 # --------------------------------------------------------
2296 echo $ac_n "checking whether preprocessor accepts -MM or -M""... $ac_c" 1>&6
2297 echo "configure:2298: checking whether preprocessor accepts -MM or -M" >&5
2298 if eval "test \"`echo '$''{'sdcc_cv_MM'+set}'`\" = set"; then
2299 echo $ac_n "(cached) $ac_c" 1>&6
2301 echo "#include <stdio.h>" >_test_.c
2303 $CPP -v -MM _test_.c 1>&5 2>&5
2304 if test "$?" = "0"; then
2312 echo "$ac_t""$sdcc_cv_MM" 1>&6
2316 # This is the first time when CFLAGS are set/modified!!
2318 echo $ac_n "checking whether $CC accepts -ggdb""... $ac_c" 1>&6
2319 echo "configure:2320: checking whether $CC accepts -ggdb" >&5
2320 if eval "test \"`echo '$''{'sdcc_cv_CCggdb'+set}'`\" = set"; then
2321 echo $ac_n "(cached) $ac_c" 1>&6
2327 $CC -v -ggdb -c _test_.c 1>&5 2>&5
2328 if test "$?" = "0"; then
2329 sdcc_cv_CCggdb="yes"
2333 rm -f _test_.* a.out
2336 echo "$ac_t""$sdcc_cv_CCggdb" 1>&6
2338 if test "$sdcc_cv_CCggdb" = "yes"; then
2343 echo $ac_n "checking whether $CC accepts -pipe""... $ac_c" 1>&6
2344 echo "configure:2345: checking whether $CC accepts -pipe" >&5
2345 if eval "test \"`echo '$''{'sdcc_cv_CCpipe'+set}'`\" = set"; then
2346 echo $ac_n "(cached) $ac_c" 1>&6
2352 $CC -v -pipe -c _test_.c 1>&5 2>&5
2353 if test "$?" = "0"; then
2354 sdcc_cv_CCpipe="yes"
2358 rm -f _test_.* a.out
2361 echo "$ac_t""$sdcc_cv_CCpipe" 1>&6
2363 if test "$sdcc_cv_CCpipe" = "yes"; then
2364 CFLAGS="$CFLAGS -pipe"
2368 # Checks for typedefs, structures, and compiler characteristics.
2369 # ===========================================================================
2370 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2371 echo "configure:2372: checking return type of signal handlers" >&5
2372 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2373 echo $ac_n "(cached) $ac_c" 1>&6
2375 cat > conftest.$ac_ext <<EOF
2376 #line 2377 "configure"
2377 #include "confdefs.h"
2378 #include <sys/types.h>
2384 extern "C" void (*signal (int, void (*)(int)))(int);
2386 void (*signal ()) ();
2393 if { (eval echo configure:2394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2395 ac_cv_type_signal=void
2397 echo "configure: failed program was:" >&5
2398 cat conftest.$ac_ext >&5
2400 ac_cv_type_signal=int
2405 echo "$ac_t""$ac_cv_type_signal" 1>&6
2406 cat >> confdefs.h <<EOF
2407 #define RETSIGTYPE $ac_cv_type_signal
2414 if test "${prefix}" = "NONE"; then
2419 if test "${datadir}" = "\${prefix}/share"; then
2420 sdcc_datadir=${prefix}/share
2422 sdcc_datadir=${datadir}
2424 cat >> confdefs.h <<EOF
2425 #define STANDARD_INCLUDE_DIR "${sdcc_datadir}/include"
2428 cat >> confdefs.h <<EOF
2429 #define SDCC_INCLUDE_DIR "${sdcc_datadir}/include"
2432 cat >> confdefs.h <<EOF
2433 #define SDCC_LIB_DIR "${sdcc_datadir}/lib"
2436 cat >> confdefs.h <<EOF
2437 #define STD_LIB "libsdcc"
2440 cat >> confdefs.h <<EOF
2441 #define STD_INT_LIB "libint"
2444 cat >> confdefs.h <<EOF
2445 #define STD_LONG_LIB "liblong"
2448 cat >> confdefs.h <<EOF
2449 #define STD_FP_LIB "libfloat"
2452 cat >> confdefs.h <<EOF
2453 #define STD_DS390_LIB "libds390"
2457 cat >> confdefs.h <<EOF
2458 #define PREFIX "${prefix}"
2461 cat >> confdefs.h <<EOF
2462 #define DATADIR "${sdcc_datadir}"
2465 cat >> confdefs.h <<EOF
2466 #define SRCDIR "${config_in}"
2470 # mlh: dont compile libgc if it's available locally
2471 echo $ac_n "checking for GC_malloc in -lgc""... $ac_c" 1>&6
2472 echo "configure:2473: checking for GC_malloc in -lgc" >&5
2473 ac_lib_var=`echo gc'_'GC_malloc | sed 'y%./+-%__p_%'`
2474 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2475 echo $ac_n "(cached) $ac_c" 1>&6
2477 ac_save_LIBS="$LIBS"
2479 cat > conftest.$ac_ext <<EOF
2480 #line 2481 "configure"
2481 #include "confdefs.h"
2482 /* Override any gcc2 internal prototype to avoid an error. */
2483 /* We use char because int might match the return type of a gcc2
2484 builtin and then its argument prototype would still apply. */
2491 if { (eval echo configure:2492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2493 eval "ac_cv_lib_$ac_lib_var=yes"
2495 echo "configure: failed program was:" >&5
2496 cat conftest.$ac_ext >&5
2498 eval "ac_cv_lib_$ac_lib_var=no"
2501 LIBS="$ac_save_LIBS"
2504 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2505 echo "$ac_t""yes" 1>&6
2508 echo "$ac_t""no" 1>&6
2513 # Now handle the port selection
2514 # Check whether --enable-z80-port or --disable-z80-port was given.
2515 if test "${enable_z80_port+set}" = set; then
2516 enableval="$enable_z80_port"
2520 if test "$enable_z80_port" = "no"; then
2521 cat >> confdefs.h <<EOF
2522 #define OPT_DISABLE_Z80 1
2526 cat >> confdefs.h <<EOF
2527 #define OPT_DISABLE_Z80 0
2532 # Check whether --enable-gbz80-port or --disable-gbz80-port was given.
2533 if test "${enable_gbz80_port+set}" = set; then
2534 enableval="$enable_gbz80_port"
2538 if test "$enable_gbz80_port" = "no"; then
2539 cat >> confdefs.h <<EOF
2540 #define OPT_DISABLE_GBZ80 1
2544 cat >> confdefs.h <<EOF
2545 #define OPT_DISABLE_GBZ80 0
2550 # Check whether --enable-mcs51-port or --disable-mcs51-port was given.
2551 if test "${enable_mcs51_port+set}" = set; then
2552 enableval="$enable_mcs51_port"
2556 if test "$enable_mcs51_port" = "no"; then
2557 cat >> confdefs.h <<EOF
2558 #define OPT_DISABLE_MCS51 1
2562 cat >> confdefs.h <<EOF
2563 #define OPT_DISABLE_MCS51 0
2568 # Check whether --enable-avr-port or --disable-avr-port was given.
2569 if test "${enable_avr_port+set}" = set; then
2570 enableval="$enable_avr_port"
2574 if test "$enable_avr_port" = "no"; then
2575 cat >> confdefs.h <<EOF
2576 #define OPT_DISABLE_AVR 1
2580 cat >> confdefs.h <<EOF
2581 #define OPT_DISABLE_AVR 0
2586 # Check whether --enable-boehm-gc or --disable-boehm-gc was given.
2587 if test "${enable_boehm_gc+set}" = set; then
2588 enableval="$enable_boehm_gc"
2593 if test "$enable_boehm_gc" = "no"; then
2594 cat >> confdefs.h <<\EOF
2595 #define OPT_DISABLE_GC 1
2600 cat >> confdefs.h <<\EOF
2601 #define OPT_DISABLE_GC 0
2607 # Generating output files
2608 # ===========================================================================
2611 subdirs="sim/ucsim packihx"
2613 # MLH: removed as the rules are already in Makefile.common
2617 cat > confcache <<\EOF
2618 # This file is a shell script that caches the results of configure
2619 # tests run on this system so they can be shared between configure
2620 # scripts and configure runs. It is not useful on other systems.
2621 # If it contains results you don't want to keep, you may remove or edit it.
2623 # By default, configure uses ./config.cache as the cache file,
2624 # creating it if it does not exist already. You can give configure
2625 # the --cache-file=FILE option to use a different cache file; that is
2626 # what configure does when it calls configure scripts in
2627 # subdirectories, so they share the cache.
2628 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2629 # config.status only pays attention to the cache file if you give it the
2630 # --recheck option to rerun configure.
2633 # The following way of writing the cache mishandles newlines in values,
2634 # but we know of no workaround that is simple, portable, and efficient.
2635 # So, don't put newlines in cache variables' values.
2636 # Ultrix sh set writes to stderr and can't be redirected directly,
2637 # and sets the high bit in the cache file unless we assign to the vars.
2639 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2641 # `set' does not quote correctly, so add quotes (double-quote substitution
2642 # turns \\\\ into \\, and sed turns \\ into \).
2644 -e "s/'/'\\\\''/g" \
2645 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2648 # `set' quotes correctly as required by POSIX, so do not add quotes.
2649 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2652 if cmp -s $cache_file confcache; then
2655 if test -w $cache_file; then
2656 echo "updating cache $cache_file"
2657 cat confcache > $cache_file
2659 echo "not updating unwritable cache $cache_file"
2664 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2666 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2667 # Let make expand exec_prefix.
2668 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2670 # Any assignment to VPATH causes Sun make to only execute
2671 # the first set of double-colon rules, so remove it if not needed.
2672 # If there is a colon in the path, we need to keep it.
2673 if test "x$srcdir" = x.; then
2674 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2677 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2679 DEFS=-DHAVE_CONFIG_H
2681 # Without the "./", some shells look in PATH for config.status.
2682 : ${CONFIG_STATUS=./config.status}
2684 echo creating $CONFIG_STATUS
2685 rm -f $CONFIG_STATUS
2686 cat > $CONFIG_STATUS <<EOF
2688 # Generated automatically by configure.
2689 # Run this file to recreate the current configuration.
2690 # This directory was configured as follows,
2691 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2693 # $0 $ac_configure_args
2695 # Compiler output produced by configure, useful for debugging
2696 # configure, is in ./config.log if it exists.
2698 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2701 case "\$ac_option" in
2702 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2703 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2704 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2705 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2706 echo "$CONFIG_STATUS generated by autoconf version 2.13"
2708 -help | --help | --hel | --he | --h)
2709 echo "\$ac_cs_usage"; exit 0 ;;
2710 *) echo "\$ac_cs_usage"; exit 1 ;;
2714 ac_given_srcdir=$srcdir
2715 ac_given_INSTALL="$INSTALL"
2717 trap 'rm -fr `echo "main.mk:main_in.mk
2719 support/gc/Makefile.cross
2722 support/cpp/Makefile
2723 device/include/Makefile
2725 debugger/mcs51/Makefile
2726 Makefile.common:Makefile.common.in
2727 sdccconf.h:sdccconf_in.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2729 cat >> $CONFIG_STATUS <<EOF
2731 # Protect against being on the right side of a sed subst in config.status.
2732 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2733 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2737 s%@CFLAGS@%$CFLAGS%g
2738 s%@CPPFLAGS@%$CPPFLAGS%g
2739 s%@CXXFLAGS@%$CXXFLAGS%g
2740 s%@FFLAGS@%$FFLAGS%g
2742 s%@LDFLAGS@%$LDFLAGS%g
2744 s%@exec_prefix@%$exec_prefix%g
2745 s%@prefix@%$prefix%g
2746 s%@program_transform_name@%$program_transform_name%g
2747 s%@bindir@%$bindir%g
2748 s%@sbindir@%$sbindir%g
2749 s%@libexecdir@%$libexecdir%g
2750 s%@datadir@%$datadir%g
2751 s%@sysconfdir@%$sysconfdir%g
2752 s%@sharedstatedir@%$sharedstatedir%g
2753 s%@localstatedir@%$localstatedir%g
2754 s%@libdir@%$libdir%g
2755 s%@includedir@%$includedir%g
2756 s%@oldincludedir@%$oldincludedir%g
2757 s%@infodir@%$infodir%g
2758 s%@mandir@%$mandir%g
2760 s%@VERSION@%$VERSION%g
2761 s%@VERSIONHI@%$VERSIONHI%g
2762 s%@VERSIONLO@%$VERSIONLO%g
2763 s%@VERSIONP@%$VERSIONP%g
2767 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2768 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2769 s%@INSTALL_DATA@%$INSTALL_DATA%g
2770 s%@RANLIB@%$RANLIB%g
2772 s%@LEXLIB@%$LEXLIB%g
2774 s%@AUTOCONF@%$AUTOCONF%g
2777 s%@M_OR_MM@%$M_OR_MM%g
2778 s%@HAVE_LIBGC@%$HAVE_LIBGC%g
2779 s%@DISABLE_GC@%$DISABLE_GC%g
2780 s%@subdirs@%$subdirs%g
2785 cat >> $CONFIG_STATUS <<\EOF
2787 # Split the substitutions into bite-sized pieces for seds with
2788 # small command number limits, like on Digital OSF/1 and HP-UX.
2789 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2790 ac_file=1 # Number of current file.
2791 ac_beg=1 # First line for current file.
2792 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2795 while $ac_more_lines; do
2796 if test $ac_beg -gt 1; then
2797 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2799 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2801 if test ! -s conftest.s$ac_file; then
2803 rm -f conftest.s$ac_file
2805 if test -z "$ac_sed_cmds"; then
2806 ac_sed_cmds="sed -f conftest.s$ac_file"
2808 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2810 ac_file=`expr $ac_file + 1`
2812 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2815 if test -z "$ac_sed_cmds"; then
2820 cat >> $CONFIG_STATUS <<EOF
2822 CONFIG_FILES=\${CONFIG_FILES-"main.mk:main_in.mk
2824 support/gc/Makefile.cross
2827 support/cpp/Makefile
2828 device/include/Makefile
2830 debugger/mcs51/Makefile
2831 Makefile.common:Makefile.common.in
2834 cat >> $CONFIG_STATUS <<\EOF
2835 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2836 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2838 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2839 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2840 *) ac_file_in="${ac_file}.in" ;;
2843 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2845 # Remove last slash and all that follows it. Not all systems have dirname.
2846 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2847 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2848 # The file is in a subdirectory.
2849 test ! -d "$ac_dir" && mkdir "$ac_dir"
2850 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2851 # A "../" for each directory in $ac_dir_suffix.
2852 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2854 ac_dir_suffix= ac_dots=
2857 case "$ac_given_srcdir" in
2859 if test -z "$ac_dots"; then top_srcdir=.
2860 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2861 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2863 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2864 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2867 case "$ac_given_INSTALL" in
2868 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2869 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2872 echo creating "$ac_file"
2874 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2876 *Makefile*) ac_comsub="1i\\
2877 # $configure_input" ;;
2881 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2883 s%@configure_input@%$configure_input%g
2884 s%@srcdir@%$srcdir%g
2885 s%@top_srcdir@%$top_srcdir%g
2886 s%@INSTALL@%$INSTALL%g
2887 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2891 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2892 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2894 # ac_d sets the value in "#define NAME VALUE" lines.
2895 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2896 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2899 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2900 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2901 ac_uB='\([ ]\)%\1#\2define\3'
2904 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2905 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2906 ac_eB='$%\1#\2define\3'
2910 if test "${CONFIG_HEADERS+set}" != set; then
2912 cat >> $CONFIG_STATUS <<EOF
2913 CONFIG_HEADERS="sdccconf.h:sdccconf_in.h"
2915 cat >> $CONFIG_STATUS <<\EOF
2917 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2918 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2920 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2921 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2922 *) ac_file_in="${ac_file}.in" ;;
2925 echo creating $ac_file
2927 rm -f conftest.frag conftest.in conftest.out
2928 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2929 cat $ac_file_inputs > conftest.in
2933 # Transform confdefs.h into a sed script conftest.vals that substitutes
2934 # the proper values into config.h.in to produce config.h. And first:
2935 # Protect against being on the right side of a sed subst in config.status.
2936 # Protect against being in an unquoted here document in config.status.
2938 cat > conftest.hdr <<\EOF
2941 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2945 sed -n -f conftest.hdr confdefs.h > conftest.vals
2948 # This sed command replaces #undef with comments. This is necessary, for
2949 # example, in the case of _POSIX_SOURCE, which is predefined and required
2950 # on some systems where configure will not decide to define it.
2951 cat >> conftest.vals <<\EOF
2952 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2955 # Break up conftest.vals because some shells have a limit on
2956 # the size of here documents, and old seds have small limits too.
2961 ac_lines=`grep -c . conftest.vals`
2962 # grep -c gives empty output for an empty file on some AIX systems.
2963 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2964 # Write a limited-size here document to conftest.frag.
2965 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2966 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2968 sed -f conftest.frag conftest.in > conftest.out
2970 mv conftest.out conftest.in
2972 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2974 mv conftest.tail conftest.vals
2978 cat >> $CONFIG_STATUS <<\EOF
2979 rm -f conftest.frag conftest.h
2980 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2981 cat conftest.in >> conftest.h
2983 if cmp -s $ac_file conftest.h 2>/dev/null; then
2984 echo "$ac_file is unchanged"
2987 # Remove last slash and all that follows it. Not all systems have dirname.
2988 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2989 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2990 # The file is in a subdirectory.
2991 test ! -d "$ac_dir" && mkdir "$ac_dir"
2994 mv conftest.h $ac_file
2999 cat >> $CONFIG_STATUS <<EOF
3002 cat >> $CONFIG_STATUS <<\EOF
3006 chmod +x $CONFIG_STATUS
3007 rm -fr confdefs* $ac_clean_files
3008 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3010 if test "$no_recursion" != yes; then
3012 # Remove --cache-file and --srcdir arguments so they do not pile up.
3013 ac_sub_configure_args=
3015 for ac_arg in $ac_configure_args; do
3016 if test -n "$ac_prev"; then
3021 -cache-file | --cache-file | --cache-fil | --cache-fi \
3022 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
3023 ac_prev=cache_file ;;
3024 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
3025 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
3027 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
3029 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
3031 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
3035 for ac_config_dir in sim/ucsim packihx; do
3037 # Do not complain, so a configure script can configure whichever
3038 # parts of a large source tree are present.
3039 if test ! -d $srcdir/$ac_config_dir; then
3043 echo configuring in $ac_config_dir
3048 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
3050 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
3058 # A "../" for each directory in /$ac_config_dir.
3059 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
3062 .) # No --srcdir option. We are building in place.
3063 ac_sub_srcdir=$srcdir ;;
3064 /*) # Absolute path.
3065 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
3067 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
3070 # Check for guested configure; otherwise get Cygnus style configure.
3071 if test -f $ac_sub_srcdir/configure; then
3072 ac_sub_configure=$ac_sub_srcdir/configure
3073 elif test -f $ac_sub_srcdir/configure.in; then
3074 ac_sub_configure=$ac_configure
3076 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
3080 # The recursion is here.
3081 if test -n "$ac_sub_configure"; then
3083 # Make the cache file name correct relative to the subdirectory.
3084 case "$cache_file" in
3085 /*) ac_sub_cache_file=$cache_file ;;
3087 ac_sub_cache_file="$ac_dots$cache_file" ;;
3089 case "$ac_given_INSTALL" in
3090 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3091 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3094 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
3095 # The eval makes quoting arguments work.
3096 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
3099 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
3108 # End of configure/configure.in