Remove duplicate check for dlopen
authorMichael Jeanson <mjeanson@efficios.com>
Thu, 20 Dec 2018 21:16:47 +0000 (16:16 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 11 Feb 2019 22:52:04 +0000 (17:52 -0500)
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
configure.ac

index 36046a9a79000eb16606457cb6d106750603401b..ac72a885ba15f03335c5a24814728b92b979e782 100644 (file)
@@ -205,15 +205,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."])
@@ -548,20 +551,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],
 [
This page took 0.028231 seconds and 5 git commands to generate.