aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/config-ix.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/config-ix.cmake')
-rwxr-xr-xcmake/config-ix.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index 7cad190..c426f41 100755
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -79,6 +79,7 @@ check_include_file(unistd.h HAVE_UNISTD_H)
check_include_file(utime.h HAVE_UTIME_H)
check_include_file(valgrind/valgrind.h HAVE_VALGRIND_VALGRIND_H)
check_include_file(windows.h HAVE_WINDOWS_H)
+check_include_file(zlib.h HAVE_ZLIB_H)
check_include_file(fenv.h HAVE_FENV_H)
check_symbol_exists(FE_ALL_EXCEPT "fenv.h" HAVE_DECL_FE_ALL_EXCEPT)
check_symbol_exists(FE_INEXACT "fenv.h" HAVE_DECL_FE_INEXACT)
@@ -104,6 +105,7 @@ if( NOT PURE_WINDOWS )
endif()
check_library_exists(dl dlopen "" HAVE_LIBDL)
check_library_exists(rt clock_gettime "" HAVE_LIBRT)
+ check_library_exists(z compress2 "" HAVE_LIBZ)
endif()
# function checks
@@ -450,4 +452,11 @@ else( LLVM_ENABLE_THREADS )
message(STATUS "Threads disabled.")
endif()
+if (LLVM_ENABLE_ZLIB )
+ # Check if zlib is available in the system.
+ if ( NOT HAVE_ZLIB_H OR NOT HAVE_LIBZ )
+ set(LLVM_ENABLE_ZLIB 0)
+ endif()
+endif()
+
set(LLVM_PREFIX ${CMAKE_INSTALL_PREFIX})