Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autotools: Allow selecting a specific libjpeg SONAME #434

Merged
merged 2 commits into from
Mar 11, 2024

Conversation

smcv
Copy link
Contributor

@smcv smcv commented Mar 11, 2024

It is possible to have multiple dynamic shared libraries for libjpeg, for example in the Steam Runtime 1 'scout' SDK, which has development headers and a runtime library for libjpeg-turbo (installed as libjpeg.so.8), but also has the runtime library for IJG libjpeg 6b (installed as libjpeg.so.62). Allow an invocation like

./configure --enable-jpg-shared=libjpeg.so.8 ...

to force the use of a specific SONAME.

Resolves: #433

It is possible to have multiple dynamic shared libraries for libjpeg,
for example in the Steam Runtime 1 'scout' SDK, which has development
headers and a runtime library for libjpeg-turbo (installed as
libjpeg.so.8), but also has the runtime library for IJG libjpeg 6b
(installed as libjpeg.so.62). Allow an invocation like

    ./configure --enable-jpg-shared=libjpeg.so.8 ...

to force the use of a specific SONAME.

Resolves: libsdl-org#433
Signed-off-by: Simon McVittie <smcv@collabora.com>
@sezero
Copy link
Contributor

sezero commented Mar 11, 2024

Can we please expand this to cover other --enable-XXX-shared ?

@smcv
Copy link
Contributor Author

smcv commented Mar 11, 2024

See #433 (comment) for notes on why this is the way it is.

@smcv
Copy link
Contributor Author

smcv commented Mar 11, 2024

Can we please expand this to cover other --enable-XXX-shared ?

For avif, jxl, png and tif: yes if you want, but I'm not really convinced it's worth it just for symmetry. As far as I know, all of these libraries only have one implementation, which is numbered in a straightforward integer sequence (no 62 meaning 6.2).

For webp: not trivially, we'd have to add a second option, and I'd prefer not to get into that for a stable-branch bug-fix, particularly when Autotools is on its way out (present in 2.x but deleted from 3.x).

@sezero
Copy link
Contributor

sezero commented Mar 11, 2024

@slouken ?

This is just for completeness: there is not the same requirement for this
as with libjpeg, because there's only one implementation of each of the
other libraries.

webp is not included in this, because that would require inventing
syntax for specifying the SONAME of libwebp and libwebpdemux separately.

Signed-off-by: Simon McVittie <smcv@collabora.com>
@smcv
Copy link
Contributor Author

smcv commented Mar 11, 2024

For avif, jxl, png and tif: yes if you want, but I'm not really convinced it's worth it just for symmetry.

I added a commit to give these libraries the same treatment, which you can take or not take as you prefer. I'd personally suggest not cherry-picking this one to 2.8.x.

@slouken slouken merged commit 949ebfa into libsdl-org:SDL2 Mar 11, 2024
8 checks passed
@slouken
Copy link
Collaborator

slouken commented Mar 11, 2024

Merged and the JPEG library fix is merged to release-2.8.x.

@smcv smcv deleted the 2.x-issue433 branch March 13, 2024 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants