update_engine: make it accept LDFLAGS

BUG=None
TEST=It accepts LDFLAGS now

Change-Id: Ibfd08e72db9b56d580fd474169f51b5124b5cdd1
Reviewed-on: https://chromium-review.googlesource.com/168047
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Yunlian Jiang <yunlian@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>
Allow not passing LDFLAGS to scons

On CL:168047 passing LDFLAGS to scons was introduced, but forcing
it to be always present. This patch makes it optional to pass the
LDFLAGS environment variable.

BUG=None
TEST=Ran "scons -c && scons".

Change-Id: I6b0cfb76d635ded26e71f5cdb1dca3cfae2d4421
Reviewed-on: https://chromium-review.googlesource.com/173742
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Remove duplicated flags.

On CL:2044001 these duplicated flags were added without any mention
of it on the commit message. Anyway, these duplicated flags are
required only once.

TEST=build and unittest
BUG=None

Change-Id: Ic3b6fccc2bdf9e462deebe474b85cb4e3f5cc1b1
Reviewed-on: https://chromium-review.googlesource.com/186383
Reviewed-by: David Zeuthen <zeuthen@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Fix lib flags on update_engine scons file.

env['LIBS'] defines the list libraries that the binaries will be
linked against, passing -l and the name of the library. Instead of
hardcoding the library names, we use pkg-config when available.

BUG=None
TEST=emerge-link update_engine ; sudo emerge update_engine
TEST=Manually checked pkg-config for each one of the packages and compared with the former list.

Change-Id: Ie962cac297d2b9eb41fb244b9edfb1e693e81523
Reviewed-on: https://chromium-review.googlesource.com/203335
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>

Conflicts:
	SConstruct
Merge pull request #44 from marineam/build

Build updates