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-mcs51-port Excludes the Intel mcs51 port"
17 --disable-gbz80-port Excludes the Gameboy gbz80 port"
19 --disable-z80-port Excludes the z80 port"
21 --disable-avr-port Excludes the AVR port"
23 --disable-ds390-port Excludes the DS390 port"
25 --disable-pic-port Excludes the PIC port"
27 --disable-i186-port Excludes the I186 port"
29 --disable-tlcs900h-port Excludes the TLCS900H port"
31 --disable-xa51-port Excludes the XA51 port"
33 --disable-ucsim Disables configuring and building of ucsim"
35 --disable-device-lib-build Disables automatically building device libraries"
37 --disable-packihx Disables building packihx"
39 --enable-libgc Use the Bohem memory allocator. Lower runtime footprint."
41 # Initialize some variables set by options.
42 # The variables have the same names as the options, with
43 # dashes changed to underlines.
45 cache_file=./config.cache
54 program_transform_name=s,x,x,
62 bindir='${exec_prefix}/bin'
63 sbindir='${exec_prefix}/sbin'
64 libexecdir='${exec_prefix}/libexec'
65 datadir='${prefix}/share'
66 sysconfdir='${prefix}/etc'
67 sharedstatedir='${prefix}/com'
68 localstatedir='${prefix}/var'
69 libdir='${exec_prefix}/lib'
70 includedir='${prefix}/include'
71 oldincludedir='/usr/include'
72 infodir='${prefix}/info'
73 mandir='${prefix}/man'
75 # Initialize some other variables.
78 SHELL=${CONFIG_SHELL-/bin/sh}
79 # Maximum number of lines to put in a shell here document.
86 # If the previous option needs an argument, assign it.
87 if test -n "$ac_prev"; then
88 eval "$ac_prev=\$ac_option"
94 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
98 # Accept the important Cygnus configure options, so we can diagnose typos.
102 -bindir | --bindir | --bindi | --bind | --bin | --bi)
104 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
105 bindir="$ac_optarg" ;;
107 -build | --build | --buil | --bui | --bu)
109 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
110 build="$ac_optarg" ;;
112 -cache-file | --cache-file | --cache-fil | --cache-fi \
113 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
114 ac_prev=cache_file ;;
115 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
116 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
117 cache_file="$ac_optarg" ;;
119 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
121 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
123 datadir="$ac_optarg" ;;
125 -disable-* | --disable-*)
126 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
127 # Reject names that are not valid shell variable names.
128 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
129 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
131 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
132 eval "enable_${ac_feature}=no" ;;
134 -enable-* | --enable-*)
135 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
136 # Reject names that are not valid shell variable names.
137 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
138 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
140 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
145 eval "enable_${ac_feature}='$ac_optarg'" ;;
147 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
148 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
149 | --exec | --exe | --ex)
150 ac_prev=exec_prefix ;;
151 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
152 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
153 | --exec=* | --exe=* | --ex=*)
154 exec_prefix="$ac_optarg" ;;
156 -gas | --gas | --ga | --g)
157 # Obsolete; use --with-gas.
160 -help | --help | --hel | --he)
161 # Omit some internal or obsolete options to make the list less imposing.
162 # This message is too long to be a string in the A/UX 3.1 sh.
164 Usage: configure [options] [host]
165 Options: [defaults in brackets after descriptions]
167 --cache-file=FILE cache test results in FILE
168 --help print this message
169 --no-create do not create output files
170 --quiet, --silent do not print \`checking...' messages
171 --version print the version of autoconf that created configure
172 Directory and file names:
173 --prefix=PREFIX install architecture-independent files in PREFIX
175 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
177 --bindir=DIR user executables in DIR [EPREFIX/bin]
178 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
179 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
180 --datadir=DIR read-only architecture-independent data in DIR
182 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
183 --sharedstatedir=DIR modifiable architecture-independent data in DIR
185 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
186 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
187 --includedir=DIR C header files in DIR [PREFIX/include]
188 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
189 --infodir=DIR info documentation in DIR [PREFIX/info]
190 --mandir=DIR man documentation in DIR [PREFIX/man]
191 --srcdir=DIR find the sources in DIR [configure dir or ..]
192 --program-prefix=PREFIX prepend PREFIX to installed program names
193 --program-suffix=SUFFIX append SUFFIX to installed program names
194 --program-transform-name=PROGRAM
195 run sed PROGRAM on installed program names
199 --build=BUILD configure for building on BUILD [BUILD=HOST]
200 --host=HOST configure for HOST [guessed]
201 --target=TARGET configure for TARGET [TARGET=HOST]
202 Features and packages:
203 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
204 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
205 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
206 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
207 --x-includes=DIR X include files are in DIR
208 --x-libraries=DIR X library files are in DIR
210 if test -n "$ac_help"; then
211 echo "--enable and --with options recognized:$ac_help"
215 -host | --host | --hos | --ho)
217 -host=* | --host=* | --hos=* | --ho=*)
220 -includedir | --includedir | --includedi | --included | --include \
221 | --includ | --inclu | --incl | --inc)
222 ac_prev=includedir ;;
223 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
224 | --includ=* | --inclu=* | --incl=* | --inc=*)
225 includedir="$ac_optarg" ;;
227 -infodir | --infodir | --infodi | --infod | --info | --inf)
229 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
230 infodir="$ac_optarg" ;;
232 -libdir | --libdir | --libdi | --libd)
234 -libdir=* | --libdir=* | --libdi=* | --libd=*)
235 libdir="$ac_optarg" ;;
237 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
238 | --libexe | --libex | --libe)
239 ac_prev=libexecdir ;;
240 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
241 | --libexe=* | --libex=* | --libe=*)
242 libexecdir="$ac_optarg" ;;
244 -localstatedir | --localstatedir | --localstatedi | --localstated \
245 | --localstate | --localstat | --localsta | --localst \
246 | --locals | --local | --loca | --loc | --lo)
247 ac_prev=localstatedir ;;
248 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
249 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
250 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
251 localstatedir="$ac_optarg" ;;
253 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
255 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
256 mandir="$ac_optarg" ;;
259 # Obsolete; use --without-fp.
262 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
266 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
267 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
270 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
271 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
272 | --oldin | --oldi | --old | --ol | --o)
273 ac_prev=oldincludedir ;;
274 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
275 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
276 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
277 oldincludedir="$ac_optarg" ;;
279 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
281 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
282 prefix="$ac_optarg" ;;
284 -program-prefix | --program-prefix | --program-prefi | --program-pref \
285 | --program-pre | --program-pr | --program-p)
286 ac_prev=program_prefix ;;
287 -program-prefix=* | --program-prefix=* | --program-prefi=* \
288 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
289 program_prefix="$ac_optarg" ;;
291 -program-suffix | --program-suffix | --program-suffi | --program-suff \
292 | --program-suf | --program-su | --program-s)
293 ac_prev=program_suffix ;;
294 -program-suffix=* | --program-suffix=* | --program-suffi=* \
295 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
296 program_suffix="$ac_optarg" ;;
298 -program-transform-name | --program-transform-name \
299 | --program-transform-nam | --program-transform-na \
300 | --program-transform-n | --program-transform- \
301 | --program-transform | --program-transfor \
302 | --program-transfo | --program-transf \
303 | --program-trans | --program-tran \
304 | --progr-tra | --program-tr | --program-t)
305 ac_prev=program_transform_name ;;
306 -program-transform-name=* | --program-transform-name=* \
307 | --program-transform-nam=* | --program-transform-na=* \
308 | --program-transform-n=* | --program-transform-=* \
309 | --program-transform=* | --program-transfor=* \
310 | --program-transfo=* | --program-transf=* \
311 | --program-trans=* | --program-tran=* \
312 | --progr-tra=* | --program-tr=* | --program-t=*)
313 program_transform_name="$ac_optarg" ;;
315 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
316 | -silent | --silent | --silen | --sile | --sil)
319 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
321 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
323 sbindir="$ac_optarg" ;;
325 -sharedstatedir | --sharedstatedir | --sharedstatedi \
326 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
327 | --sharedst | --shareds | --shared | --share | --shar \
329 ac_prev=sharedstatedir ;;
330 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
331 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
332 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
334 sharedstatedir="$ac_optarg" ;;
336 -site | --site | --sit)
338 -site=* | --site=* | --sit=*)
341 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
343 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
344 srcdir="$ac_optarg" ;;
346 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
347 | --syscon | --sysco | --sysc | --sys | --sy)
348 ac_prev=sysconfdir ;;
349 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
350 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
351 sysconfdir="$ac_optarg" ;;
353 -target | --target | --targe | --targ | --tar | --ta | --t)
355 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
356 target="$ac_optarg" ;;
358 -v | -verbose | --verbose | --verbos | --verbo | --verb)
361 -version | --version | --versio | --versi | --vers)
362 echo "configure generated by autoconf version 2.13"
366 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
367 # Reject names that are not valid shell variable names.
368 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
369 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
371 ac_package=`echo $ac_package| sed 's/-/_/g'`
376 eval "with_${ac_package}='$ac_optarg'" ;;
378 -without-* | --without-*)
379 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
380 # Reject names that are not valid shell variable names.
381 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
382 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
384 ac_package=`echo $ac_package| sed 's/-/_/g'`
385 eval "with_${ac_package}=no" ;;
388 # Obsolete; use --with-x.
391 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
392 | --x-incl | --x-inc | --x-in | --x-i)
393 ac_prev=x_includes ;;
394 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
395 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
396 x_includes="$ac_optarg" ;;
398 -x-libraries | --x-libraries | --x-librarie | --x-librari \
399 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
400 ac_prev=x_libraries ;;
401 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
402 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
403 x_libraries="$ac_optarg" ;;
405 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
409 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
410 echo "configure: warning: $ac_option: invalid host type" 1>&2
412 if test "x$nonopt" != xNONE; then
413 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
421 if test -n "$ac_prev"; then
422 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
425 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
427 # File descriptor usage:
430 # 2 errors and warnings
431 # 3 some systems may open it to /dev/tty
432 # 4 used on the Kubota Titan
433 # 6 checking for... messages and results
434 # 5 compiler messages saved in config.log
435 if test "$silent" = yes; then
443 This file contains any messages produced by compilers while
444 running configure, to aid debugging if configure makes a mistake.
447 # Strip out --no-create and --no-recursion so they do not pile up.
448 # Also quote any args containing shell metacharacters.
453 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
454 | --no-cr | --no-c) ;;
455 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
456 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
457 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
458 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
459 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
464 # Only set these to C if already set. These must not be set unconditionally
465 # because not all systems understand e.g. LANG=C (notably SCO).
466 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
467 # Non-C LC_CTYPE values break the ctype check.
468 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
469 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
470 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
471 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
473 # confdefs.h avoids OS command line length limits that DEFS can exceed.
474 rm -rf conftest* confdefs.h
475 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
478 # A filename unique to this package, relative to the directory that
479 # configure is in, which we can look for to find out if srcdir is correct.
480 ac_unique_file=Makefile
482 # Find the source files, if location was not specified.
483 if test -z "$srcdir"; then
484 ac_srcdir_defaulted=yes
485 # Try the directory containing this script, then its parent.
487 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
488 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
490 if test ! -r $srcdir/$ac_unique_file; then
494 ac_srcdir_defaulted=no
496 if test ! -r $srcdir/$ac_unique_file; then
497 if test "$ac_srcdir_defaulted" = yes; then
498 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
500 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
503 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
505 # Prefer explicitly selected file to automatically selected ones.
506 if test -z "$CONFIG_SITE"; then
507 if test "x$prefix" != xNONE; then
508 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
510 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
513 for ac_site_file in $CONFIG_SITE; do
514 if test -r "$ac_site_file"; then
515 echo "loading site script $ac_site_file"
520 if test -r "$cache_file"; then
521 echo "loading cache $cache_file"
524 echo "creating cache $cache_file"
529 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
530 ac_cpp='$CPP $CPPFLAGS'
531 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
532 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
533 cross_compiling=$ac_cv_prog_cc_cross
537 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
538 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
539 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
546 ac_n= ac_c='\c' ac_t=
552 for ac_prog in gawk mawk nawk awk
554 # Extract the first word of "$ac_prog", so it can be a program name with args.
555 set dummy $ac_prog; ac_word=$2
556 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
557 echo "configure:558: checking for $ac_word" >&5
558 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
559 echo $ac_n "(cached) $ac_c" 1>&6
561 if test -n "$AWK"; then
562 ac_cv_prog_AWK="$AWK" # Let the user override the test.
564 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
566 for ac_dir in $ac_dummy; do
567 test -z "$ac_dir" && ac_dir=.
568 if test -f $ac_dir/$ac_word; then
569 ac_cv_prog_AWK="$ac_prog"
576 AWK="$ac_cv_prog_AWK"
577 if test -n "$AWK"; then
578 echo "$ac_t""$AWK" 1>&6
580 echo "$ac_t""no" 1>&6
583 test -n "$AWK" && break
587 echo $ac_n "checking version of the package""... $ac_c" 1>&6
588 echo "configure:589: checking version of the package" >&5
589 if test -f .version; then
590 VERSION=`cat .version`
591 elif test -f ../.version; then
592 VERSION=`cat ../.version`
596 VERSIONHI=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $1}'`
597 VERSIONLO=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $2}'`
598 VERSIONP=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $3}'`
599 # Assume no special extension
600 EXEEXT=`echo $EXEEXT`
602 echo "$ac_t""${VERSION}" 1>&6
607 cat >> confdefs.h <<EOF
608 #define SDCC_VERSION_LO ${VERSIONLO}
611 cat >> confdefs.h <<EOF
612 #define SDCC_VERSION_HI ${VERSIONHI}
615 cat >> confdefs.h <<EOF
616 #define SDCC_VERSION_P ${VERSIONP}
619 cat >> confdefs.h <<EOF
620 #define SDCC_VERSION_STR "${VERSION}"
623 if test "$program_transform_name" = s,x,x,; then
624 program_transform_name=
626 # Double any \ or $. echo might interpret backslashes.
627 cat <<\EOF_SED > conftestsed
628 s,\\,\\\\,g; s,\$,$$,g
630 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
633 test "$program_prefix" != NONE &&
634 program_transform_name="s,^,${program_prefix},; $program_transform_name"
635 # Use a double $ so make ignores it.
636 test "$program_suffix" != NONE &&
637 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
639 # sed with no file args requires a program.
640 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
642 sdcc_cv_version=$VERSION
643 sdcc_cv_versionhi=$VERSIONHI
644 sdcc_cv_versionlo=$VERSIONLO
645 sdcc_cv_versionp=$VERSIONP
649 # Extract the first word of "gcc", so it can be a program name with args.
650 set dummy gcc; ac_word=$2
651 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
652 echo "configure:653: checking for $ac_word" >&5
653 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
654 echo $ac_n "(cached) $ac_c" 1>&6
656 if test -n "$CC"; then
657 ac_cv_prog_CC="$CC" # Let the user override the test.
659 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
661 for ac_dir in $ac_dummy; do
662 test -z "$ac_dir" && ac_dir=.
663 if test -f $ac_dir/$ac_word; then
672 if test -n "$CC"; then
673 echo "$ac_t""$CC" 1>&6
675 echo "$ac_t""no" 1>&6
678 if test -z "$CC"; then
679 # Extract the first word of "cc", so it can be a program name with args.
680 set dummy cc; ac_word=$2
681 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
682 echo "configure:683: checking for $ac_word" >&5
683 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
684 echo $ac_n "(cached) $ac_c" 1>&6
686 if test -n "$CC"; then
687 ac_cv_prog_CC="$CC" # Let the user override the test.
689 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
692 for ac_dir in $ac_dummy; do
693 test -z "$ac_dir" && ac_dir=.
694 if test -f $ac_dir/$ac_word; then
695 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
704 if test $ac_prog_rejected = yes; then
705 # We found a bogon in the path, so make sure we never use it.
706 set dummy $ac_cv_prog_CC
708 if test $# -gt 0; then
709 # We chose a different compiler from the bogus one.
710 # However, it has the same basename, so the bogon will be chosen
711 # first if we set CC to just the basename; use the full file name.
713 set dummy "$ac_dir/$ac_word" "$@"
721 if test -n "$CC"; then
722 echo "$ac_t""$CC" 1>&6
724 echo "$ac_t""no" 1>&6
727 if test -z "$CC"; then
730 # Extract the first word of "cl", so it can be a program name with args.
731 set dummy cl; ac_word=$2
732 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
733 echo "configure:734: checking for $ac_word" >&5
734 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
735 echo $ac_n "(cached) $ac_c" 1>&6
737 if test -n "$CC"; then
738 ac_cv_prog_CC="$CC" # Let the user override the test.
740 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
742 for ac_dir in $ac_dummy; do
743 test -z "$ac_dir" && ac_dir=.
744 if test -f $ac_dir/$ac_word; then
753 if test -n "$CC"; then
754 echo "$ac_t""$CC" 1>&6
756 echo "$ac_t""no" 1>&6
761 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
764 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
765 echo "configure:766: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
768 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
769 ac_cpp='$CPP $CPPFLAGS'
770 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
771 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
772 cross_compiling=$ac_cv_prog_cc_cross
774 cat > conftest.$ac_ext << EOF
776 #line 777 "configure"
777 #include "confdefs.h"
781 if { (eval echo configure:782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
782 ac_cv_prog_cc_works=yes
783 # If we can't run a trivial program, we are probably using a cross compiler.
784 if (./conftest; exit) 2>/dev/null; then
785 ac_cv_prog_cc_cross=no
787 ac_cv_prog_cc_cross=yes
790 echo "configure: failed program was:" >&5
791 cat conftest.$ac_ext >&5
792 ac_cv_prog_cc_works=no
796 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
797 ac_cpp='$CPP $CPPFLAGS'
798 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
799 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
800 cross_compiling=$ac_cv_prog_cc_cross
802 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
803 if test $ac_cv_prog_cc_works = no; then
804 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
806 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
807 echo "configure:808: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
808 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
809 cross_compiling=$ac_cv_prog_cc_cross
811 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
812 echo "configure:813: checking whether we are using GNU C" >&5
813 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
814 echo $ac_n "(cached) $ac_c" 1>&6
816 cat > conftest.c <<EOF
821 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
828 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
830 if test $ac_cv_prog_gcc = yes; then
836 ac_test_CFLAGS="${CFLAGS+set}"
837 ac_save_CFLAGS="$CFLAGS"
839 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
840 echo "configure:841: checking whether ${CC-cc} accepts -g" >&5
841 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
842 echo $ac_n "(cached) $ac_c" 1>&6
844 echo 'void f(){}' > conftest.c
845 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
854 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
855 if test "$ac_test_CFLAGS" = set; then
856 CFLAGS="$ac_save_CFLAGS"
857 elif test $ac_cv_prog_cc_g = yes; then
858 if test "$GCC" = yes; then
864 if test "$GCC" = yes; then
871 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
873 # Extract the first word of "$ac_prog", so it can be a program name with args.
874 set dummy $ac_prog; ac_word=$2
875 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
876 echo "configure:877: checking for $ac_word" >&5
877 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
878 echo $ac_n "(cached) $ac_c" 1>&6
880 if test -n "$CXX"; then
881 ac_cv_prog_CXX="$CXX" # Let the user override the test.
883 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
885 for ac_dir in $ac_dummy; do
886 test -z "$ac_dir" && ac_dir=.
887 if test -f $ac_dir/$ac_word; then
888 ac_cv_prog_CXX="$ac_prog"
895 CXX="$ac_cv_prog_CXX"
896 if test -n "$CXX"; then
897 echo "$ac_t""$CXX" 1>&6
899 echo "$ac_t""no" 1>&6
902 test -n "$CXX" && break
904 test -n "$CXX" || CXX="gcc"
907 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
908 echo "configure:909: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
911 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
912 ac_cpp='$CXXCPP $CPPFLAGS'
913 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
914 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
915 cross_compiling=$ac_cv_prog_cxx_cross
917 cat > conftest.$ac_ext << EOF
919 #line 920 "configure"
920 #include "confdefs.h"
922 int main(){return(0);}
924 if { (eval echo configure:925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
925 ac_cv_prog_cxx_works=yes
926 # If we can't run a trivial program, we are probably using a cross compiler.
927 if (./conftest; exit) 2>/dev/null; then
928 ac_cv_prog_cxx_cross=no
930 ac_cv_prog_cxx_cross=yes
933 echo "configure: failed program was:" >&5
934 cat conftest.$ac_ext >&5
935 ac_cv_prog_cxx_works=no
939 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
940 ac_cpp='$CPP $CPPFLAGS'
941 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
942 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
943 cross_compiling=$ac_cv_prog_cc_cross
945 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
946 if test $ac_cv_prog_cxx_works = no; then
947 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
949 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
950 echo "configure:951: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
951 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
952 cross_compiling=$ac_cv_prog_cxx_cross
954 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
955 echo "configure:956: checking whether we are using GNU C++" >&5
956 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
957 echo $ac_n "(cached) $ac_c" 1>&6
959 cat > conftest.C <<EOF
964 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:965: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
971 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
973 if test $ac_cv_prog_gxx = yes; then
979 ac_test_CXXFLAGS="${CXXFLAGS+set}"
980 ac_save_CXXFLAGS="$CXXFLAGS"
982 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
983 echo "configure:984: checking whether ${CXX-g++} accepts -g" >&5
984 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
985 echo $ac_n "(cached) $ac_c" 1>&6
987 echo 'void f(){}' > conftest.cc
988 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
997 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
998 if test "$ac_test_CXXFLAGS" = set; then
999 CXXFLAGS="$ac_save_CXXFLAGS"
1000 elif test $ac_cv_prog_cxx_g = yes; then
1001 if test "$GXX" = yes; then
1007 if test "$GXX" = yes; then
1014 for ac_declaration in \
1016 '#include <stdlib.h>' \
1017 'extern "C" void std::exit (int) throw (); using std::exit;' \
1018 'extern "C" void std::exit (int); using std::exit;' \
1019 'extern "C" void exit (int) throw ();' \
1020 'extern "C" void exit (int);' \
1023 cat > conftest.$ac_ext <<EOF
1024 #line 1025 "configure"
1025 #include "confdefs.h"
1032 if { (eval echo configure:1033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1035 echo "configure: failed program was:" >&5
1036 cat conftest.$ac_ext >&5
1041 cat > conftest.$ac_ext <<EOF
1042 #line 1043 "configure"
1043 #include "confdefs.h"
1049 if { (eval echo configure:1050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1053 echo "configure: failed program was:" >&5
1054 cat conftest.$ac_ext >&5
1058 if test -n "$ac_declaration"; then
1059 echo '#ifdef __cplusplus' >>confdefs.h
1060 echo $ac_declaration >>confdefs.h
1061 echo '#endif' >>confdefs.h
1065 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1066 echo "configure:1067: checking how to run the C preprocessor" >&5
1067 # On Suns, sometimes $CPP names a directory.
1068 if test -n "$CPP" && test -d "$CPP"; then
1071 if test -z "$CPP"; then
1072 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1073 echo $ac_n "(cached) $ac_c" 1>&6
1075 # This must be in double quotes, not single quotes, because CPP may get
1076 # substituted into the Makefile and "${CC-cc}" will confuse make.
1078 # On the NeXT, cc -E runs the code through the compiler's parser,
1079 # not just through cpp.
1080 cat > conftest.$ac_ext <<EOF
1081 #line 1082 "configure"
1082 #include "confdefs.h"
1086 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1087 { (eval echo configure:1088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1088 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1089 if test -z "$ac_err"; then
1093 echo "configure: failed program was:" >&5
1094 cat conftest.$ac_ext >&5
1096 CPP="${CC-cc} -E -traditional-cpp"
1097 cat > conftest.$ac_ext <<EOF
1098 #line 1099 "configure"
1099 #include "confdefs.h"
1103 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1104 { (eval echo configure:1105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1105 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1106 if test -z "$ac_err"; then
1110 echo "configure: failed program was:" >&5
1111 cat conftest.$ac_ext >&5
1113 CPP="${CC-cc} -nologo -E"
1114 cat > conftest.$ac_ext <<EOF
1115 #line 1116 "configure"
1116 #include "confdefs.h"
1120 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1121 { (eval echo configure:1122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1122 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1123 if test -z "$ac_err"; then
1127 echo "configure: failed program was:" >&5
1128 cat conftest.$ac_ext >&5
1137 ac_cv_prog_CPP="$CPP"
1139 CPP="$ac_cv_prog_CPP"
1141 ac_cv_prog_CPP="$CPP"
1143 echo "$ac_t""$CPP" 1>&6
1146 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1147 if test -f $ac_dir/install-sh; then
1149 ac_install_sh="$ac_aux_dir/install-sh -c"
1151 elif test -f $ac_dir/install.sh; then
1153 ac_install_sh="$ac_aux_dir/install.sh -c"
1157 if test -z "$ac_aux_dir"; then
1158 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1160 ac_config_guess=$ac_aux_dir/config.guess
1161 ac_config_sub=$ac_aux_dir/config.sub
1162 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1164 # Find a good install program. We prefer a C program (faster),
1165 # so one script is as good as another. But avoid the broken or
1166 # incompatible versions:
1167 # SysV /etc/install, /usr/sbin/install
1168 # SunOS /usr/etc/install
1169 # IRIX /sbin/install
1171 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1172 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1173 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1174 # ./install, which can be erroneously created by make from ./install.sh.
1175 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1176 echo "configure:1177: checking for a BSD compatible install" >&5
1177 if test -z "$INSTALL"; then
1178 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1179 echo $ac_n "(cached) $ac_c" 1>&6
1181 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1182 for ac_dir in $PATH; do
1183 # Account for people who put trailing slashes in PATH elements.
1185 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1187 # OSF1 and SCO ODT 3.0 have their own names for install.
1188 # Don't use installbsd from OSF since it installs stuff as root
1190 for ac_prog in ginstall scoinst install; do
1191 if test -f $ac_dir/$ac_prog; then
1192 if test $ac_prog = install &&
1193 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1194 # AIX install. It has an incompatible calling convention.
1197 ac_cv_path_install="$ac_dir/$ac_prog -c"
1208 if test "${ac_cv_path_install+set}" = set; then
1209 INSTALL="$ac_cv_path_install"
1211 # As a last resort, use the slow shell script. We don't cache a
1212 # path for INSTALL within a source directory, because that will
1213 # break other packages using the cache if that directory is
1214 # removed, or if the path is relative.
1215 INSTALL="$ac_install_sh"
1218 echo "$ac_t""$INSTALL" 1>&6
1220 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1221 # It thinks the first close brace ends the variable substitution.
1222 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1224 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1226 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1228 # Extract the first word of "ranlib", so it can be a program name with args.
1229 set dummy ranlib; ac_word=$2
1230 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1231 echo "configure:1232: checking for $ac_word" >&5
1232 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1233 echo $ac_n "(cached) $ac_c" 1>&6
1235 if test -n "$RANLIB"; then
1236 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1238 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1240 for ac_dir in $ac_dummy; do
1241 test -z "$ac_dir" && ac_dir=.
1242 if test -f $ac_dir/$ac_word; then
1243 ac_cv_prog_RANLIB="ranlib"
1248 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1251 RANLIB="$ac_cv_prog_RANLIB"
1252 if test -n "$RANLIB"; then
1253 echo "$ac_t""$RANLIB" 1>&6
1255 echo "$ac_t""no" 1>&6
1258 # Extract the first word of "flex", so it can be a program name with args.
1259 set dummy flex; ac_word=$2
1260 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1261 echo "configure:1262: checking for $ac_word" >&5
1262 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1263 echo $ac_n "(cached) $ac_c" 1>&6
1265 if test -n "$LEX"; then
1266 ac_cv_prog_LEX="$LEX" # Let the user override the test.
1268 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1270 for ac_dir in $ac_dummy; do
1271 test -z "$ac_dir" && ac_dir=.
1272 if test -f $ac_dir/$ac_word; then
1273 ac_cv_prog_LEX="flex"
1278 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1281 LEX="$ac_cv_prog_LEX"
1282 if test -n "$LEX"; then
1283 echo "$ac_t""$LEX" 1>&6
1285 echo "$ac_t""no" 1>&6
1288 if test -z "$LEXLIB"
1294 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1295 echo "configure:1296: checking for yywrap in -l$ac_lib" >&5
1296 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1297 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1298 echo $ac_n "(cached) $ac_c" 1>&6
1300 ac_save_LIBS="$LIBS"
1301 LIBS="-l$ac_lib $LIBS"
1302 cat > conftest.$ac_ext <<EOF
1303 #line 1304 "configure"
1304 #include "confdefs.h"
1305 /* Override any gcc2 internal prototype to avoid an error. */
1306 /* We use char because int might match the return type of a gcc2
1307 builtin and then its argument prototype would still apply. */
1314 if { (eval echo configure:1315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1316 eval "ac_cv_lib_$ac_lib_var=yes"
1318 echo "configure: failed program was:" >&5
1319 cat conftest.$ac_ext >&5
1321 eval "ac_cv_lib_$ac_lib_var=no"
1324 LIBS="$ac_save_LIBS"
1327 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1328 echo "$ac_t""yes" 1>&6
1331 echo "$ac_t""no" 1>&6
1336 # Extract the first word of "bison", so it can be a program name with args.
1337 set dummy bison; ac_word=$2
1338 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1339 echo "configure:1340: checking for $ac_word" >&5
1340 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1341 echo $ac_n "(cached) $ac_c" 1>&6
1343 if test -n "$YACC"; then
1344 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1346 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1348 for ac_dir in $ac_dummy; do
1349 test -z "$ac_dir" && ac_dir=.
1350 if test -f $ac_dir/$ac_word; then
1351 ac_cv_prog_YACC="bison -y"
1356 test -z "$ac_cv_prog_YACC" && ac_cv_prog_YACC=":"
1359 YACC="$ac_cv_prog_YACC"
1360 if test -n "$YACC"; then
1361 echo "$ac_t""$YACC" 1>&6
1363 echo "$ac_t""no" 1>&6
1366 # Extract the first word of "autoconf", so it can be a program name with args.
1367 set dummy autoconf; ac_word=$2
1368 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1369 echo "configure:1370: checking for $ac_word" >&5
1370 if eval "test \"`echo '$''{'ac_cv_prog_AUTOCONF'+set}'`\" = set"; then
1371 echo $ac_n "(cached) $ac_c" 1>&6
1373 if test -n "$AUTOCONF"; then
1374 ac_cv_prog_AUTOCONF="$AUTOCONF" # Let the user override the test.
1376 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1378 for ac_dir in $ac_dummy; do
1379 test -z "$ac_dir" && ac_dir=.
1380 if test -f $ac_dir/$ac_word; then
1381 ac_cv_prog_AUTOCONF="autoconf"
1386 test -z "$ac_cv_prog_AUTOCONF" && ac_cv_prog_AUTOCONF=":"
1389 AUTOCONF="$ac_cv_prog_AUTOCONF"
1390 if test -n "$AUTOCONF"; then
1391 echo "$ac_t""$AUTOCONF" 1>&6
1393 echo "$ac_t""no" 1>&6
1396 # Extract the first word of "strip", so it can be a program name with args.
1397 set dummy strip; ac_word=$2
1398 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1399 echo "configure:1400: checking for $ac_word" >&5
1400 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1401 echo $ac_n "(cached) $ac_c" 1>&6
1403 if test -n "$STRIP"; then
1404 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1406 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1408 for ac_dir in $ac_dummy; do
1409 test -z "$ac_dir" && ac_dir=.
1410 if test -f $ac_dir/$ac_word; then
1411 ac_cv_prog_STRIP="strip"
1416 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
1419 STRIP="$ac_cv_prog_STRIP"
1420 if test -n "$STRIP"; then
1421 echo "$ac_t""$STRIP" 1>&6
1423 echo "$ac_t""no" 1>&6
1426 # Extract the first word of "as", so it can be a program name with args.
1427 set dummy as; ac_word=$2
1428 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1429 echo "configure:1430: checking for $ac_word" >&5
1430 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1431 echo $ac_n "(cached) $ac_c" 1>&6
1433 if test -n "$AS"; then
1434 ac_cv_prog_AS="$AS" # Let the user override the test.
1436 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1438 for ac_dir in $ac_dummy; do
1439 test -z "$ac_dir" && ac_dir=.
1440 if test -f $ac_dir/$ac_word; then
1446 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS=":"
1450 if test -n "$AS"; then
1451 echo "$ac_t""$AS" 1>&6
1453 echo "$ac_t""no" 1>&6
1456 # Extract the first word of "cp", so it can be a program name with args.
1457 set dummy cp; ac_word=$2
1458 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1459 echo "configure:1460: checking for $ac_word" >&5
1460 if eval "test \"`echo '$''{'ac_cv_prog_CP'+set}'`\" = set"; then
1461 echo $ac_n "(cached) $ac_c" 1>&6
1463 if test -n "$CP"; then
1464 ac_cv_prog_CP="$CP" # Let the user override the test.
1466 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1468 for ac_dir in $ac_dummy; do
1469 test -z "$ac_dir" && ac_dir=.
1470 if test -f $ac_dir/$ac_word; then
1476 test -z "$ac_cv_prog_CP" && ac_cv_prog_CP=":"
1480 if test -n "$CP"; then
1481 echo "$ac_t""$CP" 1>&6
1483 echo "$ac_t""no" 1>&6
1489 if test "$YACC" = ":"; then
1490 { echo "configure: error: Cannot find required program bison." 1>&2; exit 1; }
1493 if test "$LEX" = ":"; then
1494 { echo "configure: error: Cannot find required program lex." 1>&2; exit 1; }
1499 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1500 ac_cpp='$CPP $CPPFLAGS'
1501 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1502 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1503 cross_compiling=$ac_cv_prog_cc_cross
1506 # Checking for header files.
1507 # ===========================================================================
1508 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1509 echo "configure:1510: checking for ANSI C header files" >&5
1510 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1511 echo $ac_n "(cached) $ac_c" 1>&6
1513 cat > conftest.$ac_ext <<EOF
1514 #line 1515 "configure"
1515 #include "confdefs.h"
1521 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1522 { (eval echo configure:1523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1523 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1524 if test -z "$ac_err"; then
1526 ac_cv_header_stdc=yes
1529 echo "configure: failed program was:" >&5
1530 cat conftest.$ac_ext >&5
1532 ac_cv_header_stdc=no
1536 if test $ac_cv_header_stdc = yes; then
1537 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1538 cat > conftest.$ac_ext <<EOF
1539 #line 1540 "configure"
1540 #include "confdefs.h"
1543 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1544 egrep "memchr" >/dev/null 2>&1; then
1548 ac_cv_header_stdc=no
1554 if test $ac_cv_header_stdc = yes; then
1555 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1556 cat > conftest.$ac_ext <<EOF
1557 #line 1558 "configure"
1558 #include "confdefs.h"
1561 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1562 egrep "free" >/dev/null 2>&1; then
1566 ac_cv_header_stdc=no
1572 if test $ac_cv_header_stdc = yes; then
1573 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1574 if test "$cross_compiling" = yes; then
1577 cat > conftest.$ac_ext <<EOF
1578 #line 1579 "configure"
1579 #include "confdefs.h"
1581 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1582 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1583 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1584 int main () { int i; for (i = 0; i < 256; i++)
1585 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1589 if { (eval echo configure:1590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1593 echo "configure: failed program was:" >&5
1594 cat conftest.$ac_ext >&5
1596 ac_cv_header_stdc=no
1604 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1605 if test $ac_cv_header_stdc = yes; then
1606 cat >> confdefs.h <<\EOF
1607 #define STDC_HEADERS 1
1612 for ac_hdr in getopt.h
1614 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1615 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1616 echo "configure:1617: checking for $ac_hdr" >&5
1617 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1618 echo $ac_n "(cached) $ac_c" 1>&6
1620 cat > conftest.$ac_ext <<EOF
1621 #line 1622 "configure"
1622 #include "confdefs.h"
1625 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1626 { (eval echo configure:1627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1627 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1628 if test -z "$ac_err"; then
1630 eval "ac_cv_header_$ac_safe=yes"
1633 echo "configure: failed program was:" >&5
1634 cat conftest.$ac_ext >&5
1636 eval "ac_cv_header_$ac_safe=no"
1640 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1641 echo "$ac_t""yes" 1>&6
1642 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1643 cat >> confdefs.h <<EOF
1644 #define $ac_tr_hdr 1
1648 echo "$ac_t""no" 1>&6
1652 for ac_hdr in unistd.h
1654 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1655 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1656 echo "configure:1657: checking for $ac_hdr" >&5
1657 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1658 echo $ac_n "(cached) $ac_c" 1>&6
1660 cat > conftest.$ac_ext <<EOF
1661 #line 1662 "configure"
1662 #include "confdefs.h"
1665 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1666 { (eval echo configure:1667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1667 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1668 if test -z "$ac_err"; then
1670 eval "ac_cv_header_$ac_safe=yes"
1673 echo "configure: failed program was:" >&5
1674 cat conftest.$ac_ext >&5
1676 eval "ac_cv_header_$ac_safe=no"
1680 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1681 echo "$ac_t""yes" 1>&6
1682 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1683 cat >> confdefs.h <<EOF
1684 #define $ac_tr_hdr 1
1688 echo "$ac_t""no" 1>&6
1692 for ac_hdr in endian.h
1694 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1695 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1696 echo "configure:1697: checking for $ac_hdr" >&5
1697 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1698 echo $ac_n "(cached) $ac_c" 1>&6
1700 cat > conftest.$ac_ext <<EOF
1701 #line 1702 "configure"
1702 #include "confdefs.h"
1705 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1706 { (eval echo configure:1707: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1707 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1708 if test -z "$ac_err"; then
1710 eval "ac_cv_header_$ac_safe=yes"
1713 echo "configure: failed program was:" >&5
1714 cat conftest.$ac_ext >&5
1716 eval "ac_cv_header_$ac_safe=no"
1720 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1721 echo "$ac_t""yes" 1>&6
1722 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1723 cat >> confdefs.h <<EOF
1724 #define $ac_tr_hdr 1
1728 echo "$ac_t""no" 1>&6
1732 for ac_hdr in machine/endian.h
1734 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1735 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1736 echo "configure:1737: checking for $ac_hdr" >&5
1737 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1738 echo $ac_n "(cached) $ac_c" 1>&6
1740 cat > conftest.$ac_ext <<EOF
1741 #line 1742 "configure"
1742 #include "confdefs.h"
1745 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1746 { (eval echo configure:1747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1747 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1748 if test -z "$ac_err"; then
1750 eval "ac_cv_header_$ac_safe=yes"
1753 echo "configure: failed program was:" >&5
1754 cat conftest.$ac_ext >&5
1756 eval "ac_cv_header_$ac_safe=no"
1760 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1761 echo "$ac_t""yes" 1>&6
1762 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1763 cat >> confdefs.h <<EOF
1764 #define $ac_tr_hdr 1
1768 echo "$ac_t""no" 1>&6
1772 for ac_hdr in malloc.h
1774 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1775 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1776 echo "configure:1777: checking for $ac_hdr" >&5
1777 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1778 echo $ac_n "(cached) $ac_c" 1>&6
1780 cat > conftest.$ac_ext <<EOF
1781 #line 1782 "configure"
1782 #include "confdefs.h"
1785 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1786 { (eval echo configure:1787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1787 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1788 if test -z "$ac_err"; then
1790 eval "ac_cv_header_$ac_safe=yes"
1793 echo "configure: failed program was:" >&5
1794 cat conftest.$ac_ext >&5
1796 eval "ac_cv_header_$ac_safe=no"
1800 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1801 echo "$ac_t""yes" 1>&6
1802 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1803 cat >> confdefs.h <<EOF
1804 #define $ac_tr_hdr 1
1808 echo "$ac_t""no" 1>&6
1812 for ac_hdr in sys/isa_defs.h
1814 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1815 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1816 echo "configure:1817: checking for $ac_hdr" >&5
1817 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1818 echo $ac_n "(cached) $ac_c" 1>&6
1820 cat > conftest.$ac_ext <<EOF
1821 #line 1822 "configure"
1822 #include "confdefs.h"
1825 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1826 { (eval echo configure:1827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1827 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1828 if test -z "$ac_err"; then
1830 eval "ac_cv_header_$ac_safe=yes"
1833 echo "configure: failed program was:" >&5
1834 cat conftest.$ac_ext >&5
1836 eval "ac_cv_header_$ac_safe=no"
1840 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1841 echo "$ac_t""yes" 1>&6
1842 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1843 cat >> confdefs.h <<EOF
1844 #define $ac_tr_hdr 1
1848 echo "$ac_t""no" 1>&6
1852 for ac_hdr in sys/socket.h
1854 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1855 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1856 echo "configure:1857: checking for $ac_hdr" >&5
1857 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1858 echo $ac_n "(cached) $ac_c" 1>&6
1860 cat > conftest.$ac_ext <<EOF
1861 #line 1862 "configure"
1862 #include "confdefs.h"
1865 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1866 { (eval echo configure:1867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1867 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1868 if test -z "$ac_err"; then
1870 eval "ac_cv_header_$ac_safe=yes"
1873 echo "configure: failed program was:" >&5
1874 cat conftest.$ac_ext >&5
1876 eval "ac_cv_header_$ac_safe=no"
1880 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1881 echo "$ac_t""yes" 1>&6
1882 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1883 cat >> confdefs.h <<EOF
1884 #define $ac_tr_hdr 1
1888 echo "$ac_t""no" 1>&6
1893 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1895 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1896 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1897 echo "configure:1898: checking for $ac_hdr that defines DIR" >&5
1898 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1899 echo $ac_n "(cached) $ac_c" 1>&6
1901 cat > conftest.$ac_ext <<EOF
1902 #line 1903 "configure"
1903 #include "confdefs.h"
1904 #include <sys/types.h>
1910 if { (eval echo configure:1911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1912 eval "ac_cv_header_dirent_$ac_safe=yes"
1914 echo "configure: failed program was:" >&5
1915 cat conftest.$ac_ext >&5
1917 eval "ac_cv_header_dirent_$ac_safe=no"
1921 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1922 echo "$ac_t""yes" 1>&6
1923 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1924 cat >> confdefs.h <<EOF
1925 #define $ac_tr_hdr 1
1927 ac_header_dirent=$ac_hdr; break
1929 echo "$ac_t""no" 1>&6
1932 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1933 if test $ac_header_dirent = dirent.h; then
1934 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1935 echo "configure:1936: checking for opendir in -ldir" >&5
1936 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1937 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1938 echo $ac_n "(cached) $ac_c" 1>&6
1940 ac_save_LIBS="$LIBS"
1942 cat > conftest.$ac_ext <<EOF
1943 #line 1944 "configure"
1944 #include "confdefs.h"
1945 /* Override any gcc2 internal prototype to avoid an error. */
1946 /* We use char because int might match the return type of a gcc2
1947 builtin and then its argument prototype would still apply. */
1954 if { (eval echo configure:1955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1956 eval "ac_cv_lib_$ac_lib_var=yes"
1958 echo "configure: failed program was:" >&5
1959 cat conftest.$ac_ext >&5
1961 eval "ac_cv_lib_$ac_lib_var=no"
1964 LIBS="$ac_save_LIBS"
1967 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1968 echo "$ac_t""yes" 1>&6
1971 echo "$ac_t""no" 1>&6
1975 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1976 echo "configure:1977: checking for opendir in -lx" >&5
1977 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1978 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1979 echo $ac_n "(cached) $ac_c" 1>&6
1981 ac_save_LIBS="$LIBS"
1983 cat > conftest.$ac_ext <<EOF
1984 #line 1985 "configure"
1985 #include "confdefs.h"
1986 /* Override any gcc2 internal prototype to avoid an error. */
1987 /* We use char because int might match the return type of a gcc2
1988 builtin and then its argument prototype would still apply. */
1995 if { (eval echo configure:1996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1997 eval "ac_cv_lib_$ac_lib_var=yes"
1999 echo "configure: failed program was:" >&5
2000 cat conftest.$ac_ext >&5
2002 eval "ac_cv_lib_$ac_lib_var=no"
2005 LIBS="$ac_save_LIBS"
2008 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2009 echo "$ac_t""yes" 1>&6
2012 echo "$ac_t""no" 1>&6
2018 # This must be after CPP
2020 echo $ac_n "checking which header file defines FD_ macros""... $ac_c" 1>&6
2021 echo "configure:2022: checking which header file defines FD_ macros" >&5
2022 if eval "test \"`echo '$''{'s51_cv_fd'+set}'`\" = set"; then
2023 echo $ac_n "(cached) $ac_c" 1>&6
2025 sdcc_cv_fd="unknown"
2026 cat > conftest.$ac_ext <<EOF
2027 #line 2028 "configure"
2028 #include "confdefs.h"
2030 #include <sys/time.h>
2035 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2036 egrep "yes" >/dev/null 2>&1; then
2038 sdcc_cv_fd="<sys/time.h>"
2042 cat > conftest.$ac_ext <<EOF
2043 #line 2044 "configure"
2044 #include "confdefs.h"
2046 #include <sys/types.h>
2051 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2052 egrep "yes" >/dev/null 2>&1; then
2054 sdcc_cv_fd="<sys/types.h>"
2058 cat > conftest.$ac_ext <<EOF
2059 #line 2060 "configure"
2060 #include "confdefs.h"
2062 #include <sys/select.h>
2067 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2068 egrep "yes" >/dev/null 2>&1; then
2070 sdcc_cv_fd="<sys/types.h>"
2076 echo "$ac_t""$s51_cv_fd" 1>&6
2078 cat >> confdefs.h <<\EOF
2079 #define FD_HEADER_OK 0
2082 if echo $sdcc_cv_fd|grep time >/dev/null 2>&1; then
2083 cat >> confdefs.h <<\EOF
2084 #define FD_NEED_TIME_H 1
2087 cat >> confdefs.h <<\EOF
2088 #define FD_HEADER_OK 1
2092 cat >> confdefs.h <<\EOF
2093 #define FD_NEED_TIME_H 0
2097 if echo $sdcc_cv_fd|grep types >/dev/null 2>&1; then
2098 cat >> confdefs.h <<\EOF
2099 #define FD_NEED_TYPES_H 1
2102 cat >> confdefs.h <<\EOF
2103 #define FD_HEADER_OK 1
2107 cat >> confdefs.h <<\EOF
2108 #define FD_NEED_TYPES_H 0
2112 if echo $sdcc_cv_fd|grep select >/dev/null 2>&1; then
2113 cat >> confdefs.h <<\EOF
2114 #define FD_NEED_SELECT_H 1
2117 cat >> confdefs.h <<\EOF
2118 #define FD_HEADER_OK 1
2122 cat >> confdefs.h <<\EOF
2123 #define FD_NEED_SELECT_H 0
2128 cat >> confdefs.h <<EOF
2129 #define HEADER_FD ${sdcc_cv_fd}
2134 # Checking for functions
2135 # ===========================================================================
2136 for ac_func in strlen strcpy strcat strstr strcmp strerror strtok strdup
2138 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2139 echo "configure:2140: checking for $ac_func" >&5
2140 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2141 echo $ac_n "(cached) $ac_c" 1>&6
2143 cat > conftest.$ac_ext <<EOF
2144 #line 2145 "configure"
2145 #include "confdefs.h"
2146 /* System header to define __stub macros and hopefully few prototypes,
2147 which can conflict with char $ac_func(); below. */
2149 /* Override any gcc2 internal prototype to avoid an error. */
2150 /* We use char because int might match the return type of a gcc2
2151 builtin and then its argument prototype would still apply. */
2156 /* The GNU C library defines this for functions which it implements
2157 to always fail with ENOSYS. Some functions are actually named
2158 something starting with __ and the normal name is an alias. */
2159 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2167 if { (eval echo configure:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2169 eval "ac_cv_func_$ac_func=yes"
2171 echo "configure: failed program was:" >&5
2172 cat conftest.$ac_ext >&5
2174 eval "ac_cv_func_$ac_func=no"
2179 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2180 echo "$ac_t""yes" 1>&6
2181 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2182 cat >> confdefs.h <<EOF
2183 #define $ac_tr_func 1
2187 echo "$ac_t""no" 1>&6
2191 for ac_func in strchr memcpy
2193 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2194 echo "configure:2195: checking for $ac_func" >&5
2195 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2196 echo $ac_n "(cached) $ac_c" 1>&6
2198 cat > conftest.$ac_ext <<EOF
2199 #line 2200 "configure"
2200 #include "confdefs.h"
2201 /* System header to define __stub macros and hopefully few prototypes,
2202 which can conflict with char $ac_func(); below. */
2204 /* Override any gcc2 internal prototype to avoid an error. */
2205 /* We use char because int might match the return type of a gcc2
2206 builtin and then its argument prototype would still apply. */
2211 /* The GNU C library defines this for functions which it implements
2212 to always fail with ENOSYS. Some functions are actually named
2213 something starting with __ and the normal name is an alias. */
2214 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2222 if { (eval echo configure:2223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2224 eval "ac_cv_func_$ac_func=yes"
2226 echo "configure: failed program was:" >&5
2227 cat conftest.$ac_ext >&5
2229 eval "ac_cv_func_$ac_func=no"
2234 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2235 echo "$ac_t""yes" 1>&6
2236 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2237 cat >> confdefs.h <<EOF
2238 #define $ac_tr_func 1
2242 echo "$ac_t""no" 1>&6
2246 for ac_func in fgets
2248 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2249 echo "configure:2250: checking for $ac_func" >&5
2250 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2251 echo $ac_n "(cached) $ac_c" 1>&6
2253 cat > conftest.$ac_ext <<EOF
2254 #line 2255 "configure"
2255 #include "confdefs.h"
2256 /* System header to define __stub macros and hopefully few prototypes,
2257 which can conflict with char $ac_func(); below. */
2259 /* Override any gcc2 internal prototype to avoid an error. */
2260 /* We use char because int might match the return type of a gcc2
2261 builtin and then its argument prototype would still apply. */
2266 /* The GNU C library defines this for functions which it implements
2267 to always fail with ENOSYS. Some functions are actually named
2268 something starting with __ and the normal name is an alias. */
2269 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2277 if { (eval echo configure:2278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2279 eval "ac_cv_func_$ac_func=yes"
2281 echo "configure: failed program was:" >&5
2282 cat conftest.$ac_ext >&5
2284 eval "ac_cv_func_$ac_func=no"
2289 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2290 echo "$ac_t""yes" 1>&6
2291 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2292 cat >> confdefs.h <<EOF
2293 #define $ac_tr_func 1
2297 echo "$ac_t""no" 1>&6
2301 for ac_func in yylex
2303 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2304 echo "configure:2305: checking for $ac_func" >&5
2305 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2306 echo $ac_n "(cached) $ac_c" 1>&6
2308 cat > conftest.$ac_ext <<EOF
2309 #line 2310 "configure"
2310 #include "confdefs.h"
2311 /* System header to define __stub macros and hopefully few prototypes,
2312 which can conflict with char $ac_func(); below. */
2314 /* Override any gcc2 internal prototype to avoid an error. */
2315 /* We use char because int might match the return type of a gcc2
2316 builtin and then its argument prototype would still apply. */
2321 /* The GNU C library defines this for functions which it implements
2322 to always fail with ENOSYS. Some functions are actually named
2323 something starting with __ and the normal name is an alias. */
2324 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2332 if { (eval echo configure:2333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2334 eval "ac_cv_func_$ac_func=yes"
2336 echo "configure: failed program was:" >&5
2337 cat conftest.$ac_ext >&5
2339 eval "ac_cv_func_$ac_func=no"
2344 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2345 echo "$ac_t""yes" 1>&6
2346 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2347 cat >> confdefs.h <<EOF
2348 #define $ac_tr_func 1
2352 echo "$ac_t""no" 1>&6
2357 # check if -lsocket && -lxnet is required to compile socket stuff
2359 echo $ac_n "checking for library containing socket""... $ac_c" 1>&6
2360 echo "configure:2361: checking for library containing socket" >&5
2361 if eval "test \"`echo '$''{'ac_cv_search_socket'+set}'`\" = set"; then
2362 echo $ac_n "(cached) $ac_c" 1>&6
2364 ac_func_search_save_LIBS="$LIBS"
2365 ac_cv_search_socket="no"
2366 cat > conftest.$ac_ext <<EOF
2367 #line 2368 "configure"
2368 #include "confdefs.h"
2369 /* Override any gcc2 internal prototype to avoid an error. */
2370 /* We use char because int might match the return type of a gcc2
2371 builtin and then its argument prototype would still apply. */
2378 if { (eval echo configure:2379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2380 ac_cv_search_socket="none required"
2382 echo "configure: failed program was:" >&5
2383 cat conftest.$ac_ext >&5
2386 test "$ac_cv_search_socket" = "no" && for i in socket; do
2387 LIBS="-l$i $ac_func_search_save_LIBS"
2388 cat > conftest.$ac_ext <<EOF
2389 #line 2390 "configure"
2390 #include "confdefs.h"
2391 /* Override any gcc2 internal prototype to avoid an error. */
2392 /* We use char because int might match the return type of a gcc2
2393 builtin and then its argument prototype would still apply. */
2400 if { (eval echo configure:2401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2402 ac_cv_search_socket="-l$i"
2405 echo "configure: failed program was:" >&5
2406 cat conftest.$ac_ext >&5
2410 LIBS="$ac_func_search_save_LIBS"
2413 echo "$ac_t""$ac_cv_search_socket" 1>&6
2414 if test "$ac_cv_search_socket" != "no"; then
2415 test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
2421 echo $ac_n "checking for library containing inet_addr""... $ac_c" 1>&6
2422 echo "configure:2423: checking for library containing inet_addr" >&5
2423 if eval "test \"`echo '$''{'ac_cv_search_inet_addr'+set}'`\" = set"; then
2424 echo $ac_n "(cached) $ac_c" 1>&6
2426 ac_func_search_save_LIBS="$LIBS"
2427 ac_cv_search_inet_addr="no"
2428 cat > conftest.$ac_ext <<EOF
2429 #line 2430 "configure"
2430 #include "confdefs.h"
2431 /* Override any gcc2 internal prototype to avoid an error. */
2432 /* We use char because int might match the return type of a gcc2
2433 builtin and then its argument prototype would still apply. */
2440 if { (eval echo configure:2441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2442 ac_cv_search_inet_addr="none required"
2444 echo "configure: failed program was:" >&5
2445 cat conftest.$ac_ext >&5
2448 test "$ac_cv_search_inet_addr" = "no" && for i in nsl xnet; do
2449 LIBS="-l$i $ac_func_search_save_LIBS"
2450 cat > conftest.$ac_ext <<EOF
2451 #line 2452 "configure"
2452 #include "confdefs.h"
2453 /* Override any gcc2 internal prototype to avoid an error. */
2454 /* We use char because int might match the return type of a gcc2
2455 builtin and then its argument prototype would still apply. */
2462 if { (eval echo configure:2463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2464 ac_cv_search_inet_addr="-l$i"
2467 echo "configure: failed program was:" >&5
2468 cat conftest.$ac_ext >&5
2472 LIBS="$ac_func_search_save_LIBS"
2475 echo "$ac_t""$ac_cv_search_inet_addr" 1>&6
2476 if test "$ac_cv_search_inet_addr" != "no"; then
2477 test "$ac_cv_search_inet_addr" = "none required" || LIBS="$ac_cv_search_inet_addr $LIBS"
2486 # DD_COPT macro checks if the compiler specified as the 1st parameter
2487 # supports option specified as the 2nd parameter
2488 # For example: DD_CPORT(CXX, fPIC)
2493 # Checking characteristics of compilers and other programs
2494 # --------------------------------------------------------
2495 echo $ac_n "checking whether preprocessor accepts -MM or -M""... $ac_c" 1>&6
2496 echo "configure:2497: checking whether preprocessor accepts -MM or -M" >&5
2497 if eval "test \"`echo '$''{'sdcc_cv_MM'+set}'`\" = set"; then
2498 echo $ac_n "(cached) $ac_c" 1>&6
2500 echo "#include <stdio.h>" >_test_.c
2502 $CPP -v -MM _test_.c 1>&5 2>&5
2503 if test "$?" = "0"; then
2511 echo "$ac_t""$sdcc_cv_MM" 1>&6
2515 # This is the first time when CFLAGS are set/modified!!
2517 echo $ac_n "checking whether $CC accepts -ggdb""... $ac_c" 1>&6
2518 echo "configure:2519: checking whether $CC accepts -ggdb" >&5
2519 if eval "test \"`echo '$''{'sdcc_cv_CCggdb'+set}'`\" = set"; then
2520 echo $ac_n "(cached) $ac_c" 1>&6
2526 $CC -v -ggdb -c _test_.c 1>&5 2>&5
2527 if test "$?" = "0"; then
2528 sdcc_cv_CCggdb="yes"
2532 rm -f _test_.* a.out
2535 echo "$ac_t""$sdcc_cv_CCggdb" 1>&6
2537 if test "$sdcc_cv_CCggdb" = "yes"; then
2542 echo $ac_n "checking whether $CC accepts -pipe""... $ac_c" 1>&6
2543 echo "configure:2544: checking whether $CC accepts -pipe" >&5
2544 if eval "test \"`echo '$''{'sdcc_cv_CCpipe'+set}'`\" = set"; then
2545 echo $ac_n "(cached) $ac_c" 1>&6
2551 $CC -v -pipe -c _test_.c 1>&5 2>&5
2552 if test "$?" = "0"; then
2553 sdcc_cv_CCpipe="yes"
2557 rm -f _test_.* a.out
2560 echo "$ac_t""$sdcc_cv_CCpipe" 1>&6
2562 if test "$sdcc_cv_CCpipe" = "yes"; then
2563 CFLAGS="$CFLAGS -pipe"
2567 # Checks for typedefs, structures, and compiler characteristics.
2568 # ===========================================================================
2569 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2570 echo "configure:2571: checking return type of signal handlers" >&5
2571 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2572 echo $ac_n "(cached) $ac_c" 1>&6
2574 cat > conftest.$ac_ext <<EOF
2575 #line 2576 "configure"
2576 #include "confdefs.h"
2577 #include <sys/types.h>
2583 extern "C" void (*signal (int, void (*)(int)))(int);
2585 void (*signal ()) ();
2592 if { (eval echo configure:2593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2594 ac_cv_type_signal=void
2596 echo "configure: failed program was:" >&5
2597 cat conftest.$ac_ext >&5
2599 ac_cv_type_signal=int
2604 echo "$ac_t""$ac_cv_type_signal" 1>&6
2605 cat >> confdefs.h <<EOF
2606 #define RETSIGTYPE $ac_cv_type_signal
2613 if test "${prefix}" = "NONE"; then
2618 sdcc_datadir=${datadir}/sdcc
2621 # For some unknown reason, putting this assignment in a subshell
2622 # like this causes the rvalue to be fully substituted. We need this
2623 # for the defines below to generate the right thing. We keep this
2624 # separate from the substituted sdcc_datadir because we want the
2625 # latter for makefiles.
2626 if test "${datadir}" = "\${prefix}/share"; then
2627 sdcc_datadir_tmp=${prefix}/share/sdcc
2629 sdcc_datadir_tmp=${datadir}/sdcc
2633 cat >> confdefs.h <<EOF
2634 #define STANDARD_INCLUDE_DIR "${sdcc_datadir_tmp}/include"
2637 cat >> confdefs.h <<EOF
2638 #define SDCC_INCLUDE_DIR "${sdcc_datadir_tmp}/include"
2641 cat >> confdefs.h <<EOF
2642 #define SDCC_LIB_DIR "${sdcc_datadir_tmp}/lib"
2645 cat >> confdefs.h <<EOF
2646 #define STD_LIB "libsdcc"
2649 cat >> confdefs.h <<EOF
2650 #define STD_INT_LIB "libint"
2653 cat >> confdefs.h <<EOF
2654 #define STD_LONG_LIB "liblong"
2657 cat >> confdefs.h <<EOF
2658 #define STD_FP_LIB "libfloat"
2661 cat >> confdefs.h <<EOF
2662 #define STD_DS390_LIB "libds390"
2665 cat >> confdefs.h <<EOF
2666 #define STD_xa51_LIB "xa51"
2670 cat >> confdefs.h <<EOF
2671 #define PREFIX "${prefix}"
2674 cat >> confdefs.h <<EOF
2675 #define DATADIR "${sdcc_datadir_tmp}"
2678 cat >> confdefs.h <<EOF
2679 #define SRCDIR "${config_in}"
2685 # Now handle the port selection
2686 rm -f ports.all ports.build
2687 # Check whether --enable-mcs51-port or --disable-mcs51-port was given.
2688 if test "${enable_mcs51_port+set}" = set; then
2689 enableval="$enable_mcs51_port"
2693 echo mcs51 >>ports.all
2694 if test "$enable_mcs51_port" = "no"; then
2695 cat >> confdefs.h <<EOF
2696 #define OPT_DISABLE_MCS51 1
2700 echo mcs51 >>ports.build
2701 cat >> confdefs.h <<EOF
2702 #define OPT_DISABLE_MCS51 0
2707 # Check whether --enable-gbz80-port or --disable-gbz80-port was given.
2708 if test "${enable_gbz80_port+set}" = set; then
2709 enableval="$enable_gbz80_port"
2713 echo z80 >>ports.all
2714 if test "$enable_gbz80_port" = "no"; then
2715 cat >> confdefs.h <<EOF
2716 #define OPT_DISABLE_GBZ80 1
2720 echo z80 >>ports.build
2721 cat >> confdefs.h <<EOF
2722 #define OPT_DISABLE_GBZ80 0
2727 # Check whether --enable-z80-port or --disable-z80-port was given.
2728 if test "${enable_z80_port+set}" = set; then
2729 enableval="$enable_z80_port"
2733 echo z80 >>ports.all
2734 if test "$enable_z80_port" = "no"; then
2735 cat >> confdefs.h <<EOF
2736 #define OPT_DISABLE_Z80 1
2740 echo z80 >>ports.build
2741 cat >> confdefs.h <<EOF
2742 #define OPT_DISABLE_Z80 0
2747 # Check whether --enable-avr-port or --disable-avr-port was given.
2748 if test "${enable_avr_port+set}" = set; then
2749 enableval="$enable_avr_port"
2753 echo avr >>ports.all
2754 if test "$enable_avr_port" = "no"; then
2755 cat >> confdefs.h <<EOF
2756 #define OPT_DISABLE_AVR 1
2760 echo avr >>ports.build
2761 cat >> confdefs.h <<EOF
2762 #define OPT_DISABLE_AVR 0
2767 # Check whether --enable-ds390-port or --disable-ds390-port was given.
2768 if test "${enable_ds390_port+set}" = set; then
2769 enableval="$enable_ds390_port"
2773 echo ds390 >>ports.all
2774 if test "$enable_ds390_port" = "no"; then
2775 cat >> confdefs.h <<EOF
2776 #define OPT_DISABLE_DS390 1
2780 echo ds390 >>ports.build
2781 cat >> confdefs.h <<EOF
2782 #define OPT_DISABLE_DS390 0
2787 # Check whether --enable-pic-port or --disable-pic-port was given.
2788 if test "${enable_pic_port+set}" = set; then
2789 enableval="$enable_pic_port"
2793 echo pic >>ports.all
2794 if test "$enable_pic_port" = "no"; then
2795 cat >> confdefs.h <<EOF
2796 #define OPT_DISABLE_PIC 1
2800 echo pic >>ports.build
2801 cat >> confdefs.h <<EOF
2802 #define OPT_DISABLE_PIC 0
2807 # Check whether --enable-i186-port or --disable-i186-port was given.
2808 if test "${enable_i186_port+set}" = set; then
2809 enableval="$enable_i186_port"
2813 echo izt >>ports.all
2814 if test "$enable_i186_port" = "no"; then
2815 cat >> confdefs.h <<EOF
2816 #define OPT_DISABLE_I186 1
2820 echo izt >>ports.build
2821 cat >> confdefs.h <<EOF
2822 #define OPT_DISABLE_I186 0
2827 # Check whether --enable-tlcs900h-port or --disable-tlcs900h-port was given.
2828 if test "${enable_tlcs900h_port+set}" = set; then
2829 enableval="$enable_tlcs900h_port"
2833 echo izt >>ports.all
2834 if test "$enable_tlcs900h_port" = "no"; then
2835 cat >> confdefs.h <<EOF
2836 #define OPT_DISABLE_TLCS900H 1
2840 echo izt >>ports.build
2841 cat >> confdefs.h <<EOF
2842 #define OPT_DISABLE_TLCS900H 0
2847 # Check whether --enable-xa51-port or --disable-xa51-port was given.
2848 if test "${enable_xa51_port+set}" = set; then
2849 enableval="$enable_xa51_port"
2853 echo xa51 >>ports.all
2854 if test "$enable_xa51_port" = "no"; then
2855 cat >> confdefs.h <<EOF
2856 #define OPT_DISABLE_XA51 1
2860 echo xa51 >>ports.build
2861 cat >> confdefs.h <<EOF
2862 #define OPT_DISABLE_XA51 0
2867 # Check whether --enable-ucsim or --disable-ucsim was given.
2868 if test "${enable_ucsim+set}" = set; then
2869 enableval="$enable_ucsim"
2873 OPT_ENABLE_UCSIM=$enable_ucsim
2876 # Check whether --enable-device-lib-build or --disable-device-lib-build was given.
2877 if test "${enable_device_lib_build+set}" = set; then
2878 enableval="$enable_device_lib_build"
2882 OPT_ENABLE_DEVICE_LIB_BUILD=$enable_device_lib_build
2885 # Check whether --enable-packihx or --disable-packihx was given.
2886 if test "${enable_packihx+set}" = set; then
2887 enableval="$enable_packihx"
2891 OPT_ENABLE_PACKIHX=$enable_packihx
2894 # Check whether --enable-libgc or --disable-libgc was given.
2895 if test "${enable_libgc+set}" = set; then
2896 enableval="$enable_libgc"
2900 if test "$enable_libgc" = "yes"; then
2901 echo $ac_n "checking for GC_malloc in -lgc""... $ac_c" 1>&6
2902 echo "configure:2903: checking for GC_malloc in -lgc" >&5
2903 ac_lib_var=`echo gc'_'GC_malloc | sed 'y%./+-%__p_%'`
2904 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2905 echo $ac_n "(cached) $ac_c" 1>&6
2907 ac_save_LIBS="$LIBS"
2909 cat > conftest.$ac_ext <<EOF
2910 #line 2911 "configure"
2911 #include "confdefs.h"
2912 /* Override any gcc2 internal prototype to avoid an error. */
2913 /* We use char because int might match the return type of a gcc2
2914 builtin and then its argument prototype would still apply. */
2921 if { (eval echo configure:2922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2923 eval "ac_cv_lib_$ac_lib_var=yes"
2925 echo "configure: failed program was:" >&5
2926 cat conftest.$ac_ext >&5
2928 eval "ac_cv_lib_$ac_lib_var=no"
2931 LIBS="$ac_save_LIBS"
2934 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2935 echo "$ac_t""yes" 1>&6
2936 ac_tr_lib=HAVE_LIB`echo gc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2937 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2938 cat >> confdefs.h <<EOF
2939 #define $ac_tr_lib 1
2945 echo "$ac_t""no" 1>&6
2952 cat >> confdefs.h <<EOF
2953 #define OPT_ENABLE_LIBGC $OPT_ENABLE_LIBGC
2958 cat ports.all | uniq >ports
2960 cat ports.build | uniq >ports
2961 mv ports ports.build
2963 # Generating output files
2964 # ===========================================================================
2965 subdirs="support/cpp2"
2967 subdirs="support/cpp2 packihx"
2969 subdirs="support/cpp2 packihx sim/ucsim"
2971 # MLH: removed as the rules are already in Makefile.common
2975 cat > confcache <<\EOF
2976 # This file is a shell script that caches the results of configure
2977 # tests run on this system so they can be shared between configure
2978 # scripts and configure runs. It is not useful on other systems.
2979 # If it contains results you don't want to keep, you may remove or edit it.
2981 # By default, configure uses ./config.cache as the cache file,
2982 # creating it if it does not exist already. You can give configure
2983 # the --cache-file=FILE option to use a different cache file; that is
2984 # what configure does when it calls configure scripts in
2985 # subdirectories, so they share the cache.
2986 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2987 # config.status only pays attention to the cache file if you give it the
2988 # --recheck option to rerun configure.
2991 # The following way of writing the cache mishandles newlines in values,
2992 # but we know of no workaround that is simple, portable, and efficient.
2993 # So, don't put newlines in cache variables' values.
2994 # Ultrix sh set writes to stderr and can't be redirected directly,
2995 # and sets the high bit in the cache file unless we assign to the vars.
2997 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2999 # `set' does not quote correctly, so add quotes (double-quote substitution
3000 # turns \\\\ into \\, and sed turns \\ into \).
3002 -e "s/'/'\\\\''/g" \
3003 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3006 # `set' quotes correctly as required by POSIX, so do not add quotes.
3007 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3010 if cmp -s $cache_file confcache; then
3013 if test -w $cache_file; then
3014 echo "updating cache $cache_file"
3015 cat confcache > $cache_file
3017 echo "not updating unwritable cache $cache_file"
3022 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3024 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3025 # Let make expand exec_prefix.
3026 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3028 # Any assignment to VPATH causes Sun make to only execute
3029 # the first set of double-colon rules, so remove it if not needed.
3030 # If there is a colon in the path, we need to keep it.
3031 if test "x$srcdir" = x.; then
3032 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3035 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3037 DEFS=-DHAVE_CONFIG_H
3039 # Without the "./", some shells look in PATH for config.status.
3040 : ${CONFIG_STATUS=./config.status}
3042 echo creating $CONFIG_STATUS
3043 rm -f $CONFIG_STATUS
3044 cat > $CONFIG_STATUS <<EOF
3046 # Generated automatically by configure.
3047 # Run this file to recreate the current configuration.
3048 # This directory was configured as follows,
3049 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3051 # $0 $ac_configure_args
3053 # Compiler output produced by configure, useful for debugging
3054 # configure, is in ./config.log if it exists.
3056 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3059 case "\$ac_option" in
3060 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3061 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3062 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3063 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3064 echo "$CONFIG_STATUS generated by autoconf version 2.13"
3066 -help | --help | --hel | --he | --h)
3067 echo "\$ac_cs_usage"; exit 0 ;;
3068 *) echo "\$ac_cs_usage"; exit 1 ;;
3072 ac_given_srcdir=$srcdir
3073 ac_given_INSTALL="$INSTALL"
3075 trap 'rm -fr `echo "main.mk:main_in.mk
3078 device/include/Makefile
3080 debugger/mcs51/Makefile
3081 Makefile.common:Makefile.common.in
3082 sdccconf.h:sdccconf_in.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3084 cat >> $CONFIG_STATUS <<EOF
3086 # Protect against being on the right side of a sed subst in config.status.
3087 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3088 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3092 s%@CFLAGS@%$CFLAGS%g
3093 s%@CPPFLAGS@%$CPPFLAGS%g
3094 s%@CXXFLAGS@%$CXXFLAGS%g
3095 s%@FFLAGS@%$FFLAGS%g
3097 s%@LDFLAGS@%$LDFLAGS%g
3099 s%@exec_prefix@%$exec_prefix%g
3100 s%@prefix@%$prefix%g
3101 s%@program_transform_name@%$program_transform_name%g
3102 s%@bindir@%$bindir%g
3103 s%@sbindir@%$sbindir%g
3104 s%@libexecdir@%$libexecdir%g
3105 s%@datadir@%$datadir%g
3106 s%@sysconfdir@%$sysconfdir%g
3107 s%@sharedstatedir@%$sharedstatedir%g
3108 s%@localstatedir@%$localstatedir%g
3109 s%@libdir@%$libdir%g
3110 s%@includedir@%$includedir%g
3111 s%@oldincludedir@%$oldincludedir%g
3112 s%@infodir@%$infodir%g
3113 s%@mandir@%$mandir%g
3115 s%@VERSION@%$VERSION%g
3116 s%@VERSIONHI@%$VERSIONHI%g
3117 s%@VERSIONLO@%$VERSIONLO%g
3118 s%@VERSIONP@%$VERSIONP%g
3122 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3123 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3124 s%@INSTALL_DATA@%$INSTALL_DATA%g
3125 s%@RANLIB@%$RANLIB%g
3127 s%@LEXLIB@%$LEXLIB%g
3129 s%@AUTOCONF@%$AUTOCONF%g
3133 s%@M_OR_MM@%$M_OR_MM%g
3134 s%@sdcc_datadir@%$sdcc_datadir%g
3135 s%@OPT_ENABLE_UCSIM@%$OPT_ENABLE_UCSIM%g
3136 s%@OPT_ENABLE_DEVICE_LIB_BUILD@%$OPT_ENABLE_DEVICE_LIB_BUILD%g
3137 s%@OPT_ENABLE_PACKIHX@%$OPT_ENABLE_PACKIHX%g
3138 s%@subdirs@%$subdirs%g
3143 cat >> $CONFIG_STATUS <<\EOF
3145 # Split the substitutions into bite-sized pieces for seds with
3146 # small command number limits, like on Digital OSF/1 and HP-UX.
3147 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3148 ac_file=1 # Number of current file.
3149 ac_beg=1 # First line for current file.
3150 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3153 while $ac_more_lines; do
3154 if test $ac_beg -gt 1; then
3155 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3157 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3159 if test ! -s conftest.s$ac_file; then
3161 rm -f conftest.s$ac_file
3163 if test -z "$ac_sed_cmds"; then
3164 ac_sed_cmds="sed -f conftest.s$ac_file"
3166 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3168 ac_file=`expr $ac_file + 1`
3170 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3173 if test -z "$ac_sed_cmds"; then
3178 cat >> $CONFIG_STATUS <<EOF
3180 CONFIG_FILES=\${CONFIG_FILES-"main.mk:main_in.mk
3183 device/include/Makefile
3185 debugger/mcs51/Makefile
3186 Makefile.common:Makefile.common.in
3189 cat >> $CONFIG_STATUS <<\EOF
3190 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3191 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3193 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3194 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3195 *) ac_file_in="${ac_file}.in" ;;
3198 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3200 # Remove last slash and all that follows it. Not all systems have dirname.
3201 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3202 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3203 # The file is in a subdirectory.
3204 test ! -d "$ac_dir" && mkdir "$ac_dir"
3205 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3206 # A "../" for each directory in $ac_dir_suffix.
3207 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3209 ac_dir_suffix= ac_dots=
3212 case "$ac_given_srcdir" in
3214 if test -z "$ac_dots"; then top_srcdir=.
3215 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3216 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3218 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3219 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3222 case "$ac_given_INSTALL" in
3223 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3224 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3227 echo creating "$ac_file"
3229 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3231 *Makefile*) ac_comsub="1i\\
3232 # $configure_input" ;;
3236 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3238 s%@configure_input@%$configure_input%g
3239 s%@srcdir@%$srcdir%g
3240 s%@top_srcdir@%$top_srcdir%g
3241 s%@INSTALL@%$INSTALL%g
3242 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3246 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3247 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3249 # ac_d sets the value in "#define NAME VALUE" lines.
3250 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3251 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3254 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3255 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3256 ac_uB='\([ ]\)%\1#\2define\3'
3259 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3260 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3261 ac_eB='$%\1#\2define\3'
3265 if test "${CONFIG_HEADERS+set}" != set; then
3267 cat >> $CONFIG_STATUS <<EOF
3268 CONFIG_HEADERS="sdccconf.h:sdccconf_in.h"
3270 cat >> $CONFIG_STATUS <<\EOF
3272 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3273 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3275 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3276 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3277 *) ac_file_in="${ac_file}.in" ;;
3280 echo creating $ac_file
3282 rm -f conftest.frag conftest.in conftest.out
3283 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3284 cat $ac_file_inputs > conftest.in
3288 # Transform confdefs.h into a sed script conftest.vals that substitutes
3289 # the proper values into config.h.in to produce config.h. And first:
3290 # Protect against being on the right side of a sed subst in config.status.
3291 # Protect against being in an unquoted here document in config.status.
3293 cat > conftest.hdr <<\EOF
3296 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3300 sed -n -f conftest.hdr confdefs.h > conftest.vals
3303 # This sed command replaces #undef with comments. This is necessary, for
3304 # example, in the case of _POSIX_SOURCE, which is predefined and required
3305 # on some systems where configure will not decide to define it.
3306 cat >> conftest.vals <<\EOF
3307 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3310 # Break up conftest.vals because some shells have a limit on
3311 # the size of here documents, and old seds have small limits too.
3316 ac_lines=`grep -c . conftest.vals`
3317 # grep -c gives empty output for an empty file on some AIX systems.
3318 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3319 # Write a limited-size here document to conftest.frag.
3320 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3321 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3323 sed -f conftest.frag conftest.in > conftest.out
3325 mv conftest.out conftest.in
3327 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3329 mv conftest.tail conftest.vals
3333 cat >> $CONFIG_STATUS <<\EOF
3334 rm -f conftest.frag conftest.h
3335 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3336 cat conftest.in >> conftest.h
3338 if cmp -s $ac_file conftest.h 2>/dev/null; then
3339 echo "$ac_file is unchanged"
3342 # Remove last slash and all that follows it. Not all systems have dirname.
3343 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3344 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3345 # The file is in a subdirectory.
3346 test ! -d "$ac_dir" && mkdir "$ac_dir"
3349 mv conftest.h $ac_file
3354 cat >> $CONFIG_STATUS <<EOF
3357 cat >> $CONFIG_STATUS <<\EOF
3361 chmod +x $CONFIG_STATUS
3362 rm -fr confdefs* $ac_clean_files
3363 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3365 if test "$no_recursion" != yes; then
3367 # Remove --cache-file and --srcdir arguments so they do not pile up.
3368 ac_sub_configure_args=
3370 for ac_arg in $ac_configure_args; do
3371 if test -n "$ac_prev"; then
3376 -cache-file | --cache-file | --cache-fil | --cache-fi \
3377 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
3378 ac_prev=cache_file ;;
3379 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
3380 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
3382 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
3384 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
3386 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
3390 for ac_config_dir in support/cpp2 packihx sim/ucsim; do
3392 # Do not complain, so a configure script can configure whichever
3393 # parts of a large source tree are present.
3394 if test ! -d $srcdir/$ac_config_dir; then
3398 echo configuring in $ac_config_dir
3403 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
3405 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
3413 # A "../" for each directory in /$ac_config_dir.
3414 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
3417 .) # No --srcdir option. We are building in place.
3418 ac_sub_srcdir=$srcdir ;;
3419 /*) # Absolute path.
3420 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
3422 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
3425 # Check for guested configure; otherwise get Cygnus style configure.
3426 if test -f $ac_sub_srcdir/configure; then
3427 ac_sub_configure=$ac_sub_srcdir/configure
3428 elif test -f $ac_sub_srcdir/configure.in; then
3429 ac_sub_configure=$ac_configure
3431 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
3435 # The recursion is here.
3436 if test -n "$ac_sub_configure"; then
3438 # Make the cache file name correct relative to the subdirectory.
3439 case "$cache_file" in
3440 /*) ac_sub_cache_file=$cache_file ;;
3442 ac_sub_cache_file="$ac_dots$cache_file" ;;
3444 case "$ac_given_INSTALL" in
3445 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3446 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3449 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
3450 # The eval makes quoting arguments work.
3451 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
3454 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
3463 # End of configure/configure.in