From 373af903a8b183994c93a43d941b295f6791e472 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Wed, 5 Nov 2014 22:05:38 +0100 Subject: [PATCH] Use -install_name on MacOS X when the installation path is known Kudos to yrmt@ for the hint --- src/makefile.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/makefile.c b/src/makefile.c index 5de62ff..a357ee8 100644 --- a/src/makefile.c +++ b/src/makefile.c @@ -1149,6 +1149,9 @@ static int _target_library(Configure * configure, FILE * fp, /* soname is not available on MacOS X */ if(configure->os != HO_MACOSX) fprintf(fp, "%s%s", " -Wl,-soname,", soname); + else if((p = config_get(configure->config, target, "install")) != NULL) + fprintf(fp, "%s%s%s%s%s", " -install_name ", p, "/", target, + configure_get_soext(configure)); fprintf(fp, "%s%s%s%s%s", " $(", target, "_OBJS) $(", target, "_LDFLAGS)"); if(q != NULL)