@@ -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.31 ] )
10+ AC_INIT ( [ smallbasic] , [ 12.32 ] )
1111AC_CONFIG_SRCDIR ( [ configure.ac] )
1212
1313AC_CANONICAL_TARGET
@@ -174,6 +174,9 @@ function buildSDL() {
174174
175175 PKG_CHECK_MODULES([ SDL3] , [ sdl3] )
176176
177+ AC_MSG_CHECKING ( [ for SDL3 library linking] )
178+ SDL3_LIBS=`pkg-config sdl3 --libs --static`
179+
177180 SAVED_CPPFLAGS="$CPPFLAGS"
178181 CPPFLAGS="$CPPFLAGS `pkg-config freetype2 --cflags`"
179182 AC_CHECK_HEADERS ( [ ft2build.h] , [ ] , [ AC_MSG_ERROR ( [ libfreetype6-dev not installed: configure failed.] ) ] )
@@ -184,6 +187,15 @@ function buildSDL() {
184187 AC_MSG_ERROR ( [ xxd command not installed: configure failed.] )
185188 fi
186189
190+ AC_ARG_WITH ( flatpak ,
191+ [ --with-flatpak Build the flatpak version default=no] ,
192+ [ with_flatpak=$withval] ,
193+ [ with_flatpak=no] )
194+ if test "$with_flatpak" = "yes" || test "$with_flatpak" = "full"
195+ then
196+ AC_DEFINE ( _FLATPAK , 1 , [ flatpak build enabled] )
197+ fi
198+
187199 case "${host_os}" in
188200 *mingw* | cygwin*)
189201 dnl avoid using MSCRT versions of printf for long double
@@ -222,11 +234,7 @@ function buildSDL() {
222234
223235 PACKAGE_CFLAGS="${PACKAGE_CFLAGS} ${FONTCONFIG_CFLAGS}"
224236
225- (cd images && xxd -i sb-desktop-128x128.png > ../src/platform/sdl/icon.h)
226-
227- AC_MSG_CHECKING ( [ for SDL3 library linking] )
228- SDL3_LIBS=`pkg-config sdl3 --libs --static`
229- AC_MSG_RESULT ( [ $SDL3_LIBS] )
237+ (cd images && xxd -i io.github.smallbasic.SmallBASIC.png > ../src/platform/sdl/icon.h)
230238
231239 dnl backlinking support for modules
232240 PACKAGE_LIBS="${PACKAGE_LIBS} -ldl -no-pie"
@@ -271,7 +279,6 @@ function buildAndroid() {
271279 TEST_DIR="src/platform/android"
272280 AC_SUBST ( TEST_DIR )
273281 if test $with_library = no; then
274- (cd src/platform/android/webui && npm run build)
275282 TARGET="Building for Android."
276283 else
277284 TARGET="Building for Android library."
@@ -351,6 +358,14 @@ function buildWeb() {
351358 PACKAGE_LIBS="${PACKAGE_LIBS} -lm -ldl -lpthread -lmicrohttpd"
352359 AC_CHECK_HEADERS ( [ microhttpd.h] , [ ] , [ AC_MSG_ERROR ( [ microhttpd is not installed] ) ] )
353360 fi
361+
362+ AC_CHECK_HEADERS ( [ curl/curl.h] , [ have_curl_h=yes; break;] )
363+
364+ if test "x${have_curl_h}" = "xyes" ; then
365+ AC_DEFINE ( USE_LIB_CURL , 1 , [ use the curl library.] )
366+ PACKAGE_LIBS="${PACKAGE_LIBS} -lcurl"
367+ fi
368+
354369 BUILD_SUBDIRS="src/common src/platform/web"
355370 AM_CONDITIONAL(WITH_CYGWIN_CONSOLE, false)
356371 AC_DEFINE ( _UnixOS , 1 , [ Building under Unix like systems.] )
@@ -385,6 +400,17 @@ function buildTEENSY() {
385400 if test "${have_xxd}" = "no" ; then
386401 AC_MSG_ERROR ( [ xxd command not installed: configure failed.] )
387402 fi
403+ AC_CHECK_PROG ( [ ARM_GCC] , [ arm-none-eabi-gcc] , [ yes] , [ no] )
404+ AC_CHECK_PROG ( [ ARM_GXX] , [ arm-none-eabi-g++] , [ yes] , [ no] )
405+ if test "$ARM_GCC" = "no"; then
406+ AC_MSG_ERROR ( [ arm-none-eabi-gcc not found in PATH. Please install gcc-arm-none-eabi.] )
407+ fi
408+ if test "$ARM_GXX" = "no"; then
409+ AC_MSG_ERROR ( [ arm-none-eabi-g++ not found in PATH. Please install g++-arm-none-eabi.] )
410+ fi
411+ PKG_CHECK_MODULES([ LIBUSB] , [ libusb] , [ ] ,
412+ [ AC_MSG_ERROR ( [ libusb not found. Please install libusb-dev] ) ]
413+ )
388414 AM_CONDITIONAL(WITH_CYGWIN_CONSOLE, false)
389415 AC_DEFINE ( _UnixOS , 1 , [ Building under Unix like systems.] )
390416 AC_DEFINE ( _MCU , 1 , [ Micro controller based builds] )
@@ -482,7 +508,7 @@ checkProfiling
482508checkForWindows
483509
484510CFLAGS="${CFLAGS} -std=gnu11"
485- PACKAGE_CFLAGS="${PACKAGE_CFLAGS} -Wall -Wno-unused-result"
511+ PACKAGE_CFLAGS="${PACKAGE_CFLAGS} -Wall -Werror - Wno-unused-result"
486512BUILD_DATE=`date +"%a, %d %b %Y"`
487513AC_DEFINE_UNQUOTED ( [ BUILD_DATE] ,[ "$BUILD_DATE"] ,[ Build date] )
488514
0 commit comments