commit 72540e8b8776604fd5eaf5a41144cdd65f3cfce9
Author: Peter Kümmel <kuem...@lyx.org>
Date:   Wed Dec 9 10:11:10 2015 +0100

    build libiconv with cmake

diff --git a/src/3rdparty/libiconv/CMakeLists.txt 
b/src/3rdparty/libiconv/CMakeLists.txt
new file mode 100644
index 0000000..e092828
--- /dev/null
+++ b/src/3rdparty/libiconv/CMakeLists.txt
@@ -0,0 +1,53 @@
+# Copyright (C) 2007-2012 LuaDist.
+# Created by Peter Drahoš
+# Redistribution and use of this file is allowed according to the terms of the 
MIT license.
+# For details see the COPYRIGHT file distributed with LuaDist.
+# Please note that the package source code is licensed under its own license.
+
+project ( libiconv C )
+cmake_minimum_required ( VERSION 2.8 )
+set(CMAKE_MODULE_PATH .)
+include ( configure.cmake )
+
+set(LIBICONV_VERSION 1.14)
+
+set(SRCDIR ${LIBICONV_VERSION})
+
+# Options
+option(ENABLE_EXTRA "Enable a few rarely used encodings" OFF)
+option(ENABLE_NLS "Translation of program messages to the user's native
+   language is requested" OFF)
+#option(ENABLE_RELOCATABLE "The package shall run at any location in the file 
system" ON)
+
+# iconv.h
+set(USE_MBSTATE_T 1)
+set(BROKEN_WCHAR_H 0)
+set(HAVE_WCHAR_T 0)
+
+set(BINDIR ${CMAKE_BINARY_DIR}/libiconv)
+configure_file(config.h.cmake ${BINDIR}/config.h)
+configure_file(${SRCDIR}/include/iconv.h.build.in ${BINDIR}/include/iconv.h)
+configure_file(${SRCDIR}/libcharset/include/libcharset.h.in 
${BINDIR}/include/libcharset.h)
+configure_file(${SRCDIR}/srclib/uniwidth.in.h ${BINDIR}/srclib/uniwidth.h)
+configure_file(${SRCDIR}/srclib/unitypes.in.h ${BINDIR}/srclib/unitypes.h)
+
+# Dirty fix for MinGW
+if(MINGW)
+  add_definitions(-DELOOP=0 -DHAVE_DECL_STRERROR_R=0)
+endif ()
+
+include_directories( ${BINDIR}/include ${SRCDIR}/include ${SRCDIR}/srclib)
+add_definitions(-Dset_relocation_prefix=libcharset_set_relocation_prefix 
-Drelocate=libcharset_relocate -DHAVE_CONFIG_H -DINSTALLPREFIX=NULL 
-DNO_XMALLOC -DBUILDING_LIBCHARSET -DINSTALLDIR="" -DLIBDIR="" 
-DENABLE_RELOCATABLE=1 -DIN_LIBRARY)
+
+# libcharset
+set(SRC_LIBCHARSET ${SRCDIR}/libcharset/lib/localcharset.c)
+
+# libiconv
+set(SRC_LIBICONV ${SRCDIR}/lib/iconv.c)
+
+add_library(iconv ${SRC_LIBICONV} ${SRC_LIBCHARSET})
+set_target_properties(iconv PROPERTIES COMPILE_FLAGS -DBUILDING_LIBICONV)
+
+set(ICONV_INCLUDE_DIR ${BINDIR}/include CACHE STRING "libiconv include  dir" 
FORCE)
+set(ICONV_LIBRARY iconv CACHE STRING "libiconv library" FORCE)
+set(ICONV_FOUND iconv CACHE STRING "libiconv found" FORCE)
diff --git a/src/3rdparty/libiconv/config.h.cmake 
b/src/3rdparty/libiconv/config.h.cmake
new file mode 100644
index 0000000..2921e90
--- /dev/null
+++ b/src/3rdparty/libiconv/config.h.cmake
@@ -0,0 +1,926 @@
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to the number of bits in type 'ptrdiff_t'. */
+#cmakedefine BITSIZEOF_PTRDIFF_T @BITSIZEOF_PTRDIFF_T@
+
+/* Define to the number of bits in type 'sig_atomic_t'. */
+#cmakedefine BITSIZEOF_SIG_ATOMIC_T @BITSIZEOF_SIG_ATOMIC_T@
+
+/* Define to the number of bits in type 'size_t'. */
+#cmakedefine BITSIZEOF_SIZE_T @BITSIZEOF_SIZE_T@
+
+/* Define to the number of bits in type 'wchar_t'. */
+#cmakedefine BITSIZEOF_WCHAR_T @BITSIZEOF_WCHAR_T@
+
+/* Define to the number of bits in type 'wint_t'. */
+#cmakedefine BITSIZEOF_WINT_T @BITSIZEOF_WINT_T@
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+   systems. This function is required for `alloca.c' support on those systems.
+   */
+#cmakedefine CRAY_STACKSEG_END @CRAY_STACKSEG_END@
+
+/* Define to 1 if using `alloca.c'. */
+#cmakedefine C_ALLOCA 1
+
+/* Define to 1 if // is a file system root distinct from /. */
+#cmakedefine DOUBLE_SLASH_IS_DISTINCT_ROOT 1
+
+/* Define as good substitute value for EILSEQ. */
+#cmakedefine EILSEQ @ELISEQ@
+
+/* Define to 1 to enable a few rarely used encodings. */
+#cmakedefine ENABLE_EXTRA 1
+
+/* Define to 1 if translation of program messages to the user's native
+   language is requested. */
+#cmakedefine ENABLE_NLS 1
+
+/* Define to 1 if the package shall run at any location in the file system. */
+#cmakedefine ENABLE_RELOCATABLE 1
+
+/* Define to 1 if realpath() can malloc memory, always gives an absolute path,
+   and handles trailing slash correctly. */
+#cmakedefine FUNC_REALPATH_WORKS 1
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module canonicalize-lgpl shall be considered present. */
+#cmakedefine GNULIB_CANONICALIZE_LGPL 1
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module sigpipe shall be considered present. */
+#cmakedefine GNULIB_SIGPIPE 1
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module strerror shall be considered present. */
+#cmakedefine GNULIB_STRERROR 1
+
+/* Define to 1 when the gnulib module canonicalize_file_name should be tested.
+   */
+#cmakedefine GNULIB_TEST_CANONICALIZE_FILE_NAME 
@GNULIB_TEST_CANONICALIZE_FILE_NAME@
+
+/* Define to 1 when the gnulib module environ should be tested. */
+#cmakedefine GNULIB_TEST_ENVIRON 1
+
+/* Define to 1 when the gnulib module lstat should be tested. */
+#cmakedefine GNULIB_TEST_LSTAT 1
+
+/* Define to 1 when the gnulib module read should be tested. */
+#cmakedefine GNULIB_TEST_READ 1
+
+/* Define to 1 when the gnulib module readlink should be tested. */
+#cmakedefine GNULIB_TEST_READLINK 1
+
+/* Define to 1 when the gnulib module realpath should be tested. */
+#cmakedefine GNULIB_TEST_REALPATH 1
+
+/* Define to 1 when the gnulib module sigprocmask should be tested. */
+#cmakedefine GNULIB_TEST_SIGPROCMASK 1
+
+/* Define to 1 when the gnulib module stat should be tested. */
+#cmakedefine GNULIB_TEST_STAT 1
+
+/* Define to 1 when the gnulib module strerror should be tested. */
+#cmakedefine GNULIB_TEST_STRERROR 1
+
+/* Define to 1 if you have `alloca', as a function or macro. */
+#cmakedefine HAVE_ALLOCA 1
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+   */
+#cmakedefine HAVE_ALLOCA_H 1
+
+/* Define to 1 if you have the `canonicalize_file_name' function. */
+#cmakedefine HAVE_CANONICALIZE_FILE_NAME 1
+
+/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
+   CoreFoundation framework. */
+#cmakedefine HAVE_CFLOCALECOPYCURRENT 1
+
+/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
+   the CoreFoundation framework. */
+#cmakedefine HAVE_CFPREFERENCESCOPYAPPVALUE 1
+
+/* Define if the GNU dcgettext() function is already present or preinstalled.
+   */
+#cmakedefine HAVE_DCGETTEXT 1
+
+/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if
+   you don't. */
+#cmakedefine HAVE_DECL_CLEARERR_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
+   don't. */
+#cmakedefine HAVE_DECL_FEOF_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if
+   you don't. */
+#cmakedefine HAVE_DECL_FERROR_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if
+   you don't. */
+#cmakedefine HAVE_DECL_FFLUSH_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
+   you don't. */
+#cmakedefine HAVE_DECL_FGETS_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if
+   you don't. */
+#cmakedefine HAVE_DECL_FPUTC_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if
+   you don't. */
+#cmakedefine HAVE_DECL_FPUTS_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if
+   you don't. */
+#cmakedefine HAVE_DECL_FREAD_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if
+   you don't. */
+#cmakedefine HAVE_DECL_FWRITE_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if
+   you don't. */
+#cmakedefine HAVE_DECL_GETCHAR_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
+   don't. */
+#cmakedefine HAVE_DECL_GETC_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `program_invocation_name', and
+   to 0 if you don't. */
+#cmakedefine HAVE_DECL_PROGRAM_INVOCATION_NAME 1
+
+/* Define to 1 if you have the declaration of `program_invocation_short_name',
+   and to 0 if you don't. */
+#cmakedefine HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 1
+
+/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if
+   you don't. */
+#cmakedefine HAVE_DECL_PUTCHAR_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you
+   don't. */
+#cmakedefine HAVE_DECL_PUTC_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `setenv', and to 0 if you don't.
+   */
+#cmakedefine HAVE_DECL_SETENV 1
+
+/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
+   don't. */
+#cmakedefine HAVE_DECL_STRERROR_R 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#cmakedefine HAVE_DLFCN_H 1
+
+/* Define if you have the declaration of environ. */
+#cmakedefine HAVE_ENVIRON_DECL 1
+
+/* Define to 1 if you have the `getcwd' function. */
+#cmakedefine HAVE_GETCWD 1
+
+/* Define to 1 if you have the `getc_unlocked' function. */
+#cmakedefine HAVE_GETC_UNLOCKED 1
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#cmakedefine HAVE_GETTEXT 1
+
+/* Define if you have the iconv() function and it works. */
+#cmakedefine HAVE_ICONV 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#cmakedefine HAVE_INTTYPES_H 1
+
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#cmakedefine HAVE_LANGINFO_CODESET 1
+
+/* Define to 1 if the system has the type `long long int'. */
+#cmakedefine HAVE_LONG_LONG_INT 1
+
+/* Define to 1 if you have the `lstat' function. */
+#cmakedefine HAVE_LSTAT 1
+
+/* Define to 1 if you have the <mach-o/dyld.h> header file. */
+#cmakedefine HAVE_MACH_O_DYLD_H 1
+
+/* Define to 1 if you have the `mbrtowc' function. */
+#cmakedefine HAVE_MBRTOWC 1
+
+/* Define to 1 if you have the `mbsinit' function. */
+#cmakedefine HAVE_MBSINIT 1
+
+/* Define to 1 if <wchar.h> declares mbstate_t. */
+#cmakedefine HAVE_MBSTATE_T 1
+
+/* Define to 1 if you have the `memmove' function. */
+#cmakedefine HAVE_MEMMOVE 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#cmakedefine HAVE_MEMORY_H 1
+
+/* Define to 1 if atoll is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_ATOLL 1
+
+/* Define to 1 if canonicalize_file_name is declared even after undefining
+   macros. */
+#cmakedefine HAVE_RAW_DECL_CANONICALIZE_FILE_NAME 1
+
+/* Define to 1 if chown is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_CHOWN 1
+
+/* Define to 1 if dprintf is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_DPRINTF 1
+
+/* Define to 1 if dup2 is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_DUP2 1
+
+/* Define to 1 if dup3 is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_DUP3 1
+
+/* Define to 1 if endusershell is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_ENDUSERSHELL 1
+
+/* Define to 1 if environ is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_ENVIRON 1
+
+/* Define to 1 if euidaccess is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_EUIDACCESS 1
+
+/* Define to 1 if faccessat is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_FACCESSAT 1
+
+/* Define to 1 if fchdir is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_FCHDIR 1
+
+/* Define to 1 if fchmodat is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_FCHMODAT 1
+
+/* Define to 1 if fchownat is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_FCHOWNAT 1
+
+/* Define to 1 if fcntl is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_FCNTL 1
+
+/* Define to 1 if ffsl is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_FFSL 1
+
+/* Define to 1 if ffsll is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_FFSLL 1
+
+/* Define to 1 if fpurge is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_FPURGE 1
+
+/* Define to 1 if fseeko is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_FSEEKO 1
+
+/* Define to 1 if fstatat is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_FSTATAT 1
+
+/* Define to 1 if fsync is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_FSYNC 1
+
+/* Define to 1 if ftello is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_FTELLO 1
+
+/* Define to 1 if ftruncate is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_FTRUNCATE 1
+
+/* Define to 1 if futimens is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_FUTIMENS 1
+
+/* Define to 1 if getcwd is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_GETCWD 1
+
+/* Define to 1 if getdelim is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_GETDELIM 1
+
+/* Define to 1 if getdomainname is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_GETDOMAINNAME 1
+
+/* Define to 1 if getdtablesize is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_GETDTABLESIZE 1
+
+/* Define to 1 if getgroups is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_GETGROUPS 1
+
+/* Define to 1 if gethostname is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_GETHOSTNAME 1
+
+/* Define to 1 if getline is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_GETLINE 1
+
+/* Define to 1 if getloadavg is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_GETLOADAVG 1
+
+/* Define to 1 if getlogin is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_GETLOGIN 1
+
+/* Define to 1 if getlogin_r is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_GETLOGIN_R 1
+
+/* Define to 1 if getpagesize is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_GETPAGESIZE 1
+
+/* Define to 1 if getsubopt is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_GETSUBOPT 1
+
+/* Define to 1 if getusershell is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_GETUSERSHELL 1
+ 
+/* Define to 1 if grantpt is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_GRANTPT 1
+
+/* Define to 1 if group_member is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_GROUP_MEMBER 1
+
+/* Define to 1 if initstat_r is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_INITSTAT_R 1
+
+/* Define to 1 if lchmod is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_LCHMOD 1
+
+/* Define to 1 if lchown is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_LCHOWN 1
+
+/* Define to 1 if link is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_LINK 1
+
+/* Define to 1 if linkat is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_LINKAT 1
+
+/* Define to 1 if lseek is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_LSEEK 1
+
+/* Define to 1 if lstat is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_LSTAT 1
+
+/* Define to 1 if memmem is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_MEMMEM 1
+
+/* Define to 1 if mempcpy is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_MEMPCPY 1
+
+/* Define to 1 if memrchr is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_MEMRCHR 1
+
+/* Define to 1 if mkdirat is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_MKDIRAT 1
+
+/* Define to 1 if mkdtemp is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_MKDTEMP 1
+
+/* Define to 1 if mkfifo is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_MKFIFO 1
+
+/* Define to 1 if mkfifoat is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_MKFIFOAT 1
+
+/* Define to 1 if mknod is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_MKNOD 1
+
+/* Define to 1 if mknodat is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_MKNODAT 1
+
+/* Define to 1 if mkostemp is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_MKOSTEMP 1
+
+/* Define to 1 if mkostemps is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_MKOSTEMPS 1
+
+/* Define to 1 if mkstemp is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_MKSTEMP 1
+
+/* Define to 1 if mkstemps is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_MKSTEMPS 1
+
+/* Define to 1 if openat is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_OPENAT 1
+
+/* Define to 1 if pipe is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_PIPE 1
+
+/* Define to 1 if pipe2 is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_PIPE2 1
+
+/* Define to 1 if popen is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_POPEN 1
+
+/* Define to 1 if pread is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_PREAD 1
+
+/* Define to 1 if pthread_sigmask is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_PTHREAD_SIGMASK 1
+
+/* Define to 1 if ptsname is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_PTSNAME 1
+
+/* Define to 1 if pwrite is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_PWRITE 1
+
+/* Define to 1 if random_r is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_RANDOM_R 1
+
+/* Define to 1 if rawmemchr is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_RAWMEMCHR 1
+
+/* Define to 1 if readlink is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_READLINK 1
+
+/* Define to 1 if readlinkat is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_READLINKAT 1
+
+/* Define to 1 if realpath is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_REALPATH 1
+
+/* Define to 1 if renameat is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_RENAMEAT 1
+
+/* Define to 1 if rmdir is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_RMDIR 1
+
+/* Define to 1 if rpmatch is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_RPMATCH 1
+
+/* Define to 1 if setenv is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_SETENV 1
+
+/* Define to 1 if setstate_r is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_SETSTATE_R 1
+
+/* Define to 1 if setusershell is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_SETUSERSHELL 1
+
+/* Define to 1 if sigaction is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_SIGACTION 1
+
+/* Define to 1 if sigaddset is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_SIGADDSET 1
+
+/* Define to 1 if sigdelset is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_SIGDELSET 1
+
+/* Define to 1 if sigemptyset is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_SIGEMPTYSET 1
+
+/* Define to 1 if sigfillset is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_SIGFILLSET 1
+
+/* Define to 1 if sigismember is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_SIGISMEMBER 1
+
+/* Define to 1 if sigpending is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_SIGPENDING 1
+
+/* Define to 1 if sigprocmask is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_SIGPROCMASK 1
+
+/* Define to 1 if sleep is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_SLEEP 1
+
+/* Define to 1 if snprintf is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_SNPRINTF 1
+
+/* Define to 1 if srandom_r is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_SRANDOM_R 1
+
+/* Define to 1 if stat is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_STAT 1
+
+/* Define to 1 if stpcpy is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_STPCPY 1
+
+/* Define to 1 if stpncpy is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_STPNCPY 1
+
+/* Define to 1 if strcasestr is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_STRCASESTR 1
+
+/* Define to 1 if strchrnul is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_STRCHRNUL 1
+
+/* Define to 1 if strdup is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_STRDUP 1
+
+/* Define to 1 if strerror_r is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_STRERROR_R 1
+
+/* Define to 1 if strncat is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_STRNCAT 1
+
+/* Define to 1 if strndup is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_STRNDUP 1
+
+/* Define to 1 if strnlen is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_STRNLEN 1
+
+/* Define to 1 if strpbrk is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_STRPBRK 1
+
+/* Define to 1 if strsep is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_STRSEP 1
+
+/* Define to 1 if strsignal is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_STRSIGNAL 1
+
+/* Define to 1 if strtod is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_STRTOD 1
+
+/* Define to 1 if strtok_r is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_STRTOK_R 1
+
+/* Define to 1 if strtoll is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_STRTOLL 1
+
+/* Define to 1 if strtoull is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_STRTOULL 1
+
+/* Define to 1 if strverscmp is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_STRVERSCMP 1
+
+/* Define to 1 if symlink is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_SYMLINK 1
+
+/* Define to 1 if symlinkat is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_SYMLINKAT 1
+
+/* Define to 1 if tmpfile is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_TMPFILE 1
+
+/* Define to 1 if ttyname_r is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_TTYNAME_R 1
+
+/* Define to 1 if unlink is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_UNLINK 1
+
+/* Define to 1 if unlinkat is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_UNLINKAT 1
+
+/* Define to 1 if unlockpt is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_UNLOCKPT 1
+
+/* Define to 1 if unsetenv is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_UNSETENV 1
+
+/* Define to 1 if usleep is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_USLEEP 1
+
+/* Define to 1 if utimensat is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_UTIMENSAT 1
+
+/* Define to 1 if vdprintf is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_VDPRINTF 1
+
+/* Define to 1 if vsnprintf is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL_VSNPRINTF 1
+
+/* Define to 1 if _Exit is declared even after undefining macros. */
+#cmakedefine HAVE_RAW_DECL__EXIT 1
+
+/* Define to 1 if you have the `readlink' function. */
+#cmakedefine HAVE_READLINK 1
+
+/* Define to 1 if you have the `readlinkat' function. */
+#cmakedefine HAVE_READLINKAT 1
+
+/* Define to 1 if you have the `realpath' function. */
+#cmakedefine HAVE_REALPATH 1
+
+/* Define to 1 if you have the <search.h> header file. */
+#cmakedefine HAVE_SEARCH_H 1
+
+/* Define to 1 if you have the `setenv' function. */
+#cmakedefine HAVE_SETENV 1
+
+/* Define to 1 if you have the `setlocale' function. */
+#cmakedefine HAVE_SETLOCALE 1
+
+/* Define to 1 if 'sig_atomic_t' is a signed integer type. */
+#cmakedefine HAVE_SIGNED_SIG_ATOMIC_T 1
+
+/* Define to 1 if 'wchar_t' is a signed integer type. */
+#cmakedefine HAVE_SIGNED_WCHAR_T 1
+
+/* Define to 1 if 'wint_t' is a signed integer type. */
+#cmakedefine HAVE_SIGNED_WINT_T 1
+
+/* Define to 1 if the system has the type `sigset_t'. */
+#cmakedefine HAVE_SIGSET_T 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#cmakedefine HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#cmakedefine HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strerror_r' function. */
+#cmakedefine HAVE_STRERROR_R 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#cmakedefine HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#cmakedefine HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/bitypes.h> header file. */
+#cmakedefine HAVE_SYS_BITYPES_H 1
+
+/* Define to 1 if you have the <sys/inttypes.h> header file. */
+#cmakedefine HAVE_SYS_INTTYPES_H 1
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#cmakedefine HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#cmakedefine HAVE_SYS_SOCKET_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#cmakedefine HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#cmakedefine HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#cmakedefine HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the `tsearch' function. */
+#cmakedefine HAVE_TSEARCH 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#cmakedefine HAVE_UNISTD_H 1
+
+/* Define to 1 if the system has the type `unsigned long long int'. */
+#cmakedefine HAVE_UNSIGNED_LONG_LONG_INT 1
+
+/* Define to 1 or 0, depending whether the compiler supports simple visibility
+   declarations. */
+#cmakedefine HAVE_VISIBILITY 1
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#cmakedefine HAVE_WCHAR_H 1
+
+/* Define if you have the 'wchar_t' type. */
+#cmakedefine HAVE_WCHAR_T 1
+
+/* Define to 1 if you have the `wcrtomb' function. */
+#cmakedefine HAVE_WCRTOMB 1
+
+/* Define to 1 if you have the <winsock2.h> header file. */
+#cmakedefine HAVE_WINSOCK2_H 1
+
+/* Define to 1 if O_NOATIME works. */
+#cmakedefine HAVE_WORKING_O_NOATIME 1
+
+/* Define to 1 if O_NOFOLLOW works. */
+#define HAVE_WORKING_O_NOFOLLOW @HAVE_WORKING_O_NOFOLLOW@
+
+/* Define to 1 if the system has the type `_Bool'. */
+#cmakedefine HAVE__BOOL 1
+
+/* Define to 1 if you have the `_NSGetExecutablePath' function. */
+#cmakedefine HAVE__NSGETEXECUTABLEPATH 1
+
+/* Define as const if the declaration of iconv() needs const. */
+#define ICONV_CONST @ICONV_CONST@
+
+/* Define to the value of ${prefix}, as a string. */
+#cmakedefine INSTALLPREFIX "@INSTALLPREFIX@"
+
+/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
+   slash. */
+#cmakedefine LSTAT_FOLLOWS_SLASHED_SYMLINK 1
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#cmakedefine LT_OBJDIR "@LT_OBJDIR@"
+
+/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */
+#cmakedefine MALLOC_0_IS_NONNULL 1
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#cmakedefine NO_MINUS_C_MINUS_O 1
+
+/* Name of package */
+#cmakedefine PACKAGE "@PACKAGE@"
+
+/* Define to the address where bug reports for this package should be sent. */
+#cmakedefine PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
+
+/* Define to the full name of this package. */
+#cmakedefine PACKAGE_NAME "@PACKAGE_NAME@"
+
+/* Define to the full name and version of this package. */
+#cmakedefine PACKAGE_STRING "@PACKAGE_STRING@"
+
+/* Define to the one symbol short name of this package. */
+#cmakedefine PACKAGE_TARNAME "@PACKAGE_TARNAME@"
+
+/* Define to the home page for this package. */
+#cmakedefine PACKAGE_URL "@PACKAGE_URL@"
+
+/* Define to the version of this package. */
+#cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@"
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+   'ptrdiff_t'. */
+#cmakedefine PTRDIFF_T_SUFFIX @PTRDIFF_T_SUFFIX@
+
+/* Define to 1 if readlink fails to recognize a trailing slash. */
+#cmakedefine READLINK_TRAILING_SLASH_BUG 1
+
+/* Define to 1 if stat needs help when passed a directory name with a trailing
+   slash */
+#cmakedefine REPLACE_FUNC_STAT_DIR 1
+
+/* Define to 1 if stat needs help when passed a file name with a trailing
+   slash */
+#cmakedefine REPLACE_FUNC_STAT_FILE 1
+
+/* Define to 1 if strerror(0) does not return a message implying success. */
+#cmakedefine REPLACE_STRERROR_0 1
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+   'sig_atomic_t'. */
+#cmakedefine SIG_ATOMIC_T_SUFFIX @SIG_ATOMIC_T_SUFFIX@
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+   'size_t'. */
+#cmakedefine SIZE_T_SUFFIX @SIZE_T_SUFFIX@
+
+/* If using the C implementation of alloca, define if you know the
+   direction of stack growth for your system; otherwise it will be
+   automatically deduced at runtime.
+       STACK_DIRECTION > 0 => grows toward higher addresses
+       STACK_DIRECTION < 0 => grows toward lower addresses
+       STACK_DIRECTION = 0 => direction of growth unknown */
+#cmakedefine STACK_DIRECTION @STACK_DIRECTION@
+
+/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
+#cmakedefine STAT_MACROS_BROKEN 1
+
+/* Define to 1 if you have the ANSI C header files. */
+#cmakedefine STDC_HEADERS 1
+
+/* Define to 1 if strerror_r returns char *. */
+#cmakedefine STRERROR_R_CHAR_P 1
+
+/* Define to the prefix of C symbols at the assembler and linker level, either
+   an underscore or empty. */
+#cmakedefine USER_LABEL_PREFIX @USER_LABEL_PREFIX@
+
+/* Define to 1 if you want getc etc. to use unlocked I/O if available.
+   Unlocked I/O can improve performance in unithreaded apps, but it is not
+   safe for multithreaded apps. */
+#cmakedefine USE_UNLOCKED_IO 1
+
+/* Version number of package */
+#cmakedefine VERSION "@VERSION@"
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+   'wchar_t'. */
+#cmakedefine WCHAR_T_SUFFIX @WCHAR_T_SUFFIX@
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+   'wint_t'. */
+#cmakedefine WINT_T_SUFFIX @WINT_T_SUFFIX@
+
+/* Define if the machine's byte ordering is little endian. */
+#cmakedefine WORDS_LITTLEENDIAN 1
+
+/* Define to 1 if on MINIX. */
+#cmakedefine _MINIX 1
+
+/* The _Noreturn keyword of draft C1X.  */
+#ifndef _Noreturn
+# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
+      || 0x5110 <= __SUNPRO_C)
+#  define _Noreturn __attribute__ ((__noreturn__))
+# elif 1200 <= _MSC_VER
+#  define _Noreturn __declspec (noreturn)
+# else
+#  define _Noreturn
+# endif
+#endif
+
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+   this defined. */
+#cmakedefine _POSIX_1_SOURCE 2
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#cmakedefine _POSIX_SOURCE 1
+
+/* Define to 500 only on HP-UX. */
+#cmakedefine _XOPEN_SOURCE 500
+
+/* Enable extensions on AIX 3, Interix.  */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable general extensions on MacOS X.  */
+#ifndef _DARWIN_C_SOURCE
+# undef _DARWIN_C_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris.  */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop.  */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#cmakedefine gid_t @GID_T@
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+#undef inline
+#endif
+
+/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
+   the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
+   earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
+   __APPLE__ && __MACH__ test for MacOS X.
+   __APPLE_CC__ tests for the Apple compiler and its version.
+   __STDC_VERSION__ tests for the C99 mode.  */
+#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined 
__cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
+# define __GNUC_STDC_INLINE__ 1
+#endif
+
+/* Define to a type if <wchar.h> does not define. */
+#cmakedefine mbstate_t @MBSTATE_T@
+
+/* Define to the type of st_nlink in struct stat, or a supertype. */
+#cmakedefine nlink_t @MBSTATE_T@
+
+/* Define to the equivalent of the C99 'restrict' keyword, or to
+   nothing if this is not supported.  Do not define if restrict is
+   supported directly.  */
+#cmakedefine restrict
+/* Work around a bug in Sun C++: it does not support _Restrict or
+   __restrict__, even though the corresponding Sun C compiler ends up with
+   "#define restrict _Restrict" or "#define restrict __restrict__" in the
+   previous line.  Perhaps some future version of Sun C++ will work with
+   restrict; if so, hopefully it defines __RESTRICT like Sun C does.  */
+#if defined __SUNPRO_CC && !defined __RESTRICT
+# define _Restrict
+# define __restrict__
+#endif
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#cmakedefine size_t @SIZE_T@
+
+/* Define as a signed type of the same size as size_t. */
+#cmakedefine ssize_t @SSIZE_T@
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#cmakedefine uid_t @UID_T@
+
+/* Define as a marker that can be attached to declarations that might not
+    be used.  This helps to reduce warnings, such as from
+    GCC -Wunused-parameter.  */
+#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+# define _GL_UNUSED __attribute__ ((__unused__))
+#else
+# define _GL_UNUSED
+#endif
+/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
+   is a misnomer outside of parameter lists.  */
+#define _UNUSED_PARAMETER_ _GL_UNUSED
+
+/* The __pure__ attribute was added in gcc 2.96.  */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE /* empty */
+#endif
+
+/* The __const__ attribute was added in gcc 2.95.  */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
+# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
+#else
+# define _GL_ATTRIBUTE_CONST /* empty */
+#endif
+
+
+
+/* On Windows, variables that may be in a DLL must be marked specially.  */
+#if defined _MSC_VER && defined _DLL
+# define DLL_VARIABLE __declspec (dllimport)
+#else
+# define DLL_VARIABLE
+#endif
+
diff --git a/src/3rdparty/libiconv/configure.cmake 
b/src/3rdparty/libiconv/configure.cmake
new file mode 100644
index 0000000..497450e
--- /dev/null
+++ b/src/3rdparty/libiconv/configure.cmake
@@ -0,0 +1,280 @@
+# Simulate autotools detection for config generation
+# This insanity is needed for autotools infected packages
+
+# Type checks
+include ( CheckTypeSize )
+check_type_size ( ptrdiff_t SIZEOF_PTRDIFF_T )
+if ( SIZEOF_PTRDIFF_T )
+  math ( EXPR BITSIZEOF_PTRDIFF_T "${SIZEOF_PTRDIFF_T} * 8" )
+endif ()
+
+set ( CMAKE_EXTRA_INCLUDE_FILES signal.h )
+check_type_size ( sig_atomic_t SIZEOF_SIG_ATOMIC_T )
+if ( SIZEOF_SIG_ATOMIC_T )
+  math ( EXPR BITSIZEOF_SIG_ATOMIC_T "${SIZEOF_SIG_ATOMIC_T} * 8" )
+endif ()
+
+check_type_size ( size_t SIZEOF_SIZE_T )
+if ( SIZEOF_SIZE_T )
+  math ( EXPR BITSIZEOF_SIZE_T "${SIZEOF_SIZE_T} * 8" )
+endif ()
+
+set ( CMAKE_EXTRA_INCLUDE_FILES wchar.h )
+check_type_size ( wchar_t SIZEOF_WCHAR_T )
+if ( SIZEOF_WCHAR_T )
+  set ( HAVE_WCHAR_T 1)
+  math ( EXPR BITSIZEOF_WCHAR_T "${SIZEOF_WCHAR_T} * 8" )
+endif ()
+
+check_type_size ( wint_t SIZEOF_WINT_T )
+if ( SIZEOF_WINT_T )
+  math ( EXPR BITSIZEOF_WINT_T "${SIZEOF_WINT_T} * 8" )
+endif ()
+
+check_type_size ( "long long int" HAVE_LONG_LONG_INT )
+check_type_size ( "unsigned long long int" HAVE_UNSIGNED_LONG_LONG_INT )
+check_type_size ( _Bool HAVE__BOOL )
+
+# Header checks
+include ( CheckIncludeFiles )
+check_include_files ( alloca.h HAVE_ALLOCA_H )
+check_include_files ( dlfcn.h HAVE_DLFCN_H )
+check_include_files ( inttypes.h HAVE_INTTYPES_H )
+check_include_files ( mach-o/dyld.h HAVE_MACH_O_DYLD_H )
+check_include_files ( memory.h HAVE_MEMORY_H )
+check_include_files ( search.h HAVE_SEARCH_H )
+check_include_files ( stdint.h HAVE_STDINT_H )
+check_include_files ( stdlib.h HAVE_STDLIB_H )
+check_include_files ( strings.h HAVE_STRINGS_H )
+check_include_files ( string.h HAVE_STRING_H )
+check_include_files ( sys/bitypes.h HAVE_SYS_BITYPES_H )
+check_include_files ( sys/inttypes.h HAVE_SYS_INTTYPES_H )
+check_include_files ( sys/param.h HAVE_SYS_PARAM_H )
+check_include_files ( sys/socket.h HAVE_SYS_SOCKET_H )
+check_include_files ( sys/stat.h HAVE_SYS_STAT_H )
+check_include_files ( sys/time.h HAVE_SYS_TIME_H )
+check_include_files ( sys/types.h HAVE_SYS_TYPES_H )
+check_include_files ( unistd.h HAVE_UNISTD_H )
+check_include_files ( wchar.h HAVE_WCHAR_H )
+check_include_files ( winsock2.h HAVE_WINSOCK2_H )
+
+# Function checks
+include ( CheckFunctionExists )
+check_function_exists ( canonicalize_file_name HAVE_CANONICALIZE_FILE_NAME )
+check_function_exists ( dcgettext HAVE_DCGETTEXT )
+check_function_exists ( gettext HAVE_GETTEXT )
+check_function_exists ( iconv HAVE_ICONV )
+check_function_exists ( lstat HAVE_LSTAT )
+check_function_exists ( mbrtowc HAVE_MBRTOWC )
+check_function_exists ( mbsinit HAVE_MBSINIT )
+check_function_exists ( memmove HAVE_MEMMOVE )
+check_function_exists ( atoll HAVE_RAW_DECL_ATOLL )
+check_function_exists ( chown HAVE_RAW_DECL_CHOWN )
+check_function_exists ( dprintf HAVE_RAW_DECL_DPRINTF )
+check_function_exists ( dup2 HAVE_RAW_DECL_DUP2 )
+check_function_exists ( dup3 HAVE_RAW_DECL_DUP3 )
+check_function_exists ( endusershell HAVE_RAW_DECL_ENDUSERSHELL )
+check_function_exists ( environ HAVE_RAW_DECL_ENVIRON )
+check_function_exists ( euidaccess HAVE_RAW_DECL_EUIDACCESS )
+check_function_exists ( faccessat HAVE_RAW_DECL_FACCESSAT )
+check_function_exists ( fchdir HAVE_RAW_DECL_FCHDIR )
+check_function_exists ( fchmodat HAVE_RAW_DECL_FCHMODAT )
+check_function_exists ( fchownat HAVE_RAW_DECL_FCHOWNAT )
+check_function_exists ( fcntl HAVE_RAW_DECL_FCNTL )
+check_function_exists ( ffsl HAVE_RAW_DECL_FFSL )
+check_function_exists ( ffsll HAVE_RAW_DECL_FFSLL )
+check_function_exists ( fpurge HAVE_RAW_DECL_FPURGE )
+check_function_exists ( fseeko HAVE_RAW_DECL_FSEEKO )
+check_function_exists ( fstatat HAVE_RAW_DECL_FSTATAT )
+check_function_exists ( fsync HAVE_RAW_DECL_FSYNC )
+check_function_exists ( ftello HAVE_RAW_DECL_FTELLO )
+check_function_exists ( ftruncate HAVE_RAW_DECL_FTRUNCATE )
+check_function_exists ( futimens HAVE_RAW_DECL_FUTIMENS )
+check_function_exists ( getcwd HAVE_RAW_DECL_GETCWD )
+check_function_exists ( getdelim HAVE_RAW_DECL_GETDELIM )
+check_function_exists ( getdomainname HAVE_RAW_DECL_GETDOMAINNAME )
+check_function_exists ( canonicalize_file_name 
HAVE_RAW_DECL_CANONICALIZE_FILE_NAME )
+check_function_exists ( getdtablesize HAVE_RAW_DECL_GETDTABLESIZE )
+check_function_exists ( getgroups HAVE_RAW_DECL_GETGROUPS )
+check_function_exists ( gethostname HAVE_RAW_DECL_GETHOSTNAME )
+check_function_exists ( getline HAVE_RAW_DECL_GETLINE )
+check_function_exists ( getloadavg HAVE_RAW_DECL_GETLOADAVG )
+check_function_exists ( getlogin HAVE_RAW_DECL_GETLOGIN )
+check_function_exists ( getlogin_r HAVE_RAW_DECL_GETLOGIN_R )
+check_function_exists ( getpagesize HAVE_RAW_DECL_GETPAGESIZE )
+check_function_exists ( getsubopt HAVE_RAW_DECL_GETSUBOPT )
+check_function_exists ( getusershell HAVE_RAW_DECL_GETUSERSHELL )
+check_function_exists ( grantpt HAVE_RAW_DECL_GRANTPT )
+check_function_exists ( group_member HAVE_RAW_DECL_GROUP_MEMBER )
+check_function_exists ( initstat_r HAVE_RAW_DECL_INITSTAT_R )
+check_function_exists ( lchmod HAVE_RAW_DECL_LCHMOD )
+check_function_exists ( lchown HAVE_RAW_DECL_LCHOWN )
+check_function_exists ( link HAVE_RAW_DECL_LINK )
+check_function_exists ( linkat HAVE_RAW_DECL_LINKAT )
+check_function_exists ( lseek HAVE_RAW_DECL_LSEEK )
+check_function_exists ( lstat HAVE_RAW_DECL_LSTAT )
+check_function_exists ( memmem HAVE_RAW_DECL_MEMMEM )
+check_function_exists ( mempcpy HAVE_RAW_DECL_MEMPCPY )
+check_function_exists ( memrchr HAVE_RAW_DECL_MEMRCHR )
+check_function_exists ( mkdirat HAVE_RAW_DECL_MKDIRAT )
+check_function_exists ( mkdtemp HAVE_RAW_DECL_MKDTEMP )
+check_function_exists ( mkfifo HAVE_RAW_DECL_MKFIFO )
+check_function_exists ( mkfifoat HAVE_RAW_DECL_MKFIFOAT )
+check_function_exists ( mknod HAVE_RAW_DECL_MKNOD )
+check_function_exists ( mknodat HAVE_RAW_DECL_MKNODAT )
+check_function_exists ( mkostemp HAVE_RAW_DECL_MKOSTEMP )
+check_function_exists ( mkostemps HAVE_RAW_DECL_MKOSTEMPS )
+check_function_exists ( openat HAVE_RAW_DECL_OPENAT )
+check_function_exists ( pipe HAVE_RAW_DECL_PIPE )
+check_function_exists ( pipe2 HAVE_RAW_DECL_PIPE2 )
+check_function_exists ( popen HAVE_RAW_DECL_POPEN )
+check_function_exists ( pread HAVE_RAW_DECL_PREAD )
+check_function_exists ( pthread_sigmask HAVE_RAW_DECL_PTHREAD_SIGMASK )
+check_function_exists ( ptsname HAVE_RAW_DECL_PTSNAME )
+check_function_exists ( pwrite HAVE_RAW_DECL_PWRITE )
+check_function_exists ( random_r HAVE_RAW_DECL_RANDOM_R )
+check_function_exists ( rawmemchr HAVE_RAW_DECL_RAWMEMCHR )
+check_function_exists ( readlink HAVE_RAW_DECL_READLINK )
+check_function_exists ( readlinkat HAVE_RAW_DECL_READLINKAT )
+check_function_exists ( realpath HAVE_RAW_DECL_REALPATH )
+check_function_exists ( renameat HAVE_RAW_DECL_RENAMEAT )
+check_function_exists ( rmdir HAVE_RAW_DECL_RMDIR )
+check_function_exists ( rpmatch HAVE_RAW_DECL_RPMATCH )
+check_function_exists ( setenv HAVE_RAW_DECL_SETENV )
+check_function_exists ( setstate_r HAVE_RAW_DECL_SETSTATE_R )
+check_function_exists ( setusershell HAVE_RAW_DECL_SETUSERSHELL )
+check_function_exists ( sigaction HAVE_RAW_DECL_SIGACTION )
+check_function_exists ( sigaddset HAVE_RAW_DECL_SIGADDSET )
+check_function_exists ( sigdelset HAVE_RAW_DECL_SIGDELSET )
+check_function_exists ( sigemptyset HAVE_RAW_DECL_SIGEMPTYSET )
+check_function_exists ( sigfillset HAVE_RAW_DECL_SIGFILLSET )
+check_function_exists ( sigismember HAVE_RAW_DECL_SIGISMEMBER )
+check_function_exists ( sigpending HAVE_RAW_DECL_SIGPENDING )
+check_function_exists ( sigprocmask HAVE_RAW_DECL_SIGPROCMASK )
+check_function_exists ( sleep HAVE_RAW_DECL_SLEEP )
+check_function_exists ( snprintf HAVE_RAW_DECL_SNPRINTF )
+check_function_exists ( srandom_r HAVE_RAW_DECL_SRANDOM_R )
+check_function_exists ( stat HAVE_RAW_DECL_STAT )
+check_function_exists ( stpcpy HAVE_RAW_DECL_STPCPY )
+check_function_exists ( stpncpy HAVE_RAW_DECL_STPNCPY )
+check_function_exists ( strcasestr HAVE_RAW_DECL_STRCASESTR )
+check_function_exists ( strchrnul HAVE_RAW_DECL_STRCHRNUL )
+check_function_exists ( strdup HAVE_RAW_DECL_STRDUP )
+check_function_exists ( strerror_r HAVE_RAW_DECL_STRERROR_R )
+check_function_exists ( strncat HAVE_RAW_DECL_STRNCAT )
+check_function_exists ( strndup HAVE_RAW_DECL_STRNDUP )
+check_function_exists ( strnlen HAVE_RAW_DECL_STRNLEN )
+check_function_exists ( strpbrk HAVE_RAW_DECL_STRSEP )
+check_function_exists ( strsignal HAVE_RAW_DECL_STRSIGNAL )
+check_function_exists ( strtod HAVE_RAW_DECL_STRTOD )
+check_function_exists ( strtok_r HAVE_RAW_DECL_STRTOK_R )
+check_function_exists ( strtoll HAVE_RAW_DECL_STRTOLL )
+check_function_exists ( strtoull HAVE_RAW_DECL_STRTOULL )
+check_function_exists ( strverscmp HAVE_RAW_DECL_STRVERSCMP )
+check_function_exists ( symlink HAVE_RAW_DECL_SYMLINK )
+check_function_exists ( symlinkat HAVE_RAW_DECL_SYMLINKAT )
+check_function_exists ( tmpfile HAVE_RAW_DECL_TMPFILE )
+check_function_exists ( ttyname_r HAVE_RAW_DECL_TTYNAME_R )
+check_function_exists ( unlink HAVE_RAW_DECL_UNLINK )
+check_function_exists ( unlinkat HAVE_RAW_DECL_UNLINKAT )
+check_function_exists ( unlockpt HAVE_RAW_DECL_UNLOCKPT )
+check_function_exists ( unsetenv HAVE_RAW_DECL_UNSETENV )
+check_function_exists ( usleep HAVE_RAW_DECL_USLEEP )
+check_function_exists ( utimensat HAVE_RAW_DECL_UTIMENSAT )
+check_function_exists ( vdprintf HAVE_RAW_DECL_VDPRINTF )
+check_function_exists ( vsnprintf HAVE_RAW_DECL_VSNPRINTF )
+check_function_exists ( _Exit HAVE_RAW_DECL__EXIT )
+check_function_exists ( readlink HAVE_READLINK )
+check_function_exists ( readlinkat HAVE_READLINKAT )
+check_function_exists ( realpath HAVE_REALPATH )
+check_function_exists ( setenv HAVE_SETENV )
+check_function_exists ( setlocale HAVE_SETLOCALE )
+check_function_exists ( strerror_r HAVE_STRERROR_R )
+check_function_exists ( tsearch HAVE_TSEARCH )
+check_function_exists ( wcrtomb HAVE_WCRTOMB )
+check_function_exists ( _NSGetExecutablePath HAVE__NSGETEXECUTABLEPATH )
+
+# Symbols
+include ( CheckSymbolExists )
+check_symbol_exists ( alloca "alloca.h" HAVE_ALLOCA )
+check_symbol_exists ( clearerr_unlocked "stdio.h" HAVE_DECL_CLEARERR_UNLOCKED )
+check_symbol_exists ( feof_unlocked "stdio.h" HAVE_DECL_FEOF_UNLOCKED )
+check_symbol_exists ( ferror_unlocked "stdio.h" HAVE_DECL_FERROR_UNLOCKED )
+check_symbol_exists ( fflush_unlocked "stdio.h" HAVE_DECL_FFLUSH_UNLOCKED )
+check_symbol_exists ( fgets_unlocked "stdio.h" HAVE_DECL_FGETS_UNLOCKED )
+check_symbol_exists ( fputc_unlocked "stdio.h" HAVE_DECL_FPUTC_UNLOCKED )
+check_symbol_exists ( fputs_unlocked "stdio.h" HAVE_DECL_FPUTS_UNLOCKED )
+check_symbol_exists ( fread_unlocked "stdio.h" HAVE_DECL_FREAD_UNLOCKED )
+check_symbol_exists ( fwrite_unlocked "stdio.h" HAVE_DECL_FWRITE_UNLOCKED )
+check_symbol_exists ( getchar_unlocked "stdio.h" HAVE_DECL_GETCHAR_UNLOCKED )
+check_symbol_exists ( getc_unlocked "stdio.h" HAVE_DECL_GETC_UNLOCKED )
+check_symbol_exists ( program_invocation_name "stdio.h" 
HAVE_DECL_PROGRAM_INVOCATION_NAME )
+check_symbol_exists ( program_invocation_short_name "stdio.h" 
HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME )
+check_symbol_exists ( putchar_unlocked "stdio.h" HAVE_DECL_PUTCHAR_UNLOCKED )
+check_symbol_exists ( putc_unlocked "stdio.h" HAVE_DECL_PUTC_UNLOCKED )
+check_symbol_exists ( setenv "stdlib.h" HAVE_DECL_SETENV )
+check_symbol_exists ( strerror_r "string.h" HAVE_DECL_STRERROR_R )
+check_symbol_exists ( environ "unistd.h" HAVE_ENVIRON_DECL )
+check_symbol_exists ( getcwd "unistd.h" HAVE_GETCWD )
+check_symbol_exists ( getc_unlocked "stdio.h" HAVE_GETC_UNLOCKED )
+check_symbol_exists ( nl_langinfo "langinfo.h" HAVE_LANGINFO_CODESET )
+check_symbol_exists ( mbstate_t "wchar.h" HAVE_MBSTATE_T )
+
+# Other
+if ( APPLE )
+  set ( HAVE_CFLOCALECOPYCURRENT 1 )
+  set ( HAVE_CFPREFERENCESCOPYAPPVALUE 1 )
+  set ( HAVE__NSGETEXECUTABLEPATH 1 )
+endif ()
+
+# From dist.info
+set ( PACKAGE "${DIST_NAME}" )
+set ( PACKAGE_BUGREPORT "https://github.com/LuaDist/Repository/issues"; )
+set ( PACKAGE_NAME "${DIST_NAME}-${DIST_VERSION}" )
+set ( PACKAGE_STRING "iconv" )
+set ( PACKAGE_TARNAME "${DIST_NAME}-${DIST_VERSION}.dist" )
+set ( PACKAGE_URL "${DIST_URL}" )
+set ( PACKAGE_VERSION "${DIST_VERSION}" )
+
+set ( INSTALLPREFIX "" )
+set ( HAVE_SIGNED_WCHAR_T 1)
+set ( HAVE_SIGNED_SIG_ATOMIC_T 1 )
+set ( HAVE_SIGNED_WINT_T 1)
+set ( HAVE_SIGSET_T )
+
+set ( HAVE_VISIBILITY 1 )
+set ( ICONV_CONST "" )
+set ( INSTALLPREFIX "" )
+set ( MALLOC_0_IS_NONNULL 1 )
+set ( HAVE_WORKING_O_NOATIME 0 )
+set ( HAVE_WORKING_O_NOFOLLOW 1 )
+set ( LSTAT_FOLLOWS_SLASHED_SYMLINK 0 )
+set ( PTRDIFF_T_SUFFIX l )
+set ( READLINK_TRAILING_SLASH_BUG 1 )
+set ( REPLACE_FUNC_STAT_DIR 0 )
+set ( REPLACE_FUNC_STAT_FILE 1 )
+set ( REPLACE_STRERROR_0 1 )
+set ( SIG_ATOMIC_T_SUFFIX 1 )
+set ( SIZE_T_SUFFIX ul )
+set ( STDC_HEADERS 1 )
+set ( STRERROR_R_CHAR_P 0 )
+set ( USER_LABEL_PREFIX _ )
+set ( USE_UNLOCKED_IO 1 )
+set ( VERSION "${DIST_VERSION}" )
+set ( WCHAR_T_SUFFIX "" )
+set ( WINT_T_SUFFIX "" )
+set ( WORDS_LITTLEENDIAN 1 )
+
+# GNULIB settings
+set ( GNULIB_CANONICALIZE_LGPL 1 )
+set ( GNULIB_SIGPIPE 1 )
+set ( GNULIB_STRERROR 1 )
+set ( GNULIB_TEST_CANONICALIZE_FILE_NAME 1 )
+set ( GNULIB_TEST_ENVIRON 1 )
+set ( GNULIB_TEST_LSTAT 1 )
+set ( GNULIB_TEST_READ 1 )
+set ( GNULIB_TEST_READLINK 1 )
+set ( GNULIB_TEST_REALPATH 1 )
+set ( GNULIB_TEST_SIGPROCMASK 1 )
+set ( GNULIB_TEST_STAT 1 )
+set ( GNULIB_TEST_STRERROR 1 )
\ No newline at end of file

Reply via email to