From 700ff2c459fa1dd0b341f04619fcfb35258873f5 Mon Sep 17 00:00:00 2001 From: Ryan Schmidt Date: Fri, 8 May 2020 23:03:05 -0500 Subject: [PATCH] Set the install_name for the macOS dylib Just like on Linux where one sets a shared library's soname, one should set a macOS dylib's install_name, but unlike on Linux, on macOS the install_name should be the absolute path where the library will be installed. Fixes #40 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index bd728c3..ce29150 100644 --- a/configure.ac +++ b/configure.ac @@ -120,7 +120,7 @@ case $host in *-apple*) AC_SUBST( sharedlib, ["libstk.dylib"] ) AC_SUBST( sharedname, ["${basesharedname}.dylib"] ) - AC_SUBST( libflags, ["-dynamiclib -o ${basesharedname}.dylib"] ) + AC_SUBST( libflags, ["-dynamiclib -install_name \$(libdir)/${basesharedname}.dylib -o ${basesharedname}.dylib"] ) esac if test $realtime = yes; then