apache/thrift — pull request #333 by jparise (2014-12-19 16:23:52+00:00)
Title: Directly link libboost_unit_test_framework.a.

Not all linkers support the `-l:libfoo.a` syntax (notably ld(1) on Mac
OS X). For full compatibility, we want to link directly against the
static library using its full path.

(We can't link the dynamic version of this library because of the way
that the `_main()` symbol is defined and used by the Thrift unit tests.)

Unfortunately, AX_BOOST_BASE doesn't expose the selected library path
as a variable, so we derive BOOST_LIB_DIR from BOOST_LDPATH instead.
That variable is defined conditionally on C++ and Boost support.

Lastly, I looked at the GNU AX_BOOST_UNIT_TEST_FRAMEWORK macro. It
unfortunately prefers the dynamic library over the static one (see
above), so it's not suitable for our use case. That macro could be
extended to take an argument (e.g. 'static') which would force the use
of the static library, but that felt unnecessary here.

Fixes [THRIFT-2906](https://issues.apache.org/jira/browse/THRIFT-2906)