@@ -7,7 +7,7 @@ dnl This program is distributed under the terms of the GPL v2.0
77dnl Download the GNU Public License (GPL) from www.gnu.org
88dnl
99
10- AC_INIT ( [ smallbasic] , [ 12.27 ] )
10+ AC_INIT ( [ smallbasic] , [ 12.28 ] )
1111AC_CONFIG_SRCDIR ( [ configure.ac] )
1212
1313AC_CANONICAL_TARGET
@@ -53,6 +53,11 @@ AC_ARG_ENABLE(dist,
5353 [ ac_build_dist="yes"] ,
5454 [ ac_build_dist="no"] )
5555
56+ AC_ARG_ENABLE ( teensy ,
57+ AS_HELP_STRING ( [ --enable-teensy] ,[ build teensy version(default=no)] ) ,
58+ [ ac_build_teensy="yes"] ,
59+ [ ac_build_teensy="no"] )
60+
5661function checkForWindows() {
5762 win32=no
5863 case "${host_os}" in
@@ -126,6 +131,10 @@ function checkPCRE() {
126131 have_pcre="no"
127132 fi
128133
134+ if test x$ac_build_teensy = xyes; then
135+ have_pcre="no"
136+ fi
137+
129138 if test "${have_pcre}" = "yes" ; then
130139 AC_DEFINE ( USE_PCRE , 1 , [ match.c used with libpcre.] )
131140 PACKAGE_LIBS="${PACKAGE_LIBS} `pcre-config --libs`"
@@ -144,6 +153,10 @@ function checkTermios() {
144153 have_termios_h="no"
145154 fi
146155
156+ if test x$ac_build_teensy = xyes; then
157+ have_termios_h="no"
158+ fi
159+
147160 if test "${have_termios_h}" = "yes" ; then
148161 AC_DEFINE ( USE_TERM_IO , 1 , [ use the termios library.] )
149162 fi
@@ -373,6 +386,24 @@ function buildEmscripten() {
373386 (cd src/platform/android/app/src/main/assets && xxd -i main.bas > ../../../../../../../src/platform/emcc/main_bas.h)
374387}
375388
389+ function buildTEENSY() {
390+ TARGET="Building teensy version."
391+ BUILD_SUBDIRS="src/platform/teensy"
392+ AC_CHECK_PROG ( have_xxd , xxd , [ yes] , [ no] )
393+ if test "${have_xxd}" = "no" ; then
394+ AC_MSG_ERROR ( [ xxd command not installed: configure failed.] )
395+ fi
396+ AM_CONDITIONAL(WITH_CYGWIN_CONSOLE, false)
397+ AC_DEFINE ( _UnixOS , 1 , [ Building under Unix like systems.] )
398+ AC_DEFINE ( _MCU , 1 , [ Micro controller based builds] )
399+ AC_DEFINE ( _TEENSY , 1 , [ Teensy Micro controller based build] )
400+ AC_DEFINE ( USE_TERM_IO , 0 , [ dont use the termios library.] )
401+ AC_DEFINE ( IMPL_LOG_WRITE , 1 , [ Driver implements lwrite()] )
402+ AC_DEFINE ( IMPL_DEV_READ , 1 , [ Implement dev_read()] )
403+ AC_SUBST ( BUILD_SUBDIRS )
404+ (cd src/platform/teensy && xxd -i main.bas > src/main_bas.h)
405+ }
406+
376407function buildFLTK() {
377408 TARGET="Building FLTK version."
378409
@@ -444,6 +475,8 @@ elif test x$ac_build_fltk = xyes; then
444475 buildFLTK
445476elif test x$ac_build_emcc = xyes; then
446477 buildEmscripten
478+ elif test x$ac_build_teensy = xyes; then
479+ buildTEENSY
447480else
448481 buildConsole
449482fi
@@ -484,6 +517,7 @@ src/platform/emcc/Makefile
484517src/platform/sdl/Makefile
485518src/platform/web/Makefile
486519src/platform/fltk/Makefile
520+ src/platform/teensy/Makefile
487521] )
488522AC_OUTPUT
489523
0 commit comments