meson: Add lmsensors support

v2: - Make -Dlmsensors=false work
    - Simplify auto and true cases

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
diff --git a/meson.build b/meson.build
index 2115871..65c6b98 100644
--- a/meson.build
+++ b/meson.build
@@ -926,6 +926,17 @@
   pre_args += '-DHAVE_GALLIUM_EXTRA_HUD=1'
 endif
 
+_sensors = get_option('lmsensors')
+if _sensors != 'false'
+  dep_lmsensors = cc.find_library('libsensors', required : _sensors == 'true')
+  if dep_lmsensors.found()
+    pre_args += '-DHAVE_LIBSENSORS=1'
+  endif
+else
+  dep_lmsensors = []
+endif
+
+
 # TODO: nine
 
 # TODO: clover