--- lib/configure.orig	2022-11-18 06:15:08
+++ lib/configure	2023-04-16 07:37:53
@@ -303,6 +303,8 @@
 		echo >>$m 'PCILIB=$(LIBNAME).$(LIBEXT).$(VERSION)'
 	elif [ "$LIBEXT" = dll ]; then
 		echo >>$m 'PCILIB=$(LIBNAME)$(ABI_VERSION).$(LIBEXT)'
+	elif [ "$LIBEXT" = dylib ]; then
+		echo >>$m 'PCILIB=$(LIBNAME).$(ABI_VERSION).$(LIBEXT)'
 	else
 		echo >>$m 'PCILIB=$(LIBNAME).$(VERSION).$(LIBEXT)'
 	fi
@@ -314,7 +316,7 @@
 		echo >>$m 'PCILIB_LDFLAGS+=-Wl,-soname,$(LIBNAME).$(LIBEXT).$(ABI_VERSION)'
 		echo >>$m 'PCILIB_LDFLAGS+=-Wl,--version-script=libpci.ver'
 	elif [ "$LIBEXT" = dylib ]; then
-		echo >>$m 'PCILIB_LDFLAGS+=-Wl,-install_name,$(LIBDIR)/$(PCILIB)'
+		echo >>$m 'PCILIB_LDFLAGS+=-Wl,-install_name,$(LIBDIR)/$(PCILIB),-compatibility_version,$(ABI_VERSION),-current_version,$(VERSION)'
 	elif [ "$LIBEXT" = dll ]; then
 		echo >>$m 'PCIIMPDEF=$(LIBNAME)$(ABI_VERSION).def'
 		# GCC's -fvisibility=hidden is broken for Windows targets, use -Wl,--exclude-all-symbols instead (supported since GNU LD 2.21)
