diff --git a/src/test/SDL_test_memory.c b/src/test/SDL_test_memory.c index df182da41..e49bd60ab 100644 --- a/src/test/SDL_test_memory.c +++ b/src/test/SDL_test_memory.c @@ -26,6 +26,7 @@ #include "SDL_test_memory.h" #ifdef HAVE_LIBUNWIND_H +#define UNW_LOCAL_ONLY #include #endif diff --git a/test/configure.ac b/test/configure.ac index a0450255a..1ff1157ed 100644 --- a/test/configure.ac +++ b/test/configure.ac @@ -192,6 +192,13 @@ if test x$have_SDL_ttf = xyes; then fi AC_SUBST(SDL_TTF_LIB) +dnl Really, SDL2_test should be linking against libunwind (if it found +dnl libunwind.h when configured), but SDL2_test is a static library, so +dnl there's no way for it to link against it. We could make SDL2 depend on +dnl it, but we don't want all SDL2 build to suddenly gain an extra dependency, +dnl so just assume that if it's here now, SDL2_test was probably built with it. +PKG_CHECK_MODULES(libunwind, libunwind, [LIBS="$LIBS $libunwind_LIBS"]) + dnl Finally create all the generated files AC_CONFIG_FILES([Makefile]) AC_OUTPUT