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

Produce pkg-config files for aldor libraries #27

Open
pippijn opened this issue Jul 26, 2013 · 5 comments
Open

Produce pkg-config files for aldor libraries #27

pippijn opened this issue Jul 26, 2013 · 5 comments

Comments

@pippijn
Copy link
Collaborator

pippijn commented Jul 26, 2013

Instead of querying the aldor about where its programs are (see #10), we could use the standard mechanism of pkg-config. For example, pkg-config --cflags libfoam would return -I${includedir}, which can be used for building external libraries. The .pc files can also contain arbitrary additional information, such as the location of aldor includes, recommended aldor compiler flags, etc.

@hemmecke
Copy link
Collaborator

How would that work with non-system-wide (i.e. user installed) versions of the aldor compiler + libfoam?

@pippijn
Copy link
Collaborator Author

pippijn commented Jul 26, 2013

You can use the PKG_CONFIG_PATH environment variable for that, just like you would set your PATH variable accordingly.

@hemmecke
Copy link
Collaborator

Maybe that defeats the whole purpose. I want minimal user interaction. Setting PKG_CONFIG_PATH is something that can be avoided.

Use case:
A library writer who want's to use libtool and the _LIBRARIES primary of automake. Then the .c->.o->.a compilation is taken over by automake rules. But since that proces will not call the aldor executable anymore, the paths that are included in the wrapper do not help. So one has to provide an additional -I${includedir} which points to a place of foam_c.h.

If that library author now gives the sources to someone else, there must be a mechanism to figure out this additional include path on the recipient's computer. Of course, configure.ac can rely on PKG_CONFIG_PATH to be set correctly. But I doubt that every user will do that. Setting PATH for the aldor executable, however, is probably more common.

PKG_CONFIG_PATH is certainly a good idea, but maybe the aldor --print-confvar prefix 5ca3e2f, (which can be run by configure) is easier than an additional user interaction after a failed configure run. The latter even means to write documentation for the user to let him/her figure out what went wrong and how to cure it.

@pippijn
Copy link
Collaborator Author

pippijn commented Jul 26, 2013

You can set PKG_CONFIG_PATH in configure automatically. Once you have that (perhaps from which aldor or aldor --print-confvar), you can get the rest out of the pkg-config variables.

@hemmecke
Copy link
Collaborator

Is by general (non-aldor-specific) convention aldor --print-confvar prefix related in any way to what I should set PKG_CONFIG_PATH to?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants