From 034ce1678e88bcb438dad5ed202974cb9524e07b Mon Sep 17 00:00:00 2001 From: Le Philousophe Date: Fri, 14 May 2021 23:32:47 +0200 Subject: [PATCH] AMIGAOS: Fix miniGL link when building with plugins On AmigaOS miniGL is a static library and linking against it in plugins prevents to have a shared context. By linking only in main executable, this forces plugins to use the only context available in scummvm binary. --- configure | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/configure b/configure index d9afdcc180f..2836dc78b99 100755 --- a/configure +++ b/configure @@ -5468,6 +5468,19 @@ define_in_config_if_yes "$_opengl_game_classic" "USE_OPENGL_GAME" define_in_config_if_yes "$_opengl_game_shaders" "USE_OPENGL_SHADERS" define_in_config_if_yes "$_opengl_game_es2" "USE_GLES2" +if test "$_dynamic_modules" = yes ; then + case $_host_os in + amigaos*) + # miniGL on AmigaOS is a static library so don't link with it in plugins + # instead link against it and include all symbols + append_var LIBS "-Wl,-whole-archive $LIBS_3D -Wl,-no-whole-archive" + LIBS_3D= + ;; + *) + ;; + esac +fi + # If we have OpenGL libraries, then add them to plugins # so they could link if test -n "$LIBS_3D" ; then