1 dnl Copyright (C) 2009 Sun Microsystems, Inc.
2 dnl This file is free software; Sun Microsystems, Inc.
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
6 #--------------------------------------------------------------------
8 #--------------------------------------------------------------------
11 AC_DEFUN([_PANDORA_SEARCH_LIBUUID],[
12 AC_REQUIRE([AC_LIB_PREFIX])
14 dnl Do this by hand. Need to check for uuid/uuid.h, but uuid may or may
15 dnl not be a lib is weird.
16 AC_CHECK_HEADERS(uuid/uuid.h)
17 AC_LIB_HAVE_LINKFLAGS(uuid,,
19 #include <uuid/uuid.h>
26 AM_CONDITIONAL(HAVE_LIBUUID, [test "x${ac_cv_libuuid}" = "xyes"])
29 AC_DEFUN([_PANDORA_HAVE_LIBUUID],[
31 AC_ARG_ENABLE([libuuid],
32 [AS_HELP_STRING([--disable-libuuid],
33 [Build with libuuid support @<:@default=on@:>@])],
34 [ac_enable_libuuid="$enableval"],
35 [ac_enable_libuuid="yes"])
37 _PANDORA_SEARCH_LIBUUID
41 AC_DEFUN([PANDORA_HAVE_LIBUUID],[
42 AC_REQUIRE([_PANDORA_HAVE_LIBUUID])
45 AC_DEFUN([_PANDORA_REQUIRE_LIBUUID],[
46 ac_enable_libuuid="yes"
47 _PANDORA_SEARCH_LIBUUID
48 AS_IF([test "x$ac_cv_header_uuid_uuid_h" = "xno"],[
49 AC_MSG_ERROR([Couldn't find uuid/uuid.h. On Debian this can be found in uuid-dev. On RHEL 4 this can be found in e2fsprogs-devel and Fedora/RHEL 6 in libuuid-devel.])
53 AC_DEFUN([PANDORA_REQUIRE_LIBUUID],[
54 AC_REQUIRE([_PANDORA_REQUIRE_LIBUUID])