diff options
author | James Le Cuirot <chewi@gentoo.org> | 2020-04-11 23:38:34 +0100 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2020-04-11 23:38:34 +0100 |
commit | 3b2effc5826b8488888d1f1b19bad0a80ea5a2b5 (patch) | |
tree | fd85a2f2062aefc6b0752b52cc055de57ef8b55b /sdl2-config.in | |
parent | 68d19395a38afa4e6b79e721407de3d958930f69 (diff) | |
download | sdl-3b2effc5826b8488888d1f1b19bad0a80ea5a2b5.tar.gz |
build: Merge pkg-config Libs.private into Libs for static-only builds
A project being built entirely statically will call pkg-config with
--static, which utilises the Libs.private field. Conversely it will
not use --static when not being built entirely statically, even if
there is only a static build of SDL available. This will most likely
cause the build to fail due to underlinking unless we merge the Libs
fields.
This is what the Meson build system does when it generates pkg-config
files. This also also follows the behaviour of sdl2-config.
At the same time, the runtime linker flags are not applicable to
static-only builds so only add them for shared builds.
Diffstat (limited to 'sdl2-config.in')
-rw-r--r-- | sdl2-config.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sdl2-config.in b/sdl2-config.in index 254a345e6..98d6e0653 100644 --- a/sdl2-config.in +++ b/sdl2-config.in @@ -49,7 +49,7 @@ while test $# -gt 0; do @ENABLE_SHARED_TRUE@ ;; @ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@ --static-libs) @ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@ --libs|--static-libs) -@ENABLE_STATIC_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_STATIC_LIBS@ +@ENABLE_STATIC_TRUE@ echo -L@libdir@ @SDL_STATIC_LIBS@ @ENABLE_STATIC_TRUE@ ;; *) echo "${usage}" 1>&2 |