@@ -7,7 +7,7 @@ dnl This program is distributed under the terms of the GPL v2.0
7
7
dnl Download the GNU Public License (GPL) from www.gnu.org
8
8
dnl
9
9
10
- AC_INIT ( [ smallbasic] , [ 12.27 ] )
10
+ AC_INIT ( [ smallbasic] , [ 12.28 ] )
11
11
AC_CONFIG_SRCDIR ( [ configure.ac] )
12
12
13
13
AC_CANONICAL_TARGET
@@ -53,6 +53,11 @@ AC_ARG_ENABLE(dist,
53
53
[ ac_build_dist="yes"] ,
54
54
[ ac_build_dist="no"] )
55
55
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
+
56
61
function checkForWindows() {
57
62
win32=no
58
63
case "${host_os}" in
@@ -126,6 +131,10 @@ function checkPCRE() {
126
131
have_pcre="no"
127
132
fi
128
133
134
+ if test x$ac_build_teensy = xyes; then
135
+ have_pcre="no"
136
+ fi
137
+
129
138
if test "${have_pcre}" = "yes" ; then
130
139
AC_DEFINE ( USE_PCRE , 1 , [ match.c used with libpcre.] )
131
140
PACKAGE_LIBS="${PACKAGE_LIBS} `pcre-config --libs`"
@@ -144,6 +153,10 @@ function checkTermios() {
144
153
have_termios_h="no"
145
154
fi
146
155
156
+ if test x$ac_build_teensy = xyes; then
157
+ have_termios_h="no"
158
+ fi
159
+
147
160
if test "${have_termios_h}" = "yes" ; then
148
161
AC_DEFINE ( USE_TERM_IO , 1 , [ use the termios library.] )
149
162
fi
@@ -373,6 +386,24 @@ function buildEmscripten() {
373
386
(cd src/platform/android/app/src/main/assets && xxd -i main.bas > ../../../../../../../src/platform/emcc/main_bas.h)
374
387
}
375
388
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
+
376
407
function buildFLTK() {
377
408
TARGET="Building FLTK version."
378
409
@@ -444,6 +475,8 @@ elif test x$ac_build_fltk = xyes; then
444
475
buildFLTK
445
476
elif test x$ac_build_emcc = xyes; then
446
477
buildEmscripten
478
+ elif test x$ac_build_teensy = xyes; then
479
+ buildTEENSY
447
480
else
448
481
buildConsole
449
482
fi
@@ -484,6 +517,7 @@ src/platform/emcc/Makefile
484
517
src/platform/sdl/Makefile
485
518
src/platform/web/Makefile
486
519
src/platform/fltk/Makefile
520
+ src/platform/teensy/Makefile
487
521
] )
488
522
AC_OUTPUT
489
523
0 commit comments