CMake: Detects libpthread and sets HAVE_LIBPTHREAD.
authorOscar Fuentes <ofv@wanadoo.es>
Wed, 6 May 2009 14:40:37 +0000 (14:40 +0000)
committerOscar Fuentes <ofv@wanadoo.es>
Wed, 6 May 2009 14:40:37 +0000 (14:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71084 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/config-ix.cmake
include/llvm/Config/config.h.cmake

index 5ab3935f6de553f60fe488a1d97641d74c02e004..0d61f1e213e8625398204185d8c124b97561aa7f 100755 (executable)
@@ -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)
index cabf0f17882d3c02b3082a7464e611c47d05ff06..dac1856ea0b006019324f5cfa4371b36fc0a4a2c 100644 (file)
 #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