diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 66 |
1 files changed, 65 insertions, 1 deletions
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 | ||
3 | AC_INIT | 3 | AC_INIT |
4 | AC_CONFIG_SRCDIR([ssh.c]) | 4 | AC_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 | ||
768 | AC_MSG_CHECKING([OpenSSL header version]) | ||
769 | AC_TRY_RUN( | ||
770 | [ | ||
771 | #include <stdio.h> | ||
772 | #include <string.h> | ||
773 | #include <openssl/opensslv.h> | ||
774 | #define DATA "conftest.sslincver" | ||
775 | int 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 | ||
800 | AC_MSG_CHECKING([OpenSSL library version]) | ||
801 | AC_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" | ||
808 | int 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 |
769 | AC_MSG_CHECKING([whether OpenSSL's headers match the library]) | 833 | AC_MSG_CHECKING([whether OpenSSL's headers match the library]) |