-
Notifications
You must be signed in to change notification settings - Fork 247
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
Support pkg-config in configure.ac for iniparser #622
Comments
I have iniparser 4.2.1 on my ubuntu 24.10 but I can't seem to have the package file both
and
fails to find any iniparser i don't think the package file was added properly before quit recently: 4.2.2? Anyway, the reason for the hard coded path was because debian have the header file in iniparser/iniparser.h and other distros did not: https://bugzilla.redhat.com/show_bug.cgi?id=1635706 this may be resolved all over now and I can remove the include path and just do the correct way to do it would of course be to leave the include as it is and use the package config file. looks like the package config file adds the iniparser sub dir to the include paths: |
Ah I see, I hadn't checked as far back as 4.2.1 given we never had that version in Gentoo and kind of assumed, sorry. Currently have 4.2.6, in case interested the file has:
For us, during cross-compilation, pkg-config --cflags would give e.g. Using pkg-config may handle odd cases like /opt/iniparser though, not that (we) need that. |
Well... historically we also had a odd include path at /usr/include/iniparser4 back when we installed iinparser3 and 4 at same time, but we got rid of the logic recently given we have nothing that needs 3 anymore. In that kind of situation (when possible, it wasn't with iniparser) we often rely on pkg-config to tell a package which version to use. Just to say that it's nice to leave it up to pkg-config when possible rather than assume anything. |
I can make it use the pkg-config if it exists and fall back to using the manual include path if it can't find any pkg-config |
Currently configure.ac hardcodes some paths like
-I/usr/include/iniparser
as a best effort, but this doesn't account for any non-typical installation or other needs like when cross-compiling. This is fine as a fallback for old versions of iniparser, but since iniparser-4.2 ainiparser.pc
is shipped and it'd be nice if it was tried first.The text was updated successfully, but these errors were encountered: