Change LDFLAGS to LDADD in order to allow static builds.  This is more
proper way to ensure that the command line compile works the way we intend.

Add explicity DPADD statemens on LIBMD and LIBPTHREAD depending on which
options are used in the build.

Reviewed by:	andrew
MFC after:	2 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@274552 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f