summaryrefslogtreecommitdiff
path: root/src/modules/extra
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/extra')
-rw-r--r--src/modules/extra/m_mysql.cpp2
-rw-r--r--src/modules/extra/mysql_rpath.pl6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp
index 9679f9cef..9c8e43a31 100644
--- a/src/modules/extra/m_mysql.cpp
+++ b/src/modules/extra/m_mysql.cpp
@@ -30,7 +30,7 @@ using namespace std;
/* $ModDesc: SQL Service Provider module for all other m_sql* modules */
/* $CompileFlags: `mysql_config --include` */
-/* $LinkerFlags: `mysql_config --libs_r` `perl ../mysql_rpath.pl` */
+/* $LinkerFlags: `mysql_config --libs_r` `perl extra/mysql_rpath.pl` */
/* THE NONBLOCKING MYSQL API!
*
diff --git a/src/modules/extra/mysql_rpath.pl b/src/modules/extra/mysql_rpath.pl
new file mode 100644
index 000000000..befa45a82
--- /dev/null
+++ b/src/modules/extra/mysql_rpath.pl
@@ -0,0 +1,6 @@
+#!/usr/bin/perl
+$data = `mysql_config --libs_r`;
+$data =~ /-L(\S+)\s/;
+$libpath = $1;
+print "-Wl,--rpath -Wl,$libpath";
+