From 3132c5ed17e8693246664c01d9116d3d3338ba51 Mon Sep 17 00:00:00 2001
From: Alexpux <alexey.pawlow@gmail.com>
Date: Wed, 26 Nov 2014 09:27:40 +0300
Subject: [PATCH 22/27] Create symlinks of fbembed only if names are different

---
 builds/posix/Makefile.in.libfbembed | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/builds/posix/Makefile.in.libfbembed b/builds/posix/Makefile.in.libfbembed
index d919ba2b34..2e70ab90f8 100644
--- a/builds/posix/Makefile.in.libfbembed
+++ b/builds/posix/Makefile.in.libfbembed
@@ -61,14 +61,18 @@ Dependencies = $(AllObjects:.o=.d)
 
 libfbembed : $(LIBIBUTIL_SO) $(LIBFBEMBED_SONAME)
 
-$(LIBFBEMBED_SO): $(LIBFBEMBED_Objects) $(SERVER_Objects) $(COMMON_Objects)
-	$(LINK_EMBED) -o $@ $^ $(LINK_EMBED_LIBS)
-
+ifneq ($(SharedLibraryName),$(SharedLibrarySoName))
 $(LIBFBEMBED_SOBASENAME): $(LIBFBEMBED_SO)
 	(cd $(LIB) && $(LN) -f $(SharedLibraryName) $(SharedLibrarySoName) )
+endif
 
+ifneq ($(SharedLibrarySoName),$(SharedLibraryBaseName))
 $(LIBFBEMBED_SONAME): $(LIBFBEMBED_SOBASENAME)
 	(cd $(LIB) && $(LN) -f $(SharedLibrarySoName) $(SharedLibraryBaseName) )
+endif
+
+$(LIBFBEMBED_SO): $(LIBFBEMBED_Objects) $(SERVER_Objects) $(COMMON_Objects)
+	$(LINK_EMBED) -o $@ $^ $(LINK_EMBED_LIBS)
 
 include $(ROOT)/gen/make.shared.targets
 
-- 
2.13.0

