configure: Make libraries properly relocatable on MacOS.
Also set the compatibility version.
This commit is contained in:
parent
17689c07bb
commit
7ed7e8fd4d
|
@ -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"
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue