Commit e436954d authored by William Blough's avatar William Blough

Merge tag 'upstream/3.2.1+debian'

Upstream version 3.2.1+debian
parents 576603b6 7f4617eb
......@@ -50,6 +50,18 @@ foreach(line IN LISTS configure)
string(REGEX REPLACE "^AC_INIT\\(\\[xerces-c\\],\\[(.*)\\]\\)" "\\1" xerces_c_version "${line}")
break()
endforeach()
file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/configure.ac" configure
REGEX "^INTERFACE_VERSION=.*")
foreach(line IN LISTS configure)
string(REGEX REPLACE "^INTERFACE_VERSION=(.*)" "\\1" xerces_c_interface_version "${line}")
break()
endforeach()
file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/configure.ac" configure
REGEX "^GRAMMAR_SERIALIZATION_LEVEL=.*")
foreach(line IN LISTS configure)
string(REGEX REPLACE "^GRAMMAR_SERIALIZATION_LEVEL=(.*)" "\\1" xerces_c_grammar_serialization_level "${line}")
break()
endforeach()
message(STATUS "Configuring Apache Xerces-C++ version ${xerces_c_version}")
......@@ -68,8 +80,20 @@ set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set(PACKAGE_BUGREPORT "c-dev@xerces.apache.org")
set(PACKAGE_URL "https://xerces.apache.org/xerces-c/")
set(VERSION "${PROJECT_VERSION}")
set(XERCES_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
set(XERCES_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
set(XERCES_VERSION_REVISION "${PROJECT_VERSION_PATCH}")
string(REPLACE "." ";" interface_version_parts "${xerces_c_interface_version}")
list(GET interface_version_parts 0 INTERFACE_VERSION_MAJOR)
list(GET interface_version_parts 1 INTERFACE_VERSION_MINOR)
set(INTERFACE_VERSION_D "${INTERFACE_VERSION_MAJOR}.${INTERFACE_VERSION_MINOR}")
set(INTERFACE_VERSION_U "${INTERFACE_VERSION_MAJOR}_${INTERFACE_VERSION_MINOR}")
set(XERCES_GRAMMAR_SERIALIZATION_LEVEL "${xerces_c_grammar_serialization_level}")
set(EXTRA_DIST
version.incl
xerces-c.spec
xerces-c.pc.in
CREDITS
......@@ -107,6 +131,7 @@ include(XercesConst)
include(XercesInline)
include(XercesVolatile)
include(XercesLString)
include(XercesMFC)
include(XercesNamespaces)
include(XercesStdLibs)
include(XercesStdNamespace)
......@@ -125,6 +150,14 @@ configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/src/xercesc/util/Xerces_autoconf_config.hpp.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/src/xercesc/util/Xerces_autoconf_config.hpp
@ONLY)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/src/xercesc/util/XercesVersion.hpp.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/src/xercesc/util/XercesVersion.hpp
@ONLY)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/doc/style/dtd/entities.ent.in
${CMAKE_CURRENT_BINARY_DIR}/doc/style/dtd/entities.ent
@ONLY)
# Generate pkg-config file
set(pkgconfig-dir "${CMAKE_INSTALL_LIBDIR}/pkgconfig" CACHE STRING "pkg-config installation directory (default ${CMAKE_INSTALL_LIBDIR}/pkgconfig)")
......@@ -152,19 +185,18 @@ message(STATUS "")
message(STATUS "Xerces-C++ configuration summary")
message(STATUS "--------------------------------")
message(STATUS "")
message(STATUS " Version: ${xerces-c_VERSION}")
message(STATUS " Library version: ${LIB_VER}")
message(STATUS " Library interface version D: ${LIB_INTERFACE_VER_D}")
message(STATUS " Library interface version U: ${LIB_INTERFACE_VER_U}")
message(STATUS " Version: ${xerces-c_VERSION}")
message(STATUS " Library interface version: ${xerces_c_interface_version}")
message(STATUS "")
message(STATUS " Installation directory: ${prefix}")
message(STATUS " C compiler: ${CMAKE_C_COMPILER}")
message(STATUS " C++ compiler: ${CMAKE_CXX_COMPILER}")
message(STATUS " Installation directory: ${prefix}")
message(STATUS " C compiler: ${CMAKE_C_COMPILER}")
message(STATUS " C++ compiler: ${CMAKE_CXX_COMPILER}")
message(STATUS "")
message(STATUS " Build shared libraries: ${BUILD_SHARED_LIBS}")
message(STATUS " Path delimiters: \"${path_delims}\"")
message(STATUS " File Manager: ${filemgr}")
message(STATUS " Mutex Manager: ${mutexmgr}")
message(STATUS " Transcoder: ${transcoder}")
message(STATUS " NetAccessor: ${netaccessor}")
message(STATUS " Message Loader: ${msgloader}")
message(STATUS " Build shared libraries: ${BUILD_SHARED_LIBS}")
message(STATUS " Path delimiters: \"${path_delims}\"")
message(STATUS " File Manager: ${filemgr}")
message(STATUS " Mutex Manager: ${mutexmgr}")
message(STATUS " Transcoder: ${transcoder}")
message(STATUS " NetAccessor: ${netaccessor}")
message(STATUS " Message Loader: ${msgloader}")
message(STATUS " XMLCh type: ${xmlch_type}")
SUBDIRS = src tests samples
SUBDIRS = doc src tests samples
EXTRA_DIST = version.incl \
CMakeLists.txt \
EXTRA_DIST = CMakeLists.txt \
cmake \
config.h.cmake.in \
xerces-c.spec \
......@@ -13,7 +12,6 @@ EXTRA_DIST = version.incl \
NOTICE \
README \
config/pretty-make \
doc \
reconf \
scripts/createBindingsFormatFromHPP.pl \
scripts/makeStringDefinition.pl \
......
......@@ -110,6 +110,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/xerces_no_threads.m4 \
$(top_srcdir)/m4/xerces_path_delimiters.m4 \
$(top_srcdir)/m4/xerces_transcoder_selection.m4 \
$(top_srcdir)/m4/xerces_xmlch_selection.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
......@@ -119,8 +120,10 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h \
$(top_builddir)/src/xercesc/util/Xerces_autoconf_config.hpp
CONFIG_CLEAN_FILES = xerces-c.pc scripts/run-test
$(top_builddir)/src/xercesc/util/Xerces_autoconf_config.hpp \
$(top_builddir)/src/xercesc/util/XercesVersion.hpp
CONFIG_CLEAN_FILES = doc/style/dtd/entities.ent xerces-c.pc \
scripts/run-test
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
......@@ -213,7 +216,10 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/config/config.guess \
$(top_srcdir)/config/config.sub \
$(top_srcdir)/config/install-sh $(top_srcdir)/config/ltmain.sh \
$(top_srcdir)/config/missing $(top_srcdir)/scripts/run-test.in \
$(top_srcdir)/config/missing \
$(top_srcdir)/doc/style/dtd/entities.ent.in \
$(top_srcdir)/scripts/run-test.in \
$(top_srcdir)/src/xercesc/util/XercesVersion.hpp.in \
$(top_srcdir)/src/xercesc/util/Xerces_autoconf_config.hpp.in \
INSTALL README config/compile config/config.guess \
config/config.sub config/install-sh config/ltmain.sh \
......@@ -307,6 +313,10 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTERFACE_VERSION_D = @INTERFACE_VERSION_D@
INTERFACE_VERSION_MAJOR = @INTERFACE_VERSION_MAJOR@
INTERFACE_VERSION_MINOR = @INTERFACE_VERSION_MINOR@
INTERFACE_VERSION_U = @INTERFACE_VERSION_U@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
......@@ -344,6 +354,9 @@ SHELL = @SHELL@
SHREXT = @SHREXT@
STRIP = @STRIP@
VERSION = @VERSION@
XERCES_VERSION_MAJOR = @XERCES_VERSION_MAJOR@
XERCES_VERSION_MINOR = @XERCES_VERSION_MINOR@
XERCES_VERSION_REVISION = @XERCES_VERSION_REVISION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
......@@ -401,9 +414,8 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = src tests samples
EXTRA_DIST = version.incl \
CMakeLists.txt \
SUBDIRS = doc src tests samples
EXTRA_DIST = CMakeLists.txt \
cmake \
config.h.cmake.in \
xerces-c.spec \
......@@ -415,7 +427,6 @@ EXTRA_DIST = version.incl \
NOTICE \
README \
config/pretty-make \
doc \
reconf \
scripts/createBindingsFormatFromHPP.pl \
scripts/makeStringDefinition.pl \
......@@ -482,8 +493,18 @@ src/xercesc/util/stamp-h2: $(top_srcdir)/src/xercesc/util/Xerces_autoconf_config
@rm -f src/xercesc/util/stamp-h2
cd $(top_builddir) && $(SHELL) ./config.status src/xercesc/util/Xerces_autoconf_config.hpp
src/xercesc/util/XercesVersion.hpp: src/xercesc/util/stamp-h3
@test -f $@ || rm -f src/xercesc/util/stamp-h3
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) src/xercesc/util/stamp-h3
src/xercesc/util/stamp-h3: $(top_srcdir)/src/xercesc/util/XercesVersion.hpp.in $(top_builddir)/config.status
@rm -f src/xercesc/util/stamp-h3
cd $(top_builddir) && $(SHELL) ./config.status src/xercesc/util/XercesVersion.hpp
distclean-hdr:
-rm -f config.h stamp-h1 src/xercesc/util/Xerces_autoconf_config.hpp src/xercesc/util/stamp-h2
-rm -f config.h stamp-h1 src/xercesc/util/Xerces_autoconf_config.hpp src/xercesc/util/stamp-h2 src/xercesc/util/XercesVersion.hpp src/xercesc/util/stamp-h3
doc/style/dtd/entities.ent: $(top_builddir)/config.status $(top_srcdir)/doc/style/dtd/entities.ent.in
cd $(top_builddir) && $(SHELL) ./config.status $@
xerces-c.pc: $(top_builddir)/config.status $(srcdir)/xerces-c.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $@
scripts/run-test: $(top_builddir)/config.status $(top_srcdir)/scripts/run-test.in
......
......@@ -1208,3 +1208,4 @@ m4_include([m4/xerces_netaccessor_selection.m4])
m4_include([m4/xerces_no_threads.m4])
m4_include([m4/xerces_path_delimiters.m4])
m4_include([m4/xerces_transcoder_selection.m4])
m4_include([m4/xerces_xmlch_selection.m4])
......@@ -43,21 +43,3 @@ else()
set(XERCES_DLL_EXPORT 1)
endif()
endif()
# Versioning information
file(STRINGS "${PROJECT_SOURCE_DIR}/version.incl" icu_verinfo
REGEX "^[^#].*=.*")
foreach(item IN LISTS icu_verinfo)
string(REGEX REPLACE "^([^=]+)=(.*)"
"\\1" lib_key "${item}")
string(REGEX REPLACE "^([^=]+)=(.*)"
"\\2" lib_value "${item}")
set(LIB_${lib_key} "${lib_value}")
endforeach()
string(REGEX REPLACE "^([0-9]+)_.*"
"\\1"
LIB_INTERFACE_VER_U_MAJOR
"${LIB_INTERFACE_VER_U}")
# CMake build for xerces-c
#
# Copyright 1999-2004 The Apache Software Foundation.
# Written by Roger Leigh <rleigh@codelibre.net>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
......@@ -12,11 +16,11 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
#
# $Id: version.incl 1799382 2017-06-21 01:48:53Z scantor $
#
VER=3_2_0
INTERFACE_VER_D=3.2
INTERFACE_VER_U=3_2
# MFC Support
if(MSVC)
option(mfc-debug "MFC debug support" ON)
set(XERCES_MFC_SUPPORT ${mfc-debug})
endif()
......@@ -51,13 +51,13 @@ endif()
set(XERCES_USE_MUTEXMGR_POSIX 0)
set(XERCES_USE_MUTEXMGR_WINDOWS 0)
set(XERCES_USE_MUTEXMGR_NOTHREADS 0)
set(XERCES_USE_MUTEXMGR_NOTHREAD 0)
if(mutexmgr STREQUAL "POSIX")
set(XERCES_USE_MUTEXMGR_POSIX 1)
elseif(mutexmgr STREQUAL "windows")
set(XERCES_USE_MUTEXMGR_WINDOWS 1)
elseif(mutexmgr STREQUAL "nothreads")
set(XERCES_USE_MUTEXMGR_NOTHREADS 1)
set(XERCES_USE_MUTEXMGR_NOTHREAD 1)
else()
message(FATAL_ERROR "Invalid mutex manager: \"${mutexmgr}\"")
endif()
......@@ -59,7 +59,7 @@ check_function_exists(iconv HAVE_ICONV)
set(gnuiconv_available 0)
if(HAVE_ICONV_H AND HAVE_WCHAR_H AND HAVE_STRING_H AND HAVE_STDLIB_H AND
HAVE_STDIO_H AND HAVE_CTYPE_H AND HAVE_LOCALE_H AND HAVE_ERRNO_H)
if (HAVE_ENDIAN_H OR HAVE_MACHINE/ENDIAN_H OR HAVE_ARPA/NAMESER_COMPAT_H)
if (HAVE_ENDIAN_H OR HAVE_MACHINE_ENDIAN_H OR HAVE_ARPA_NAMESER_COMPAT_H)
if(HAVE_ICONV_OPEN AND HAVE_ICONV_CLOSE AND HAVE_ICONV)
set(gnuiconv_available 1)
list(APPEND transcoders gnuiconv)
......
......@@ -26,10 +26,6 @@ include(CheckCXXSourceCompiles)
include(CheckTypeSize)
include(XercesIntTypes)
set(XERCES_XMLCH_T ${XERCES_U16BIT_INT})
set(XERCES_USE_CHAR16_T 0)
set(XERCES_INCLUDE_WCHAR_H 0)
check_cxx_source_compiles("
int main() {
const char16_t *unicode = u\"Test ünícodè → ©\";
......@@ -41,19 +37,16 @@ if(HAVE_STD_char16_t)
check_type_size("wchar_t" SIZEOF_WCHAR_T LANGUAGE CXX)
if(NOT SIZEOF_CHAR16_T EQUAL 2)
message(FATAL_ERROR "char16_t is not a 16-bit type")
endif()
if(WIN32)
if(NOT SIZEOF_WCHAR_T EQUAL 2)
message(FATAL_ERROR "wchar_t is not a 16-bit type, and size differs from char16_t")
endif()
message(WARNING "char16_t is not a 16-bit type")
elseif(WIN32 AND NOT SIZEOF_WCHAR_T EQUAL 2)
message(WARNING "wchar_t is not a 16-bit type, and size differs from char16_t")
else()
list(APPEND xmlch_types char16_t)
endif()
endif()
set(XERCES_XMLCH_T char16_t)
set(XERCES_USE_CHAR16_T 1)
else()
if(WIN32)
check_cxx_source_compiles("
if(WIN32)
check_cxx_source_compiles("
#include <windows.h>
wchar_t file[] = L\"dummy.file\";
......@@ -64,9 +57,30 @@ int main() {
}"
WINDOWS_wchar)
if(WINDOWS_wchar)
set(XERCES_XMLCH_T wchar_t)
set(XERCES_INCLUDE_WCHAR_H 1)
endif()
if(WINDOWS_wchar)
list(APPEND xmlch_types wchar_t)
endif()
endif()
list(APPEND xmlch_types uint16_t)
string(REPLACE ";" "|" xmlch_type_help "${xmlch_types}")
list(GET xmlch_types 0 xerces_xmlch_type_default)
set(xmlch-type "${xerces_xmlch_type_default}" CACHE STRING "XMLCh type (${xmlch_type_help})")
set(xmlch_type "${xmlch-type}")
list(FIND xmlch_types "${xmlch_type}" xmlch_type_found)
if(xmlch_type_found EQUAL -1)
message(FATAL_ERROR "${xmlch_type} xmlch_type unavailable")
endif()
set(XERCES_XMLCH_T ${XERCES_U16BIT_INT})
set(XERCES_USE_CHAR16_T 0)
set(XERCES_INCLUDE_WCHAR_H 0)
if(xmlch_type STREQUAL "char16_t")
set(XERCES_XMLCH_T char16_t)
set(XERCES_USE_CHAR16_T 1)
elseif(xmlch_type STREQUAL "wchar_t")
set(XERCES_XMLCH_T wchar_t)
set(XERCES_INCLUDE_WCHAR_H 1)
endif()
......@@ -481,9 +481,6 @@
/* Define to use the Windows transcoder */
#cmakedefine XERCES_USE_TRANSCODER_WINDOWS 1
/* Define to use the Windows transcode */
#cmakedefine XERCES_USE_CHAR16_T 1
/* Define to the 16 bit type used to represent Xerces UTF-16 characters */
#define XERCES_XMLCH_T @XERCES_XMLCH_T@
......
......@@ -159,6 +159,9 @@
/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
/* Define to 1 if you have the `socket' function. */
#undef HAVE_SOCKET
......@@ -283,6 +286,12 @@
char*. */
#undef ICONV_USES_CONST_POINTER
/* Definition of Xerces interface major version */
#undef INTERFACE_VERSION_MAJOR
/* Definition of Xerces interface minor version */
#undef INTERFACE_VERSION_MINOR
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#undef LT_OBJDIR
......@@ -341,6 +350,9 @@
/* Define to true if autoconf is used in this configuration */
#undef XERCES_AUTOCONF
/* Definition of Xerces grammar serialization level */
#undef XERCES_GRAMMAR_SERIALIZATION_LEVEL
/* Define if namespaces is supported by the compiler */
#undef XERCES_HAS_CPP_NAMESPACE
......@@ -373,9 +385,6 @@
/* Define to 1 if we have sys/types.h */
#undef XERCES_HAVE_SYS_TYPES_H
/* Define to have Xerces_autoconf_config.hpp include wchar.h */
#undef XERCES_INCLUDE_WCHAR_H
/* Define if there is support for L"widestring" */
#undef XERCES_LSTRSUPPORT
......@@ -431,9 +440,6 @@
/* An appropriate unsigned 64 bit integer type */
#undef XERCES_U64BIT_INT
/* Define if the C++11 char16_t type is to be used */
#undef XERCES_USE_CHAR16_T
/* Define to use the POSIX file mgr */
#undef XERCES_USE_FILEMGR_POSIX
......@@ -485,6 +491,15 @@
/* Define to use the Windows transcoder */
#undef XERCES_USE_TRANSCODER_WINDOWS
/* Definition of Xerces major version */
#undef XERCES_VERSION_MAJOR
/* Definition of Xerces minor version */
#undef XERCES_VERSION_MINOR
/* Definition of Xerces patch version */
#undef XERCES_VERSION_REVISION
/* Define to the 16 bit type used to represent Xerces UTF-16 characters */
#undef XERCES_XMLCH_T
......
This diff is collapsed.
......@@ -20,20 +20,54 @@
#
#
# $Id: configure.ac 1804250 2017-08-06 18:09:44Z scantor $
# $Id: configure.ac 1824713 2018-02-18 23:07:07Z rleigh $
#
AC_PREREQ(2.60)
AC_INIT([xerces-c],[3.2.0])
AC_INIT([xerces-c],[3.2.1])
INTERFACE_VERSION=3.2
GRAMMAR_SERIALIZATION_LEVEL=7
XERCES_VERSION_MAJOR=$(echo $PACKAGE_VERSION | cut -d. -f1)
XERCES_VERSION_MINOR=$(echo $PACKAGE_VERSION | cut -d. -f2)
XERCES_VERSION_REVISION=$(echo $PACKAGE_VERSION | cut -d. -f3)
INTERFACE_VERSION_MAJOR=$(echo $INTERFACE_VERSION | cut -d. -f1)
INTERFACE_VERSION_MINOR=$(echo $INTERFACE_VERSION | cut -d. -f2)
INTERFACE_VERSION_D="${INTERFACE_VERSION_MAJOR}.${INTERFACE_VERSION_MINOR}"
INTERFACE_VERSION_U="${INTERFACE_VERSION_MAJOR}_${INTERFACE_VERSION_MINOR}"
AC_SUBST([XERCES_VERSION_MAJOR])
AC_SUBST([XERCES_VERSION_MINOR])
AC_SUBST([XERCES_VERSION_REVISION])
AC_SUBST([INTERFACE_VERSION_MAJOR])
AC_SUBST([INTERFACE_VERSION_MINOR])
AC_SUBST([INTERFACE_VERSION_D])
AC_SUBST([INTERFACE_VERSION_U])
AC_DEFINE_UNQUOTED([XERCES_VERSION_MAJOR], $XERCES_VERSION_MAJOR, [Definition of Xerces major version])
AC_DEFINE_UNQUOTED([XERCES_VERSION_MINOR], $XERCES_VERSION_MINOR, [Definition of Xerces minor version])
AC_DEFINE_UNQUOTED([XERCES_VERSION_REVISION], $XERCES_VERSION_REVISION, [Definition of Xerces patch version])
AC_DEFINE_UNQUOTED([INTERFACE_VERSION_MAJOR], $INTERFACE_VERSION_MAJOR, [Definition of Xerces interface major version])
AC_DEFINE_UNQUOTED([INTERFACE_VERSION_MINOR], $INTERFACE_VERSION_MINOR, [Definition of Xerces interface minor version])
AC_DEFINE_UNQUOTED([XERCES_GRAMMAR_SERIALIZATION_LEVEL], $GRAMMAR_SERIALIZATION_LEVEL, [Definition of Xerces grammar serialization level])
AC_CONFIG_SRCDIR([src/Makefile.am])
AC_CONFIG_LIBOBJ_DIR([src])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h src/xercesc/util/Xerces_autoconf_config.hpp])
AC_CONFIG_FILES([Makefile \
src/Makefile \
tests/Makefile \
samples/Makefile \
AC_CONFIG_HEADER([src/xercesc/util/XercesVersion.hpp])
AC_CONFIG_FILES([Makefile
doc/Makefile
doc/Doxyfile
doc/style/dtd/entities.ent
src/Makefile
tests/Makefile
samples/Makefile
xerces-c.pc
scripts/run-test])
......@@ -329,46 +363,7 @@ AC_DEFINE_UNQUOTED([XERCES_PLATFORM_IMPORT], [$platform_import], [Define as the
AS_IF([test ! $ac_cv_cxx_have_bool],
AC_DEFINE([XERCES_NO_NATIVE_BOOL], 1, [Define if there is no native bool support in this environment]))
AS_IF([test $ac_cv_cxx_have_lstring],
AC_DEFINE([XERCES_LSTRSUPPORT], 1, [Define if there is support for L"widestring"]))
AC_MSG_CHECKING([whether C++11 char16_t is available])
AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[]],
[[const char16_t *unicode = u"Test ünícodè → ©";]])],
[
xerces_cv_type_xmlch=char16_t
AC_DEFINE_UNQUOTED([XERCES_USE_CHAR16_T], [1], [Define if the C++11 char16_t type is to be used])
AC_MSG_RESULT([yes])
],
[
xerces_cv_type_xmlch=$xerces_cv_type_u16bit_int
AC_MSG_RESULT([no])
]
)
AM_CONDITIONAL([XERCES_USE_CHAR16], [test "x$xerces_cv_type_xmlch" = "xchar16_t"])
if test "$xerces_cv_type_xmlch" != "char16_t"; then
# fallback to check if the Windows API is defined as using wchar_t or
# unsigned short; if it's wchar_t, we need to map XMLCh to be wchar_t
# (this is safe because on Windows wchar_t is used to store UTF-16
# codepoints, while it is not true on Unix)
AC_MSG_CHECKING([whether the Windows SDK is available and using wchar_t as wide string])
AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <windows.h>
wchar_t file[] = L"dummy.file";]],
[[DeleteFileW(file);]])],
[
xerces_cv_type_xmlch=wchar_t
AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED([XERCES_INCLUDE_WCHAR_H], 1, [Define to have Xerces_autoconf_config.hpp include wchar.h])
],
[
xerces_cv_type_xmlch=$xerces_cv_type_u16bit_int
AC_MSG_RESULT([no])
]
)
fi
AC_DEFINE_UNQUOTED([XERCES_XMLCH_T], [$xerces_cv_type_xmlch], [Define to the 16 bit type used to represent Xerces UTF-16 characters])
XERCES_XMLCH_SELECTION
AC_MSG_CHECKING([whether the compiler chokes on a placement operator delete])
AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <stdlib.h>
......@@ -544,3 +539,4 @@ AC_MSG_NOTICE([ Mutex Manager: $mutexmgr])
AC_MSG_NOTICE([ Transcoder: $transcoder])
AC_MSG_NOTICE([ NetAccessor: $netaccessor])
AC_MSG_NOTICE([ Message Loader: $msgloader])
AC_MSG_NOTICE([ XMLCh Type: $xmlch])
......@@ -17,10 +17,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# Install docs
# Install docs. Install from source tree if pre-generated, then the
# build tree if generated during the build.
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/html"
DESTINATION "${CMAKE_INSTALL_DOCDIR}"
COMPONENT "development")
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html"
DESTINATION "${CMAKE_INSTALL_DOCDIR}"
COMPONENT "development")
# Add createdocs target (if Java is available, plus the needed jars)
find_package(Java COMPONENTS Runtime)
......@@ -34,14 +39,20 @@ if(Java_FOUND
set(cpsep ";")
endif()
set(classpath "${PROJECT_SOURCE_DIR}/tools/jars/stylebook-1.0-b2.jar${cpsep}${PROJECT_SOURCE_DIR}/tools/jars/xalan.jar${cpsep}${PROJECT_SOURCE_DIR}/tools/jars/xerces.jar")
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doc/style/dtd}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/style/dtd/entities.ent.in
${CMAKE_CURRENT_BINARY_DIR}/style/dtd/entities.ent @ONLY)
add_custom_target(createdocs
COMMAND "${CMAKE_COMMAND}" -E copy_directory
${CMAKE_CURRENT_SOURCE_DIR}/style
${CMAKE_CURRENT_BINARY_DIR}/style
COMMAND "${Java_JAVA_EXECUTABLE}" -Djava.awt.headless=true
-classpath "${classpath}"
org.apache.stylebook.StyleBook
"targetDirectory=${CMAKE_CURRENT_SOURCE_DIR}/html"
"targetDirectory=${CMAKE_CURRENT_BINARY_DIR}/html"
${CMAKE_CURRENT_SOURCE_DIR}/xerces-c_book.xml
${CMAKE_CURRENT_SOURCE_DIR}/style
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
${CMAKE_CURRENT_BINARY_DIR}/style
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
)
set_target_properties(createdocs PROPERTIES FOLDER "Documentation")
endif()
......@@ -49,9 +60,14 @@ endif()
# Add createapidocs target (if doxygen is available)
find_program(DOXYGEN_EXECUTABLE doxygen)
if(DOXYGEN_EXECUTABLE)
set(VERSION "${PROJECT_VERSION}")
set(abs_top_srcdir "${PROJECT_SOURCE_DIR}")
set(abs_top_builddir "${PROJECT_BINARY_DIR}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(createapidocs
COMMAND "${DOXYGEN_EXECUTABLE}" Doxyfile
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
)
set_target_properties(createapidocs PROPERTIES FOLDER "Documentation")
endif()
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
DOCS_CLASSPATH=$(abs_top_srcdir)/tools/jars/stylebook-1.0-b2.jar:$(abs_top_srcdir)/tools/jars/xalan.jar:$(abs_top_srcdir)/tools/jars/xerces.jar
DOCS_SRCSTYLE=$(abs_top_srcdir)/doc/style
DOCS_BUILDSTYLE=$(abs_top_builddir)/doc/style
DOCS_SOURCE=$(abs_top_srcdir)/doc/xerces-c_book.xml
DOCS_TARGET=$(abs_top_builddir)/doc/html
createapidocs:
doxygen Doxyfile
# stylebook doesn't like the same style directory being specified
# twice for in-source builds.
createdocs:
$(MKDIR_P) "$(DOCS_TARGET)"; \
if [ "$(abs_top_srcdir)" != "$(abs_top_builddir)" ]; then \
for file in $(STYLE_FILES); do \
$(INSTALL) -d $(builddir)/$$(dirname $$file); \
$(INSTALL_DATA) $(srcdir)/$$file $(builddir)/$$file; \
done; \
fi; \
java -Djava.awt.headless=true -classpath "$(DOCS_CLASSPATH)" \
org.apache.stylebook.StyleBook \
"targetDirectory=$(DOCS_TARGET)" \
"$(DOCS_SOURCE)" \
"$(DOCS_BUILDSTYLE)"
STYLE_FILES = \
style/dtd/blocks.ent \
style/dtd/book.dtd \
style/dtd/changes.dtd \
style/dtd/characters.ent \
style/dtd/document.dtd \
style/dtd/entities.ent.in \
style/dtd/faqs.dtd \
style/dtd/links.ent \
style/dtd/markup.ent \
style/graphics/button-a.gif \
style/graphics/button-b.gif \
style/graphics/section.gif \
style/loader.xml \
style/resources/bottom.gif \
style/resources/button-asf-hi.gif \
style/resources/button-asf-lo.gif \
style/resources/button-w3c-hi.gif \
style/resources/button-w3c-lo.gif \
style/resources/button-xml-hi.gif \
style/resources/button-xml-lo.gif \
style/resources/close.gif \
style/resources/dot.gif \
style/resources/join.gif \
style/resources/line.gif \
style/resources/logo.gif \
style/resources/note.gif \
style/resources/right.gif \
style/resources/script.js \
style/resources/separator-space.gif \
style/resources/separator.gif \
style/resources/void.gif \
style/stylesheets/any2header.xsl \
style/stylesheets/any2project.xsl \
style/stylesheets/book2group.xsl \
style/stylesheets/book2project.xsl \
style/stylesheets/changes2document.xsl \
style/stylesheets/context2footer.xsl \
style/stylesheets/context2label.xsl \
style/stylesheets/context2section.xsl \
style/stylesheets/directory2project.xsl \
style/stylesheets/document2html.xsl \
style/stylesheets/faqs2document.xsl \
style/stylesheets/group2document.xsl
EXTRA_DIST = CMakeLists.txt \
Doxyfile.in \
Makefile.am \
apidocs.xml \
applications.xml \
bug-report.xml \
build.xml \
charter.xml \
createdoc.xml \
domcount.xml \
domprint.xml \
download.xml \
enumval.xml \
faq-build.xml \
faq-contributing.xml \
faq-distrib.xml \
faq-other.xml \
faq-parse.xml \
feedback.xml \
html/ApacheDOMC++Binding.html \
html/secadv/CVE-2015-0252.txt \
html/secadv/CVE-2016-0729.txt \
html/secadv/CVE-2016-4463.txt \
install.xml \
mailing-lists.xml \