--- festival/speech_tools/config/rules/library.mak.soname	2001-04-04 07:55:32.000000000 -0400
+++ festival/speech_tools/config/rules/library.mak	2007-03-16 14:13:59.000000000 -0400
@@ -103,14 +103,14 @@
  ###########################################################################
 
 lib%.so : lib%.a
-	@echo Make Shared Library $*
+	@echo Make Shared Library $(*F)
 	@if [ ! -d shared_space ] ; then mkdir shared_space ; else $(RM) -f shared_space/*.o ; fi
 	@(cd shared_space ; $(AR) x ../$< ) 
-	@echo Link Shared Library $*
-	if [ -n "$(PROJECT_LIBRARY_NEEDS_SYSLIBS_$*)" ] ; then libs='$(JAVA_PROJECT_LIBS)' ; fi ;\
-	$(subst XXX,$@.$(PROJECT_LIBRARY_VERSION_$*),$(MAKE_SHARED_LIB)) shared_space/*.o $(PROJECT_LIBRARY_USES_$*:%=-L. -l%) $$libs
+	@echo Link Shared Library $(*F)
+	if [ -n "$(PROJECT_LIBRARY_NEEDS_SYSLIBS_$(*F))" ] ; then libs='$(JAVA_PROJECT_LIBS)' ; fi ;\
+	$(subst XXX,$@.$(PROJECT_LIBRARY_VERSION_$(*F)),$(subst YYY,$(@F).$(PROJECT_LIBRARY_VERSION_$(*F)),$(MAKE_SHARED_LIB))) shared_space/*.o $(PROJECT_LIBRARY_USES_$(*F):%=-L. -l%) $$libs
 	@$(RM) -f shared_space/*.o $@
-	@ln -s $@.$(PROJECT_LIBRARY_VERSION_$*) $@
+	@ln -s $(@F).$(PROJECT_LIBRARY_VERSION_$(*F)) $@
 
  ###########################################################################
  ##                                                                       ##
--- festival/speech_tools/config/compilers/gcc_defaults.mak.soname	2007-03-16 12:43:31.000000000 -0400[0;0m
+++ festival/speech_tools/config/compilers/gcc_defaults.mak	2007-03-16 13:30:11.000000000 -0400[0;0m
@@ -78,7 +78,7 @@
 SHARED_LINKFLAGS = -fno-shared-data
 
 ifndef GCC_MAKE_SHARED_LIB
-    MAKE_SHARED_LIB = $(CXX) -shared -fno-shared-data -o XXX
+    MAKE_SHARED_LIB = $(CXX) -shared -fno-shared-data -o XXX -Wl,-soname,YYY
 else
     MAKE_SHARED_LIB = $(GCC_MAKE_SHARED_LIB)
 endif
