From 5a8ebacfa816fc73737c517155c9ee26a8dc9761 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Tue, 21 Feb 2012 08:46:52 -0500 Subject: [PATCH] configure.ac: check for both libuuid/libc uuid APIs commit 5e8445c48358d4d943c61e5cd94429fc75047d63 upstream. Signed-off-by: Mathieu Desnoyers Signed-off-by: Christian Babeux --- configure.ac | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index b442a81d..de1c0c5f 100644 --- a/configure.ac +++ b/configure.ac @@ -77,8 +77,20 @@ AC_CHECK_LIB([dl], [dlopen]) AC_CHECK_LIB([pthread], [pthread_create]) # Check for libuuid -AC_CHECK_LIB([uuid], [uuid_generate], [], - [AC_MSG_ERROR([Cannot find libuuid. Use [LDFLAGS]=-Ldir to specify its location.])] +AC_CHECK_LIB([uuid], [uuid_generate], +[ + AC_DEFINE_UNQUOTED([LTTNG_UST_HAVE_LIBUUID], 1, [Has libuuid support.]) +], +[ + # libuuid not found, check for uuid_create in libc. + AC_CHECK_LIB([c], [uuid_create], + [ + AC_DEFINE_UNQUOTED([LTTNG_UST_HAVE_LIBC_UUID], 1, [Has libc uuid support.]) + ], + [ + AC_MSG_ERROR([Cannot find libuuid uuid_generate nor libc uuid_create. Use [LDFLAGS]=-Ldir to specify its location.]) + ]) +] ) # Checks for header files. -- 2.34.1