On 17/04/17 22:36, Steffan Karger wrote: > Hi, > On 17-04-17 11:01, David Sommerseth wrote: >> [..] >> >> We should anyway in this case have a better check of OpenSSL version >> available. So in the case pkg-config fails, it will run an additional >> test looking for the OpenSSL version number in the opensslv.h header >> file and check against that version number. > > Content-wise this looks good, but two remarks: > >> @@ -861,12 +861,34 @@ if test "${enable_crypto}" = "yes" -a >> "${with_crypto_library}" = "openssl"; then >> [OPENSSL], >> [libcrypto >= 1.0.1, libssl >= 1.0.1], >> [have_openssl="yes"], >> - [AC_MSG_ERROR([Minimum supported OpenSSL version is >> 1.0.1])] >> + [] # If this fails, we will do another test next >> ) >> >> OPENSSL_LIBS=${OPENSSL_LIBS:--lssl -lcrypto} >> fi > > I think this OPENSSL_LIBS default can go now, since it is set below if > needed.
Ah, right. Somehow I connected that to pkg-config as well. But you're right! >> + # If pkgconfig check failed or OPENSSL_CFLAGS/OPENSSL_LIBS env vars >> + # are used, check the version directly in the OpenSSL include file >> + if test "${have_openssl}" != "yes"; then >> + AC_MSG_CHECKING([additionally if OpenSSL is available and >> version >= 1.0.1]) >> + AC_COMPILE_IFELSE( >> + [AC_LANG_PROGRAM( >> + [[ >> +#include <openssl/opensslv.h> >> + ]], >> + [[ >> +/* Version encoding: MNNFFPPS - see opensslv.h for details */ >> +#if OPENSSL_VERSION_NUMBER < 0x10001000L >> +#error OpenSSL too old >> +#endif >> + ]] >> + )], >> + [AC_MSG_RESULT([ok])], >> + [AC_MSG_ERROR([OpenSSL version too old])] >> + ) >> + OPENSSL_LIBS=${OPENSSL_LIBS:--lssl -lcrypto} >> + fi > > Tabs and spaces are mixed here. The surrounding lines seem to be > tabs-only. (This bites me each time I edit configure.ac too...) Oh bloody h...... *grmbl* .... Something have seriously changed in my emacs setup during an update or something related; I've never had as much tab/space mess as I've had lately. It used to do everything correct earlier. I'll send another update soonish. Thanks! -- kind regards, David Sommerseth OpenVPN Technologies, Inc
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel