mirror of
https://https.git.savannah.gnu.org/git/coreutils.git
synced 2026-01-26 15:29:07 +00: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:
parent
45411e3fc6
commit
df5fa309c2
11
configure.ac
11
configure.ac
@ -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>
|
||||
|
||||
@ -304,7 +304,7 @@ src_printf_LDADD += $(LIBICONV)
|
||||
|
||||
# for libcrypto hash routines
|
||||
src_md5sum_LDADD += $(LIB_CRYPTO)
|
||||
src_sort_LDADD += $(LIB_CRYPTO)
|
||||
src_sort_LDADD += $(LIB_DL) $(LIB_CRYPTO)
|
||||
src_sha1sum_LDADD += $(LIB_CRYPTO)
|
||||
src_sha224sum_LDADD += $(LIB_CRYPTO)
|
||||
src_sha256sum_LDADD += $(LIB_CRYPTO)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user