ofiwg/libfabric — pull request #335 by pmmccorm (2014-11-18 21:44:35+00:00)
Title: Static constructors for built-in providers.

Add config.h defines for each built provider and if that provider is built as a DSO. Make
changes to init functions to match: remove ctor on fi_ini and call explicitly, only have the
ctor attribute defined on the providers if built as DSO, explicitly call built-in providers
and declare their init defs in fi.h

This should work for all our supported build configurations, and should not work for static-build plus dl-loading built-in providers (which I assume is unsupported).

Tested with dso providers and built-in, needs testing for static linking and other more providers. @sayantansur @jsquyres

I can centralize a lot of the sprinkled ifdefs in one header (for example: include/provider.h) that is included by fabric.c and the various providers if that is wanted.

fixes #293

Signed-off-by: pmmccorm