multiple ipmi shortname implementations

As ipmi subsystem requires short names, and there are multiple
ways to implement that, this patch provides compile-time configuration
options.

 - shortname-remove-suffix
 - shortname-replace-words

Previously, PSU Sensor Names were stripped of some
suffixes, some of which uniquely identified the sensor.

e.g. "_Input_Voltage", "_Output_Voltage".
Without the suffix, the sensor cannot be uniquely identified.

Example: "PSU0_Input_Voltage", "PSU0_Output_Voltage"
both become "PSU0".

Tested:
 - with both configurations turned off, name is only trucated
 - with nothing configured, default config is applied and suffix is
   removed (current behavior)
 - word replacement enabled and suffix removal disabled: expected
   behavior
 - word replacement disabled and suffix removal enabled: expected
   behavior

Change-Id: I01dd35f31e75df3c31733e9818884813a241440a
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/meson.build b/meson.build
index 0cd2f44..4a4d01e 100644
--- a/meson.build
+++ b/meson.build
@@ -34,6 +34,13 @@
 conf_data.set_quoted('HOST_IPMI_LIB_PATH', get_option('host-ipmi-lib-path'))
 conf_data.set_quoted('FW_VER_REGEX', get_option('fw-ver-regex'))
 
+if get_option('shortname-remove-suffix').enabled()
+  conf_data.set_quoted('SHORTNAME_REMOVE_SUFFIX', '1')
+endif
+if get_option('shortname-replace-words').enabled()
+  conf_data.set_quoted('SHORTNAME_REPLACE_WORDS', '1')
+endif
+
 matches_map = get_option('matches-map')
 conf_data.set('MAJOR_MATCH_INDEX', matches_map[0])
 conf_data.set('MINOR_MATCH_INDEX', matches_map[1])