File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -212,10 +212,23 @@ function buildSDL() {
212212
213213 (cd images && xxd -i sb-desktop-128x128.png > ../src/platform/sdl/icon.h)
214214
215+ HAVE_SDL2_STATIC=yes
216+ AC_MSG_CHECKING ( [ if installed SDL2 supports static libs] )
217+ AC_PATH_PROGS_FEATURE_CHECK ( [ SDL2_STATIC_TMP] , [ sdl2-config] ,
218+ AS_IF ( [ `"$ac_path_SDL2_STATIC_TMP" --static-libs 2>&1 | sed '/Usage/!{q1};' > /dev/null`] , [ HAVE_SDL2_STATIC=no] ) )
219+ AC_MSG_RESULT ( [ $HAVE_SDL2_STATIC] )
220+
221+ if test "x$HAVE_SDL2_STATIC" = "xno"; then
222+ SDL_LIBS=`sdl2-config --libs`
223+ else
224+ SDL_LIBS=`sdl2-config --static-libs`
225+ fi
226+
215227 dnl backlinking support for modules
216228 PACKAGE_LIBS="${PACKAGE_LIBS} -ldl -no-pie"
217229 PACKAGE_LIBS="${PACKAGE_LIBS} ${FONTCONFIG_LIBS}"
218- PACKAGE_LIBS="-static-libgcc ${PACKAGE_LIBS} `sdl2-config --static-libs` `pkg-config freetype2 --libs`"
230+
231+ PACKAGE_LIBS="-static-libgcc ${PACKAGE_LIBS} ${SDL_LIBS} `pkg-config freetype2 --libs`"
219232 esac
220233
221234 PACKAGE_CFLAGS="${PACKAGE_CFLAGS} `sdl2-config --cflags` `pkg-config freetype2 --cflags` -fno-exceptions"
Original file line number Diff line number Diff line change @@ -714,10 +714,13 @@ void Runtime::saveWindowRect() {
714714//
715715// System platform methods
716716//
717+ #pragma GCC diagnostic push
718+ #pragma GCC diagnostic ignored "-Wint-in-bool-context"
717719bool System::getPen3 () {
718720 SDL_PumpEvents ();
719721 return (SDL_BUTTON (SDL_BUTTON_LEFT) && SDL_GetMouseState (&_touchCurX, &_touchCurY));
720722}
723+ #pragma GCC diagnostic pop
721724
722725void System::completeKeyword (int index) const {
723726 if (get_focus_edit () && isEditing ()) {
You can’t perform that action at this time.
0 commit comments