Imported Upstream version 2.6.2
[platform/upstream/expat.git] / ConfigureChecks.cmake
index d85e48c..3fc732f 100644 (file)
@@ -2,6 +2,7 @@ include(CheckCCompilerFlag)
 include(CheckCSourceCompiles)
 include(CheckIncludeFile)
 include(CheckIncludeFiles)
+include(CheckLibraryExists)
 include(CheckSymbolExists)
 include(TestBigEndian)
 
@@ -45,11 +46,11 @@ else(WORDS_BIGENDIAN)
 endif(WORDS_BIGENDIAN)
 
 if(HAVE_SYS_TYPES_H)
-    check_symbol_exists("off_t" "sys/types.h" OFF_T)
-    check_symbol_exists("size_t" "sys/types.h" SIZE_T)
+    check_symbol_exists("off_t" "sys/types.h" off_t)
+    check_symbol_exists("size_t" "sys/types.h" size_t)
 else(HAVE_SYS_TYPES_H)
-    set(OFF_T "long")
-    set(SIZE_T "unsigned")
+    set(off_t "long")
+    set(size_t "unsigned")
 endif(HAVE_SYS_TYPES_H)
 
 check_c_source_compiles("
@@ -64,3 +65,5 @@ check_c_source_compiles("
 
 check_c_compiler_flag("-fno-strict-aliasing" FLAG_NO_STRICT_ALIASING)
 check_c_compiler_flag("-fvisibility=hidden" FLAG_VISIBILITY)
+
+check_library_exists(m cos "" _EXPAT_LIBM_FOUND)