Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=6c36b2f7591... Commit: 6c36b2f759186e8a796a8aefd1a95fc70085c72e Parent: 55d954f1c431d8ff6fa89451ab63d6b6aaebbe4e Author: Andrew Price anprice@redhat.com AuthorDate: Sun Aug 14 16:55:15 2016 +0100 Committer: Andrew Price anprice@redhat.com CommitterDate: Sun Aug 14 17:03:04 2016 +0100
gfs2-utils: Add a configure check for libuuid
libuuid is already required indirectly via libblkid but make the requirement explicit and set uuid_LIBS etc. so that we can use it for UUID handling.
Signed-off-by: Andrew Price anprice@redhat.com --- configure.ac | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac index cc49642..f1d8351 100644 --- a/configure.ac +++ b/configure.ac @@ -105,6 +105,9 @@ AM_CONDITIONAL([HAVE_CHECK], [test "x$have_check" = "xyes"])
PKG_CHECK_MODULES([zlib],[zlib]) PKG_CHECK_MODULES([blkid],[blkid]) +PKG_CHECK_MODULES([uuid],[uuid], + [have_uuid=yes], + [have_uuid=no])
# old versions of ncurses don't ship pkg-config files PKG_CHECK_MODULES([ncurses],[ncurses],, @@ -126,7 +129,8 @@ AC_CHECK_HEADER([linux/fs.h], [], [AC_MSG_ERROR([Unable to find linux/fs.h])]) AC_CHECK_HEADER([linux/types.h], [], [AC_MSG_ERROR([Unable to find linux/types.h])]) AC_CHECK_HEADER([linux/limits.h], [], [AC_MSG_ERROR([Unable to find linux/limits.h])]) AC_CHECK_HEADER([linux/gfs2_ondisk.h], [], [AC_MSG_ERROR([Unable to find linux/gfs2_ondisk.h])]) -AC_CHECK_MEMBER([struct gfs2_sb.sb_uuid], [], [], [[#include <linux/gfs2_ondisk.h>]]) +AC_CHECK_MEMBER([struct gfs2_sb.sb_uuid], [sb_has_uuid=yes], [sb_has_uuid=no], + [[#include <linux/gfs2_ondisk.h>]]) AC_CHECK_MEMBER([struct gfs2_leaf.lf_inode],[AC_DEFINE([GFS2_HAS_LEAF_HINTS],[],[Leaf block hints])], [], [[#include <linux/gfs2_ondisk.h>]]) AC_CHECK_MEMBER([struct gfs2_dirent.de_rahead],[AC_DEFINE([GFS2_HAS_DE_RAHEAD],[],[Dirent readahead field])], @@ -134,6 +138,11 @@ AC_CHECK_MEMBER([struct gfs2_dirent.de_rahead],[AC_DEFINE([GFS2_HAS_DE_RAHEAD],[ AC_CHECK_MEMBER([struct gfs2_dirent.de_cookie],[AC_DEFINE([GFS2_HAS_DE_COOKIE],[],[Dirent cookie field])], [], [[#include <linux/gfs2_ondisk.h>]])
+# libuuid is only required if struct gfs2_sb.sb_uuid exists +if test "$sb_has_uuid" = "yes" -a "$have_uuid" = "no"; then + AC_MSG_ERROR([libuuid is required for this version of gfs2]) +fi + # *FLAGS handling ENV_CFLAGS="$CFLAGS" ENV_CPPFLAGS="$CPPFLAGS"
cluster-commits@lists.stg.fedorahosted.org