summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkira TAGOH <akira@tagoh.org>2018-03-08 18:19:32 +0900
committerAkira TAGOH <akira@tagoh.org>2018-03-08 18:19:32 +0900
commitbb50f62b58b5057f80f3775f91fa94b225fc6672 (patch)
tree968ffe3336e719d57d20d251730af36f9b60921b
parentf075ca1aeaedbc288d42a70df5cf2fd069ea0d10 (diff)
Use the builtin uuid for OSX
https://bugs.freedesktop.org/show_bug.cgi?id=105366
-rw-r--r--configure.ac19
1 files changed, 17 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 85f113fe..e600b2d7 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/uuid.h>],
+ [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=""