]> andersk Git - openssh.git/commitdiff
[configure.ac] Display OpenSSL header/library version.
authortim <tim>
Wed, 14 Aug 2002 01:52:10 +0000 (01:52 +0000)
committertim <tim>
Wed, 14 Aug 2002 01:52:10 +0000 (01:52 +0000)
Patch by dtucker@zip.com.au

ChangeLog
configure.ac

index 7cb22c95295554319914603e7c66d9306c6a3dba..0d1a8881c6a96170e75a58903212286396c529f4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+20020813
+ - (tim) [configure.ac] Display OpenSSL header/library version.
+   Patch by dtucker@zip.com.au
+
 20020731
  - (bal) OpenBSD CVS Sync
    - markus@cvs.openbsd.org 2002/07/24 16:11:18
index e2885afd183fa0accac406cc2578f409fe5e4b7d..ff988198780bd91d8bd36f6246c2b27eebf83093 100644 (file)
@@ -764,6 +764,70 @@ AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL),
        ]
 )
 
+# Determine OpenSSL header version
+AC_MSG_CHECKING([OpenSSL header version])
+AC_TRY_RUN(
+       [
+#include <stdio.h>
+#include <string.h>
+#include <openssl/opensslv.h>
+#define DATA "conftest.sslincver"
+int main(void) {
+        FILE *fd;
+        int rc;
+
+        fd = fopen(DATA,"w");
+        if(fd == NULL)
+                exit(1);
+
+       if ((rc = fprintf(fd ,"%x (%s)\n", OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_TEXT)) <0)
+               exit(1);
+
+       exit(0);
+}
+       ],
+       [
+               ssl_header_ver=`cat conftest.sslincver`
+               AC_MSG_RESULT($ssl_header_ver)
+       ],
+       [
+               AC_MSG_RESULT(not found)
+               AC_MSG_ERROR(OpenSSL version header not found.)
+       ]
+)
+
+# Determine OpenSSL library version
+AC_MSG_CHECKING([OpenSSL library version])
+AC_TRY_RUN(
+       [
+#include <stdio.h>
+#include <string.h>
+#include <openssl/opensslv.h>
+#include <openssl/crypto.h>
+#define DATA "conftest.ssllibver"
+int main(void) {
+        FILE *fd;
+        int rc;
+
+        fd = fopen(DATA,"w");
+        if(fd == NULL)
+                exit(1);
+
+       if ((rc = fprintf(fd ,"%x (%s)\n", SSLeay(), SSLeay_version(SSLEAY_VERSION))) <0)
+               exit(1);
+
+       exit(0);
+}
+       ],
+       [
+               ssl_library_ver=`cat conftest.ssllibver`
+               AC_MSG_RESULT($ssl_library_ver)
+       ],
+       [
+               AC_MSG_RESULT(not found)
+               AC_MSG_ERROR(OpenSSL library not found.)
+       ]
+)
 
 # Sanity check OpenSSL headers
 AC_MSG_CHECKING([whether OpenSSL's headers match the library])
This page took 0.12953 seconds and 5 git commands to generate.