summaryrefslogtreecommitdiffstats
path: root/llvm/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
commite65ed1c79492ff3cebf77b634544dbef954e8ab9 (patch)
tree90d7e1a314c34c6336ec5845382db2a17e09b384 /llvm/cmake
parente79d43da3b4b544e4482c4466853a7c94ef72b13 (diff)
downloadbcm5719-llvm-e65ed1c79492ff3cebf77b634544dbef954e8ab9.tar.gz
bcm5719-llvm-e65ed1c79492ff3cebf77b634544dbef954e8ab9.zip
Add some platform checks. Also fix a typo on a Makefile.
Patch by arrowdodger! llvm-svn: 123659
Diffstat (limited to 'llvm/cmake')
-rwxr-xr-xllvm/cmake/config-ix.cmake14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake
index 38f815e8ae0..e19cb349d5b 100755
--- a/llvm/cmake/config-ix.cmake
+++ b/llvm/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)
OpenPOWER on IntegriCloud