discover_system_state: apply power restore delay

Introduce option `apply-power-policy-bmc-ready` to control power
restore policy application timing. When enabled (default), BMC
waits until BMC_READY before applying power policy. When disabled,
BMC waits for the PowerRestoreDelay before applying power policy.
This change maintains backward compatibility while allowing more
flexible power restoration behavior.

Tested:
1) PSM builds fine
2) When `apply-power-policy-bmc-ready` is disabled,
discovery_system_state waits for PowerRestoreDelay as specified by
the user.

Change-Id: Ib2381612bdb8cb6960f126228d25d8d43fed1d92
Signed-off-by: Prithvi Pai <ppai@nvidia.com>
diff --git a/meson.build b/meson.build
index d51a86f..e9e5729 100644
--- a/meson.build
+++ b/meson.build
@@ -77,6 +77,10 @@
     add_project_arguments('-DENABLE_FORCE_WARM_REBOOT', language: 'cpp')
 endif
 
+if (get_option('apply-power-policy-bmc-ready').allowed())
+    add_project_arguments('-DAPPLY_POWER_POLICY_WHEN_BMC_READY', language: 'cpp')
+endif
+
 nlohmann_json_dep = dependency('nlohmann_json', include_type: 'system')
 sdbusplus = dependency('sdbusplus')
 sdeventplus = dependency('sdeventplus')