X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=configure.ac;h=fa0edc442b7b7f1727ed225d79b57c509006f3f5;hb=f4cc5e83435948e64f5c7bce395ca19703da02a3;hp=bf1ef6f28f9733e6b9a8d812f54b14ad81809cce;hpb=b1b34226a182e5753625a1b1e30d339bedba6aae;p=lttng-tools.git diff --git a/configure.ac b/configure.ac index bf1ef6f28..fa0edc442 100644 --- a/configure.ac +++ b/configure.ac @@ -217,15 +217,18 @@ AC_CHECK_LIB([rt], [clock_gettime, timer_create, timer_settime, timer_delete]) AC_CHECK_LIB([dl], [dlopen], [ have_libdl=yes libdl_name=dl + DL_LIBS="-ldl" ], [ # libdl not found, check for dlopen in libc. AC_CHECK_LIB([c], [dlopen], [ have_libc_dl=yes libdl_name=c + DL_LIBS="-lc" ], [ AC_MSG_ERROR([Cannot find dlopen in libdl nor libc. Use [LDFLAGS]=-Ldir to specify their location.]) ]) ]) +AC_SUBST(DL_LIBS) # Check if libdl has dlmopen support. AH_TEMPLATE([HAVE_DLMOPEN], ["Define to 1 if dlmopen is available."]) @@ -570,20 +573,6 @@ AS_IF([test "x$with_lttng_ust" = "xyes"], AM_CONDITIONAL([HAVE_LIBLTTNG_UST_CTL], [test "x$with_lttng_ust" = "xyes"]) - -# check for dlopen -AC_CHECK_LIB([dl], [dlopen], - [DL_LIBS="-ldl"], - [ - #libdl not found, check for dlopen in libc. - AC_CHECK_LIB([c], [dlopen], - [DL_LIBS="-lc"], - [AC_MSG_FAILURE([Cannot find dlopen in libdl nor libc. Use [LDFLAGS]=-Ldir to specify their location.])] - ) - ] -) -AC_SUBST(DL_LIBS) - # Check for fmemopen AC_CHECK_LIB([c], [fmemopen], [