diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-11-25 14:18:59 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-11-25 14:18:59 +0000 |
commit | 307a31f79486d56f463becd093dea873ce0dc0f0 (patch) | |
tree | a90c442c3400c0349b7b712a04c82c436c17f949 /src/modules | |
parent | 702aa22c5c1dbf721b42c6f11bfbd1a98f843fc7 (diff) |
Improve openssl detection
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5797 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/extra/openssl_config.pl | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/modules/extra/openssl_config.pl b/src/modules/extra/openssl_config.pl index 30d8c115d..61d8f2902 100644 --- a/src/modules/extra/openssl_config.pl +++ b/src/modules/extra/openssl_config.pl @@ -14,9 +14,17 @@ if ($ARGV[0] eq "compile") $ret = `pkg-config --cflags openssl 2>/dev/null`; if ((!defined $ret) || ($ret eq "")) { - $foo = `locate "openssl/ssl.h"`; - $foo =~ s/\/openssl\/ssl\.h//; - $ret = "-I$foo"; + $foo = `locate "/openssl/ssl.h" | head -n 1`; + $foo =~ /(.+)\/openssl\/ssl\.h/; + if (defined $1) + { + $foo = "-I$1"; + } + else + { + $foo = ""; + } + $ret = "$foo\n"; } } else |