X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=configure.ac;h=71fbb6034e72306f1b40b4b6394ec93a66c1efdd;hp=91e76f06a98700d2a9deb36c29a650176e62c4ab;hb=ffe600149a7608221985751e1bf293234bf2545c;hpb=ccf7af6c78ba7a206baa9d0b9578468a1af734e1 diff --git a/configure.ac b/configure.ac index 91e76f06a..71fbb6034 100644 --- a/configure.ac +++ b/configure.ac @@ -108,6 +108,27 @@ AC_CHECK_LIB([popt], [poptGetContext], [], [AC_MSG_ERROR([Cannot find libpopt. Use [LDFLAGS]=-Ldir to specify its location.])] ) +# Check for libuuid +AC_CHECK_LIB([uuid], [uuid_generate], +[ + AC_DEFINE_UNQUOTED([LTTNG_HAVE_LIBUUID], 1, [Has libuuid support.]) + have_libuuid=yes +], +[ + # libuuid not found, check for uuid_create in libc. + AC_CHECK_LIB([c], [uuid_create], + [ + AC_DEFINE_UNQUOTED([LTTNG_HAVE_LIBC_UUID], 1, [Has libc uuid support.]) + have_libc_uuid=yes + ], + [ + AC_MSG_ERROR([Cannot find libuuid uuid_generate nor libc uuid_create. Use [LDFLAGS]=-Ldir to specify their location.]) + ]) +] +) +AM_CONDITIONAL([LTTNG_BUILD_WITH_LIBUUID], [test "x$have_libuuid" = "xyes"]) +AM_CONDITIONAL([LTTNG_BUILD_WITH_LIBC_UUID], [test "x$have_libc_uuid" = "xyes"]) + # URCU library version needed or newer liburcu_version=">= 0.7.2"