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/openssl_config.pl | |
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/openssl_config.pl')
-rw-r--r-- | src/modules/extra/openssl_config.pl | 20 |
1 files changed, 20 insertions, 0 deletions
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"; + } +} |