[dpkg] 185/200: build: Handle libmd implementations built into system libc
Ximin Luo
infinity0 at debian.org
Wed Apr 5 15:17:38 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository dpkg.
commit 94f8b385a6d433a0c84f2dda22dc8c0129dba915
Author: Guillem Jover <guillem at debian.org>
Date: Mon Feb 13 06:00:50 2017 +0100
build: Handle libmd implementations built into system libc
As found on some BSD systems.
---
debian/changelog | 2 ++
m4/dpkg-libs.m4 | 13 +++++++++----
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index ec1be39..eec8e89 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -33,6 +33,8 @@ dpkg (1.18.23) UNRELEASED; urgency=medium
* Build system:
- Check <sys/proc.h> by also including <sys/param.h>, on several BSD
systems the header is not self-contained.
+ - Handle libmd implementations built into system libc, as found on some
+ BSD systems.
-- Guillem Jover <guillem at debian.org> Wed, 01 Feb 2017 06:28:28 +0100
diff --git a/m4/dpkg-libs.m4 b/m4/dpkg-libs.m4
index fbb974b..2150d2a 100644
--- a/m4/dpkg-libs.m4
+++ b/m4/dpkg-libs.m4
@@ -14,16 +14,21 @@ AC_DEFUN([DPKG_LIB_MD], [
have_libmd="no"
AS_IF([test "x$with_libmd" != "xno"], [
AC_CHECK_HEADERS([md5.h], [
- AC_CHECK_LIB([md], [MD5Init], [
- MD_LIBS="-lmd"
+ dpkg_save_libmd_LIBS=$LIBS
+ AC_SEARCH_LIBS([MD5Init], [md], [have_libmd="yes"])
+ LIBS=$dpkg_save_libmd_LIBS
+ AS_IF([test "x$ac_cv_search_MD5Init" = "xnone required"], [
+ have_libmd="bultin"
+ ], [test "x$ac_cv_search_MD5Init" != "xno"], [
have_libmd="yes"
+ MD_LIBS="$ac_cv_search_MD5Init"
])
])
AS_IF([test "x$with_libmd" = "xyes" && test "x$have_libmd" = "xno"], [
- AC_MSG_FAILURE([md5 digest not found in libmd])
+ AC_MSG_FAILURE([md5 digest functions not found])
])
])
- AM_CONDITIONAL([HAVE_LIBMD_MD5], [test "x$have_libmd" = "xyes"])
+ AM_CONDITIONAL([HAVE_LIBMD_MD5], [test "x$have_libmd" != "xno"])
])# DPKG_LIB_MD
# DPKG_WITH_COMPRESS_LIB(NAME, HEADER, FUNC)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list