Make libcompat independent not to confuse automake
[lttng-tools.git] / configure.ac
index 2ce1c9313662a318d631d62425207e1c73c4d131..3156273df0c974540f94bfbde752478c61a02358 100644 (file)
@@ -116,6 +116,24 @@ AM_CONDITIONAL([HAVE_LIBLTTNG_UST_CTL], [ test "x$ac_cv_lib_lttng_ust_ctl_ustctl
 
 AC_CHECK_FUNCS([sched_getcpu sysconf])
 
+# check for dlopen
+AC_CHECK_LIB([dl], [dlopen],
+[
+       have_libdl=yes
+],
+[
+       #libdl not found, check for dlopen in libc.
+       AC_CHECK_LIB([c], [dlopen],
+       [
+               have_libc_dl=yes
+       ],
+       [
+               AC_MSG_ERROR([Cannot find dlopen in libdl nor libc. Use [LDFLAGS]=-Ldir to specify their location.])
+       ])
+])
+AM_CONDITIONAL([LTTNG_TOOLS_BUILD_WITH_LIBDL], [test "x$have_libdl" = "xyes"])
+AM_CONDITIONAL([LTTNG_TOOLS_BUILD_WITH_LIBC_DL], [test "x$have_libc_dl" = "xyes"])
+
 # Option to only build the consumer daemon and its libraries
 AC_ARG_WITH([consumerd-only],
        AS_HELP_STRING([--with-consumerd-only],[Only build the consumer daemon [default=no]]),
@@ -159,6 +177,7 @@ AC_CONFIG_FILES([
        src/common/ust-consumer/Makefile
        src/common/hashtable/Makefile
        src/common/sessiond-comm/Makefile
+       src/common/compat/Makefile
        src/lib/Makefile
        src/lib/lttng-ctl/Makefile
        src/bin/Makefile
This page took 0.022919 seconds and 4 git commands to generate.