Used LDADD to add unbundled libraries to all command line programs.
Used LDADD to add unbundled libraries to all command line programs.

When building with unbundled libraries, every program needs to link
against the libraries, and can't assume it will be linked against
because the program links with a program which links against the
libraries.

This comes up on Debian and Ubuntu[1] which set the flag
`-Wl,--no-copy-dt-needed-entries` which forcibly disables the binaries
from getting automatically the dependencies of the shared libraries they
link against.

Also adds -Wl,--as-needed to AM_LDFLAGS to silence warnings in Fedora
packaging since we link against more libraries than things actually use
at the command line. Debian and Ubuntu default to this option.

OS X doesn't have `-Wl,--as-needed` or `--no-copy-dt-needed-entries` so
only enable it on Linux.

[1] https://wiki.ubuntu.com/ToolChain/CompilerFlags#A-Wl.2C--no-copy-dt-needed-entries

Review: https://reviews.apache.org/r/32008

Gilbert88/mesos,andschwa/mesos,dforsyth/mesos,asamerh4/mesos,verizonlabs/mesos,craimbert/mesos,abudnik/mesos,gsantovena/mesos,zmalik/mesos,Gilbert88/mesos,gsantovena/mesos,zmalik/mesos,neilconway/mesos,yuquanshan/customizedMesos,chhsia0/mesos,craimbert/mesos,jpeach/mesos,andschwa/mesos,andschwa/mesos,gsantovena/mesos,reneploetz/mesos,zmalik/mesos,dforsyth/mesos,verizonlabs/mesos,kaysoky/mesos,abudnik/mesos,yuquanshan/customizedMesos,verizonlabs/mesos,gsantovena/mesos,verizonlabs/mesos,craimbert/mesos,neilconway/mesos,jpeach/mesos,Gilbert88/mesos,neilconway/mesos,asamerh4/mesos,kaysoky/mesos,Aman-Jain-14/customizedMesos,chhsia0/mesos,Aman-Jain-14/customizedMesos,jpeach/mesos,reneploetz/mesos,abudnik/mesos,andschwa/mesos,reneploetz/mesos,kaysoky/mesos,yuquanshan/customizedMesos,Gilbert88/mesos,zmalik/mesos,craimbert/mesos,dforsyth/mesos,Aman-Jain-14/customizedMesos,neilconway/mesos,jpeach/mesos,Gilbert88/mesos,asamerh4/mesos,abudnik/mesos,yuquanshan/customizedMesos,jpeach/mesos,asamerh4/mesos,andschwa/mesos,dforsyth/mesos,Aman-Jain-14/customizedMesos,chhsia0/mesos,verizonlabs/mesos,chhsia0/mesos,asamerh4/mesos,yuquanshan/customizedMesos,reneploetz/mesos,gsantovena/mesos,abudnik/mesos,zmalik/mesos,verizonlabs/mesos,Aman-Jain-14/customizedMesos,yuquanshan/customizedMesos,zmalik/mesos,chhsia0/mesos,neilconway/mesos,gsantovena/mesos,neilconway/mesos,gsantovena/mesos,Aman-Jain-14/customizedMesos,andschwa/mesos,kaysoky/mesos,chhsia0/mesos,dforsyth/mesos,kaysoky/mesos,andschwa/mesos,asamerh4/mesos,craimbert/mesos,chhsia0/mesos,dforsyth/mesos,neilconway/mesos,jpeach/mesos,Gilbert88/mesos,Gilbert88/mesos,abudnik/mesos,reneploetz/mesos,abudnik/mesos,craimbert/mesos,kaysoky/mesos,craimbert/mesos,jpeach/mesos,Aman-Jain-14/customizedMesos,reneploetz/mesos,zmalik/mesos,yuquanshan/customizedMesos,kaysoky/mesos,asamerh4/mesos,dforsyth/mesos,reneploetz/mesos,verizonlabs/mesos