git: d3f22d319918 - main - misc/mbuffer: Fix build if www/libwww installed

From: Fukang Chen <loader_at_FreeBSD.org>
Date: Wed, 13 Sep 2023 02:43:27 UTC
The branch main has been updated by loader:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d3f22d319918c1dda4dbfbc5d85678c91ed13590

commit d3f22d319918c1dda4dbfbc5d85678c91ed13590
Author:     Fukang Chen <loader@FreeBSD.org>
AuthorDate: 2023-09-13 01:01:25 +0000
Commit:     Fukang Chen <loader@FreeBSD.org>
CommitDate: 2023-09-13 02:13:32 +0000

    misc/mbuffer: Fix build if www/libwww installed
    
    Remove libmd5 from AC_SEARCH_LIBS and only searches for libmd,
    avoid linking with libmd5 installed by www/libwww.
    
    PR:             273735
    Reported by:    meta
    MFH:            2023Q3 (build fix)
---
 misc/mbuffer/files/patch-configure.in | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/misc/mbuffer/files/patch-configure.in b/misc/mbuffer/files/patch-configure.in
index f2104f9de554..9f8ba6fff9ee 100644
--- a/misc/mbuffer/files/patch-configure.in
+++ b/misc/mbuffer/files/patch-configure.in
@@ -8,9 +8,14 @@
   https://cgit.freebsd.org/src/commit/?id=0ad202f312f6da4f2774ecb7a3f3c2a05b3dde5f
   add llvm-objdump to the list for ${OBJDUMP}.
 
---- configure.in.orig	2021-01-16 05:20:02 UTC
+- AC_SEARCH_LIBS(MD5Init,md,AC_DEFINE([HAVE_LIBMD5], [1], [Define to 1 if you have the md5 library]),)
+  PR 273735: fails to build if www/libwww installed
+  Remove md5 and only searches for md here to avoid linking with lib/libmd5.*
+  installed by www/libwww.
+
+--- configure.in.orig	2023-02-27 19:18:52 UTC
 +++ configure.in
-@@ -104,7 +104,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
+@@ -104,7 +104,7 @@ AC_PROG_INSTALL
  AC_SUBST(CFLAGS)
  
  AC_PROG_INSTALL
@@ -19,7 +24,7 @@
  AC_PATH_PROG(RM,rm)
  AC_PATH_PROG(CP,cp)
  AC_PATH_PROG(MT,mt,AC_MSG_WARN(could not find the program mt - you might need this if you want autoloader support))
-@@ -113,7 +113,7 @@ AC_PATH_PROG(AWK,awk)
+@@ -113,7 +113,7 @@ AC_STRUCT_ST_BLKSIZE
  AC_SYS_LARGEFILE
  AC_STRUCT_ST_BLKSIZE
  
@@ -28,3 +33,12 @@
  
  AC_HEADER_ASSERT
  AC_CHECK_LIB(pthread, pthread_mutex_init)
+@@ -145,7 +145,7 @@ if test x$enable_md5 != xno ; then
+ 	,enable_md5=auto
+ 	)
+ if test x$enable_md5 != xno ; then
+-	AC_SEARCH_LIBS(MD5Init,md5 md,AC_DEFINE([HAVE_LIBMD5], [1], [Define to 1 if you have the md5 library]),)
++	AC_SEARCH_LIBS(MD5Init,md,AC_DEFINE([HAVE_LIBMD5], [1], [Define to 1 if you have the md5 library]),)
+ 	AC_CHECK_HEADER(md5.h,AC_DEFINE([HAVE_MD5_H],[1],[found md5.h]),)
+ 	AC_SEARCH_LIBS(MD5_Init,crypto,AC_DEFINE([HAVE_LIBCRYPTO], [1], [Define to 1 if you have the OpenSSL crypto library]),)
+ fi