use PKG_CONFIG_PATH="/opt/homebrew/opt/cyrus-sasl/lib/pkgconfig" on
macOS to avoid the system's sasl2 lib in favor of the official one
if(HAVE_LIBSASL)
set(LIBMEMCACHED_WITH_SASL_SUPPORT 1)
pkgconfig_export(REQUIRES libsasl2)
+ cmake_push_check_state()
+ set(CMAKE_REQUIRED_INCLUDES "${LIBSASL_INCLUDEDIR}")
+ set(CMAKE_REQUIRED_LIBRARIES "${LIBSASL_LIBRARIES}")
+ check_symbol(sasl_client_done sasl/sasl.h)
+ cmake_pop_check_state()
endif()
endif()
extern "C" {
static void sasl_shutdown_function() {
+#if HAVE_SASL_CLIENT_DONE
+ (void) sasl_client_done();
+#else
sasl_done();
+#endif
}
static std::atomic<int> sasl_startup_state(SASL_OK);