-diff -ur percona-server-5.7.35-38.orig/storage/sphinx/Makefile.am percona-server-5.7.35-38/storage/sphinx/Makefile.am
---- percona-server-5.7.35-38.orig/storage/sphinx/Makefile.am 2016-07-19 12:42:18.000000000 +0200
-+++ percona-server-5.7.35-38/storage/sphinx/Makefile.am 2021-11-24 19:47:02.552556917 +0100
-@@ -31,19 +31,19 @@
+--- mysql-5.1.49/storage/sphinx/Makefile.am~ 2009-02-13 23:26:46.000000000 +0200
++++ mysql-5.1.49/storage/sphinx/Makefile.am 2010-07-24 16:35:57.568716704 +0300
+@@ -31,7 +31,7 @@
LDADD =
DEFS= @DEFS@ \
noinst_HEADERS = ha_sphinx.h
+--- mysql-5.1.49/storage/sphinx/Makefile.am~ 2010-07-24 16:37:48.000000000 +0300
++++ mysql-5.1.49/storage/sphinx/Makefile.am 2010-07-24 17:00:56.161565823 +0300
+@@ -38,7 +38,7 @@
EXTRA_LTLIBRARIES = ha_sphinx.la
pkgplugin_LTLIBRARIES = @plugin_sphinx_shared_target@ sphinx.la
ha_sphinx_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_sphinx_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_sphinx_la_SOURCES = ha_sphinx.cc
+--- mysql-5.1.49/storage/sphinx/Makefile.am~ 2010-07-24 19:14:55.000000000 +0300
++++ mysql-5.1.49/storage/sphinx/Makefile.am 2010-07-25 03:47:56.660771099 +0300
+@@ -43,7 +43,7 @@
+ ha_sphinx_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
+ ha_sphinx_la_SOURCES = ha_sphinx.cc
-sphinx_la_LDFLAGS = -module
+sphinx_la_LDFLAGS = -module -avoid-version -rpath $(MYSQLLIBdir)