openbsd-ports/security/qca-tls/patches/patch-configure
naddy 2e23d6274f * Fix build against OpenSSL 0.9.8; from Daniel Roethlisberger via FreeBSD.
* Remove former maintainer per his request.
* tab-ify
2008-09-12 13:56:32 +00:00

33 lines
954 B
Plaintext

$OpenBSD: patch-configure,v 1.2 2008/09/12 13:56:32 naddy Exp $
--- configure.orig Wed Dec 17 23:54:50 2003
+++ configure Thu Sep 11 22:40:51 2008
@@ -175,6 +175,19 @@ class qc_openssl : public ConfObj (public)
if(ret == 0)
conf->addDefine("OSSL_097");
+ // is it at least openssl 0.9.8?
+ str =
+ "#include<openssl/opensslv.h>\n"
+ "int main()\n"
+ "{\n"
+ " unsigned long x = OPENSSL_VERSION_NUMBER;\n"
+ " if(x >= 0x00908000) return 0; else return 1;\n"
+ "}\n";
+ if(!conf->doCompileAndLink(str, ext, &ret))
+ return false;
+ if(ret == 0)
+ conf->addDefine("OSSL_098");
+
if(!inc.isEmpty())
conf->addIncludePath(inc);
if(kb)
@@ -375,7 +388,7 @@ class Conf (public)
QString extra;
if(!path.isEmpty())
extra += QString("-L") + path + ' ';
- extra += QString("-l") + name;
+ extra += QString("-l") + name + QString(" -lcrypto");
if(!doCompileAndLink(str, extra))
return false;
return true;