mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-01-08 11:02:24 +01:00
build: Split libmd dependency due to MD5 functions from SHA requirements
To be able to rework the md5 deprecation logic, we need to detangle when we depend on libmd due to requiring MD5 functions, which might be otherwise provided by libc, or when we require SHA functions for the internal getentropy() implementation.
This commit is contained in:
parent
500b3080a2
commit
25d35625eb
@ -110,7 +110,7 @@ AC_SEARCH_LIBS([dlsym], [dl], [
|
||||
])
|
||||
AC_SEARCH_LIBS([MD5Update], [md], [
|
||||
AS_IF([test "x$ac_cv_search_MD5Update" != "xnone required"], [
|
||||
LIBBSD_LIBS="$LIBBSD_LIBS $ac_cv_search_MD5Update"
|
||||
MD5_LIBS="$MD5_LIBS $ac_cv_search_MD5Update"
|
||||
])
|
||||
], [
|
||||
AC_MSG_ERROR([cannot find required MD5 functions in libc or libmd])
|
||||
@ -250,6 +250,7 @@ AC_CHECK_FUNCS([clearenv dirfd fopencookie __fpurge \
|
||||
pstat_getproc sysconf])
|
||||
AM_CONDITIONAL([HAVE_GETENTROPY], [test "x$ac_cv_func_getentropy" = "xtrue"])
|
||||
|
||||
AC_SUBST([MD5_LIBS])
|
||||
AC_SUBST([LIBBSD_LIBS])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
|
@ -52,6 +52,7 @@ libbsd_la_DEPENDENCIES = \
|
||||
$(libbsd_la_included_sources) \
|
||||
libbsd.map
|
||||
libbsd_la_LIBADD = \
|
||||
$(MD5_LIBS) \
|
||||
$(LIBBSD_LIBS) \
|
||||
$(nil)
|
||||
libbsd_la_LDFLAGS = \
|
||||
|
@ -8,5 +8,5 @@ Description: Utility functions from BSD systems (overlay)
|
||||
Version: @VERSION@
|
||||
URL: https://libbsd.freedesktop.org/
|
||||
Libs: -L${libdir} -lbsd
|
||||
Libs.private: @LIBBSD_LIBS@
|
||||
Libs.private: @LIBBSD_LIBS@ @MD5_LIBS@
|
||||
Cflags: -isystem ${includedir}/bsd -DLIBBSD_OVERLAY
|
||||
|
@ -8,5 +8,5 @@ Description: Utility functions from BSD systems
|
||||
Version: @VERSION@
|
||||
URL: https://libbsd.freedesktop.org/
|
||||
Libs: -L${libdir} -lbsd
|
||||
Libs.private: @LIBBSD_LIBS@
|
||||
Libs.private: @LIBBSD_LIBS@ @MD5_LIBS@
|
||||
Cflags: -I${includedir}
|
||||
|
Loading…
Reference in New Issue
Block a user