1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-21 11:16:16 +02:00

sort: make the startup time optimization effective on glibc < 2.34

* configure.ac: Test where to find the dlopen function. Set LIB_DL.
Use it in the DLOPEN_LIBCRYPTO test.
* src/local.mk (src_sort_LDADD): Add $(LIB_DL).
This commit is contained in:
Bruno Haible
2024-02-27 12:12:59 +01:00
committed by Pádraig Brady
parent 45411e3fc6
commit df5fa309c2
2 changed files with 11 additions and 2 deletions

View File

@@ -351,6 +351,15 @@ if test $utils_cv_localtime_cache = yes; then
AC_DEFINE([LOCALTIME_CACHE], [1], [FIXME])
fi
# 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],
@@ -360,7 +369,7 @@ AS_CASE([$LIB_CRYPTO],
[utils_cv_dlopen_libcrypto],
[utils_cv_dlopen_libcrypto=no
saved_LIBS=$LIBS
LIBS="$LIBS $LIB_CRYPTO"
LIBS="$LIBS $LIB_DL $LIB_CRYPTO"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <dlfcn.h>