X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=configure.ac;h=21dca42c45fa563054dec166c79f9dff32ef6576;hb=eade58d0cba1a300e37a4b1fd4b2588f134d08c9;hp=693cb1852a4a99576a7c89bb79e10b037c52c59a;hpb=4171df999bf0c0c552fa35cea9a12fa4d82faae6;p=lttng-ust.git diff --git a/configure.ac b/configure.ac index 693cb185..21dca42c 100644 --- a/configure.ac +++ b/configure.ac @@ -46,8 +46,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.