From 458611540d81a51eea1b863c4252a0314c56a74f Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Sat, 2 Jan 2016 13:01:48 +0100 Subject: [PATCH] Make the use of libblkid optional in configuration --- HISTORY | 7 ++++--- configure.ac | 17 ++++++++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/HISTORY b/HISTORY index 54349cb7..dafc4f02 100644 --- a/HISTORY +++ b/HISTORY @@ -1,7 +1,7 @@ SnapRAID HISTORY ================ -9.2 2015/12 +9.2 2016/01 =========== * Fixes support for symlinks pointing to an empty target. Before they were only partially supported, and their presence could result in @@ -11,12 +11,13 @@ SnapRAID HISTORY a performance advantage. Content verification is instead still multi threads because it provides a performance advantage. * Autorename disks using the matching UUID. To rename a disk you can - now change directly the name in the configuration file. + now change directly the name in the configuration file, + and run a 'sync' command. * Improves the physical offset ordering for the Btrfs filesystem, correctly detecting files that have not a physical offset, for whatever reason. * Adds UUID support to Btrfs filesystems. It's present only if the - libblkid library is available on the system. + 'libblkid' library is available on the system. * Added a new --no-warnings option to disable some repetitive warnings that could be annoying to power users. diff --git a/configure.ac b/configure.ac index 71660d09..03244d1b 100644 --- a/configure.ac +++ b/configure.ac @@ -94,9 +94,20 @@ AC_CHECK_FUNCS([pthread_create]) AC_SEARCH_LIBS([exp], [m]) dnl Checks for libblkid -AC_CHECK_HEADERS([blkid/blkid.h]) -AC_SEARCH_LIBS([blkid_probe_all], [blkid]) -AC_CHECK_FUNCS([blkid_devno_to_devname blkid_get_tag_value]) +AC_ARG_WITH([blkid], + AS_HELP_STRING([--without-blkid], [Ignore presence of blkid and disable it])) +AS_IF([test "x$with_blkid" != "xno"], + [AC_SEARCH_LIBS([blkid_probe_all], [blkid], [have_blkid=yes], [have_blkid=no])], + [have_blkid=no]) +AS_IF([test "x$have_blkid" = "xyes"], + [ + AC_CHECK_HEADERS([blkid/blkid.h]) + AC_CHECK_FUNCS([blkid_devno_to_devname blkid_get_tag_value]) + ], + [AS_IF([test "x$with_blkid" = "xyes"], + [AC_MSG_ERROR([blkid requested but not found]) + ]) +]) dnl Checks for architecture AC_C_BIGENDIAN