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.
])
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])
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([
$(libbsd_la_included_sources) \
libbsd.map
libbsd_la_LIBADD = \
+ $(MD5_LIBS) \
$(LIBBSD_LIBS) \
$(nil)
libbsd_la_LDFLAGS = \
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
Version: @VERSION@
URL: https://libbsd.freedesktop.org/
Libs: -L${libdir} -lbsd
-Libs.private: @LIBBSD_LIBS@
+Libs.private: @LIBBSD_LIBS@ @MD5_LIBS@
Cflags: -I${includedir}