[lttng-dev] [PATCH lttng-tools 03/14] Adding libext2_uuid support

Charles Briere charlesbriere.flatzo at gmail.com
Mon May 6 14:18:40 EDT 2013


Signed-off-by: Charles Briere <charlesbriere.flatzo at gmail.com>
---
 configure.ac             | 1 +
 src/common/Makefile.am   | 5 +++++
 src/common/compat/uuid.h | 2 +-
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 618d203..b78cc94 100644
--- a/configure.ac
+++ b/configure.ac
@@ -172,6 +172,7 @@ AC_CHECK_LIB([uuid], [uuid_generate],
 )
 AM_CONDITIONAL([LTTNG_BUILD_WITH_LIBUUID], [test "x$have_libuuid" = "xyes"])
 AM_CONDITIONAL([LTTNG_BUILD_WITH_LIBC_UUID], [test "x$have_libc_uuid" = "xyes"])
+AM_CONDITIONAL([LTTNG_BUILD_WITH_LIBEXT2_UUID], [test "x$have_libext2_uuid" = "xyes"])
 
 # URCU library version needed or newer
 liburcu_version=">= 0.7.2"
diff --git a/src/common/Makefile.am b/src/common/Makefile.am
index f2ea40a..6aa6c4a 100644
--- a/src/common/Makefile.am
+++ b/src/common/Makefile.am
@@ -14,7 +14,12 @@ noinst_LTLIBRARIES = libcommon.la
 
 libcommon_la_SOURCES = error.h error.c utils.c utils.h runas.c runas.h \
                        common.h futex.c futex.h uri.c uri.h defaults.c
+
+if LTTNG_BUILD_WITH_LIBEXT2_UUID
+libcommon_la_LIBADD = -lext2_uuid
+else
 libcommon_la_LIBADD = -luuid
+endif
 
 # Consumer library
 noinst_LTLIBRARIES += libconsumer.la
diff --git a/src/common/compat/uuid.h b/src/common/compat/uuid.h
index 35faf53..448d6bd 100644
--- a/src/common/compat/uuid.h
+++ b/src/common/compat/uuid.h
@@ -30,7 +30,7 @@
 #define UUID_STR_LEN		37
 #define UUID_LEN		16
 
-#ifdef LTTNG_HAVE_LIBUUID
+#if defined(LTTNG_HAVE_LIBUUID) || defined(LTTNG_HAVE_LIBEXT2_UUID)
 #include <uuid/uuid.h>
 
 /*
-- 
1.8.1.msysgit.1




More information about the lttng-dev mailing list