5 AC_CONFIG_SRCDIR([Makefile])
6 AC_CONFIG_HEADER(sdccconf.h:sdccconf_in.h)
10 AC_MSG_CHECKING(version of the package)
11 if test -f .version; then
12 VERSION=`cat .version`
13 elif test -f ../.version; then
14 VERSION=`cat ../.version`
18 VERSIONHI=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $1}'`
19 VERSIONLO=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $2}'`
20 VERSIONP=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $3}'`
22 AC_MSG_RESULT(${VERSION})
27 AC_DEFINE_UNQUOTED(SDCC_VERSION_LO, ${VERSIONLO})
28 AC_DEFINE_UNQUOTED(SDCC_VERSION_HI, ${VERSIONHI})
29 AC_DEFINE_UNQUOTED(SDCC_VERSION_P, ${VERSIONP})
30 AC_DEFINE_UNQUOTED(SDCC_VERSION_STR, "${VERSION}")
32 sdcc_cv_version=$VERSION
33 sdcc_cv_versionhi=$VERSIONHI
34 sdcc_cv_versionlo=$VERSIONLO
35 sdcc_cv_versionp=$VERSIONP
39 # ===========================================================================
47 AC_CHECK_PROG(AUTOCONF, autoconf, autoconf, :)
48 AC_CHECK_PROG(STRIP, strip, strip, :)
49 AC_CHECK_PROG(AS, as, as, :)
50 AC_CHECK_PROG(CP, cp, cp, :)
52 AC_CHECK_PROG(LYX, lyx, lyx, :)
53 AC_CHECK_PROG(LATEX, latex, latex, :)
54 AC_CHECK_PROG(LATEX2HTML, latex2html, latex2html, :)
55 AC_CHECK_PROG(PDFLATEX, pdflatex, pdflatex, :)
56 AC_CHECK_PROG(DVIPDF, dvipdf, dvipdf, :)
58 AC_DEFUN(SDCC_REQUIRE_PROG,
59 [if test "$1" = ":"; then
60 AC_MSG_ERROR([Cannot find required program $2.])
64 SDCC_REQUIRE_PROG($YACC, bison)
65 SDCC_REQUIRE_PROG($LEX, lex)
70 # Checking for header files.
71 # ===========================================================================
72 AC_CHECK_HEADERS(sys/socket.h)
75 # Checking for functions/libs
76 # ===========================================================================
77 AC_CHECK_LIB(socket,socket)
78 AC_CHECK_LIB(nsl,xdr_short)
81 # Checking for functions
82 # ===========================================================================
83 AC_CHECK_FUNCS(strerror)
84 AC_CHECK_FUNCS(vsnprintf snprintf vsprintf mkstemp)
88 # ===========================================================================
90 # DD_COPT macro checks if the compiler specified as the 1st parameter
91 # supports option specified as the 2nd parameter
92 # For example: DD_CPORT(CXX, fPIC)
95 AC_CACHE_CHECK(whether $$1 accepts -$2,sdcc_cv_$1$2,
100 $$1 -v -$2 -c _test_.c 1>&5 2>&5
101 if test "$?" = "0"; then
106 rm -f _test_.* a.out)
109 # This macro expands DIR and assigns it to RET.
110 # If DIR is NONE, then it's replaced by DEFAULT.
112 # Based on AC_DEFINE_DIR
116 # AC_EXPAND(prefix, "/usr/local", expanded_prefix)
118 AC_DEFUN([AC_EXPAND], [
119 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
120 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
122 test "x$ac_expand" = xNONE && ac_expand="[$]$2"
123 ac_expand=`eval echo [$]ac_expand`
124 $3=`eval echo [$]ac_expand`
129 # - empty paths are changed to '.'
130 # - trailing slashes are removed
131 # - repeated slashes are squeezed except a leading doubled slash '//'
132 # (which might indicate a networked disk on some OS).
135 # REFERENCE_STRING is used to turn '/' into '\' and vice-versa: if
136 # REFERENCE_STRING contains some backslashes, all slashes and backslashes
137 # are turned into backslashes, otherwise they are all turned into slashes.
139 # This makes processing of DOS filenames quite easier, because you can turn a
140 # filename to the Unix notation, make your processing, and turn it back to
143 dnl Available from the GNU Autoconf Macro Archive at:
144 dnl http://www.gnu.org/software/ac-archive/htmldoc/normpath.html
146 AC_DEFUN([adl_NORMALIZE_PATH],
148 # change empty paths to '.'
150 # strip trailing slashes
151 :*[[\\/]]:) $1=`echo "[$]$1" | sed 's,[[\\/]]*[$],,'` ;;
154 # squeze repeated slashes
155 case ifelse($2,,"[$]$1",$2) in
156 # if the path contains any backslashes, turn slashes into backslashes
158 # Bernhard Held 2003-04-06
159 # This was the original line. It doesn't:
160 # - convert the first slash
161 # - replace a slash with a double-backslash
162 # *\\*) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
163 *\\*) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\\\\\,g' | sed 's,^[[\\/]],\\\\\\\\,'` ;;
165 # if the path contains slashes, also turn backslashes into slashes
166 *) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1/,g'` ;;
170 # adl_COMPUTE_RELATIVE_PATH
172 # PATH_LIST is a space-separated list of colon-separated triplets of the form
173 # 'FROM:TO:RESULT'. This function iterates over these triplets and set $RESULT
174 # to the relative path from $FROM to $TO. Note that $FROM and $TO needs to be
175 # absolute filenames for this macro to success.
177 AC_DEFUN([adl_COMPUTE_RELATIVE_PATHS],
178 [for _lcl_i in $1; do
179 _lcl_from=\[$]`echo "[$]_lcl_i" | sed 's,:.*$,,'`
180 _lcl_to=\[$]`echo "[$]_lcl_i" | sed 's,^[[^:]]*:,,' | sed 's,:[[^:]]*$,,'`
181 _lcl_result_var=`echo "[$]_lcl_i" | sed 's,^.*:,,'`
182 adl_RECURSIVE_EVAL([[$]_lcl_from], [_lcl_from])
183 adl_RECURSIVE_EVAL([[$]_lcl_to], [_lcl_to])
184 _lcl_notation="$_lcl_from$_lcl_to"
185 adl_NORMALIZE_PATH([_lcl_from],['/'])
186 adl_NORMALIZE_PATH([_lcl_to],['/'])
187 adl_COMPUTE_RELATIVE_PATH([_lcl_from], [_lcl_to], [_lcl_result_tmp])
188 adl_NORMALIZE_PATH([_lcl_result_tmp],["[$]_lcl_notation"])
189 eval $_lcl_result_var='[$]_lcl_result_tmp'
194 ## The following helper macros are too fragile to be used out
195 ## of adl_COMPUTE_RELATIVE_PATHS (mainly because they assume that
196 ## paths are normalized), that's why I'm keeping them in the same file.
197 ## Still, some of them maybe worth to reuse.
199 dnl adl_COMPUTE_RELATIVE_PATH(FROM, TO, RESULT)
200 dnl ===========================================
201 dnl Compute the relative path to go from $FROM to $TO and set the value
202 dnl of $RESULT to that value. This function work on raw filenames
203 dnl (for instead it will considerate /usr//local and /usr/local as
204 dnl two distinct paths), you should really use adl_COMPUTE_REALTIVE_PATHS
205 dnl instead to have the paths sanitized automatically.
208 dnl first_dir=/somewhere/on/my/disk/bin
209 dnl second_dir=/somewhere/on/another/disk/share
210 dnl adl_COMPUTE_RELATIVE_PATH(first_dir, second_dir, first_to_second)
211 dnl will set $first_to_second to '../../../another/disk/share'.
212 AC_DEFUN([adl_COMPUTE_RELATIVE_PATH],
213 [adl_COMPUTE_COMMON_PATH([$1], [$2], [_lcl_common_prefix])
214 adl_COMPUTE_BACK_PATH([$1], [_lcl_common_prefix], [_lcl_first_rel])
215 adl_COMPUTE_SUFFIX_PATH([$2], [_lcl_common_prefix], [_lcl_second_suffix])
216 $3="[$]_lcl_first_rel[$]_lcl_second_suffix"])
218 dnl adl_COMPUTE_COMMON_PATH(LEFT, RIGHT, RESULT)
219 dnl ============================================
220 dnl Compute the common path to $LEFT and $RIGHT and set the result to $RESULT.
223 dnl first_path=/somewhere/on/my/disk/bin
224 dnl second_path=/somewhere/on/another/disk/share
225 dnl adl_COMPUTE_COMMON_PATH(first_path, second_path, common_path)
226 dnl will set $common_path to '/somewhere/on'.
227 AC_DEFUN([adl_COMPUTE_COMMON_PATH],
229 _lcl_second_prefix_match=''
230 while test "[$]_lcl_second_prefix_match" != 0; do
231 _lcl_first_prefix=`expr "x[$]$1" : "x\([$]$3/*[[^/]]*\)"`
232 _lcl_second_prefix_match=`expr "x[$]$2" : "x[$]_lcl_first_prefix"`
233 if test "[$]_lcl_second_prefix_match" != 0; then
234 if test "[$]_lcl_first_prefix" != "[$]$3"; then
235 $3="[$]_lcl_first_prefix"
237 _lcl_second_prefix_match=0
242 dnl adl_COMPUTE_SUFFIX_PATH(PATH, SUBPATH, RESULT)
243 dnl ==============================================
244 dnl Substrack $SUBPATH from $PATH, and set the resulting suffix
245 dnl (or the empty string if $SUBPATH is not a subpath of $PATH)
249 dnl first_path=/somewhere/on/my/disk/bin
250 dnl second_path=/somewhere/on
251 dnl adl_COMPUTE_SUFFIX_PATH(first_path, second_path, common_path)
252 dnl will set $common_path to '/my/disk/bin'.
253 AC_DEFUN([adl_COMPUTE_SUFFIX_PATH],
254 [$3=`expr "x[$]$1" : "x[$]$2/*\(.*\)"`])
256 dnl adl_COMPUTE_BACK_PATH(PATH, SUBPATH, RESULT)
257 dnl ============================================
258 dnl Compute the relative path to go from $PATH to $SUBPATH, knowing that
259 dnl $SUBPATH is a subpath of $PATH (any other words, only repeated '../'
260 dnl should be needed to move from $PATH to $SUBPATH) and set the value
261 dnl of $RESULT to that value. If $SUBPATH is not a subpath of PATH,
262 dnl set $RESULT to the empty string.
265 dnl first_path=/somewhere/on/my/disk/bin
266 dnl second_path=/somewhere/on
267 dnl adl_COMPUTE_BACK_PATH(first_path, second_path, back_path)
268 dnl will set $back_path to '../../../'.
269 AC_DEFUN([adl_COMPUTE_BACK_PATH],
270 [adl_COMPUTE_SUFFIX_PATH([$1], [$2], [_lcl_first_suffix])
273 while test "[$]_lcl_tmp" != ''; do
274 _lcl_tmp=`expr "x[$]_lcl_first_suffix" : "x[[^/]]*/*\(.*\)"`
275 if test "[$]_lcl_first_suffix" != ''; then
276 _lcl_first_suffix="[$]_lcl_tmp"
282 dnl adl_RECURSIVE_EVAL(VALUE, RESULT)
283 dnl =================================
284 dnl Interpolate the VALUE in loop until it doesn't change,
285 dnl and set the result to $RESULT.
286 dnl WARNING: It's easy to get an infinite loop with some unsane input.
287 AC_DEFUN([adl_RECURSIVE_EVAL],
289 $2=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix"
290 test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
292 while test "[$]_lcl_receval_old" != "[$]_lcl_receval"; do
293 _lcl_receval_old="[$]_lcl_receval"
294 eval _lcl_receval="\"[$]_lcl_receval\""
296 echo "[$]_lcl_receval")`])
299 # AC_NORMALIZE_DEFINE_UNQUOTED(var, DEFINE, REFERENCE_STRING)
301 AC_DEFUN([AC_NORMALIZE_DEFINE_UNQUOTED], [
303 adl_NORMALIZE_PATH([ac_ndu], [$]$3)
304 AC_DEFINE_UNQUOTED($2, "${ac_ndu}")
308 # Checking characteristics of compilers and other programs
309 # ===========================================================================
310 AC_CACHE_CHECK(whether preprocessor accepts -MM or -M,sdcc_cv_MM,
311 echo "#include <stdio.h>" >_test_.c
313 $CPP -v -MM _test_.c 1>&5 2>&5
314 if test "$?" = "0"; then
323 # This is the first time when CFLAGS are set/modified!!
325 if test "$sdcc_cv_CCggdb" = "yes"; then
326 CFLAGS="-ggdb ${CFLAGS}"
330 if test "$sdcc_cv_CCpipe" = "yes"; then
331 CFLAGS="-pipe $CFLAGS"
335 # Checks for typedefs, structures, and compiler characteristics.
336 # ===========================================================================
339 AC_CHECK_SIZEOF(char)
340 AC_CHECK_SIZEOF(short)
342 AC_CHECK_SIZEOF(long)
346 if expr "$ac_cv_sizeof_char" '>=' "$1" >/dev/null; then
350 if expr "$ac_cv_sizeof_short" '>=' "$1" >/dev/null; then
354 if expr "$ac_cv_sizeof_int" '>=' "$1" >/dev/null; then
358 if expr "$ac_cv_sizeof_long" '>=' "$1" >/dev/null; then
365 AC_MSG_CHECKING(type name for byte)
366 TYPE_BYTE=`type_name 1`
367 AC_MSG_RESULT($TYPE_BYTE)
368 AC_MSG_CHECKING(type name for word)
369 TYPE_WORD=`type_name 2`
370 AC_MSG_RESULT($TYPE_WORD)
371 AC_MSG_CHECKING(type name for dword)
372 TYPE_DWORD=`type_name 4`
373 AC_MSG_RESULT($TYPE_DWORD)
374 AC_DEFINE_UNQUOTED(TYPE_BYTE, $TYPE_BYTE)
375 AC_DEFINE_UNQUOTED(TYPE_WORD, $TYPE_WORD)
376 AC_DEFINE_UNQUOTED(TYPE_DWORD, $TYPE_DWORD)
380 # Set standard installation paths
381 # ===========================================================================
383 # In the Makefiles we need paths with '/' as directory separator, even if
384 # crosscompiling for Win32.
385 # And we want to preserve the macros (e.g. ${prefix}) in the Makefiles.
386 # The variables in the Makefiles are replaced by AC_SUBST()
388 # In sdccconf.h the '/' in paths can be replaced by "\\" (normalized), if
390 # The macros are expanded for the header.
391 # The variables in the header are replaced by AC_*DEFINE*()
392 # sdccconf_h_dir_separator contains a backslash.
393 AC_ARG_VAR(sdccconf_h_dir_separator, needed in sdccconf.h: either "/" (default) or "\\")
394 if test "${sdccconf_h_dir_separator}" = ""; then
395 sdccconf_h_dir_separator="/"
401 # include_dir_suffix:
402 # *nix default: "sdcc/include"
404 AC_ARG_VAR(include_dir_suffix, appended to datadir to define SDCC's include directory)
405 if test "${include_dir_suffix}" = ""; then
406 include_dir_suffix="sdcc/include"
408 AC_SUBST(include_dir_suffix)
411 # *nix default: "sdcc/lib"
412 AC_ARG_VAR(lib_dir_suffix, appended to datadir to define SDCC's library root directory)
413 if test "${lib_dir_suffix}" = ""; then
414 lib_dir_suffix="sdcc/lib"
416 AC_SUBST(lib_dir_suffix)
419 # *nix default: "${datadir}/sdcc/doc"
420 AC_ARG_VAR(docdir, documentation installation directory)
421 if test "${docdir}" = ""; then
422 docdir="\${datadir}"/sdcc/doc
431 AC_DEFINE_UNQUOTED(DIR_SEPARATOR_STRING, "${sdccconf_h_dir_separator}")
432 AC_DEFINE_UNQUOTED(DIR_SEPARATOR_CHAR , '${sdccconf_h_dir_separator}')
435 # default: "NONE", ${ac_default_prefix}: "/usr/local"
436 AC_EXPAND(prefix, ac_default_prefix, expanded_prefix)
437 AC_NORMALIZE_DEFINE_UNQUOTED(expanded_prefix, PREFIX, sdccconf_h_dir_separator)
440 # default: "${prefix}"
441 AC_EXPAND(exec_prefix, expanded_prefix, expanded_exec_prefix)
442 AC_NORMALIZE_DEFINE_UNQUOTED(expanded_exec_prefix, EXEC_PREFIX, sdccconf_h_dir_separator)
445 # default: "${exec_prefix}/bin"
446 AC_EXPAND(bindir, "NONE", expanded_bindir)
447 AC_NORMALIZE_DEFINE_UNQUOTED(expanded_bindir, BINDIR, sdccconf_h_dir_separator)
450 # default: "${prefix}/share"
451 AC_EXPAND(datadir, "NONE", expanded_datadir)
452 AC_NORMALIZE_DEFINE_UNQUOTED(expanded_datadir, DATADIR, sdccconf_h_dir_separator)
455 norm_inc_dir_suffix=${include_dir_suffix}
456 adl_NORMALIZE_PATH([norm_inc_dir_suffix], [$sdccconf_h_dir_separator])
457 AC_DEFINE_UNQUOTED(INCLUDE_DIR_SUFFIX,
458 DIR_SEPARATOR_STRING "${norm_inc_dir_suffix}")
459 norm_lib_dir_suffix=${lib_dir_suffix}
460 adl_NORMALIZE_PATH([norm_lib_dir_suffix], [$sdccconf_h_dir_separator])
461 AC_DEFINE_UNQUOTED(LIB_DIR_SUFFIX,
462 DIR_SEPARATOR_STRING "${norm_lib_dir_suffix}")
465 adl_COMPUTE_RELATIVE_PATHS([expanded_bindir:expanded_datadir:bin2data_dir])
466 adl_NORMALIZE_PATH(bin2data_dir, [$sdccconf_h_dir_separator])
467 AC_DEFINE_UNQUOTED(BIN2DATA_DIR,
468 DIR_SEPARATOR_STRING "${bin2data_dir}")
470 adl_COMPUTE_RELATIVE_PATHS([expanded_prefix:expanded_bindir:prefix2bin_dir])
471 adl_NORMALIZE_PATH(prefix2bin_dir, [$sdccconf_h_dir_separator])
472 AC_DEFINE_UNQUOTED(PREFIX2BIN_DIR,
473 DIR_SEPARATOR_STRING "${prefix2bin_dir}")
475 adl_COMPUTE_RELATIVE_PATHS([expanded_prefix:expanded_datadir:prefix2data_dir])
476 adl_NORMALIZE_PATH(prefix2data_dir, [$sdccconf_h_dir_separator])
477 if test "${prefix2data_dir}" = "."; then
478 # small optimization for Mingw32; otherwise Borut will complain ;-)
479 AC_DEFINE_UNQUOTED(PREFIX2DATA_DIR, "")
481 AC_DEFINE_UNQUOTED(PREFIX2DATA_DIR,
482 DIR_SEPARATOR_STRING "${prefix2data_dir}")
486 AC_DEFINE_UNQUOTED(STD_LIB, "libsdcc")
487 AC_DEFINE_UNQUOTED(STD_INT_LIB, "libint")
488 AC_DEFINE_UNQUOTED(STD_LONG_LIB, "liblong")
489 AC_DEFINE_UNQUOTED(STD_FP_LIB, "libfloat")
490 AC_DEFINE_UNQUOTED(STD_DS390_LIB, "libds390")
491 AC_DEFINE_UNQUOTED(STD_DS400_LIB, "libds400")
492 AC_DEFINE_UNQUOTED(STD_XA51_LIB, "libxa51")
494 # SDCC runtime environment variables
495 sdcc_dir_name="SDCC_HOME"
496 AC_DEFINE_UNQUOTED(SDCC_DIR_NAME, "${sdcc_dir_name}")
498 sdcc_include_name="SDCC_INCLUDE"
499 AC_DEFINE_UNQUOTED(SDCC_INCLUDE_NAME, "${sdcc_include_name}")
501 sdcc_lib_name="SDCC_LIB"
502 AC_DEFINE_UNQUOTED(SDCC_LIB_NAME, "${sdcc_lib_name}")
504 # Now handle the port selection
505 # ===========================================================================
506 rm -f ports.all ports.build
507 AC_ARG_ENABLE(mcs51-port,
508 AC_HELP_STRING([--disable-mcs51-port],
509 [Excludes the Intel mcs51 port]))
510 echo mcs51 >>ports.all
511 if test "$enable_mcs51_port" = "no"; then
512 AC_DEFINE_UNQUOTED(OPT_DISABLE_MCS51, 1)
514 echo mcs51 >>ports.build
515 AC_DEFINE_UNQUOTED(OPT_DISABLE_MCS51, 0)
518 AC_ARG_ENABLE(gbz80-port,
519 AC_HELP_STRING([--disable-gbz80-port],
520 [Excludes the Gameboy gbz80 port]))
522 if test "$enable_gbz80_port" = "no"; then
523 AC_DEFINE_UNQUOTED(OPT_DISABLE_GBZ80, 1)
525 echo z80 >>ports.build
526 AC_DEFINE_UNQUOTED(OPT_DISABLE_GBZ80, 0)
529 AC_ARG_ENABLE(z80-port,
530 AC_HELP_STRING([--disable-z80-port],
531 [Excludes the z80 port]))
533 if test "$enable_z80_port" = "no"; then
534 AC_DEFINE_UNQUOTED(OPT_DISABLE_Z80, 1)
536 echo z80 >>ports.build
537 AC_DEFINE_UNQUOTED(OPT_DISABLE_Z80, 0)
540 AC_ARG_ENABLE(avr-port,
541 AC_HELP_STRING([--disable-avr-port],
542 [Excludes the AVR port]))
544 if test "$enable_avr_port" = "no"; then
545 AC_DEFINE_UNQUOTED(OPT_DISABLE_AVR, 1)
547 echo avr >>ports.build
548 AC_DEFINE_UNQUOTED(OPT_DISABLE_AVR, 0)
551 AC_ARG_ENABLE(ds390-port,
552 AC_HELP_STRING([--disable-ds390-port],
553 [Excludes the DS390 port]))
554 echo ds390 >>ports.all
555 if test "$enable_ds390_port" = "no"; then
556 AC_DEFINE_UNQUOTED(OPT_DISABLE_DS390, 1)
557 AC_DEFINE_UNQUOTED(OPT_DISABLE_TININative, 1)
559 echo ds390 >>ports.build
560 AC_DEFINE_UNQUOTED(OPT_DISABLE_DS390, 0)
561 AC_DEFINE_UNQUOTED(OPT_DISABLE_TININative, 0)
564 AC_ARG_ENABLE(ds400-port,
565 AC_HELP_STRING([--disable-ds400-port],
566 [Excludes the DS400 port]))
567 echo ds400 >>ports.all
568 if test "$enable_ds400_port" = "no"; then
569 AC_DEFINE_UNQUOTED(OPT_DISABLE_DS400, 1)
571 echo ds400 >>ports.build
572 AC_DEFINE_UNQUOTED(OPT_DISABLE_DS400, 0)
575 AC_ARG_ENABLE(pic-port,
576 AC_HELP_STRING([--disable-pic-port],
577 [Excludes the PIC port]))
579 if test "$enable_pic_port" = "no"; then
580 AC_DEFINE_UNQUOTED(OPT_DISABLE_PIC, 1)
582 echo pic >>ports.build
583 AC_DEFINE_UNQUOTED(OPT_DISABLE_PIC, 0)
586 AC_ARG_ENABLE(pic16-port,
587 AC_HELP_STRING([--disable-pic16-port],
588 [Excludes the PIC port]))
589 echo pic16 >>ports.all
590 if test "$enable_pic16_port" = "no"; then
591 AC_DEFINE_UNQUOTED(OPT_DISABLE_PIC16, 1)
593 echo pic16 >>ports.build
594 AC_DEFINE_UNQUOTED(OPT_DISABLE_PIC16, 0)
597 AC_ARG_ENABLE(xa51-port,
598 AC_HELP_STRING([--disable-xa51-port],
599 [Excludes the XA51 port]))
600 echo xa51 >>ports.all
601 if test "$enable_xa51_port" = "no"; then
602 AC_DEFINE_UNQUOTED(OPT_DISABLE_XA51, 1)
604 echo xa51 >>ports.build
605 AC_DEFINE_UNQUOTED(OPT_DISABLE_XA51, 0)
608 AC_ARG_ENABLE(hc08-port,
609 AC_HELP_STRING([--disable-hc08-port],
610 [Excludes the HC08 port]))
611 echo hc08 >>ports.all
612 if test "$enable_hc08_port" = "no"; then
613 AC_DEFINE_UNQUOTED(OPT_DISABLE_HC08, 1)
615 echo hc08 >>ports.build
616 AC_DEFINE_UNQUOTED(OPT_DISABLE_HC08, 0)
620 AC_HELP_STRING([--disable-ucsim],
621 [Disables configuring and building of ucsim]))
622 OPT_ENABLE_UCSIM=$enable_ucsim
623 AC_SUBST(OPT_ENABLE_UCSIM)
625 AC_ARG_ENABLE(device-lib-build,
626 AC_HELP_STRING([--disable-device-lib-build],
627 [Disables automatically building device libraries]))
628 OPT_ENABLE_DEVICE_LIB_BUILD=$enable_device_lib_build
629 AC_SUBST(OPT_ENABLE_DEVICE_LIB_BUILD)
631 AC_ARG_ENABLE(packihx,
632 AC_HELP_STRING([--disable-packihx],
633 [Disables building packihx]))
634 OPT_ENABLE_PACKIHX=$enable_packihx
635 AC_SUBST(OPT_ENABLE_PACKIHX)
638 AC_HELP_STRING([--enable-libgc],
639 [Use the Bohem memory allocator. Lower runtime footprint.]))
640 if test "$enable_libgc" = "yes"; then
641 AC_CHECK_LIB(gc, GC_malloc)
646 AC_DEFINE_UNQUOTED(OPT_ENABLE_LIBGC, $OPT_ENABLE_LIBGC)
651 uniq ports.build ports
654 # Generating output files
655 # ===========================================================================
656 AC_CONFIG_SUBDIRS(support/cpp2)
657 AC_CONFIG_SUBDIRS(packihx)
658 AC_CONFIG_SUBDIRS(sim/ucsim)
659 AC_CONFIG_SUBDIRS(device/lib/pic16)
660 AC_CONFIG_SUBDIRS(device/lib/pic)
662 AC_CONFIG_FILES([main.mk:main_in.mk
666 device/include/Makefile
668 debugger/mcs51/Makefile
669 support/regression/Makefile
670 Makefile.common:Makefile.common.in
674 # End of configure/configure.in