Since commit bff0e5412 (build: sort: explicitly tag libcrypto
dependency, 2026-09-06), which added a dependency on Gnulib's sd-dlopen
module, this check has been unnecessary. This can be seen by the
separate variables in Makefile.in, which have the same purpose.
$ grep -E '^LIB_?DL' Makefile.in
LIBDL = @LIBDL@
LIB_DL = @LIB_DL@
* src/local.mk (src_sort_LDADD): Use $(LIBDL) instead of $(LIB_DL).
* configure.ac: Likewise. Don't check for dlopen and libdl, which Gnulib
has already done for us.
---
configure.ac | 11 +----------
src/local.mk | 2 +-
2 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/configure.ac b/configure.ac
index aa3b71adb..211078983 100644
--- a/configure.ac
+++ b/configure.ac
@@ -304,15 +304,6 @@ AC_CHECK_FUNCS([sigsuspend],
gl_WINSIZE_IN_PTEM
-# Find the library for dynamic loading of shared libraries.
-AC_SEARCH_LIBS([dlopen], [dl])
-AS_CASE([$ac_cv_search_dlopen],
- [no | 'none required'],
- [LIB_DL=],
- [*],
- [LIB_DL="$ac_cv_search_dlopen"])
-AC_SUBST([LIB_DL])
-
# Should 'sort' link libcrypto dynamically?
AS_CASE([$LIB_CRYPTO],
[-lcrypto],
@@ -322,7 +313,7 @@ AS_CASE([$LIB_CRYPTO],
[utils_cv_libcrypto_soname],
[utils_cv_libcrypto_soname=no
saved_LIBS=$LIBS
- LIBS="$LIBS $LIB_DL $LIB_CRYPTO"
+ LIBS="$LIBS $LIBDL $LIB_CRYPTO"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <dlfcn.h>
diff --git a/src/local.mk b/src/local.mk
index 6ed4ed78f..4bdc54f0a 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -323,7 +323,7 @@ src_printf_LDADD += $(LIBICONV)
# for libcrypto hash routines
src_md5sum_LDADD += $(LIB_CRYPTO)
-src_sort_LDADD += $(LIB_DL) $(LIB_CRYPTO)
+src_sort_LDADD += $(LIBDL) $(LIB_CRYPTO)
src_sha1sum_LDADD += $(LIB_CRYPTO)
src_sha224sum_LDADD += $(LIB_CRYPTO)
src_sha256sum_LDADD += $(LIB_CRYPTO)
--
2.56.0