summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gnutls_rpath.pl6
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/gnutls_rpath.pl b/src/gnutls_rpath.pl
new file mode 100644
index 000000000..f47445581
--- /dev/null
+++ b/src/gnutls_rpath.pl
@@ -0,0 +1,6 @@
+#!/usr/bin/perl
+$data = `libgnutls-config --libs`;
+$data =~ /-L(\S+)\s/;
+$libpath = $1;
+print "-Wl,--rpath -Wl,$libpath";
+
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 12ecf18eb..50a751412 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -13,7 +13,7 @@
/* $ModDesc: Provides SSL support for clients */
/* $CompileFlags: `libgnutls-config --cflags` */
-/* $LinkerFlags: `libgnutls-config --libs` */
+/* $LinkerFlags: `libgnutls-config --libs` `perl ../gnutls_rpath.pl` */
enum issl_status { ISSL_NONE, ISSL_HANDSHAKING_READ, ISSL_HANDSHAKING_WRITE, ISSL_HANDSHAKEN, ISSL_CLOSING, ISSL_CLOSED };