diff options
Diffstat (limited to 'src/modules/extra')
-rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 4 | ||||
-rw-r--r-- | src/modules/extra/openssl_config.pl | 20 |
2 files changed, 22 insertions, 2 deletions
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 578ffce00..37f0e1ad8 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -17,8 +17,8 @@ #include "ssl_cert.h" /* $ModDesc: Provides SSL support for clients */ -/* $CompileFlags: `pkg-config --cflags openssl` */ -/* $LinkerFlags: `pkg-config --libs openssl` */ +/* $CompileFlags: `perl extra/openssl_config.pl compile` */ +/* $LinkerFlags: `perl extra/openssl_config.pl link` */ diff --git a/src/modules/extra/openssl_config.pl b/src/modules/extra/openssl_config.pl new file mode 100644 index 000000000..fb36f2f5e --- /dev/null +++ b/src/modules/extra/openssl_config.pl @@ -0,0 +1,20 @@ +#!/usr/bin/perl + +$ENV{PKG_CONFIG_PATH} = "/usr/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/libdata/pkgconfig:/usr/X11R6/libdata/pkgconfig"; + +if ($ARGV[1] eq "compile") +{ + $ret = `pkg-config --cflags openssl`; + if ((undef $ret) || ($ret eq "")) + { + $ret = ""; + } +} +else +{ + $ret = `pkg-config --libs openssl`; + if ((undef $ret) || ($ret eq "")) + { + $ret = "-lssl -lcrypto -ldl"; + } +} |