$NetBSD: patch-configure,v 1.3 2025/01/03 13:41:51 adam Exp $

Allow libdpkg being a shared library.
Use md5 from OpenSSL.

--- configure.orig	2025-01-01 22:27:27.000000000 +0000
+++ configure
@@ -17349,12 +17349,6 @@ CC=$lt_save_CC
 
 
 
-  if test "$enable_shared" = "yes" && test -z "$AUTHOR_TESTING"
-then :
-
-    as_fn_error $? "building libdpkg as a shared library is not supported" "$LINENO" 5
-
-fi
 
 
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --as-needed linker flag" >&5
@@ -24372,16 +24366,16 @@ fi
 
 
   have_libmd="no"
-         for ac_header in md5.h
+         for ac_header in openssl/md5.h
 do :
-  ac_fn_c_check_header_compile "$LINENO" "md5.h" "ac_cv_header_md5_h" "$ac_includes_default"
+  ac_fn_c_check_header_compile "$LINENO" "openssl/md5.h" "ac_cv_header_md5_h" "$ac_includes_default"
 if test "x$ac_cv_header_md5_h" = xyes
 then :
   printf "%s\n" "#define HAVE_MD5_H 1" >>confdefs.h
 
     dpkg_save_libmd_LIBS=$LIBS
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing MD5Init" >&5
-printf %s "checking for library containing MD5Init... " >&6; }
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing MD5_Init" >&5
+printf %s "checking for library containing MD5_Init... " >&6; }
 if test ${ac_cv_search_MD5Init+y}
 then :
   printf %s "(cached) " >&6
@@ -24399,16 +24393,16 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_
 #ifdef __cplusplus
 extern "C"
 #endif
-char MD5Init (void);
+char MD5_Init (void);
 int
 main (void)
 {
-return MD5Init ();
+return MD5_Init ();
   ;
   return 0;
 }
 _ACEOF
-for ac_lib in '' md
+for ac_lib in '' crypto
 do
   if test -z "$ac_lib"; then
     ac_res="none required"
