From 3c00a83c3362dc7d066454936ad36fbfb3fd26c5 Mon Sep 17 00:00:00 2001 From: Oscar Fuentes Date: Mon, 17 Jan 2011 16:35:14 +0000 Subject: 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 --- cmake/config-ix.cmake | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'cmake') 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) -- cgit v1.2.3