diff --git a/configure b/configure index 533fcc5c0b..ebc4f6ba8d 100755 --- a/configure +++ b/configure @@ -14188,7 +14188,7 @@ echo "${ECHO_T}$ac_cv_c_dll_macho" >&6 then LIBEXT="dylib" LDDLLFLAGS="-bundle" - LDSHARED="\$(CC) -dynamiclib" + LDSHARED="\$(CC) -dynamiclib -install_name @executable_path/\`\$(RELPATH) \$(bindir) \$(libdir)\`/\$(DYNAME) \$(SOVERSION:%=-compatibility_version %)" STRIP="$STRIP -u -r" COREFOUNDATIONLIB="-framework CoreFoundation" diff --git a/configure.ac b/configure.ac index cd5a7ae151..58c07d97cb 100644 --- a/configure.ac +++ b/configure.ac @@ -1127,7 +1127,7 @@ case $host_os in then LIBEXT="dylib" LDDLLFLAGS="-bundle" - LDSHARED="\$(CC) -dynamiclib" + LDSHARED="\$(CC) -dynamiclib -install_name @executable_path/\`\$(RELPATH) \$(bindir) \$(libdir)\`/\$(DYNAME) \$(SOVERSION:%=-compatibility_version %)" STRIP="$STRIP -u -r" dnl declare needed frameworks AC_SUBST(COREFOUNDATIONLIB,"-framework CoreFoundation") diff --git a/libs/Makelib.rules.in b/libs/Makelib.rules.in index 4a08d1e4e9..c1f8888080 100644 --- a/libs/Makelib.rules.in +++ b/libs/Makelib.rules.in @@ -13,6 +13,7 @@ LIBEXT = @LIBEXT@ LIBNAME = lib$(LIBRARY) DEFNAME = $(LIBRARY).def SONAME = $(LIBNAME).so.$(SOVERSION) +DYNAME = $(LIBNAME).$(SOVERSION).dylib MODULE = $(LIBNAME).$(LIBEXT) all: $(MODULE) $(MODULE:.dll=.a) @@ -31,8 +32,8 @@ $(LIBNAME).a: $(DEFNAME) $(LIBNAME).dll: $(OBJS) $(DEFNAME) Makefile.in $(DLLWRAP) --def $(SRCDIR)/$(DEFNAME) -o $@ $(OBJS) $(EXTRALIBS) -$(LIBNAME).$(SOVERSION).dylib: $(OBJS) Makefile.in - $(LDSHARED) -install_name $(libdir)/$(LIBNAME).$(SOVERSION).dylib $(OBJS) $(EXTRALIBS) $(LDFLAGS) $(LIBS) -o $@ +$(LIBNAME).$(SOVERSION).dylib: $(OBJS) $(RELPATH) Makefile.in + $(LDSHARED) $(OBJS) $(EXTRALIBS) $(LDFLAGS) $(LIBS) -o $@ $(LIBNAME).dylib: $(LIBNAME).$(SOVERSION).dylib $(RM) $@ && $(LN_S) $(LIBNAME).$(SOVERSION).dylib $@ @@ -71,3 +72,6 @@ uninstall:: clean:: $(RM) $(LIBNAME).so.$(SOVERSION) $(LIBNAME).dll $(LIBNAME).$(SOVERSION).dylib + +$(RELPATH): + @cd $(TOOLSDIR)/tools && $(MAKE) relpath diff --git a/libs/wine/Makefile.in b/libs/wine/Makefile.in index 9d5d6eef09..7aa49e3437 100644 --- a/libs/wine/Makefile.in +++ b/libs/wine/Makefile.in @@ -30,7 +30,4 @@ CONFIGDIRS = \ config.o: config.c $(RELPATH) $(CC) -c $(ALLCFLAGS) -o $@ $(SRCDIR)/config.c $(CONFIGDIRS) -$(RELPATH): - @cd $(TOOLSDIR)/tools && $(MAKE) relpath - ### Dependencies: