Upgrade libxml2 to c41bc10da31a4a4e5416270110b6d1b79606cad1

Test: make
Change-Id: Ic025f2f5cd8dbadc8bf3a446b941c403931de3f1
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 073869f..f922d5a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -117,7 +117,7 @@
 set(PACKAGE_NAME "libxml2")
 set(PACKAGE_STRING "libxml2 ${VERSION}")
 set(PACKAGE_TARNAME "libxml2")
-set(PACKAGE_URL "http://www.xmlsoft.org/")
+set(PACKAGE_URL "https://gitlab.gnome.org/GNOME/libxml2")
 set(PACKAGE_VERSION ${VERSION})
 
 if(LIBLZMA_FOUND)
@@ -139,7 +139,10 @@
 		void __attribute__((destructor))
 		f(void) {}
 		int main(void) { return 0; }
-	" ATTRIBUTE_DESTRUCTOR)
+	" HAVE_ATTRIBUTE_DESTRUCTOR)
+	if(HAVE_ATTRIBUTE_DESTRUCTOR)
+		set(ATTRIBUTE_DESTRUCTOR "__attribute__((destructor))")
+	endif()
 	check_c_source_compiles("
 		#include <netdb.h>
 		int main() { (void) gethostbyname((const char*) \"\"); return 0; }
@@ -158,39 +161,27 @@
 	endif()
 	check_function_exists(class HAVE_CLASS)
 	check_include_files(ctype.h HAVE_CTYPE_H)
-	check_include_files(dirent.h HAVE_DIRENT_H)
 	check_include_files(dlfcn.h HAVE_DLFCN_H)
 	check_library_exists(dl dlopen "" HAVE_DLOPEN)
 	check_include_files(dl.h HAVE_DL_H)
 	check_include_files(errno.h HAVE_ERRNO_H)
 	check_include_files(fcntl.h HAVE_FCNTL_H)
-	check_function_exists(finite HAVE_FINITE)
 	check_include_files(float.h HAVE_FLOAT_H)
 	check_function_exists(fpclass HAVE_FPCLASS)
 	check_function_exists(fprintf HAVE_FPRINTF)
-	check_function_exists(fp_class HAVE_FP_CLASS)
 	check_function_exists(ftime HAVE_FTIME)
 	check_function_exists(getaddrinfo HAVE_GETADDRINFO)
 	check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
 	check_include_files(inttypes.h HAVE_INTTYPES_H)
 	check_function_exists(isascii HAVE_ISASCII)
-	check_function_exists(isinf HAVE_ISINF)
-	check_function_exists(isnan HAVE_ISNAN)
-	check_function_exists(isnand HAVE_ISNAND)
 	check_library_exists(history append_history "" HAVE_LIBHISTORY)
-	check_library_exists(lzma lzma_code "" HAVE_LIBLZMA)
-	check_library_exists(pthread pthread_join "" HAVE_LIBPTHREAD)
 	check_library_exists(readline readline "" HAVE_LIBREADLINE)
-	check_library_exists(z gzread "" HAVE_LIBZ)
 	check_include_files(limits.h HAVE_LIMITS_H)
 	check_function_exists(localtime HAVE_LOCALTIME)
-	check_include_files(lzma.h HAVE_LZMA_H)
 	check_include_files(malloc.h HAVE_MALLOC_H)
 	check_include_files(math.h HAVE_MATH_H)
-	check_include_files(memory.h HAVE_MEMORY_H)
 	check_function_exists(mmap HAVE_MMAP)
 	check_function_exists(munmap HAVE_MUNMAP)
-	check_symbol_exists(DIR ndir.h HAVE_NDIR_H)
 	check_include_files(netdb.h HAVE_NETDB_H)
 	check_include_files(netinet/in.h HAVE_NETINET_IN_H)
 	check_include_files(poll.h HAVE_POLL_H)
@@ -201,7 +192,6 @@
 	check_function_exists(rand_r HAVE_RAND_R)
 	check_include_files(resolv.h HAVE_RESOLV_H)
 	check_library_exists(dld shl_load "" HAVE_SHLLOAD)
-	check_function_exists(signal HAVE_SIGNAL)
 	check_include_files(signal.h HAVE_SIGNAL_H)
 	check_function_exists(snprintf HAVE_SNPRINTF)
 	check_function_exists(sprintf HAVE_SPRINTF)
@@ -214,9 +204,7 @@
 	check_function_exists(strftime HAVE_STRFTIME)
 	check_include_files(strings.h HAVE_STRINGS_H)
 	check_include_files(string.h HAVE_STRING_H)
-	check_symbol_exists(DIR sys/dir.h HAVE_SYS_DIR_H)
 	check_include_files(sys/mman.h HAVE_SYS_MMAN_H)
-	check_symbol_exists(DIR sys/ndir.h HAVE_SYS_NDIR_H)
 	check_include_files(sys/select.h HAVE_SYS_SELECT_H)
 	check_include_files(sys/socket.h HAVE_SYS_SOCKET_H)
 	check_include_files(sys/stat.h HAVE_SYS_STAT_H)
@@ -698,11 +686,6 @@
 configure_file(include/libxml/xmlversion.h.in libxml/xmlversion.h)
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libxml/xmlversion.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libxml2/libxml COMPONENT development)
 
-if(MSVC)
-	configure_file(include/libxml/xmlwin32version.h.in libxml/xmlwin32version.h)
-	install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libxml/xmlwin32version.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libxml2/libxml COMPONENT development)
-endif()
-
 if(LIBXML2_WITH_PYTHON)
 	set(prefix "${CMAKE_INSTALL_PREFIX}")
 	configure_file(python/setup.py.in setup.py @ONLY)