Allow building locally without phosphor-logging

Check for phosphor-logging available. It is only available when building
via CI, SDK or if phosphor-logging and associated dbus support has been
installed locally. If phosphor-logging is not available then compile in
minimal logging code. This allows for local testing of changes that are
not affected by or depend on phosphor-logging.

Change-Id: I1b4d54c36b181596beff465307c16ca33f2f91d8
Signed-off-by: Ben Tyner <ben.tyner@ibm.com>
diff --git a/attn/meson.build b/attn/meson.build
index 5d53674..f75bd60 100644
--- a/attn/meson.build
+++ b/attn/meson.build
@@ -1,6 +1,3 @@
-# needed to find external libraries not registered with package manager
-cmplr = meson.get_compiler('cpp')
-
 # async gpio monitor needs boost library
 boost_args = ['-DBOOST_ASIO_DISABLE_THREADS',
               '-DBOOST_ERROR_CODE_HEADER_ONLY',
@@ -26,8 +23,7 @@
 )
 
 # see if phosphor-logging is available, if not use test case logging code
-h = 'phosphor-logging/log.hpp'
-if cmplr.compiles('#include <@0@>'.format(h), name : '#include <@0@>'.format(h))
+if (true == phosphor_logging)
     logging_src = 'attn_logging.cpp'
 else
     logging_src = '../test/end2end/logging.cpp'
@@ -43,5 +39,5 @@
                       attn_src,
                       include_directories : incdir,
                       dependencies : [libpdbg, sdbusplus, libgpiod],
-                      cpp_args : boost_args,
+                      cpp_args : [boost_args, test_arg],
                       install : true)