From 5b8afad60aa2a7836b62efc9b4496ba986fe15bc Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sun, 7 Apr 2013 18:04:23 +0000 Subject: [PATCH] build: minor tweaks for emscripten builds. --- build/autotools/common.am | 7 +++++++ build/autotools/m4/lol-sdl.m4 | 2 +- configure.ac | 5 ++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/build/autotools/common.am b/build/autotools/common.am index 34717c19..0551dddc 100644 --- a/build/autotools/common.am +++ b/build/autotools/common.am @@ -106,6 +106,13 @@ CLEANFILES += $(PROGRAMS:%$(EXEEXT)=%.exe) \ $(noinst_PROGRAMS:%$(EXEEXT)=%.exe) +# +# Emscripten rules +# + +CLEANFILES += $(PROGRAMS:%$(EXEEXT)=%.data) \ + $(noinst_PROGRAMS:%$(EXEEXT)=%.data) + # # Android rules # diff --git a/build/autotools/m4/lol-sdl.m4 b/build/autotools/m4/lol-sdl.m4 index 4661fc77..42d8ca8d 100644 --- a/build/autotools/m4/lol-sdl.m4 +++ b/build/autotools/m4/lol-sdl.m4 @@ -62,7 +62,7 @@ fi dnl Then the old sdl-config method if test "x${cross_compiling}" != xyes -a "x${ac_cv_my_have_sdl}" = xno; then AC_PATH_PROG(SDL_CONFIG, sdl-config, no) - if test "${SDL_CONFIG}" != "no"; then + if test "${SDL_CONFIG}" != "no" && "${SDL_CONFIG}" --version >/dev/null; then ac_cv_my_have_sdl="yes" SDL_CFLAGS="${SDL_CFLAGS} `${SDL_CONFIG} --cflags`" SDL_LIBS="${SDL_LIBS} `${SDL_CONFIG} --libs`" diff --git a/configure.ac b/configure.ac index 268a08fa..295e88b9 100644 --- a/configure.ac +++ b/configure.ac @@ -310,7 +310,10 @@ AM_CONDITIONAL(USE_NACL, test "${ac_cv_my_have_nacl}" != "no") dnl Use Emscripten? -AC_CHECK_HEADERS(emscripten.h) +ac_cv_my_have_emscripten="no" +AC_CHECK_HEADERS(emscripten.h, + [ac_cv_my_have_emscripten="yes"]) +AM_CONDITIONAL(USE_EMSCRIPTEN, test "${ac_cv_my_have_emscripten}" != "no") dnl Use Android? FIXME: super hacks!