[Patch] Improve diags for "OpenSSL headers match library" configure test

Darren Tucker dtucker at zip.com.au
Sat Jul 27 12:45:20 EST 2002


Hello All,
	After seeing what is probably the zillionth "OpenSSL headers don't
match library" bug report I made the following mod to configure.ac. It
always writes the versions of the library and headers to config.log and
prints them to stdout if they don't match.

	Hopefully this will help diagnose these problems in future. Example
output below.

		-Daz.

$ ./configure
[snip]
checking whether OpenSSL's headers match the library... library 90602f
headers 90604f no
configure: error: Your OpenSSL headers do not match your library

and config.log:

configure:8458: ./conftest
OpenSSL library 90602f headers 90604f
configure:8461: $? = 1
configure: program exited with status 1

-- 
Darren Tucker (dtucker at zip.com.au)
GPG Fingerprint D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
-------------- next part --------------
Index: configure.ac
===================================================================
RCS file: /cvs/openssh/configure.ac,v
retrieving revision 1.84
diff -u -r1.84 configure.ac
--- configure.ac	23 Jul 2002 00:00:06 -0000	1.84
+++ configure.ac	27 Jul 2002 02:35:58 -0000
@@ -769,9 +769,18 @@
 AC_MSG_CHECKING([whether OpenSSL's headers match the library])
 AC_TRY_RUN(
 	[
+#include <stdio.h>
 #include <string.h>
 #include <openssl/opensslv.h>
-int main(void) { return(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); }
+int main(void) {
+	fprintf(stderr,"OpenSSL library %x headers %x\n", SSLeay(), OPENSSL_VERSION_NUMBER);
+	if (SSLeay() == OPENSSL_VERSION_NUMBER) {
+		return(0);
+	} else {
+		printf("library %x headers %x ", SSLeay(), OPENSSL_VERSION_NUMBER);
+		return(1);
+	}
+}
 	],
 	[
 		AC_MSG_RESULT(yes)






More information about the openssh-unix-dev mailing list