From bb50f62b58b5057f80f3775f91fa94b225fc6672 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 8 Mar 2018 18:19:32 +0900 Subject: [PATCH] Use the builtin uuid for OSX https://bugs.freedesktop.org/show_bug.cgi?id=105366 --- configure.ac | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 85f113f..e600b2d 100644 --- a/configure.ac +++ b/configure.ac @@ -336,8 +336,23 @@ CFLAGS="$fontconfig_save_cflags" # Check for uuid # if test "$os_win32" != "yes"; then - PKG_CHECK_MODULES([UUID], [uuid]) - PKGCONFIG_REQUIRES_PRIVATELY="$PKGCONFIG_REQUIRES_PRIVATELY uuid" + use_pkgconfig_for_uuid=yes + PKG_CHECK_MODULES([UUID], [uuid], + [use_pkgconfig_for_uuid=yes], + [use_pkgconfig_for_uuid=no]) + if test "x$use_pkgconfig_for_uuid" = "xno"; then + AC_MSG_CHECKING([where uuid functions comes from]) + AC_TRY_LINK([#include ], + [uuid_t a; uuid_generate(a);], + [AC_MSG_RESULT([builtin]) + UUID_CFLAGS="" + UUID_LIBS="" + ],[AC_MSG_ERROR([ +*** uuid is required. install util-linux. + ])]) + else + PKGCONFIG_REQUIRES_PRIVATELY="$PKGCONFIG_REQUIRES_PRIVATELY uuid" + fi else UUID_CFLAGS="" UUID_LIBS="" -- 2.14.3