OK, so I see two needs for pkg-flags here then.
1. finding headers that aren't in the standard locations and wouldn't otherwise be found. 2. finding headers for a specific version of a library.
I think the current committed behaviour works nicely for use case #1. Use case #2, which you've raised, suggests that ignoring a missing pkg-config is a bad default. What about adding making it an option?
Also, if we're going to cater to use case #2, then perhaps we should support a list of alternatives à la define-foreign-library. What do you think?
Finally, how about renaming the directive to pkg-config-cflags? (I can sort of imagine we might want a pkg-config-lfags for wrappers at some point in the future.)
On Sun, 2014-11-23 at 22:16 +0000, Luís Oliveira wrote:
OK, so I see two needs for pkg-flags here then.
- finding headers that aren't in the standard locations and wouldn't
otherwise be found. 2. finding headers for a specific version of a library.
The Linux distributions are going in the direction where only libc and few other core libraries are included directly, but for all the others pkg-config is becoming mandatory.
I think the current committed behaviour works nicely for use case #1. Use case #2, which you've raised, suggests that ignoring a missing pkg-config is a bad default. What about adding making it an option?
That's fine, but the strict mode should be the default.
Also, if we're going to cater to use case #2, then perhaps we should support a list of alternatives à la define-foreign-library. What do you think?
I think we should wait until somebody actually asks, because that can also be a source of compilation errors.
Finally, how about renaming the directive to pkg-config-cflags? (I can sort of imagine we might want a pkg-config-lfags for wrappers at some point in the future.)
That's a good idea. I'm also thinking of writing an ASDF extension by which a set of files is compiled using pkg-config CFLAGS and LDFLAGS. We should probably load libffi this way, at least on Linux.
On Mon, Nov 24, 2014 at 10:32 AM, Stelian Ionescu sionescu@cddr.org wrote:
I think the current committed behaviour works nicely for use case #1. Use case #2, which you've raised, suggests that ignoring a missing pkg-config is a bad default. What about adding making it an option?
That's fine, but the strict mode should be the default.
Agreed.
Also, if we're going to cater to use case #2, then perhaps we should support a list of alternatives à la define-foreign-library. What do you think?
I think we should wait until somebody actually asks, because that can also be a source of compilation errors.
Sounds reasonable.
Finally, how about renaming the directive to pkg-config-cflags? (I can sort of imagine we might want a pkg-config-lfags for wrappers at some point in the future.)
That's a good idea. [...]
Pushed a commit implementing what we've discussed. Thanks for your input Stelian.
Cheers,
On Fri, Nov 28, 2014 at 5:43 PM, Luís Oliveira luismbo@gmail.com wrote:
Pushed a commit implementing what we've discussed. Thanks for your input Stelian.
The last commit, e98738d2c2, compiles and loads without problem for me, thanks.
Liam