diff options
author | Guillem Jover <guillem@debian.org> | 2017-02-13 06:00:50 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2017-02-26 23:40:22 +0100 |
commit | 94f8b385a6d433a0c84f2dda22dc8c0129dba915 (patch) | |
tree | 6058bec741756bfaf85027cef5085b7d2007986c | |
parent | 5c32516dcad58980481ae85c71e65eaeb97865e1 (diff) | |
download | dpkg-94f8b385a6d433a0c84f2dda22dc8c0129dba915.tar.gz |
build: Handle libmd implementations built into system libc
As found on some BSD systems.
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | m4/dpkg-libs.m4 | 13 |
2 files changed, 11 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog index ec1be3976..eec8e89ec 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@debian.org> Wed, 01 Feb 2017 06:28:28 +0100 diff --git a/m4/dpkg-libs.m4 b/m4/dpkg-libs.m4 index fbb974b29..2150d2ade 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) |