diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index 5ab3935f6de..0d61f1e213e 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -37,6 +37,10 @@ check_include_file(unistd.h HAVE_UNISTD_H) check_include_file(utime.h HAVE_UTIME_H) check_include_file(windows.h HAVE_WINDOWS_H) +# library checks +include(CheckLibraryExists) +check_library_exists(pthread pthread_create "" HAVE_LIBPTHREAD) + # function checks include(CheckSymbolExists) check_symbol_exists(getpagesize unistd.h HAVE_GETPAGESIZE) diff --git a/include/llvm/Config/config.h.cmake b/include/llvm/Config/config.h.cmake index cabf0f17882..dac1856ea0b 100644 --- a/include/llvm/Config/config.h.cmake +++ b/include/llvm/Config/config.h.cmake @@ -194,7 +194,7 @@ #cmakedefine HAVE_LIBPSAPI ${HAVE_LIBPSAPI} /* Define to 1 if you have the `pthread' library (-lpthread). */ -#undef HAVE_LIBPTHREAD +#cmakedefine HAVE_LIBPTHREAD ${HAVE_LIBPTHREAD} /* Define to 1 if you have the `udis86' library (-ludis86). */ #undef HAVE_LIBUDIS86