diff options
author | Costa Tsaousis <costa@tsaousis.gr> | 2020-05-30 00:13:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-30 10:13:42 +0300 |
commit | 1ac12904b0697f1a3131af2f9ed3addc6b396ad9 (patch) | |
tree | 32aa7f70fc7bdbe4c80925161547199c02466266 /configure.ac | |
parent | fd109551e37532201a22f672c7d5ad1304206ed9 (diff) |
fix compilation for older systems (#9198)
inherit libs for clock_gettime() when building libmosquitto; Check that X509_VERIFY_PARAM_set1_host is available on the target system
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 35cf90367d..8fa593c001 100644 --- a/configure.ac +++ b/configure.ac @@ -371,6 +371,20 @@ AC_CHECK_LIB( [SSL_LIBS="-lcrypto -lssl"] ) +AC_CHECK_LIB( + [crypto], + [X509_VERIFY_PARAM_set1_host], + [ssl_host_validation="yes"], + [ssl_host_validation="no"] +) + +if test "${ssl_host_validation}" = "no"; then + AC_DEFINE([HAVE_X509_VERIFY_PARAM_set1_host], [0], [ssl host validation]) + AC_MSG_WARN([DISABLING SSL HOSTNAME VALIDATION BECAUSE IT IS NOT AVAILABLE ON THIS SYSTEM.]) +else + AC_DEFINE([HAVE_X509_VERIFY_PARAM_set1_host], [1], [ssl host validation]) +fi + # ----------------------------------------------------------------------------- # JSON-C library @@ -586,7 +600,7 @@ if test "$enable_cloud" != "no"; then AC_MSG_CHECKING([if libmosquitto static lib is present (and builds)]) if test -f "externaldeps/mosquitto/libmosquitto.a"; then LIBS_BKP="${LIBS}" - LIBS="externaldeps/mosquitto/libmosquitto.a ${OPTIONAL_SSL_LIBS}" + LIBS="externaldeps/mosquitto/libmosquitto.a ${OPTIONAL_SSL_LIBS} ${LIBS_BKP}" AC_LINK_IFELSE([AC_LANG_SOURCE([[#include "externaldeps/mosquitto/mosquitto.h" int main (int argc, char **argv) { int m,mm,r; |