summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Rice <tim@multitalents.net>2002-08-13 18:52:10 -0700
committerTim Rice <tim@multitalents.net>2002-08-13 18:52:10 -0700
commitd730b780716d3955066f9fcc89aa377b31079cff (patch)
treec0bfe17178b2f5c7689296df8664df17eacd44af
parent5d860f02ca352cd8e51fe266cc2e1b5d58704964 (diff)
[configure.ac] Display OpenSSL header/library version.
Patch by dtucker@zip.com.au
-rw-r--r--ChangeLog6
-rw-r--r--configure.ac66
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 @@
120020813
2 - (tim) [configure.ac] Display OpenSSL header/library version.
3 Patch by dtucker@zip.com.au
4
120020731 520020731
2 - (bal) OpenBSD CVS Sync 6 - (bal) OpenBSD CVS Sync
3 - markus@cvs.openbsd.org 2002/07/24 16:11:18 7 - markus@cvs.openbsd.org 2002/07/24 16:11:18
@@ -1490,4 +1494,4 @@
1490 - (stevesk) entropy.c: typo in debug message 1494 - (stevesk) entropy.c: typo in debug message
1491 - (djm) ssh-keygen -i needs seeded RNG; report from markus@ 1495 - (djm) ssh-keygen -i needs seeded RNG; report from markus@
1492 1496
1493$Id: ChangeLog,v 1.2413 2002/08/01 01:28:38 mouring Exp $ 1497$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 @@
1# $Id: configure.ac,v 1.84 2002/07/23 00:00:06 mouring Exp $ 1# $Id: configure.ac,v 1.85 2002/08/14 01:52:11 tim Exp $
2 2
3AC_INIT 3AC_INIT
4AC_CONFIG_SRCDIR([ssh.c]) 4AC_CONFIG_SRCDIR([ssh.c])
@@ -764,6 +764,70 @@ AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL),
764 ] 764 ]
765) 765)
766 766
767# Determine OpenSSL header version
768AC_MSG_CHECKING([OpenSSL header version])
769AC_TRY_RUN(
770 [
771#include <stdio.h>
772#include <string.h>
773#include <openssl/opensslv.h>
774#define DATA "conftest.sslincver"
775int main(void) {
776 FILE *fd;
777 int rc;
778
779 fd = fopen(DATA,"w");
780 if(fd == NULL)
781 exit(1);
782
783 if ((rc = fprintf(fd ,"%x (%s)\n", OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_TEXT)) <0)
784 exit(1);
785
786 exit(0);
787}
788 ],
789 [
790 ssl_header_ver=`cat conftest.sslincver`
791 AC_MSG_RESULT($ssl_header_ver)
792 ],
793 [
794 AC_MSG_RESULT(not found)
795 AC_MSG_ERROR(OpenSSL version header not found.)
796 ]
797)
798
799# Determine OpenSSL library version
800AC_MSG_CHECKING([OpenSSL library version])
801AC_TRY_RUN(
802 [
803#include <stdio.h>
804#include <string.h>
805#include <openssl/opensslv.h>
806#include <openssl/crypto.h>
807#define DATA "conftest.ssllibver"
808int main(void) {
809 FILE *fd;
810 int rc;
811
812 fd = fopen(DATA,"w");
813 if(fd == NULL)
814 exit(1);
815
816 if ((rc = fprintf(fd ,"%x (%s)\n", SSLeay(), SSLeay_version(SSLEAY_VERSION))) <0)
817 exit(1);
818
819 exit(0);
820}
821 ],
822 [
823 ssl_library_ver=`cat conftest.ssllibver`
824 AC_MSG_RESULT($ssl_library_ver)
825 ],
826 [
827 AC_MSG_RESULT(not found)
828 AC_MSG_ERROR(OpenSSL library not found.)
829 ]
830)
767 831
768# Sanity check OpenSSL headers 832# Sanity check OpenSSL headers
769AC_MSG_CHECKING([whether OpenSSL's headers match the library]) 833AC_MSG_CHECKING([whether OpenSSL's headers match the library])