From: Karel Zak Date: Fri, 22 May 2009 07:58:23 +0000 (+0200) Subject: build-sys: add --disable-uuidd X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ec884ac3504cf9ddb506225b346321ebda8af68;p=util-linux build-sys: add --disable-uuidd Signed-off-by: Karel Zak --- diff --git a/configure.ac b/configure.ac index e9a89199..f700f578 100644 --- a/configure.ac +++ b/configure.ac @@ -281,6 +281,23 @@ AM_CONDITIONAL(HAVE_UUID, test "x$have_uuid" = xyes) : ${UUID_LIBS='-luuid'} +AC_ARG_ENABLE([uuidd], + AS_HELP_STRING([--disable-uuidd], [do not build the uuid daemon]), + [], enable_uuidd=auto +) + +case "$enable_uuidd:$have_uuid" in +yes:no) + AC_MSG_ERROR([cannot enable uuidd when libuuid is disabled]) ;; +auto:*) + enable_uuidd=$have_uuid ;; +esac +if test "x$enable_uuidd" = xyes; then + AC_DEFINE(HAVE_UUIDD, 1, [Define to 1 if you want to use uuid daemon.]) +fi +AM_CONDITIONAL(BUILD_UUIDD, test "x$enable_uuidd" = xyes) + + AC_ARG_ENABLE([libblkid], AS_HELP_STRING([--disable-libblkid], [do not build libblkid and blkid utilities]), [], enable_libblkid=yes diff --git a/shlibs/uuid/src/gen_uuid.c b/shlibs/uuid/src/gen_uuid.c index e0cb5574..8497ac67 100644 --- a/shlibs/uuid/src/gen_uuid.c +++ b/shlibs/uuid/src/gen_uuid.c @@ -419,7 +419,7 @@ try_again: return 0; } -#if defined(USE_UUIDD) && defined(HAVE_SYS_UN_H) +#if defined(HAVE_UUIDD) && defined(HAVE_SYS_UN_H) /* used in get_uuid_via_daemon() only */ static ssize_t read_all(int fd, char *buf, size_t count) { @@ -541,7 +541,7 @@ fail: return -1; } -#else /* !defined(USE_UUIDD) && defined(HAVE_SYS_UN_H) */ +#else /* !defined(HAVE_UUIDD) && defined(HAVE_SYS_UN_H) */ static int get_uuid_via_daemon(int op, uuid_t out, int *num) { return -1;