diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-11-24 19:06:02 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-11-24 19:06:02 +0000 |
commit | 0c86ba0f22cba59dcafbbf2e31e86cd8576b37b1 (patch) | |
tree | 80045986a9ca2481e0c636a4a6b9fbee2211a67d /src/modules/extra | |
parent | f13202da23167c8bf8ea457ba75a497d83806f34 (diff) |
Smarter openssl detection
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5791 e03df62e-2008-0410-955e-edbf42e46eb7
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"; + } +} |