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
bring over autoconf from samtools #576
Conversation
I've just added my additions to this PR. They add configure options for plugins and libgsl, and rearrange Makefile slightly so that variables get set at the correct times. I've also updated INSTALL and made travis test both configure and non-configure builds. |
remove config.h.in
bcftools needs to export all of its symbols so that plugins can use them. There are two ways to do this on MacOS - pass -export_dynamic to the linker, or -rdynamic to the compiler. Unfortunately -export_dynamic isn't supported by older linkers on the Mac, causing build failures. Using -rdynamic works a bit better. gcc is fine, but on old systems clang issues an "argument unused during compilation: '-rdynamic'" warning. On newer systems, clang accepts the -rdynamic option without complaining. As the warning is non-fatal (as long as -Werror is not in use) the build completes. These options only appear to be necessary with clang if link-time optimization is turned on. Enabling -flto without -rdynamic or -Wl,-export_dynamic results in undefined symbols on new MacOS systems.
Allow plugins to be enabled/disabled via configure, and add options to set the install directory and default plugin search path. If plugins are enabled: * The plugins are built and installed * `make test` will test the plugins * 'plugin' will appear in the bcftools usage output * `bcftools plugin` will work as normal If plugins are disabled: * The plugins are not built * `make test` does not try to test the plugins * 'plugin' is hidden from the bcftools usage * `bcftools plugin` prints a short message to say that plugins are disabled, and exits non-zero. If configure is not used, the default is to enable plugins. The Makefile is rearranged slightly so that default values and overrides from config.mk work correctly. The platform test in the Makefile is changed so that it can be overridden by configure, so that the correct result should be used when cross-compiling.
Add a configure option to allow linking against the GNU Scientific Library, enabling the polysomy subcommand. Includes library checks for libgsl and cblas. The cblas library may be called libcblas or libgslcblas. The default is to look for both of these, but a --with-cblas option is also included to allow the cblas library name to be selected manually. A message about the change of license to GPL is printed out if configure is run successfully with --enable-libgsl. Travis in autoconf mode is updated to use --enable-libgsl.
Thanks alot @daviesrob! I've rebased against develop and squashed a few of the early commits. I get the following warnings when running autoheader and autoconf. Anything to worry about?
|
Also, @daviesrob, the stuff with |
The warnings are due to AX_WITH_HTSLIB passing a variable ($HTSDIR) to AC_CONFIG_SUBDIRS. It means bcftools' On On newer installations the linker knows about It might be worth adding a test to configure to see if |
You can configure with |
Great stuff, thanks for this! |
Still todo:
--enable-gsl
/--with-gsl
--disable-plugins
and make sure disambiguated from htslib pluginsPlus there may be a bunch of stuff I am missing...
Closes #573, closes #481