2020-02-05 01:38:00 +00:00
|
|
|
if (NOT ARCH_32)
|
2018-12-07 20:12:06 +00:00
|
|
|
option (USE_INTERNAL_LIBGSASL_LIBRARY "Set to FALSE to use system libgsasl library instead of bundled" ${NOT_UNBUNDLED})
|
|
|
|
endif ()
|
2018-12-07 14:27:04 +00:00
|
|
|
|
2018-12-19 16:15:29 +00:00
|
|
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libgsasl/src/gsasl.h")
|
|
|
|
if (USE_INTERNAL_LIBGSASL_LIBRARY)
|
|
|
|
message (WARNING "submodule contrib/libgsasl is missing. to fix try run: \n git submodule update --init --recursive")
|
|
|
|
set (USE_INTERNAL_LIBGSASL_LIBRARY 0)
|
|
|
|
endif ()
|
|
|
|
set (MISSING_INTERNAL_LIBGSASL_LIBRARY 1)
|
2018-12-07 14:27:04 +00:00
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (NOT USE_INTERNAL_LIBGSASL_LIBRARY)
|
|
|
|
find_library (LIBGSASL_LIBRARY gsasl)
|
|
|
|
find_path (LIBGSASL_INCLUDE_DIR NAMES gsasl.h PATHS ${LIBGSASL_INCLUDE_PATHS})
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (LIBGSASL_LIBRARY AND LIBGSASL_INCLUDE_DIR)
|
2020-02-05 01:38:00 +00:00
|
|
|
elseif (NOT MISSING_INTERNAL_LIBGSASL_LIBRARY AND NOT ARCH_32)
|
2018-12-07 14:27:04 +00:00
|
|
|
set (LIBGSASL_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/libgsasl/src ${ClickHouse_SOURCE_DIR}/contrib/libgsasl/linux_x86_64/include)
|
|
|
|
set (USE_INTERNAL_LIBGSASL_LIBRARY 1)
|
|
|
|
set (LIBGSASL_LIBRARY libgsasl)
|
|
|
|
endif ()
|
|
|
|
|
2019-05-15 17:19:39 +00:00
|
|
|
if(LIBGSASL_LIBRARY AND LIBGSASL_INCLUDE_DIR)
|
|
|
|
set (USE_LIBGSASL 1)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
message (STATUS "Using libgsasl=${USE_LIBGSASL}: ${LIBGSASL_INCLUDE_DIR} : ${LIBGSASL_LIBRARY}")
|