-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Use pkg-config to get x11 and xt flags #3
Conversation
Because these are listed in `$X_PRE_LIBS`.
0067775
to
f2929d2
Compare
I have rebased on top of the main branch. I also added a commit to test using the |
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.
defering judgement; looked at this mainly for my own edification and if I could see something obvious :)
@djerius, have a moment to look over this? |
7b858e2
to
c78c98c
Compare
@djerius, now that change should work. More details in the commit:
|
Co-authored-by: djerius <djerius@cfa.harvard.edu>
Per the macOS ld(1) man page <https://www.unix.com/man-page/OSX/1/ld/>, > The default library search path is /usr/lib then /usr/local/lib. When `HOMEBREW_PREFIX=/usr/local`, this is where the `.dylib` files for X11 are symlinked by Homebrew. When `AC_PATH_XTRA` is called, it uses `/usr/bin/gcc` (Apple clang) and since the libraries are found in `/usr/local/lib`, it does not need to specify any `-L` paths. However when `libtool` is used to call Homebrew `gfortran`, it sets the flag `-syslibroot` which per the man page for ld(1): > The -syslibroot option will prepend a prefix to all search paths. and this means that it no longer looks under `/usr/local/lib` by default. To fix this, add the default path back by setting the `LIBRARY_PATH` environment variable.
98f1723
to
bb4bc01
Compare
3cbd03b
to
7515756
Compare
This is to test that if libraries are not symlinked into the Homebrew prefix (here by using `brew unlink`), then `autotool` will use `pkg-config` to find the libraries.
7515756
to
e8a55e2
Compare
@djerius, the latest commits should now test the case where |
Sorry about the delay! |
Not a problem! I was wondering if the next thing to tackle is getting #1 incorporated (hopefully it can be done and the license can be worked out). |
This PR is on top of the commits of #2.
As discussed in #2, some
package managers (e.g., Homebrew) do not place x11 and xt files in the standard
locations. This uses
pkg-config
to get that information first.