Add support for building against external lmfit - Redmine #1957
Please add support for building against system version of the lmfit library. lmfit upstream merged your modifications in 6.0 and it’s present at least in Fedora 23 and later. *(from redmine: issue id 1957, created on 2016-05-12 by rathann, closed on 2016-06-27)* * Changesets: * Revision 9748639d8402319c823bbf09945efae489b1f134 by Mark Abraham on 2016-06-23T19:22:12Z: ``` Allow use of external lmfit package For packaging GROMACS for software distributions, we need to permit maintainers to use external system libraries, rather than the versions we bundle for convenience for general GROMACS users. This patch implements the CMake option GMX_EXTERNAL_LMFIT. It implements FindLmfit.cmake, which relies heavily on pkg-config, which is supported by lmfit and widely available in the intended use case (ie distribution maintainers), but can be worked around if lmfit is available and pkg-config is not and somehow an external lmfit is needed. lmfit management now needs to happen at a higher point in the GROMACS build system, so I have refactored the source code files that use lmfit functionality. The former gmx_lmcurve.cpp in src/external was in fact GROMACS code that calls the lmmin routine from lmfit and declares a suitable callback, so it should never have been in src/external. Moved it (and its header) to src/gromacs/correlationfunctions. Reverted the introduction of gmx_ prefixes in an earlier commit - that approach permits a third party to link to their own lmfit without symbol clashes, but doesn't resolve the distribution problem. If both clients of lmfit can use the same external version, then the problem is solved, and if each need a different version then there are various further options. Updated the README accordingly, and noted various other differences from stock lmfit 6.1. Added file-level Doxygen for some files. Added mention to install guide. The implementation is quiet upon repeat cmake runs, and makes only advanced or internal cache variables. Fixes #1957 Change-Id: Ib05eee796c6cf13ea90d456cb9b54b166bfda717 ```
issue