@@ -58,7 +58,7 @@ AC_ARG_ENABLE(teensy,
5858 [ ac_build_teensy="yes"] ,
5959 [ ac_build_teensy="no"] )
6060
61- function checkForWindows() {
61+ checkForWindows() {
6262 win32=no
6363 case "${host_os}" in
6464 *mingw* | pw32* | cygwin*)
@@ -72,7 +72,7 @@ function checkForWindows() {
7272 AM_CONDITIONAL(WITH_WIN32, test x"$win32" = "xyes")
7373}
7474
75- function checkDebugMode() {
75+ checkDebugMode() {
7676 AC_MSG_CHECKING ( [ if debug mode is enabled] )
7777 AC_ARG_WITH ( debug ,
7878 [ --with-debug Build the debug version default=no] ,
@@ -90,7 +90,7 @@ function checkDebugMode() {
9090 AC_SUBST ( CFLAGS )
9191}
9292
93- function checkProfiling() {
93+ checkProfiling() {
9494 AC_MSG_CHECKING ( [ if profile generate is enabled] )
9595 AC_ARG_WITH ( profile-generate ,
9696 [ --with-profile-generate Build the profile generate default=no] ,
@@ -116,7 +116,7 @@ function checkProfiling() {
116116 fi
117117}
118118
119- function checkPCRE() {
119+ checkPCRE() {
120120 AC_CHECK_PROG ( have_pcre , pcre-config , [ yes] , [ no] )
121121
122122 dnl supported under linux only for now
@@ -143,7 +143,7 @@ function checkPCRE() {
143143 fi
144144}
145145
146- function checkTermios() {
146+ checkTermios() {
147147 AC_CHECK_HEADERS ( [ termios.h] , [ have_termios_h=yes; break;] )
148148
149149 case "${host_os}" in
@@ -164,11 +164,11 @@ function checkTermios() {
164164 fi
165165}
166166
167- function defaultConditionals() {
167+ defaultConditionals() {
168168 AM_CONDITIONAL(WITH_CYGWIN_CONSOLE, false)
169169}
170170
171- function buildSDL() {
171+ buildSDL() {
172172 TARGET="Building SDL version."
173173 defaultConditionals
174174
@@ -259,7 +259,7 @@ function buildSDL() {
259259 (cd src/platform/android/app/src/main/assets && xxd -i main.bas > ../../../../../../../src/platform/sdl/main_bas.h)
260260}
261261
262- function buildAndroid() {
262+ buildAndroid() {
263263 defaultConditionals
264264
265265 AC_MSG_CHECKING ( [ if library mode is enabled] )
@@ -286,7 +286,7 @@ function buildAndroid() {
286286 fi
287287}
288288
289- function buildConsole() {
289+ buildConsole() {
290290 win32=no
291291 case "${host_os}" in
292292 *mingw* | pw32* | cygwin*)
@@ -345,7 +345,7 @@ function buildConsole() {
345345 AC_SUBST ( BUILD_SUBDIRS )
346346}
347347
348- function buildWeb() {
348+ buildWeb() {
349349 if test $host_os = 'mingw32'; then
350350 TARGET="Building Ming32 Web server version."
351351 AC_DEFINE ( __MINGW32__ , 1 , [ as above] )
@@ -375,7 +375,7 @@ function buildWeb() {
375375 AC_SUBST ( BUILD_SUBDIRS )
376376}
377377
378- function buildEmscripten() {
378+ buildEmscripten() {
379379 TARGET="Building Emscripten version."
380380 BUILD_SUBDIRS="src/common src/platform/emcc"
381381 AC_CHECK_PROG ( have_xxd , xxd , [ yes] , [ no] )
@@ -393,7 +393,7 @@ function buildEmscripten() {
393393 (cd src/platform/android/app/src/main/assets && xxd -i main.bas > ../../../../../../../src/platform/emcc/main_bas.h)
394394}
395395
396- function buildTEENSY() {
396+ buildTEENSY() {
397397 TARGET="Building teensy version."
398398 BUILD_SUBDIRS="src/platform/teensy"
399399 AC_CHECK_PROG ( have_xxd , xxd , [ yes] , [ no] )
@@ -422,7 +422,7 @@ function buildTEENSY() {
422422 (cd src/platform/teensy && xxd -i main.bas > src/main_bas.h)
423423}
424424
425- function buildFLTK() {
425+ buildFLTK() {
426426 TARGET="Building FLTK version."
427427
428428 dnl Checks for FLTK 1.x
@@ -480,7 +480,7 @@ function buildFLTK() {
480480 AC_SUBST ( desktopentrydir )
481481
482482 dnl generate kwp.h
483- (cd src/platform/fltk && g++ -o build_kwp build_kwp.cxx && ./build_kwp)
483+ (cd src/platform/fltk && ${CXX} -o build_kwp build_kwp.cxx && ./build_kwp)
484484}
485485
486486if test x$ac_build_sdl = xyes; then
499499 buildConsole
500500fi
501501
502- (cd documentation && g++ -o build_kwp build_kwp.cpp && ./build_kwp > ../src/ui/kwp.h)
502+ (cd documentation && ${CXX} -o build_kwp build_kwp.cpp && ./build_kwp > ../src/ui/kwp.h)
503503
504504checkPCRE
505505checkTermios
@@ -512,7 +512,8 @@ PACKAGE_CFLAGS="${PACKAGE_CFLAGS} -Wall -Werror -Wno-unused-result"
512512BUILD_DATE=`date +"%a, %d %b %Y"`
513513AC_DEFINE_UNQUOTED ( [ BUILD_DATE] ,[ "$BUILD_DATE"] ,[ Build date] )
514514
515- SB_DWORD_VER=`awk -F "." '{printf "0x%02d%02d%02d", $1,$2,$3}' <<< ${PACKAGE_VERSION}`
515+ SB_DWORD_VER=$(printf '%s' "$PACKAGE_VERSION" | awk -F. '{printf "0x%02d%02d%02d", $1,$2,$3}')
516+
516517AC_DEFINE_UNQUOTED ( [ SB_DWORD_VER] ,[ $SB_DWORD_VER] ,[ SB_DWORD_VER] )
517518
518519AC_SUBST ( PACKAGE_CFLAGS )
0 commit comments