build: Correcting library detection

When detecting location of the library, `includes` and `libpath`
variables must be used instead of `cxxflags` and `linkflags`.  While the
latter also makes everything work, it results in unexpected behavior:
waf always adds LINKFLAGS* in the beginning of the linking command,
which can screw up order in which libraries are selected (e.g.,
system-installed library can be chosen instead of the compiled version).

Change-Id: I9ed36e8a4e8523b33ca2e88414aed8de5111c9cd
diff --git a/.waf-tools/cryptopp.py b/.waf-tools/cryptopp.py
index 2f95504..320c81f 100644
--- a/.waf-tools/cryptopp.py
+++ b/.waf-tools/cryptopp.py
@@ -84,8 +84,8 @@
     val = self.check_cxx(msg='Checking if CryptoPP library works',
                          header_name='cryptopp/config.h',
                          lib='cryptopp',
-                         cxxflags="-I%s/include" % root,
-                         linkflags="-L%s/lib" % root,
+                         includes="%s/include" % root,
+                         libpath="%s/lib" % root,
                          mandatory=mandatory,
                          use=use,
                          uselib_store=var)
diff --git a/.waf-tools/openssl.py b/.waf-tools/openssl.py
index e2ba7d0..a6b6c76 100644
--- a/.waf-tools/openssl.py
+++ b/.waf-tools/openssl.py
@@ -32,8 +32,8 @@
                        define_name='HAVE_%s' % var,
                        uselib_store=var,
                        mandatory=mandatory,
-                       cxxflags="-I%s/include" % root,
-                       linkflags="-L%s/lib" % root)
+                       includes="%s/include" % root,
+                       libpath="%s/lib" % root)
     else:
         libcrypto = self.check_cxx(lib=['ssl', 'crypto'],
                        msg='Checking for OpenSSL library',
diff --git a/.waf-tools/sqlite3.py b/.waf-tools/sqlite3.py
index 4eabeaa..c47ae6f 100644
--- a/.waf-tools/sqlite3.py
+++ b/.waf-tools/sqlite3.py
@@ -20,8 +20,8 @@
                        define_name='HAVE_%s' % var,
                        uselib_store=var,
                        mandatory=mandatory,
-                       cxxflags="-I%s/include" % root,
-                       linkflags="-L%s/lib" % root)
+                       includes="%s/include" % root,
+                       libpath="%s/lib" % root)
     else:
         try:
             self.check_cfg(package='sqlite3',