--- aclocal.m4.orig	2008-05-23 12:17:56
+++ aclocal.m4	2026-04-24 19:59:21
@@ -303,6 +303,15 @@
 	LINK_SHLIB='$(LD) -G -z text -h $(SONAME)'
 	INSTALL_SHLIB='$(INSTALL_PROGRAM)'
 	;;
+      *-darwin*)
+	PICFLAGS='-fPIC -DPIC'
+	SHLIB_SFX='.$(VERSION).dylib'
+	SHLINK_SFX='.dylib'
+	SONAME_SFX='.$(MAJOR).dylib'
+	LINK_SHLIB='$(CC) -shared $(LDFLAGS) -Wl,-install_name,$(libdir)/$(SONAME)'
+	INSTALL_SHLIB='$(INSTALL_PROGRAM)'
+	DEPSHLIBS='-lc'
+	;;
       *)
 	AC_MSG_WARN([shared libraries not supported for $host])
 	mr_enable_shared=no
