]> git.ipfire.org Git - collecty.git/commitdiff
configure: Make libatasmart an optional dependency
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 29 Sep 2025 16:34:04 +0000 (16:34 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 29 Sep 2025 16:34:04 +0000 (16:34 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
configure.ac

index cb287565b934fd418aadff71c9af5228ee584189..f1b87f5480d7ed88523e167666acc6b597d79b1f 100644 (file)
@@ -135,7 +135,12 @@ PKG_CHECK_MODULES([RRD], [librrd])
 PKG_CHECK_MODULES([SYSTEMD], [libsystemd])
 
 # libatasmart
-PKG_CHECK_MODULES([LIBATASMART], [libatasmart >= 0.19])
+PKG_CHECK_MODULES([LIBATASMART], [libatasmart >= 0.19],
+       [have_libatasmart=yes], [have_libatasmart=no])
+
+if test "x$have_libatasmart" = "xyes"; then
+    AC_DEFINE([HAVE_LIBATASMART], [1], [Define if you have libatasmart])
+fi
 
 save_LIBS="$LIBS"
 
@@ -203,4 +208,6 @@ AC_MSG_RESULT([
        D-Bus system dir:       ${with_dbussystemservicedir}
 
        Generate man-pages:     ${have_manpages}
+
+       libatasmart:            ${have_libatasmart}
 ])