-
Notifications
You must be signed in to change notification settings - Fork 77
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
Write more variables into zlib.pc #157
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing.
Could you explain what the purpose of this change is? What's the benefit, what does it fix?
Thanks
Some C/C++ programs have configure scripts that check zlib versions. This PR just fills some of those placeholder so |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I think more information shouldn't hurt.
I thought about this and have to consider it a backwards-incompatible change as this will crash hard if a header file provided by any system does not contain the desired information, information that previously wasn't provided.
To be save, please make the version optional. Thank you.
929c9a3
to
3f05a9d
Compare
Making zlib.pc is only done when compiling from source, which is part of this repo, so zlib.h will always contain that information, that's how zlib's build system is doing it. But better safe than sorry, so there will be no panic on version fail. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am sorry for the earlier review - it was based on a browser-only session with a tiny context window. This made me miss that indeed, this change only affects the vendored version, but also that comes with zlib.pc.in
which has libdir
and includedir
variables ready for substitution.
With that knowledge, I think the change is good the way it was before 😅, assuming that you are sure that the generated includedir
and libdir
variables will be correct on any system.
Thanks for bearing with me.
3f05a9d
to
929c9a3
Compare
No worries, git stores previous commits too. |
If prefix is valid than includedir and libdir should be valid too. |
Thanks again! |
Added version, that is parsed from zlib.h and
includedir
andlibdir