diff --git a/config/ac-macros/yassl.m4 b/config/ac-macros/yassl.m4
index 9d9a4d5500044fd1ed8707b87c86eb812d6fc949..d1216554862c4cd3548d429daa2795587deafb9d 100644
--- a/config/ac-macros/yassl.m4
+++ b/config/ac-macros/yassl.m4
@@ -16,7 +16,6 @@ AC_DEFUN([MYSQL_CHECK_YASSL], [
     AC_MSG_RESULT([using bundled yaSSL])
     yassl_dir="extra/yassl"
     yassl_libs="-L\$(top_srcdir)/extra/yassl/src -lyassl -L\$(top_srcdir)/extra/yassl/taocrypt/src -ltaocrypt"
-    yassl_libs_with_path="\$(top_srcdir)/extra/yassl/src/libyassl.a \$(top_srcdir)/extra/yassl/taocrypt/src/libtaocrypt.a"
     yassl_includes="-I\$(top_srcdir)/extra/yassl/include"
     AC_DEFINE([HAVE_OPENSSL], [1], [Defined by configure. Using yaSSL for OpenSSL emulation.])
     AC_DEFINE([HAVE_YASSL], [1], [Defined by configure. Using yaSSL for OpenSSL emulation.])
@@ -24,12 +23,12 @@ AC_DEFUN([MYSQL_CHECK_YASSL], [
     yassl_integer_extra_cxxflags=""
     case $host_cpu--$CXX_VERSION in
         sparc*--*Sun*C++*5.6*)
-	# Disable inlining when compiling taocrypt/src/integer.cpp
-	yassl_integer_extra_cxxflags="+d"
-        AC_MSG_NOTICE([disabling inlining for yassl/taocrypt/src/integer.cpp])
+	# Disable inlining when compiling taocrypt/src/
+	yassl_taocrypt_extra_cxxflags="+d"
+        AC_MSG_NOTICE([disabling inlining for yassl/taocrypt/src/])
         ;;
     esac
-    AC_SUBST([yassl_integer_extra_cxxflags])
+    AC_SUBST([yassl_taocrypt_extra_cxxflags])
 
   else
     yassl_dir=""
@@ -38,6 +37,5 @@ AC_DEFUN([MYSQL_CHECK_YASSL], [
   AC_SUBST(yassl_libs)
   AC_SUBST(yassl_includes)
   AC_SUBST(yassl_dir)
-  AC_SUBST(yassl_libs_with_path)
   AM_CONDITIONAL([HAVE_YASSL], [ test "with_yassl" = "yes" ])
 ])
diff --git a/extra/yassl/src/Makefile.am b/extra/yassl/src/Makefile.am
index df96018e1cfc772a93ed19d6aff66e9b6f827a51..a852ca4019b383f231c12cb14b842c5b2a9693af 100644
--- a/extra/yassl/src/Makefile.am
+++ b/extra/yassl/src/Makefile.am
@@ -1,7 +1,7 @@
 INCLUDES = -I../include -I../taocrypt/include -I../mySTL
 
-noinst_LIBRARIES = libyassl.a
-libyassl_a_SOURCES = buffer.cpp cert_wrapper.cpp crypto_wrapper.cpp \
+noinst_LTLIBRARIES = libyassl.la
+libyassl_la_SOURCES = buffer.cpp cert_wrapper.cpp crypto_wrapper.cpp \
 	handshake.cpp lock.cpp log.cpp socket_wrapper.cpp ssl.cpp \
 	template_instnt.cpp timer.cpp yassl_imp.cpp yassl_error.cpp yassl_int.cpp
 EXTRA_DIST = $(wildcard ../include/*.hpp) $(wildcard ../include/openssl/*.h)
diff --git a/extra/yassl/taocrypt/src/Makefile.am b/extra/yassl/taocrypt/src/Makefile.am
index 0319fc6057ba413bea2c8ff6e71f1e0860f10a00..d89fa95a9403d7de60e7e6d4c2cf04d7bfc075da 100644
--- a/extra/yassl/taocrypt/src/Makefile.am
+++ b/extra/yassl/taocrypt/src/Makefile.am
@@ -1,15 +1,11 @@
 INCLUDES = -I../include -I../../mySTL
 
-noinst_LIBRARIES = libtaoint.a libtaocrypt.a
+noinst_LTLIBRARIES = libtaocrypt.la
 
-libtaoint_a_SOURCES = integer.cpp
-libtaoint_a_CXXFLAGS = @yassl_integer_extra_cxxflags@
-
-libtaocrypt_a_SOURCES  = aes.cpp aestables.cpp algebra.cpp arc4.cpp asn.cpp \
+libtaocrypt_la_SOURCES  = aes.cpp aestables.cpp algebra.cpp arc4.cpp asn.cpp \
 	coding.cpp dh.cpp des.cpp dsa.cpp file.cpp hash.cpp \
 	md2.cpp md5.cpp misc.cpp random.cpp ripemd.cpp rsa.cpp sha.cpp \
-	template_instnt.cpp
-libtaocrypt_a_LIBADD = libtaoint_a-integer.o
+	template_instnt.cpp integer.cpp
+libtaocrypt_la_CXXFLAGS = @yassl_taocrypt_extra_cxxflags@ -DYASSL_PURE_C
 
 EXTRA_DIST = $(wildcard ../include/*.hpp)
-AM_CXXFLAGS = -DYASSL_PURE_C
diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am
index 8ddc8752f078644231d215f50dbd41da88d049d9..f07bbacba027099f9ca9b351a51beb0fb05c796e 100644
--- a/libmysqld/Makefile.am
+++ b/libmysqld/Makefile.am
@@ -80,8 +80,7 @@ INC_LIB=	$(top_builddir)/regex/libregex.a \
 		$(top_builddir)/mysys/libmysys.a \
 		$(top_builddir)/strings/libmystrings.a \
 		$(top_builddir)/dbug/libdbug.a \
-		$(top_builddir)/vio/libvio.a \
-                @yassl_libs_with_path@
+		$(top_builddir)/vio/libvio.a
 		
 
 #
diff --git a/libmysqld/examples/Makefile.am b/libmysqld/examples/Makefile.am
index 925a6573efea730e9114c31667fa8673e02b2472..414cf63b003bd62e740ed79f81f717695359aa00 100644
--- a/libmysqld/examples/Makefile.am
+++ b/libmysqld/examples/Makefile.am
@@ -34,8 +34,8 @@ link_sources:
 DEFS = 		-DEMBEDDED_LIBRARY
 INCLUDES =	-I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir) \
 		-I$(top_srcdir) -I$(top_srcdir)/client -I$(top_srcdir)/regex \
-		$(openssl_includes)
-LIBS =		@LIBS@ @WRAPLIBS@ @CLIENT_LIBS@
+		$(openssl_includes) $(yassl_includes)
+LIBS =		@LIBS@ @WRAPLIBS@ @CLIENT_LIBS@ $(yassl_libs)
 LDADD =		@CLIENT_EXTRA_LDFLAGS@ ../libmysqld.a @innodb_system_libs@ @LIBDL@ $(CXXLDFLAGS)
 
 mysqltest_embedded_LINK = $(CXXLINK)