configure fails to find proper link command for Boost
unit_test_framework. See
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195597.
The problem is that configure first tries to link this library
statically, and when that fails, it "forgets" to try linking it
dynamically. The reason is that it has a bunch of nested loops
to try multiple variations on the library name and keeps track
of which library names it has tried so that it doesn't retry the
same library name. The problem is that one of the loop variables
also governs whether it should try static or dynamic liking,
and if static linking fails, the library name gets added to the
exclusion list, which prevents it from trying dynamic linking.
This change adds the value of this loop variable ($boost_rtopt_) to
disambiguate the two cases so that linking both ways is tried.
Also, the location where $boost_failed_libs is set is incorrect.
It needs to be moved out one loop nesting level to prevent the
same library name value from being added to the list multiple times.