]> git.lyx.org Git - lyx.git/blobdiff - development/cmake/ConfigureChecks.cmake
correct filenames
[lyx.git] / development / cmake / ConfigureChecks.cmake
old mode 100755 (executable)
new mode 100644 (file)
index 45339ab..88ca1a0
@@ -1,3 +1,9 @@
+# This file is part of LyX, the document processor.
+# Licence details can be found in the file COPYING.
+#
+# Copyright (c) 2006, Peter Kümmel, <syntheticpp@gmx.net>
+#
+
 include(CheckIncludeFile)
 include(CheckIncludeFileCXX)
 include(CheckIncludeFiles)
@@ -68,6 +74,7 @@ check_function_exists(getgid HAVE_GETGID)
 check_function_exists(getuid HAVE_GETUID)
 check_function_exists(wcslen HAVE_WCSLEN)
 
+check_symbol_exists(alloca "malloc.h" HAVE_SYMBOL_ALLOCA)
 check_symbol_exists(asprintf "stdio.h" HAVE_ASPRINTF)
 check_symbol_exists(wprintf "stdio.h" HAVE_WPRINTF)
 check_symbol_exists(snprintf "stdio.h" HAVE_SNPRINTF)
@@ -114,6 +121,29 @@ check_cxx_source_compiles(
        "
 CXX_GLOBAL_CSTD)
 
+check_cxx_source_compiles(
+       "
+       #include <iconv.h>
+       // this declaration will fail when there already exists a non const char** version which returns size_t
+       double iconv(iconv_t cd,  char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
+       int main() { return 0; }
+       "
+HAVE_ICONV_CONST)
+
+check_cxx_source_compiles(
+       "
+       int i[ ( sizeof(wchar_t)==2 ? 1 : -1 ) ];
+       int main(){return 0;}
+       "
+SIZEOF_WCHAR_T_IS_2)
+
+check_cxx_source_compiles(
+       "
+       int i[ ( sizeof(wchar_t)==4 ? 1 : -1 ) ];
+       int main(){return 0;}
+       "
+SIZEOF_WCHAR_T_IS_4)
+
 set(PACKAGE lyx)
 set(PACKAGE_VERSION 1.5.0svn)