From d730b780716d3955066f9fcc89aa377b31079cff Mon Sep 17 00:00:00 2001 From: Tim Rice Date: Tue, 13 Aug 2002 18:52:10 -0700 Subject: [configure.ac] Display OpenSSL header/library version. Patch by dtucker@zip.com.au --- ChangeLog | 6 +++++- configure.ac | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 70 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 74ce05354..9e002568a 100644 --- 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 @@ -1490,4 +1494,4 @@ - (stevesk) entropy.c: typo in debug message - (djm) ssh-keygen -i needs seeded RNG; report from markus@ -$Id: ChangeLog,v 1.2413 2002/08/01 01:28:38 mouring Exp $ +$Id: ChangeLog,v 1.2414 2002/08/14 01:52:10 tim Exp $ diff --git a/configure.ac b/configure.ac index 25d72e6c7..615fec2a5 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -# $Id: configure.ac,v 1.84 2002/07/23 00:00:06 mouring Exp $ +# $Id: configure.ac,v 1.85 2002/08/14 01:52:11 tim Exp $ AC_INIT AC_CONFIG_SRCDIR([ssh.c]) @@ -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 +#include +#include +#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 +#include +#include +#include +#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]) -- cgit v1.2.3