meson: handle missing ldap dependency

Adjust the meson.build so that ldap can be an optional dependency.
This allows out-of-docker builds for environments which might not have
the LDAP libraries installed.  In the future this could also be
leveraged by a meson.option that would disable LDAP support.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I214b7e69580bd11432f88a85fa760a5e07f7fad2
diff --git a/test/meson.build b/test/meson.build
index 61965df..2bdc805 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -19,16 +19,23 @@
     endif
 endif
 
-test(
-    'ldap_config_test',
-    executable(
+if ldap_dep.found()
+    test(
         'ldap_config_test',
-        ['ldap_config_test.cpp', 'utils_test.cpp'],
-        include_directories: '..',
-        dependencies: [gtest_dep, gmock_dep, phosphor_ldap_conf_dep],
-        link_args: ['-lldap'],
-    ),
-)
+        executable(
+            'ldap_config_test',
+            ['ldap_config_test.cpp', 'utils_test.cpp'],
+            include_directories: '..',
+            dependencies: [
+                gmock_dep,
+                gtest_dep,
+                ldap_dep,
+                phosphor_ldap_conf_dep,
+            ],
+            link_args: ['-lldap'],
+        ),
+    )
+endif
 
 test(
     'user_mgr_test',