-
Notifications
You must be signed in to change notification settings - Fork 245
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 pkg-config in Autotools #2099
base: main
Are you sure you want to change the base?
Conversation
Hmm, it doesn't seem to like me. Will fix the bugs some other day, but the idea still stands. |
Thanks. I'll take a closer look tomorrow. |
But at first glance, the PR must be incomplete, because |
24fa196
to
c3268b8
Compare
This commit treats the following: - Detects if pkg-config or pkgconf is available - Uses pkg-config to set the correct flags for dependencies. In particular, this solves issues when compiling against static libraries. - Cleans up configure.ac - Sets LDFLAGS, CFLAGS, CPPFLAGS and LIBS correctly and trims their corresponding string - Now pushes -lgc if GC is used. Seems to have gone unnoticed. - Pushes LIBS into flint.pc
c3268b8
to
08dfa0e
Compare
I believe this part should be fixed now. |
A few comments for now:
|
Thanks. Why separate
Suppose one uses Boehm GC and BLAS (are used "privately", I suppose), and that they are in other directories compared to FLINT's prefix. Could you give a simple example of how the pkg-config file would look like, in you opinion?
Yes, I believe GC is incorrect in its current format. However, the NTL support is header-only -- should I still push it into
Alright, I'll fix this (I have never gotten this problem with any mainline linker, though).
I mainly want to remove duplicate flags (suppose MPFR and GMP are in the same directory) and strip whitespaces as it is easier to look at the build/configure results with human eyes. The hierarchy for |
Thanks for the help, by the way! I appreciate it! |
Your
Then the basic idea for each dependency
Depending on the order in which Leave On the other hand, moving |
Re: deduplication I decided to take this approach in my R package's It is definitely a hack but it seems more robust than sorting the options or filtering them "manually" by other means. I agree that it is nice to have readable |
This looks suboptimal. pkg-config comes with its own autoconf macros, why aren't they used? |
Exactly what looks suboptimal?
Are you referring to using their macros instead of the new changes in |
Users can always clobber
So there are probably not too many good uses for
Despite the name, the output from |
This commit treats the following:
-lgc
when Boehr GC is being configured for. Has gone unnoticed.Solves #2097
Ping @jaganmn, please give your feedback. Now pkg-config is the default. The changes of interests are really in
acinclude.m4
.Sidenote: I don't know if people typically use CBLAS or OpenBLAS, and if we should have an option where you choose which one to pick.