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

Use library flags in Automake check for Glib config file parser #18

Merged
merged 1 commit into from
Jun 9, 2022

Conversation

calvin-sykes
Copy link

This is a tiny fix to the configure script so that if you use --with-libglib-2.0 to specify a path to Glib, that path is used when the separate test for the config file parser is done.

Otherwise, if Glib is installed somewhere non-standard (e.g. homebrew on Mac) the config parser won't be found even if it is actually available and so the automatic reading of extra datasets silently fails.

@jchelly
Copy link
Owner

jchelly commented Jun 9, 2022

Thanks Calvin. I'll merge that in.

If you're having to set lots of --with flags to make it find libraries you could try setting the environment variable PKG_CONFIG_PATH instead. E.g. if your packages are in /opt/local/ then I think PKG_CONFIG_PATH=/opt/local/lib/pkgconfig/ should do it (although I haven't tried building gadgetviewer on a mac in a long time).

@jchelly jchelly merged commit 09a59b4 into jchelly:master Jun 9, 2022
@calvin-sykes
Copy link
Author

Thanks for the tip! With pkg-config set up this fix is still needed (so that the path it found gets passed into the configure test) but I've mistakenly used a variable that only gets set if pkg-config wasn't found.

If you reopen the PR I've pushed a new commit that corrects this, or if it's easier to just make the change locally, line 66 in configure.ac should be changed to

LDFLAGS="${LDFLAGS} ${GLIB_LIBS}"

With that change the build works correctly with or without pkg-config, and the only --with flag I still need is for HDF5 as for some reason its homebrew package doesn't support pkg-config.

@jchelly
Copy link
Owner

jchelly commented Jun 10, 2022

Ok, thanks, I've pushed the new commit.

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.

2 participants