autotools: Move mandatory dependencies from EXTRA_LDFLAGS to MIXER_LIBS
Autotools variables whose names end with _LDFLAGS are usually for
linker options such as -Wl,--export-dynamic which would not be
appropriate to copy into the pkg-config or CMake metadata.
Move these dependencies into a separate _LIBS variable, which is
conventionally a list of -L and -l options (only) and can be copied
into pkg-config or CMake metadata. This follows the same pattern as
IMG_LIBS and TTF_LIBS in SDL_image and SDL_ttf.
Exclude SDL_LIBS from this, because the CMake metadata has a special
case for finding SDL, and linking to a different SDL causes link failure
on our macOS CI. Link SDL via $(SDL_LIBS) instead.
sdl2_mixer-config.cmake.in: Use MIXER_LIBS for static linking
We can't rely on all mandatory dependencies being in PC_LIBS, because
if we found a dependency such as libflac via pkg-config, we would have
put the name of the pkg-config module in PC_REQUIRES instead.
autotools: Move mandatory dependencies from EXTRA_LDFLAGS to MIXER_LIBS
Autotools variables whose names end with _LDFLAGS are usually for linker options such as -Wl,--export-dynamic which would not be appropriate to copy into the pkg-config or CMake metadata.
Move these dependencies into a separate _LIBS variable, which is conventionally a list of -L and -l options (only) and can be copied into pkg-config or CMake metadata. This follows the same pattern as IMG_LIBS and TTF_LIBS in SDL_image and SDL_ttf.
Exclude SDL_LIBS from this, because the CMake metadata has a special case for finding SDL, and linking to a different SDL causes link failure on our macOS CI. Link SDL via $(SDL_LIBS) instead.
sdl2_mixer-config.cmake.in: Use MIXER_LIBS for static linking
We can't rely on all mandatory dependencies being in PC_LIBS, because if we found a dependency such as libflac via pkg-config, we would have put the name of the pkg-config module in PC_REQUIRES instead.
Resolves: https://github.com/libsdl-org/SDL_mixer/issues/411