Darren Tucker
2002-Jul-27 02:45 UTC
[Patch] Improve diags for "OpenSSL headers match library" configure test
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)
Tim Rice
2002-Jul-27 04:09 UTC
[Patch] Improve diags for "OpenSSL headers match library" configure test
On Sat, 27 Jul 2002, Darren Tucker wrote:> 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.I think I remember the autoconf docs recomending against using printf() in tests. Look at the test in the --with-default-path section for how you might do it differently. -- Tim Rice Multitalents (707) 887-1469 tim at multitalents.net
Reasonably Related Threads
- [Bug 1991] New: openssl version checking needs updating
- Improper (?) OpenSSL version mismatch(was RE: OpenSSH_2.5.1p1 - RH 6.2)
- [Bug 2212] New: openssl version check should ignore status nibble
- An openssl shared library versioning problem (fwd)
- [PATCH] Solaris 10 and missing OpenSSL functions >128bit