-
Notifications
You must be signed in to change notification settings - Fork 289
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
Optionally use system provided netcdf #3184
base: devel
Are you sure you want to change the base?
Conversation
Detect a system wide installed netcdf using pkgconfig and use it, in case --enable-netcdf=system is specified. Fixes libMesh#1542.
@@ -27,6 +29,8 @@ AC_DEFUN([CONFIGURE_NETCDF], | |||
]) | |||
|
|||
AS_CASE("${netcdfversion}", | |||
[system], [PKG_CHECK_MODULES([NETCDF], [netcdf >= 4.2])], |
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.
Do we need to make a local copy of pkg.m4 before we try to use PKG_CHECK_MODULES? My system has it installed, but we don't want bootstrap to rely on anything more than our own contrib/autotools version.
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.
It is part of pkgconf, so it should be there already.
From several years of packaging experience, bundled copies only get out of sync with upstream and are a reoccurring PITA.
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.
It is part of pkgconf, so it should be there already.
Sadly I have committed the ought-is fallacy and been burned by it too many times to not check, and ... it's almost guaranteed to be available on Ubuntu (It's a dependency for ubuntu-desktop now, of all things? The default GUI now depends on autoconf macros??), but the next system I checked was an OSX laptop, where although everything I need to build (and even bootstrap) libMesh is there, pkg.m4 isn't.
bundled copies only get out of sync with upstream and are a reoccurring PITA.
I can't disagree with this. But adding dependencies willy-nilly has gotten me in trouble too. What does pkg.m4 itself depend on? If it's self-contained (and looks like it is, in a couple hundred lines?) I'd feel safer working with a copy of it than letting people without it break.
Per #3390 we will likely want to do some comparison of netcdf and hdf5 versions so that we can error out during configure if incompatible versions are detected ... although admittedly the incompatibility of netcdf 4.6.2 with hdf5 1.12 appears to only be in netcdf testing of itself and not in our uses of it |
Detect a system wide installed netcdf using pkgconfig and use it, in
case --enable-netcdf=system is specified.
Fixes #1542.