summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2011-01-17 16:35:14 +0000
committerOscar Fuentes <ofv@wanadoo.es>2011-01-17 16:35:14 +0000
commit3c00a83c3362dc7d066454936ad36fbfb3fd26c5 (patch)
tree1f06e89a846fc15b173bd3d34862f3f42dc278e0 /cmake
parent2634a5425c29eca79f2cc2e309274d365697d0a7 (diff)
downloadllvm-3c00a83c3362dc7d066454936ad36fbfb3fd26c5.tar.gz
llvm-3c00a83c3362dc7d066454936ad36fbfb3fd26c5.tar.bz2
llvm-3c00a83c3362dc7d066454936ad36fbfb3fd26c5.tar.xz
Add some platform checks. Also fix a typo on a Makefile.
Patch by arrowdodger! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123659 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rwxr-xr-xcmake/config-ix.cmake14
1 files changed, 14 insertions, 0 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index 38f815e8ae..e19cb349d5 100755
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -55,6 +55,7 @@ check_include_file(stdint.h HAVE_STDINT_H)
check_include_file(stdio.h HAVE_STDIO_H)
check_include_file(stdlib.h HAVE_STDLIB_H)
check_include_file(string.h HAVE_STRING_H)
+check_include_file(strings.h HAVE_STRINGS_H)
check_include_file(sys/dir.h HAVE_SYS_DIR_H)
check_include_file(sys/dl.h HAVE_SYS_DL_H)
check_include_file(sys/ioctl.h HAVE_SYS_IOCTL_H)
@@ -72,6 +73,8 @@ 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(fenv.h HAVE_FENV_H)
+check_include_file(mach/mach.h HAVE_MACH_MACH_H)
+check_include_file(mach-o/dyld.h HAVE_MACH_O_DYLD_H)
# library checks
if( NOT LLVM_ON_WIN32 )
@@ -106,6 +109,10 @@ check_symbol_exists(opendir "sys/types.h;dirent.h" HAVE_OPENDIR)
check_symbol_exists(getcwd unistd.h HAVE_GETCWD)
check_symbol_exists(gettimeofday sys/time.h HAVE_GETTIMEOFDAY)
check_symbol_exists(getrlimit "sys/types.h;sys/time.h;sys/resource.h" HAVE_GETRLIMIT)
+check_symbol_exists(strchr string.h HAVE_STRCHR)
+check_symbol_exists(strcmp string.h HAVE_STRCMP)
+check_symbol_exists(strdup string.h HAVE_STRDUP)
+check_symbol_exists(strrchr string.h HAVE_STRRCHR)
if( NOT LLVM_ON_WIN32 )
check_symbol_exists(pthread_mutex_lock pthread.h HAVE_PTHREAD_MUTEX_LOCK)
endif()
@@ -127,6 +134,12 @@ if( HAVE_ARGZ_H )
check_symbol_exists(argz_next argz.h HAVE_ARGZ_NEXT)
check_symbol_exists(argz_stringify argz.h HAVE_ARGZ_STRINGIFY)
endif()
+if( HAVE_DLFCN_H AND HAVE_LIBDL )
+ list(APPEND CMAKE_REQUIRED_LIBRARIES dl)
+ check_symbol_exists(dlerror dlfcn.h HAVE_DLERROR)
+ check_symbol_exists(dlopen dlfcn.h HAVE_DLOPEN)
+ list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES dl)
+endif()
check_symbol_exists(__GLIBC__ stdio.h LLVM_USING_GLIBC)
if( LLVM_USING_GLIBC )
@@ -154,6 +167,7 @@ endif()
check_type_exists(int64_t "${headers}" HAVE_INT64_T)
check_type_exists(uint64_t "${headers}" HAVE_UINT64_T)
check_type_exists(u_int64_t "${headers}" HAVE_U_INT64_T)
+check_type_exists(error_t errno.h HAVE_ERROR_T)
# available programs checks
function(llvm_find_program name)