diff options
Diffstat (limited to 'databases/mariadb103-server/files/patch-storage_innobase_lz4.cmake')
-rw-r--r-- | databases/mariadb103-server/files/patch-storage_innobase_lz4.cmake | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/databases/mariadb103-server/files/patch-storage_innobase_lz4.cmake b/databases/mariadb103-server/files/patch-storage_innobase_lz4.cmake new file mode 100644 index 000000000000..096529fae9f5 --- /dev/null +++ b/databases/mariadb103-server/files/patch-storage_innobase_lz4.cmake @@ -0,0 +1,36 @@ +--- storage/innobase/lz4.cmake.orig 2017-05-14 23:13:18 UTC ++++ storage/innobase/lz4.cmake +@@ -17,21 +17,29 @@ SET(WITH_INNODB_LZ4 AUTO CACHE STRING + + MACRO (MYSQL_CHECK_LZ4) + IF (WITH_INNODB_LZ4 STREQUAL "ON" OR WITH_INNODB_LZ4 STREQUAL "AUTO") +- CHECK_INCLUDE_FILES(lz4.h HAVE_LZ4_H) +- CHECK_LIBRARY_EXISTS(lz4 LZ4_compress_limitedOutput "" HAVE_LZ4_SHARED_LIB) +- CHECK_LIBRARY_EXISTS(lz4 LZ4_compress_default "" HAVE_LZ4_COMPRESS_DEFAULT) ++ find_path(LZ4_INCLUDE_DIR NAMES lz4.h) ++ find_library(LZ4_LIBRARY NAMES lz4) ++ IF (LZ4_LIBRARY) ++ get_filename_component(LZ4_LIBDIR ${LZ4_LIBRARY} DIRECTORY) ++#MESSAGE(STATUS "LZ4_INCLUDE_DIR=${LZ4_INCLUDE_DIR} LZ4_LIBRARY=${LZ4_LIBRARY} LZ4_LIBDIR=${LZ4_LIBDIR}") ++ IF (LZ4_INCLUDE_DIR) ++ SET(HAVE_LZ4_H YES) ++ ENDIF() ++ CHECK_LIBRARY_EXISTS(lz4 LZ4_compress_limitedOutput ${LZ4_LIBDIR} HAVE_LZ4_SHARED_LIB) ++ CHECK_LIBRARY_EXISTS(lz4 LZ4_compress_default ${LZ4_LIBDIR} HAVE_LZ4_COMPRESS_DEFAULT) + + IF (HAVE_LZ4_SHARED_LIB AND HAVE_LZ4_H) + ADD_DEFINITIONS(-DHAVE_LZ4=1) + IF (HAVE_LZ4_COMPRESS_DEFAULT) + ADD_DEFINITIONS(-DHAVE_LZ4_COMPRESS_DEFAULT=1) + ENDIF() +- LINK_LIBRARIES(lz4) ++ LINK_LIBRARIES(innobase ${LZ4_LIBRARY}) + ELSE() + IF (WITH_INNODB_LZ4 STREQUAL "ON") + MESSAGE(FATAL_ERROR "Required lz4 library is not found") + ENDIF() + ENDIF() ++ ENDIF() + ENDIF() + ENDMACRO() + |