From cce1c28bcecec87f34983599441ce16f7c2cf829 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Thu, 1 Nov 2012 18:20:06 +0100 Subject: Migrated build system to CMake. Conditional file compilation. Automatic selection of platform handler. --- .gitignore | 26 +- CMakeLists.txt | 630 +++++++++ Doxyfile.in | 1043 +++++++++++++++ README.autotools | 11 +- SConstruct | 1478 +-------------------- cmake/FindCppUnit.cmake | 34 + cmake/FindGSasl.cmake | 51 + cmake/FindIconv.cmake | 61 + cmake/TargetArch.cmake | 136 ++ cmake/Utils.cmake | 13 + cmake/config.hpp.cmake | 66 + src/exception.cpp | 24 +- src/fileAttachment.cpp | 10 + src/net/builtinServices.inl | 10 +- src/net/defaultConnectionInfos.cpp | 8 + src/net/events.cpp | 10 + src/net/folder.cpp | 10 + src/net/imap/IMAPConnection.cpp | 10 + src/net/imap/IMAPFolder.cpp | 10 + src/net/imap/IMAPMessage.cpp | 11 +- src/net/imap/IMAPMessagePartContentHandler.cpp | 9 + src/net/imap/IMAPPart.cpp | 9 + src/net/imap/IMAPSStore.cpp | 10 + src/net/imap/IMAPServiceInfos.cpp | 9 + src/net/imap/IMAPStore.cpp | 10 + src/net/imap/IMAPStructure.cpp | 9 + src/net/imap/IMAPTag.cpp | 10 + src/net/imap/IMAPUtils.cpp | 10 + src/net/maildir/format/courierMaildirFormat.cpp | 9 + src/net/maildir/format/kmailMaildirFormat.cpp | 9 + src/net/maildir/maildirFolder.cpp | 10 + src/net/maildir/maildirFormat.cpp | 9 + src/net/maildir/maildirMessage.cpp | 10 + src/net/maildir/maildirServiceInfos.cpp | 9 + src/net/maildir/maildirStore.cpp | 10 + src/net/maildir/maildirUtils.cpp | 12 +- src/net/message.cpp | 10 + src/net/pop3/POP3Folder.cpp | 10 + src/net/pop3/POP3Message.cpp | 10 + src/net/pop3/POP3SStore.cpp | 9 + src/net/pop3/POP3ServiceInfos.cpp | 9 + src/net/pop3/POP3Store.cpp | 9 + src/net/pop3/POP3Utils.cpp | 9 + src/net/sendmail/sendmailServiceInfos.cpp | 9 +- src/net/sendmail/sendmailTransport.cpp | 12 +- src/net/service.cpp | 9 + src/net/serviceFactory.cpp | 11 +- src/net/serviceInfos.cpp | 9 + src/net/session.cpp | 10 + src/net/smtp/SMTPResponse.cpp | 9 + src/net/smtp/SMTPSTransport.cpp | 9 + src/net/smtp/SMTPServiceInfos.cpp | 9 + src/net/smtp/SMTPTransport.cpp | 10 + src/net/tls/TLSSecuredConnectionInfos.cpp | 9 + src/net/tls/TLSSession.cpp | 16 +- src/net/tls/TLSSocket.cpp | 9 + src/net/transport.cpp | 9 + src/platform.cpp | 40 + src/platforms/posix/posixChildProcess.cpp | 9 + src/platforms/posix/posixFile.cpp | 11 +- src/platforms/posix/posixHandler.cpp | 9 + src/platforms/posix/posixSocket.cpp | 11 +- src/platforms/windows/windowsFile.cpp | 12 +- src/platforms/windows/windowsHandler.cpp | 11 +- src/platforms/windows/windowsSocket.cpp | 10 +- src/security/defaultAuthenticator.cpp | 9 + src/security/sasl/SASLContext.cpp | 9 + src/security/sasl/SASLMechanismFactory.cpp | 9 + src/security/sasl/SASLSession.cpp | 9 + src/security/sasl/SASLSocket.cpp | 9 + src/security/sasl/builtinSASLMechanism.cpp | 9 + src/security/sasl/defaultSASLAuthenticator.cpp | 9 + src/utility/encoder/uuEncoder.cpp | 12 +- vmime.doxygen | 1043 --------------- vmime/base.hpp | 2 +- vmime/exception.hpp | 30 +- vmime/fileAttachment.hpp | 9 +- vmime/net/connectionInfos.hpp | 8 + vmime/net/defaultConnectionInfos.hpp | 8 + vmime/net/events.hpp | 8 + vmime/net/folder.hpp | 8 + vmime/net/imap/IMAPConnection.hpp | 6 + vmime/net/imap/IMAPFolder.hpp | 8 + vmime/net/imap/IMAPMessage.hpp | 8 + vmime/net/imap/IMAPMessagePartContentHandler.hpp | 8 + vmime/net/imap/IMAPParser.hpp | 8 + vmime/net/imap/IMAPPart.hpp | 8 + vmime/net/imap/IMAPSStore.hpp | 8 + vmime/net/imap/IMAPServiceInfos.hpp | 7 + vmime/net/imap/IMAPStore.hpp | 6 + vmime/net/imap/IMAPStructure.hpp | 8 + vmime/net/imap/IMAPTag.hpp | 8 + vmime/net/imap/IMAPUtils.hpp | 8 + vmime/net/maildir/format/courierMaildirFormat.hpp | 8 + vmime/net/maildir/format/kmailMaildirFormat.hpp | 9 + vmime/net/maildir/maildirFolder.hpp | 8 + vmime/net/maildir/maildirFormat.hpp | 8 + vmime/net/maildir/maildirMessage.hpp | 8 + vmime/net/maildir/maildirServiceInfos.hpp | 7 + vmime/net/maildir/maildirStore.hpp | 6 + vmime/net/maildir/maildirUtils.hpp | 8 + vmime/net/message.hpp | 8 + vmime/net/pop3/POP3Folder.hpp | 9 +- vmime/net/pop3/POP3Message.hpp | 6 + vmime/net/pop3/POP3SStore.hpp | 8 + vmime/net/pop3/POP3ServiceInfos.hpp | 7 + vmime/net/pop3/POP3Store.hpp | 7 + vmime/net/pop3/POP3Utils.hpp | 9 +- vmime/net/securedConnectionInfos.hpp | 8 + vmime/net/sendmail/sendmailServiceInfos.hpp | 9 +- vmime/net/sendmail/sendmailTransport.hpp | 10 +- vmime/net/service.hpp | 7 + vmime/net/serviceFactory.hpp | 8 + vmime/net/serviceInfos.hpp | 8 + vmime/net/session.hpp | 8 + vmime/net/smtp/SMTPResponse.hpp | 8 + vmime/net/smtp/SMTPSTransport.hpp | 8 + vmime/net/smtp/SMTPServiceInfos.hpp | 7 + vmime/net/smtp/SMTPTransport.hpp | 6 + vmime/net/socket.hpp | 8 + vmime/net/store.hpp | 8 + vmime/net/timeoutHandler.hpp | 8 + vmime/net/tls/TLSSecuredConnectionInfos.hpp | 8 + vmime/net/tls/TLSSession.hpp | 8 + vmime/net/tls/TLSSocket.hpp | 8 + vmime/net/transport.hpp | 8 + vmime/platform.hpp | 15 +- vmime/platforms/posix/posixChildProcess.hpp | 8 + vmime/platforms/posix/posixFile.hpp | 11 +- vmime/platforms/posix/posixHandler.hpp | 7 + vmime/platforms/posix/posixSocket.hpp | 9 +- vmime/platforms/windows/windowsFile.hpp | 10 +- vmime/platforms/windows/windowsHandler.hpp | 7 + vmime/platforms/windows/windowsSocket.hpp | 11 +- vmime/security/authenticator.hpp | 8 + vmime/security/cert/X509Certificate.hpp | 2 +- vmime/security/defaultAuthenticator.hpp | 8 + vmime/security/sasl/SASLAuthenticator.hpp | 8 + vmime/security/sasl/SASLContext.hpp | 8 + vmime/security/sasl/SASLMechanism.hpp | 8 + vmime/security/sasl/SASLMechanismFactory.hpp | 8 + vmime/security/sasl/SASLSession.hpp | 8 + vmime/security/sasl/SASLSocket.hpp | 8 + vmime/security/sasl/builtinSASLMechanism.hpp | 8 + vmime/security/sasl/defaultSASLAuthenticator.hpp | 8 + 145 files changed, 3209 insertions(+), 2617 deletions(-) create mode 100644 CMakeLists.txt create mode 100644 Doxyfile.in create mode 100644 cmake/FindCppUnit.cmake create mode 100644 cmake/FindGSasl.cmake create mode 100644 cmake/FindIconv.cmake create mode 100644 cmake/TargetArch.cmake create mode 100644 cmake/Utils.cmake create mode 100644 cmake/config.hpp.cmake delete mode 100644 vmime.doxygen diff --git a/.gitignore b/.gitignore index b855c515..e24e48dc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,17 +1,33 @@ *.o -*.swp -build/ +*.sw? *.a *.dSYM +*.vim -/libvmime.a -/vmime.pc -/vmime/config.hpp +# Doxygen-generated +doc/html/* # SConstruct .sconsign.dblite /options.cache +# CMake-generated / Build files +/CMakeFiles/ +/CMakeCache.txt +/_CPack_Packages/ +/cmake_install.cmake +/CPackConfig.cmake +/CPackSourceConfig.cmake +/Doxyfile +/Makefile +/install_manifest* +/libvmime.a +/libvmime.pc +/libvmime* +/vmime/config.hpp +/COPYING.txt +/build/ + # Mac ._DS_Store diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000..af636051 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,630 @@ +# +# CMake configuration file for VMime +# +# Usage: +# +# . 'cmake -LH' to list build settings variable +# +# . 'cmake -G ' to generate makefiles for a build system +# eg. cmake -G "Unix Makefiles" +# +# For more information, please visit: +# http://www.cmake.org +# + +CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR) + +INCLUDE(cmake/Utils.cmake) + +# CMake configuration +SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY build/bin) +SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY build/lib) + +SET(CMAKE_VERBOSE_MAKEFILE ON) + + +# Project +PROJECT(vmime) + +# Package version number +SET(VMIME_VERSION_MAJOR 0) +SET(VMIME_VERSION_MINOR 9) +SET(VMIME_VERSION_MICRO 2) + +# API version number (libtool) +# +# Increment this number only immediately before a public release. +# This is independent from package version number. +# +# See: http://www.gnu.org/software/libtool/manual.html#Libtool-versioning +# +# . Implementation changed (eg. bug/security fix): REVISION++ +# . Interfaces added/removed/changed: CURRENT++, REVISION=0 +# . Interfaces added (upward-compatible changes): AGE++ +# . Interfaces removed: AGE=0 +SET(VMIME_API_VERSION_CURRENT 0) +SET(VMIME_API_VERSION_REVISION 0) +SET(VMIME_API_VERSION_AGE 0) + + +SET(VMIME_VERSION ${VMIME_VERSION_MAJOR}.${VMIME_VERSION_MINOR}.${VMIME_VERSION_MICRO}) +SET(VMIME_API_VERSION ${VMIME_API_VERSION_CURRENT}.${VMIME_API_VERSION_REVISION}.${VMIME_API_VERSION_AGE}) + + +############################################################################## +# VMime Library + +# Set base name +SET(VMIME_LIBRARY_NAME vmime) + +# Source files +FILE( + GLOB_RECURSE + VMIME_LIBRARY_SRC_FILES + src/* +) + +FILE( + GLOB_RECURSE + VMIME_LIBRARY_INCLUDE_FILES + vmime/* +) + +INCLUDE_DIRECTORIES( + ${CMAKE_CURRENT_SOURCE_DIR} +) + +# Automatically set lib suffix +IF(UNIX AND NOT APPLE AND NOT CMAKE_CROSSCOMPILING AND NOT EXISTS "/etc/debian_version") + IF(CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT LIB_SUFFIX) + SET(LIB_SUFFIX 64) + ENDIF() +ENDIF() + +# Shared library +ADD_LIBRARY( + ${VMIME_LIBRARY_NAME} + SHARED + ${VMIME_LIBRARY_SRC_FILES} + ${VMIME_LIBRARY_INCLUDE_FILES} +) + +SET_TARGET_PROPERTIES( + ${VMIME_LIBRARY_NAME} + PROPERTIES + VERSION "${VMIME_VERSION}" + SOVERSION "${VMIME_API_VERSION}" +) + +# Static library +# +# Note: cannot have two targets with the same name so the static version has +# '-static' appended and then the name of the output file is set separately. +ADD_LIBRARY( + ${VMIME_LIBRARY_NAME}-static + STATIC + ${VMIME_LIBRARY_SRC_FILES} + ${VMIME_LIBRARY_INCLUDE_FILES} +) + +SET_TARGET_PROPERTIES( + ${VMIME_LIBRARY_NAME}-static + PROPERTIES + OUTPUT_NAME ${VMIME_LIBRARY_NAME} +) + +# These next two lines are required but it is unclear exactly what they do. +# The CMake FAQ mentions they are necessary and it does not work otherwise. +SET_TARGET_PROPERTIES(${VMIME_LIBRARY_NAME} PROPERTIES CLEAN_DIRECT_OUTPUT 1) +SET_TARGET_PROPERTIES(${VMIME_LIBRARY_NAME}-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) + +SET(CMAKE_INSTALL_LIBDIR lib CACHE PATH "Output directory for libraries") + +# Installation of libraries +INSTALL( + TARGETS ${VMIME_LIBRARY_NAME} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT sharedlibs + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT sharedlibs +) + +INSTALL( + TARGETS ${VMIME_LIBRARY_NAME}-static + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT staticlibs + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT staticlibs +) + +# Installation of header files +INSTALL_HEADERS_WITH_DIRECTORY(VMIME_LIBRARY_INCLUDE_FILES headers) + +#INSTALL( +# FILES ${VMIME_LIBRARY_INCLUDE_FILES} +# DESTINATION include +# COMPONENT headers +#) + + +############################################################################## +# Tests + +OPTION( + VMIME_BUILD_TESTS + "Build unit tests (this will create a 'run-tests' binary)" + OFF +) + +IF(VMIME_BUILD_TESTS) + + FILE( + GLOB_RECURSE + VMIME_TESTS_SRC_FILES + tests/*Test.cpp tests/testRunner.cpp tests/testUtils.cpp + ) + + ADD_EXECUTABLE( + "run-tests" + ${VMIME_TESTS_SRC_FILES} + ) + + INCLUDE(cmake/FindCppUnit.cmake) + + INCLUDE_DIRECTORIES(${CPPUNIT_INCLUDE_DIR}) + + TARGET_LINK_LIBRARIES( + "run-tests" + ${VMIME_LIBRARY_NAME} + ${CPPUNIT_LIBRARY} + ) + + ADD_DEPENDENCIES( + "run-tests" + ${VMIME_LIBRARY_NAME} + ) + +ENDIF() + + +############################################################################## +# Packaging / Distribution + +# Package information +SET(VMIME_PACKAGE_NAME ${VMIME_LIBRARY_NAME}) +SET(VMIME_PACKAGE_VERSION ${VMIME_VERSION}) +SET(VMIME_PACKAGE_CONTACT "Vincent Richard ") +SET(VMIME_PACKAGE_DESCRIPTION "VMime C++ Mail Library (http://www.vmime.org)") + +SET(CPACK_PACKAGE_NAME "${VMIME_PACKAGE_NAME}") +SET(CPACK_PACKAGE_CONTACT "${VMIME_PACKAGE_CONTACT}") +SET(CPACK_PACKAGE_DESCRIPTION "${VMIME_PACKAGE_DESCRIPTION}") +SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${CPACK_PACKAGE_DESCRIPTION}") +SET(CPACK_PACKAGE_VERSION "${VMIME_PACKAGE_VERSION}") + +# Package settings +SET(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/COPYING) + +IF(APPLE) + # CPack/PackageManager won't allow file without recognized extension + # to be used as license file. + CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/COPYING" "${CMAKE_BINARY_DIR}/COPYING.txt" COPYONLY) + SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_BINARY_DIR}/COPYING.txt") +ELSE() + SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING") +ENDIF(APPLE) + +SET(CPACK_SOURCE_GENERATOR TGZ) +SET(CPACK_SOURCE_IGNORE_FILES "\\\\.git;~$;build/") +SET(CPACK_SOURCE_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}) + +# Set components +SET(CPACK_COMPONENTS_ALL sharedlibs staticlibs headers) + +SET(CPACK_COMPONENT_SHAREDLIBS_DISPLAY_NAME "Shared libraries") +SET(CPACK_COMPONENT_SHAREDLIBS_DESCRIPTION + "Shared library for general use.") + +SET(CPACK_COMPONENT_STATICLIBS_DISPLAY_NAME "Static libraries") +SET(CPACK_COMPONENT_STATICLIBS_DESCRIPTION + "Static library, good if you want to embed VMime in your application.") + +SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ Headers") +SET(CPACK_COMPONENT_HEADERS_DESCRIPTION + "C/C++ header files.") + +SET(CPACK_COMPONENT_SHAREDLIBS_GROUP "Development") +SET(CPACK_COMPONENT_STATICLIBS_GROUP "Development") +SET(CPACK_COMPONENT_HEADERS_GROUP "Development") +SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION "") + +# Make a target "dist" to generate tarball +SET(ARCHIVE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}) + +ADD_CUSTOM_TARGET( + dist + COMMAND git archive --prefix=${ARCHIVE_NAME}/ HEAD + | bzip2 > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2 + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} +) + +# PkgConfig +SET(prefix ${CMAKE_INSTALL_PREFIX}) +SET(exec_prefix ${CMAKE_INSTALL_PREFIX}/bin) +SET(includedir ${CMAKE_INSTALL_PREFIX}/include/vmime) + +SET(VMIME_PKGCONFIG_LIBS "") +SET(VMIME_PKGCONFIG_CFLAGS "") +SET(VMIME_PKGCONFIG_REQUIRES "") + +IF(${UNIX}) + SET(libdir ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}) +ENDIF(${UNIX}) +IF(${WIN32}) + SET(libdir ${CMAKE_INSTALL_PREFIX}/bin) +ENDIF(${WIN32}) + +CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/libvmime.pc.in ${CMAKE_BINARY_DIR}/libvmime.pc @ONLY) +INSTALL(FILES ${CMAKE_BINARY_DIR}/libvmime.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig COMPONENT headers) + + +############################################################################## +# Build type + +IF(NOT CMAKE_BUILD_TYPE) + SET( + CMAKE_BUILD_TYPE + "Debug" + CACHE STRING + "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." + FORCE + ) +ENDIF(NOT CMAKE_BUILD_TYPE) + +# Set a default build type for single-configuration +# CMake generators if no build type is set. +IF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) + SET(CMAKE_BUILD_TYPE Debug) +ENDIF() + +# Debug build +MESSAGE("-- Build type: ${CMAKE_BUILD_TYPE}") +IF(${CMAKE_BUILD_TYPE} STREQUAL Debug) + ADD_DEFINITIONS(-DDEBUG) +ENDIF(${CMAKE_BUILD_TYPE} STREQUAL Debug) + + +IF(CMAKE_BUILD_TYPE STREQUAL "Debug") + SET(VMIME_DEBUG 1) +ELSE() + SET(VMIME_DEBUG 0) +ENDIF() + + +############################################################################## +# Test endianness and basic type sizes + +INCLUDE(TestBigEndian) +TEST_BIG_ENDIAN(BIGENDIAN) + +IF(BIGENDIAN EQUAL 0) + set(VMIME_BYTE_ORDER_BIG_ENDIAN 0) + set(VMIME_BYTE_ORDER_LITTLE_ENDIAN 1) +ELSE(BIGENDIAN EQUAL 0) + SET(VMIME_BYTE_ORDER_BIG_ENDIAN 1) + SET(VMIME_BYTE_ORDER_LITTLE_ENDIAN 0) +ENDIF(BIGENDIAN EQUAL 0) + +SET(VMIME_DEFAULT_8BIT_TYPE "char") +SET(VMIME_DEFAULT_16BIT_TYPE "short") +SET(VMIME_DEFAULT_32BIT_TYPE "int") + + +SET( + VMIME_8BIT_TYPE + ${VMIME_DEFAULT_8BIT_TYPE} + CACHE STRING + "The C-language 8-bit type for your platform" +) + +SET( + VMIME_16BIT_TYPE + ${VMIME_DEFAULT_16BIT_TYPE} + CACHE STRING + "The C-language 16-bit type for your platform" +) + +SET( + VMIME_32BIT_TYPE + ${VMIME_DEFAULT_32BIT_TYPE} + CACHE STRING + "The C-language 32-bit type for your platform" +) + + +INCLUDE(cmake/TargetArch.cmake) +TARGET_ARCHITECTURE(CMAKE_TARGET_ARCHITECTURES) + + +############################################################################## +# Sendmail path + +FOREACH (SENDMAIL_PATH /usr/sbin/sendmail /usr/lib/sendmail /usr/bin/sendmail /bin/sendmail /var/qmail/bin/qmail-inject /bin/cgimail) + IF(EXISTS ${SENDMAIL_PATH}) + MESSAGE(STATUS "Sendmail binary found at ${SENDMAIL_PATH}") + SET(VMIME_DEFAULT_SENDMAIL_PATH ${SENDMAIL_PATH}) + ENDIF() +ENDFOREACH(SENDMAIL_PATH) + +SET( + VMIME_SENDMAIL_PATH + ${VMIME_DEFAULT_SENDMAIL_PATH} + CACHE + STRING + "Specifies the path to sendmail binary" +) + + +############################################################################## +# Messaging features + +# Module +OPTION( + VMIME_HAVE_MESSAGING_FEATURES + "Enable messaging features (connection to IMAP, POP3, SMTP...)" + ON +) + +# Protocols +OPTION( + VMIME_HAVE_MESSAGING_PROTO_POP3 + "Enable POP3 protocol" + ON +) + +OPTION( + VMIME_HAVE_MESSAGING_PROTO_SMTP + "Enable SMTP protocol" + ON +) + +OPTION( + VMIME_HAVE_MESSAGING_PROTO_IMAP + "Enable IMAP protocol" + ON +) + +OPTION( + VMIME_HAVE_MESSAGING_PROTO_MAILDIR + "Enable Maildir protocol" + ON +) + +OPTION( + VMIME_HAVE_MESSAGING_PROTO_SENDMAIL + "Enable Sendmail protocol" + ON +) + + +############################################################################## +# File-system features + +OPTION( + VMIME_HAVE_FILESYSTEM_FEATURES + "Enable file-system features (required for file attachments and Maildir)" + ON +) + + +############################################################################## +# SASL support + +INCLUDE(cmake/FindGSasl.cmake) + +OPTION( + VMIME_HAVE_SASL_SUPPORT + "Enable SASL support (requires GNU SASL library)" + ON +) + +IF(VMIME_HAVE_SASL_SUPPORT) + + INCLUDE_DIRECTORIES( + ${INCLUDE_DIRECTORIES} + ${GSASL_INCLUDE_DIR} + ) + + TARGET_LINK_LIBRARIES( + ${VMIME_LIBRARY_NAME} + ${TARGET_LINK_LIBRARIES} + ${GSASL_LIBRARIES} + ) + + SET(VMIME_PKGCONFIG_LIBS "${VMIME_PKGCONFIG_LIBS} ${GSASL_LIBRARIES}") + SET(VMIME_PKGCONFIG_CFLAGS "${VMIME_PKGCONFIG_CFLAGS} ${GSASL_INCLUDE_DIR}") + SET(VMIME_PKGCONFIG_REQUIRES "${VMIME_PKGCONFIG_REQUIRES} libgsasl") + +ENDIF() + + +############################################################################## +# SSL/TLS support + +INCLUDE(FindGnuTLS) + + +INCLUDE(CheckFunctionExists) +SET(CMAKE_REQUIRED_LIBRARIES "${GNUTLS_LIBRARY}") +CHECK_FUNCTION_EXISTS(gnutls_priority_set_direct VMIME_HAVE_GNUTLS_PRIORITY_FUNCS) + + +OPTION( + VMIME_HAVE_TLS_SUPPORT + "SSL/TLS support (requires GNU TLS library)" + ON +) + +OPTION( + VMIME_TLS_SUPPORT_LIB_IS_GNUTLS + "Use GNU TLS library for SSL/TLS support" + ON +) + + +IF(VMIME_HAVE_TLS_SUPPORT) + + IF(VMIME_TLS_SUPPORT_LIB_IS_GNUTLS) + + INCLUDE_DIRECTORIES( + ${INCLUDE_DIRECTORIES} + ${GNUTLS_INCLUDE_DIR} + ) + + LINK_DIRECTORIES( + ${LINK_DIRECTORIES} + ${GNUTLS_LIBRARY_DIRS} + ) + + TARGET_LINK_LIBRARIES( + ${VMIME_LIBRARY_NAME} + ${TARGET_LINK_LIBRARIES} + ${GNUTLS_LIBRARY} + ) + + SET(VMIME_PKGCONFIG_LIBS "${VMIME_PKGCONFIG_LIBS} ${GNUTLS_LIBRARY_DIRS} ${GNUTLS_LIBRARY}") + SET(VMIME_PKGCONFIG_CFLAGS "${VMIME_PKGCONFIG_CFLAGS} ${GNUTLS_INCLUDE_DIR}") + SET(VMIME_PKGCONFIG_REQUIRES "${VMIME_PKGCONFIG_REQUIRES} libgnutls") + + ELSE() + + MESSAGE(FATAL_ERROR "TLS support is enabled, but no TLS/SSL library was selected/found") + + ENDIF() + +ENDIF(VMIME_HAVE_TLS_SUPPORT) + + +############################################################################## +# iconv + +INCLUDE(cmake/FindIconv.cmake) + +INCLUDE_DIRECTORIES( + ${INCLUDE_DIRECTORIES} + ${ICONV_INCLUDE_DIR} +) + +TARGET_LINK_LIBRARIES( + ${VMIME_LIBRARY_NAME} + ${TARGET_LINK_LIBRARIES} + ${ICONV_LIBRARIES} +) + + +############################################################################## +# Platform + +SET(VMIME_PLATFORM_IS_POSIX OFF) +SET(VMIME_PLATFORM_IS_WINDOWS OFF) + +IF(WIN32) + SET(VMIME_PLATFORM_IS_WINDOWS ON) +ELSE() + SET(VMIME_PLATFORM_IS_POSIX ON) +ENDIF() + + +############################################################################## +# POSIX-specific checks + +INCLUDE(CheckFunctionExists) +CHECK_FUNCTION_EXISTS(getaddrinfo VMIME_HAVE_GETADDRINFO) + +FIND_PACKAGE(Threads) +FIND_LIBRARY(PTHREAD pthread) + +IF(PTHREAD) + SET(VMIME_HAVE_PTHREAD 1) +ELSE(PTHREAD) + SET(VMIME_HAVE_PTHREAD 0) +ENDIF(PTHREAD) + + +############################################################################## +# Additional compiler flags + +IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + + SET( + CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -D_REENTRANT=1 -W -Wall -pedantic -Warray-bounds-pointer-arithmetic -Wold-style-cast -Wconversion -Wcast-align -Wno-sign-conversion" + CACHE STRING + "g++ Compiler Flags" + FORCE + ) + + SET(CMAKE_CXX_FLAGS_RELEASE "-O2") + SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g") + SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") + + #SET(CMAKE_EXE_LINKER_FLAGS "-s") + +ELSE() + + IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) + + SET( + CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -D_REENTRANT=1 -W -Wall -ansi -pedantic -Wpointer-arith -Wold-style-cast -Wconversion -Wcast-align" + CACHE STRING + "g++ Compiler Flags" + FORCE + ) + + SET(CMAKE_CXX_FLAGS_RELEASE "-O2") + SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g") + SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") + + #SET(CMAKE_EXE_LINKER_FLAGS "-s") + + ENDIF() + +ENDIF() + + +############################################################################## +# Documentation + +FIND_PACKAGE(Doxygen) + +IF(DOXYGEN_FOUND) + CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/Doxyfile.in ${CMAKE_BINARY_DIR}/Doxyfile @ONLY) + + # Make a target so that documentation can be generated by running "make doc" + ADD_CUSTOM_TARGET( + doc + ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + COMMENT "Generating API documentation with Doxygen" VERBATIM + ) +ENDIF(DOXYGEN_FOUND) + + +############################################################################## +# Sanity checks + +# Maildir protocol is available only if file-system features are enabled +IF(VMIME_HAVE_MESSAGING_FEATURES AND VMIME_HAVE_MESSAGING_PROTO_MAILDIR AND NOT VMIME_HAVE_FILESYSTEM_FEATURES) + MESSAGE(FATAL_ERROR "Maildir protocol requires file-system support (VMIME_HAVE_FILESYSTEM_FEATURES must be set to ON).") +ENDIF() + +# Path to 'sendmail' must be specified if Sendmail protocol is enabled +IF(VMIME_HAVE_MESSAGING_PROTO_SENDMAIL) + IF(NOT VMIME_SENDMAIL_PATH OR VMIME_SENDMAIL_PATH STREQUAL "") + MESSAGE(FATAL_ERROR "Enabling Sendmail protocol requires that you specify path to 'sendmail' binary.") + ENDIF() +ENDIF() + + +# Set our configure file +CONFIGURE_FILE(cmake/config.hpp.cmake vmime/config.hpp) + +INCLUDE(CPack) + diff --git a/Doxyfile.in b/Doxyfile.in new file mode 100644 index 00000000..4b9d5e49 --- /dev/null +++ b/Doxyfile.in @@ -0,0 +1,1043 @@ +# +# Doxygen settings for VMime +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") +# + +#--------------------------------------------------------------------------- +# General configuration options +#--------------------------------------------------------------------------- + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = VMime + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@/doc/ + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, +# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en +# (Japanese with english messages), Korean, Norwegian, Polish, Portuguese, +# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish and Ukrainian. + +OUTPUT_LANGUAGE = English + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these class will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = YES + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +#HIDE_IN_BODY_DOCS = NO + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = NO + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited +# members of a class in the documentation of that class as if those members were +# ordinary class members. Constructors, destructors and assignment operators of +# the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. It is allowed to use relative paths in the argument list. + +STRIP_FROM_PATH = + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower case letters. If set to YES upper case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# users are adviced to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = YES + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like the Qt-style comments (thus requiring an +# explict @brief command for a brief description. + +JAVADOC_AUTOBRIEF = YES + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# will output the detailed description near the top, like JavaDoc. +# If set to NO, the detailed description appears after the member +# documentation. + +DETAILS_AT_TOP = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# reimplements. + +INHERIT_DOCS = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = NO + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 4 + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consist of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. +# For instance some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources +# only. Doxygen will then generate output that is more tailored for Java. +# For instance namespaces will be presented as packages, qualified scopes +# will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = YES + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +#WARN_IF_DOC_ERROR = YES + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = @CMAKE_CURRENT_SOURCE_DIR@/src/ @CMAKE_CURRENT_SOURCE_DIR@/vmime/ + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp +# *.h++ *.idl *.odl + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories +# that are symbolic links (a Unix filesystem feature) are excluded from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. + +EXCLUDE_PATTERNS = */config.hpp */IMAPTag* */IMAPParser* */IMAPUtils* */IMAPConnection* */md5* */smartPtr* */authHelper* */maildirUtils* + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. + +INPUT_FILTER = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. + +SOURCE_BROWSER = NO +# YES --> sources visibles + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 1 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output dir. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non empty doxygen will try to run +# the html help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the Html help documentation and to the tree view. + +TOC_EXPAND = NO + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript and frames is required (for instance Mozilla, Netscape 4.0+, +# or Internet explorer 4.0+). Note that for large projects the tree generation +# can take a very long time. In such cases it is better to disable this feature. +# Windows users are probably better off using the HTML help feature. + +GENERATE_TREEVIEW = YES + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 300 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = NO + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimised for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assigments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_XML = NO + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +#GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +#PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +#PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +#PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = YES + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_PREDEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. + +PREDEFINED = VMIME_BUILDING_DOC VMIME_HAVE_SASL_SUPPORT VMIME_HAVE_TLS_SUPPORT + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse the +# parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::addtions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES tag can be used to specify one or more tagfiles. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or +# super classes. Setting the tag to NO turns the diagrams off. Note that this +# option is superceded by the HAVE_DOT option below. This is only a fallback. It is +# recommended to install and use dot, since it yield more powerful graphs. + +CLASS_DIAGRAMS = YES + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = YES + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found on the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_WIDTH = 1024 + +# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_HEIGHT = 1024 + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermedate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES + +#--------------------------------------------------------------------------- +# Configuration::addtions related to the search engine +#--------------------------------------------------------------------------- + +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. + +SEARCHENGINE = NO + +# The CGI_NAME tag should be the name of the CGI script that +# starts the search engine (doxysearch) with the correct parameters. +# A script with this name will be generated by doxygen. + +#CGI_NAME = search.cgi + +# The CGI_URL tag should be the absolute URL to the directory where the +# cgi binaries are located. See the documentation of your http daemon for +# details. + +#CGI_URL = + +# The DOC_URL tag should be the absolute URL to the directory where the +# documentation is located. If left blank the absolute path to the +# documentation, with file:// prepended to it, will be used. + +#DOC_URL = + +# The DOC_ABSPATH tag should be the absolute path to the directory where the +# documentation is located. If left blank the directory on the local machine +# will be used. + +#DOC_ABSPATH = + +# The BIN_ABSPATH tag must point to the directory where the doxysearch binary +# is installed. + +#BIN_ABSPATH = /usr/local/bin/ + +# The EXT_DOC_PATHS tag can be used to specify one or more paths to +# documentation generated for other projects. This allows doxysearch to search +# the documentation for these projects as well. + +#EXT_DOC_PATHS = + diff --git a/README.autotools b/README.autotools index 4b83a222..a67c1c8d 100644 --- a/README.autotools +++ b/README.autotools @@ -1,8 +1,13 @@ Where are the ./configure script and the Makefile's? Configure and Make scripts are not included in the git source tree. They are -automatically generated by the SConstruct script. +automatically generated by the CMake script. -Just type "scons autotools" to generate everything needed for the traditional -./configure, make, make install build process. +Just use the following instruction to generate everything needed for the +traditional "make" and "make install" build process. + + cmake -G "Unix Makefiles" + +Please note that "configure" script is not needed anymore, as platform +checks are now done by CMake. diff --git a/SConstruct b/SConstruct index 1f3c7c98..0415ed79 100644 --- a/SConstruct +++ b/SConstruct @@ -1,6 +1,8 @@ # -# SConstruct -# libvmime build script +# SConstruct file for VMime +# +# Deprecated: use only for development purpose. +# Use CMake for distribution/packaging. # # Process this file with 'scons' to build the project. # For more information, please visit: http://www.scons.org/ . @@ -10,8 +12,6 @@ # . scons build the library # . scons -h see available configuration options # . scons opt=value set a configuration option -# . scons install install library and include files (as root) -# . scons dist build a source package (.tar.bz2) # . scons doc build documentation for the project (Doxygen) # @@ -26,43 +26,16 @@ import string # Version # ############# -# Package version number -packageVersionMajor = 0 -packageVersionMinor = 9 -packageVersionMicro = 2 - -# API version number (libtool) -# -# Increment this number only immediately before a public release. -# This is independent from package version number. -# -# See: http://www.gnu.org/software/libtool/manual.html#Libtool-versioning -# -# . Implementation changed (eg. bug/security fix): REVISION++ -# . Interfaces added/removed/changed: CURRENT++, REVISION=0 -# . Interfaces added (upward-compatible changes): AGE++ -# . Interfaces removed: AGE=0 -# -packageAPICurrent = 0 -packageAPIRevision = 0 -packageAPIAge = 0 - # Package information packageName = 'libvmime' packageGenericName = 'vmime' packageRealName = 'VMime Library' packageDescription = 'VMime C++ Mail Library (http://www.vmime.org)' -packageMaintainer = 'vincent@vincent-richard.net' +packageMaintainer = 'vincent@vmime.org' -packageVersion = '%d.%d.%d' % (packageVersionMajor, packageVersionMinor, packageVersionMicro) -packageAPI = '%d:%d:%d' % (packageAPICurrent, packageAPIRevision, packageAPIAge) +packageVersion = '0.0.0' +packageAPI = '0:0:0' -#if packageVersionMajor >= 2: -# packageVersionedGenericName = packageGenericName + ('%d' % packageVersionMajor) -# packageVersionedName = packageName + ('%d' % packageVersionMajor) -#else: -# packageVersionedGenericName = packageGenericName -# packageVersionedName = packageName packageVersionedGenericName = packageGenericName packageVersionedName = packageName @@ -489,7 +462,7 @@ opts.AddVariables( EnumVariable( 'debug', 'Debug version (useful for developers only)', - 'no', + 'yes', allowed_values = ('yes', 'no'), map = { }, ignorecase = 1 @@ -832,7 +805,8 @@ else: config_hpp.write('// -- TLS/SSL support\n') if env['with_tls'] == 'yes': config_hpp.write('#define VMIME_HAVE_TLS_SUPPORT 1\n') - config_hpp.write('#define HAVE_GNUTLS_PRIORITY_FUNCS 1\n') + config_hpp.write('#define VMIME_TLS_SUPPORT_LIB_IS_GNUTLS 1\n') + config_hpp.write('#define VMIME_HAVE_GNUTLS_PRIORITY_FUNCS 1\n') else: config_hpp.write('#define VMIME_HAVE_TLS_SUPPORT 0\n') @@ -840,30 +814,28 @@ config_hpp.write('// -- Messaging support\n') if env['with_messaging'] == 'yes': config_hpp.write('#define VMIME_HAVE_MESSAGING_FEATURES 1\n') - config_hpp.write('// -- Built-in messaging protocols\n') - config_hpp.write('#define VMIME_BUILTIN_MESSAGING_PROTOS "' + - string.replace(env['with_messaging_protocols'], '"', '') + '"\n') + config_hpp.write('// -- Messaging protocols\n') for proto in messaging_protocols: - config_hpp.write('#define VMIME_BUILTIN_MESSAGING_PROTO_' + string.upper(proto) + ' 1\n') + config_hpp.write('#define VMIME_HAVE_MESSAGING_PROTO_' + string.upper(proto) + ' 1\n') for p in libvmime_messaging_proto_sources: proto = p[0] if not proto in messaging_protocols: - config_hpp.write('#define VMIME_BUILTIN_MESSAGING_PROTO_' + string.upper(proto) + ' 0\n') + config_hpp.write('#define VMIME_HAVE_MESSAGING_PROTO_' + string.upper(proto) + ' 0\n') else: config_hpp.write('#define VMIME_HAVE_MESSAGING_FEATURES 0\n') -config_hpp.write('// -- Built-in platform handlers\n') -config_hpp.write('#define VMIME_BUILTIN_PLATFORMS "' + - string.replace(env['with_platforms'], '"', '') + '"\n') - +config_hpp.write('// -- Platform-specific code\n') for platform in platforms: - config_hpp.write('#define VMIME_BUILTIN_PLATFORM_' + string.upper(platform) + ' 1\n') + config_hpp.write('#define VMIME_PLATFORM_IS_' + string.upper(platform) + ' 1\n') for platform in libvmime_platforms_sources: if not platform in platforms: - config_hpp.write('#define VMIME_BUILTIN_PLATFORM_' + string.upper(platform) + ' 0\n') + config_hpp.write('#define VMIME_PLATFORM_IS_' + string.upper(platform) + ' 0\n') + +config_hpp.write('#define VMIME_HAVE_GETADDRINFO 1\n') +config_hpp.write('#define VMIME_HAVE_PTHREAD 1\n') config_hpp.write('\n') config_hpp.write('// Miscellaneous flags\n') @@ -873,11 +845,6 @@ if IsProtocolSupported(messaging_protocols, 'sendmail'): config_hpp.write(""" -// Additional defines -#define VMIME_HAVE_GETADDRINFO 1 -#define VMIME_HAVE_PTHREAD 1 - - #endif // VMIME_CONFIG_HPP_INCLUDED """) @@ -994,1413 +961,6 @@ if env['build_tests'] == 'yes': Exit(1) -######################## -# Installation rules # -######################## - -libDir = "%s/lib" % env['prefix'] -#includeDir = "%s/include/%s/vmime" % (env['prefix'], packageVersionedGenericName) -includeDir = "%s/include/vmime" % env['prefix'] - -installPaths = [libDir, includeDir] - -# Library -env.Install(libDir, libVmime) - -# Header files -for i in range(len(libvmime_install_includes)): - env.Install(includeDir + '/' + libvmime_install_includes[i][0], libvmime_install_includes[i][1]) - -# Configuration header file -env.Install(includeDir, 'vmime/config.hpp') - -# Pkg-config support -vmime_pc = open(packageVersionedGenericName + ".pc", 'w') - -vmime_pc_requires = '' -vmime_pc_libs = '' - -if env['with_sasl'] == 'yes': - vmime_pc_requires = vmime_pc_requires + "libgsasl " - vmime_pc_libs = vmime_pc_libs + "-lgsasl " - -vmime_pc.write("prefix=" + env['prefix'] + "\n") -vmime_pc.write("exec_prefix=" + env['prefix'] + "\n") -vmime_pc.write("libdir=" + env['prefix'] + "/lib\n") -vmime_pc.write("includedir=" + env['prefix'] + "/include\n") -vmime_pc.write("\n") -vmime_pc.write("Name: " + packageRealName + "\n") -vmime_pc.write("Description: " + packageDescription + "\n") -vmime_pc.write("Version: " + packageVersion + "\n") -vmime_pc.write("Requires: " + vmime_pc_requires + "\n") -vmime_pc.write("Libs: -L${libdir} -l" + packageVersionedGenericName + " " + vmime_pc_libs + "\n") -#vmime_pc.write("Cflags: -I${includedir}/" + packageVersionedGenericName + "\n") -vmime_pc.write("Cflags: -I${includedir}/" + "\n") - -vmime_pc.close() - -env.Install(libDir + "/pkgconfig", packageVersionedGenericName + ".pc") - -# Provide "install" target (ie. 'scons install') -env.Alias('install', installPaths) - - -################################ -# Generate autotools scripts # -################################ - -# Return the path of the specified filename. -# Example: getPath("a/b/c/myfile") will return "a/b/c" -def getPath(s): - x = s.rfind('/') - if x != -1: - return s[0:x] - else: - return "" - -def getParentPath(s): - return getPath(s) - -def getLastDir(s): - x = s.rfind('/') - if x != -1: - return s[x + 1:len(s)] - else: - return s - -def buildMakefileFileList(l, replaceSlash): - s = '' - - for i in range(len(l)): - if i != 0: - s += ' \\\n\t' - f = l[i] - if replaceSlash: - f = string.replace(f, "/", "_") - s += f - - return s - -def selectFilesFromSuffixNot(l, ext): - r = [] - n = len(ext) - - for f in l: - if f[-n:] != ext: - r.append(f) - - return r - -def generateAutotools(target, source, env): - # Generate pkg-config file for shared and static library - vmime_pc_in = open(packageVersionedGenericName + ".pc.in", 'w') - vmime_pc_in.write("# File automatically generated by SConstruct ('scons autotools')\n") - vmime_pc_in.write("# DO NOT EDIT!\n") - vmime_pc_in.write("\n") - vmime_pc_in.write("prefix=@prefix@\n") - vmime_pc_in.write("exec_prefix=@exec_prefix@\n") - vmime_pc_in.write("libdir=@libdir@\n") - vmime_pc_in.write("includedir=@includedir@\n") - vmime_pc_in.write("\n") - vmime_pc_in.write("Name: @GENERIC_LIBRARY_NAME@\n") - vmime_pc_in.write("Description: " + packageDescription + "\n") - vmime_pc_in.write("Version: @VERSION@\n") - vmime_pc_in.write("Requires: @GSASL_REQUIRED@\n") - vmime_pc_in.write("Libs: -L${libdir} -l@GENERIC_VERSIONED_LIBRARY_NAME@ @GSASL_LIBS@ @LIBGNUTLS_LIBS@ @LIBICONV@ @PTHREAD_LIBS@ @LIBICONV@ @PTHREAD_LIBS@ @VMIME_ADDITIONAL_PC_LIBS@\n") - #vmime_pc_in.write("Cflags: -I${includedir}/@GENERIC_VERSIONED_LIBRARY_NAME@\n") - vmime_pc_in.write("Cflags: -I${includedir}/ @LIBGNUTLS_CFLAGS@\n") - vmime_pc_in.close() - - # Generate 'Makefile.am' - Makefile_am = open("Makefile.am", 'w') - Makefile_am.write(""" -# File automatically generated by SConstruct ('scons autotools') -# DO NOT EDIT! - -BINDING = -INCLUDE = vmime -#examples tests - -SUBDIRS = src $(INCLUDE) $(BINDING) - -DIST_SUBDIRS = $(SUBDIRS) autotools - -#AUTOMAKE_OPTIONS = dist-bzip2 -AUTOMAKE_OPTIONS = no-dist - -pkgconfigdir = $(VMIME_PKGCONFIGDIR) -pkgconfig_DATA = $(GENERIC_VERSIONED_LIBRARY_NAME).pc - -EXTRA_DIST=SConstruct bootstrap - -dist: - @ echo "" - @ echo "Please use 'scons dist' to generate distribution tarball." - @ echo "" - -doc_DATA = AUTHORS ChangeLog COPYING INSTALL NEWS README -docdir = $(datadir)/doc/$(GENERIC_LIBRARY_NAME) -""") - Makefile_am.close() - - # Generate Makefile for header files - Makefile_am = open("vmime/Makefile.am", 'w') - Makefile_am.write(""" -# File automatically generated by SConstruct ('scons autotools') -# DO NOT EDIT! -""") - - #Makefile_am.write(packageVersionedName + "includedir = $(prefix)/include/@GENERIC_VERSIONED_LIBRARY_NAME@/@GENERIC_LIBRARY_NAME@\n") - Makefile_am.write(packageVersionedName + "includedir = $(prefix)/include/@GENERIC_LIBRARY_NAME@\n") - Makefile_am.write("nobase_" + packageVersionedName + "include_HEADERS = ") - - x = [] - - for file in libvmime_all_sources: - if file[-4:] == '.hpp': - x.append(file[len("vmime/"):]) # remove 'vmime/' prefix - - x.append("config.hpp") - - Makefile_am.write(buildMakefileFileList(x, 0)) - Makefile_am.close() - - # Generate 'src/Makefile.am' (Makefile for source files) - Makefile_am = open("src/Makefile.am", 'w') - Makefile_am.write(""" -# File automatically generated by SConstruct ('scons autotools') -# DO NOT EDIT! - -AUTOMAKE_OPTIONS = no-dependencies foreign -INTERNALS = -INCLUDES = -I$(prefix)/include -I$(top_srcdir) @PKGCONFIG_CFLAGS@ @EXTRA_CFLAGS@ -""") - - Makefile_am.write('lib_LTLIBRARIES = ' + packageVersionedName + '.la\n') - Makefile_am.write(packageVersionedName + '_la_LDFLAGS = -export-dynamic -version-info ' -# + '@LIBRARY_VERSION@ -release @LIBRARY_RELEASE@ @PKGCONFIG_LIBS@ @EXTRA_LIBS@\n') - + '@LIBRARY_VERSION@ @PKGCONFIG_LIBS@ @EXTRA_LIBS@\n') - - sourceFiles = [] # for conversion: subpath/file.cpp --> subpath_file.cpp - # used to avoid collision when two files have the same name if different dirs - - # -- base library - x = selectFilesFromSuffixNot(libvmime_sources, '.hpp') - sourceFiles += x - - Makefile_am.write(packageVersionedName + "_la_SOURCES = " + buildMakefileFileList(x, 1) + "\n") - - # -- messaging module - x = selectFilesFromSuffixNot(libvmime_messaging_sources, '.hpp') - sourceFiles += x - - Makefile_am.write("\n") - Makefile_am.write("if VMIME_HAVE_MESSAGING_FEATURES\n") - Makefile_am.write(packageVersionedName + "_la_SOURCES += " + buildMakefileFileList(x, 1) + "\n") - Makefile_am.write("endif\n") - - # -- messaging protocols - for proto in libvmime_messaging_proto_sources: - Makefile_am.write("\n") - Makefile_am.write("if VMIME_BUILTIN_MESSAGING_PROTO_" + string.upper(proto[0]) + "\n") - - x = selectFilesFromSuffixNot(proto[1], '.hpp') - sourceFiles += x - - Makefile_am.write(packageVersionedName + "_la_SOURCES += " + buildMakefileFileList(x, 1) + "\n") - Makefile_am.write("endif\n") - - # -- SASL support - x = selectFilesFromSuffixNot(libvmime_security_sasl_sources, '.hpp') - sourceFiles += x - - Makefile_am.write("\n") - Makefile_am.write("if VMIME_HAVE_SASL_SUPPORT\n") - Makefile_am.write(packageVersionedName + "_la_SOURCES += " + buildMakefileFileList(x, 1) + "\n") - Makefile_am.write("endif\n") - - # -- TLS support - x = selectFilesFromSuffixNot(libvmime_net_tls_sources, '.hpp') - sourceFiles += x - - Makefile_am.write("\n") - Makefile_am.write("if VMIME_HAVE_TLS_SUPPORT\n") - Makefile_am.write(packageVersionedName + "_la_SOURCES += " + buildMakefileFileList(x, 1) + "\n") - Makefile_am.write("endif\n") - - # -- platform handlers - for platform in libvmime_platforms_sources: - Makefile_am.write("\n") - Makefile_am.write("if VMIME_BUILTIN_PLATFORM_" + string.upper(platform) + "\n") - - x = selectFilesFromSuffixNot(libvmime_platforms_sources[platform], '.hpp') - sourceFiles += x - - Makefile_am.write(packageVersionedName + "_la_SOURCES += " + buildMakefileFileList(x, 1) + "\n") - Makefile_am.write("endif\n") - - Makefile_am.write(""" - -noinst_HEADERS = $(INTERNALS) - -""") - - for f in sourceFiles: # symbolic links to avoid filename collision - a = f - b = string.replace(f, "/", "_") - if a != b: - Makefile_am.write(b + ": " + a + "\n\tln -sf $< $@\n\n") - - Makefile_am.close() - - # Generate 'configure.in' - configure_in = open("configure.in", 'w') - configure_in.write(""" -# configure.in - -# File automatically generated by SConstruct ('scons autotools') -# DO NOT EDIT! - -# Init -""") - - configure_in.write("AC_INIT([" + packageRealName - + "], [" + packageVersion + "], [" + packageMaintainer - + "], [" + packageGenericName + "])") - configure_in.write(""" - -AC_PREREQ([2.53]) - -AC_CONFIG_AUX_DIR(autotools) - -# Library name -GENERIC_LIBRARY_NAME=""" + '"' + packageGenericName + '"' + """ -AC_SUBST(GENERIC_LIBRARY_NAME) - -GENERIC_VERSIONED_LIBRARY_NAME=""" + '"' + packageVersionedGenericName + '"' + """ -AC_SUBST(GENERIC_VERSIONED_LIBRARY_NAME) - -LIBRARY_NAME=""" + '"' + packageName + '"' + """ -AC_SUBST(LIBRARY_NAME) - -""") - - configure_in.write('# Library version\n') - configure_in.write('LIBRARY_VERSION="' + str(packageAPICurrent) - + ':' + str(packageAPIRevision) + ':' + str(packageAPIAge) + '"\n') - configure_in.write('AC_SUBST(LIBRARY_VERSION)\n') - configure_in.write('\n') - configure_in.write('LIBRARY_RELEASE="' + str(packageVersionMajor) + '"\n') - configure_in.write('AC_SUBST(LIBRARY_RELEASE)\n') - - configure_in.write(""" - -# -# Miscellaneous init stuff -# - -AC_CANONICAL_HOST -AC_CANONICAL_TARGET - -AM_INIT_AUTOMAKE(""" + packageGenericName + """, """ + packageVersion + """) -AC_CONFIG_SRCDIR([src/base.cpp]) -AM_CONFIG_HEADER([config.h]) - -AM_MAINTAINER_MODE - -VMIME_ADDITIONAL_DEFINES="" -VMIME_ADDITIONAL_PC_LIBS="" - - -# -# Check compilers, processors, etc -# - -AC_PROG_CC -AC_PROG_CXX -AC_PROG_CPP -AC_C_CONST -AC_C_INLINE -AC_HEADER_STDC -AC_HEADER_STDBOOL -AC_HEADER_DIRENT -AC_HEADER_TIME -AC_C_CONST - -AC_LANG(C++) - -AC_PROG_INSTALL -AC_PROG_MAKE_SET -AC_PROG_LN_S -AC_PROG_LIBTOOL - -OST_LIB_PTHREAD # from GNU Commons C++ - -AM_SANITY_CHECK -AM_PROG_LIBTOOL -AM_PROG_CC_C_O - -AM_ICONV - - -# -# Some checks -# - -# -- iconv -AC_MSG_CHECKING([if an usable version of iconv exists (required)]) - -if test "x$am_cv_func_iconv" = "xyes"; then - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) - AC_ERROR(no usable version of iconv has been found) -fi - -# -- global constructors (stolen from 'configure.in' in libsigc++) -AC_MSG_CHECKING([if linker supports global constructors]) -cat > mylib.$ac_ext < - -struct A -{ - A() { printf(\"PASS\\n\"); } -}; - -A a; - -int foo() - { return 1; } - -EOF -cat > mytest.$ac_ext < - -extern int foo(); - -int main(int, char**) -{ - int i = foo(); - if(i != 1) printf(\"FAIL\\n\"); - return 0; -} - -EOF -sh libtool --mode=compile $CXX -c mylib.$ac_ext >&5 -sh libtool --mode=link $CXX -o libtest.la -rpath / -version-info 0 mylib.lo >&5 -$CXX -c $CFLAGS $CPPFLAGS mytest.$ac_ext >&5 -sh libtool --mode=link $CXX -o mytest mytest.o libtest.la >&5 2>/dev/null - -if test -x mytest -a "$cross_compiling" != yes; then - myresult=`./mytest` - if test "X$myresult" = "XPASS"; then - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - AC_ERROR([ -=================================================================== -ERROR: This platform lacks support of construction of global -objects in shared libraries. - -See ftp://rtfm.mit.edu/pub/usenet/news.answers/g++-FAQ/plain -for details about this problem. Also for possible solutions -http://www.informatik.uni-frankfurt.de/~fp/Tcl/tcl-c++/tcl-c++.html -===================================================================]) - fi -else - AC_MSG_RESULT(unknown) -fi -rm -f mylib.* mytest.* libtest.la .libs/libtest* mytest .libs/mytest .libs/lt-mytest .libs/mylib.* >&5 -rmdir .libs >&5 - -# -- const_cast -AC_MSG_CHECKING([if C++ compiler supports const_cast<> (required)]) -AC_TRY_COMPILE( -[ - class foo; -],[ - const foo *c=0; - foo *c1=const_cast(c); -],[ - AC_MSG_RESULT(yes) -],[ - AC_MSG_RESULT(no) - AC_ERROR(C++ compiler const_cast<> does not work) -]) - -# -- dynamic_cast -AC_MSG_CHECKING([if C++ compiler supports dynamic_cast<> (required)]) -AC_TRY_COMPILE( -[ - class foo { public: virtual ~foo() { } }; - class bar : public foo { public: virtual ~bar() { } }; -],[ - foo *c=0; - bar *c1=dynamic_cast(c); -],[ - AC_MSG_RESULT(yes) -],[ - AC_MSG_RESULT(no) - AC_ERROR(C++ compiler dynamic_cast<> does not work) -]) - -# -- mutable -AC_MSG_CHECKING(if C++ compiler supports mutable (required)) -AC_TRY_COMPILE( -[ -class k { - mutable char *c; -public: - void foo() const { c=0; } -}; -],[ -],[ - AC_MSG_RESULT(yes) -],[ - AC_MSG_RESULT(no) - AC_ERROR(C++ compiler does not support 'mutable') -]) - -# -- namespace -AC_MSG_CHECKING(if C++ compiler supports name spaces (required)) -AC_TRY_COMPILE( -[ -namespace Check - { - int i; - } -],[ - Check::i=1; -],[ - AC_MSG_RESULT(yes) -],[ - AC_MSG_RESULT(no) - AC_ERROR(C++ compiler does not support 'namespace') -]) - - -# -# Target OS and architecture -# - -VMIME_TARGET_ARCH=${target_cpu} -VMIME_TARGET_OS=${target_os} - -# -# Byte Order -# - -AC_C_BIGENDIAN - -if test "x$ac_cv_c_bigendian" = "xyes"; then - VMIME_BYTE_ORDER_BIG_ENDIAN=1 - VMIME_BYTE_ORDER_LITTLE_ENDIAN=0 -else - VMIME_BYTE_ORDER_BIG_ENDIAN=0 - VMIME_BYTE_ORDER_LITTLE_ENDIAN=1 -fi - - -# -# Generic Type Size -# - -AC_CHECK_SIZEOF(char) -AC_CHECK_SIZEOF(short) -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(long) - -case 1 in -$ac_cv_sizeof_char) - VMIME_TYPE_INT8=char - ;; -*) - AC_MSG_ERROR([no 8-bit type available]) -esac - -case 2 in -$ac_cv_sizeof_short) - VMIME_TYPE_INT16=short - ;; -$ac_cv_sizeof_int) - VMIME_TYPE_INT16=int - ;; -*) - AC_MSG_ERROR([no 16-bit type available]) -esac - -case 4 in -$ac_cv_sizeof_int) - VMIME_TYPE_INT32=int - ;; -$ac_cv_sizeof_long) - VMIME_TYPE_INT32=long - ;; -*) - AC_MSG_ERROR([no 32-bit type available]) -esac - - -# -# Options -# - -# ** debug - -AC_ARG_ENABLE(debug, - AC_HELP_STRING([--enable-debug], [Turn on debugging, default: disabled]), - [case "${enableval}" in - yes) conf_debug=yes ;; - no) conf_debug=no ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; - esac], - [conf_debug=no]) - -if test "x$conf_debug" = "xyes"; then - AM_CONDITIONAL(VMIME_DEBUG, true) - VMIME_DEBUG=1 -else - AM_CONDITIONAL(VMIME_DEBUG, false) - VMIME_DEBUG=0 -fi - -# ** messaging - -AC_ARG_ENABLE(messaging, - AC_HELP_STRING([--enable-messaging], [Enable messaging support and connection to mail servers, default: enabled]), - [case "${enableval}" in - yes) conf_messaging=yes ;; - no) conf_messaging=no ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-messaging) ;; - esac], - [conf_messaging=yes]) - -if test "x$conf_messaging" = "xyes"; then - AM_CONDITIONAL(VMIME_HAVE_MESSAGING_FEATURES, true) - VMIME_HAVE_MESSAGING_FEATURES=1 -else - AM_CONDITIONAL(VMIME_HAVE_MESSAGING_FEATURES, false) - VMIME_HAVE_MESSAGING_FEATURES=0 -fi - -# ** SASL - -AC_ARG_ENABLE(sasl, - AC_HELP_STRING([--enable-sasl], [Enable SASL support with GNU SASL, default: enabled]), - [case "${enableval}" in - yes) conf_sasl=yes ;; - no) conf_sasl=no ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-sasl) ;; - esac], - [conf_sasl=yes]) - -if test "x$conf_sasl" = "xyes"; then - # -- GNU SASL Library (http://www.gnu.org/software/gsasl/) - AC_CHECK_HEADER(gsasl.h, - AC_CHECK_LIB(gsasl, gsasl_check_version, - [have_gsasl=yes AC_SUBST(GSASL_AVAIL_LIBS, -lgsasl) AC_SUBST(GSASL_AVAIL_REQUIRED, libgsasl)], - have_gsasl=no), - have_gsasl=no) - - if test "x$have_gsasl" = "xyes"; then - AM_CONDITIONAL(VMIME_HAVE_SASL_SUPPORT, true) - VMIME_HAVE_SASL_SUPPORT=1 - - GSASL_REQUIRED=${GSASL_AVAIL_REQUIRED} - GSASL_LIBS=${GSASL_AVAIL_LIBS} - else - AC_MSG_ERROR(can't find an usable version of GNU SASL library) - fi -else - AM_CONDITIONAL(VMIME_HAVE_SASL_SUPPORT, false) - VMIME_HAVE_SASL_SUPPORT=0 - - GSASL_REQUIRED= - GSASL_LIBS= -fi - -AC_SUBST(GSASL_REQUIRED) -AC_SUBST(GSASL_LIBS) - -# ** TLS - -AC_ARG_ENABLE(tls, - AC_HELP_STRING([--enable-tls], [Enable TLS/SSL support with GNU TLS, default: enabled]), - [case "${enableval}" in - yes) conf_tls=yes ;; - no) conf_tls=no ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-tls) ;; - esac], - [conf_tls=yes]) - -if test "x$conf_tls" = "xyes"; then - # -- GNU TLS Library (http://www.gnu.org/software/gnutls/) - PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 1.2.0], have_gnutls=yes, have_gnutls=no) - - if test "x$have_gnutls" = "xyes"; then - AM_CONDITIONAL(VMIME_HAVE_TLS_SUPPORT, true) - VMIME_HAVE_TLS_SUPPORT=1 - else - AC_MSG_ERROR(can't find an usable version of GNU TLS library) - fi - - # -- check for gnutls_priority_set_direct() function - if test "x$have_gnutls" = "xyes"; then - AC_MSG_CHECKING(for gnutls_priority_set_direct) - - LIBS_save="$LIBS" - LIBS="$LIBS $LIBGNUTLS_LIBS" - CPPFLAGS_save="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $LIBGNUTLS_CFLAGS" - - AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], - [gnutls_session s; gnutls_priority_set_direct(s, NULL, NULL);])], - [have_gnutls_priority_funcs=yes], - [have_gnutls_priority_funcs=no]) - - CPPFLAGS="$CPPFLAGS_save" - LIBS="$LIBS_save" - - AC_MSG_RESULT([$have_gnutls_priority_funcs]) - - if test "x$have_gnutls_priority_funcs" = "xyes"; then - AM_CONDITIONAL(HAVE_GNUTLS_PRIORITY_FUNCS, true) - HAVE_GNUTLS_PRIORITY_FUNCS=1 - else - AM_CONDITIONAL(HAVE_GNUTLS_PRIORITY_FUNCS, false) - HAVE_GNUTLS_PRIORITY_FUNCS=0 - fi - else - AM_CONDITIONAL(HAVE_GNUTLS_PRIORITY_FUNCS, false) - HAVE_GNUTLS_PRIORITY_FUNCS=0 - fi -else - AM_CONDITIONAL(VMIME_HAVE_TLS_SUPPORT, false) - VMIME_HAVE_TLS_SUPPORT=0 - - AM_CONDITIONAL(HAVE_GNUTLS_PRIORITY_FUNCS, false) - HAVE_GNUTLS_PRIORITY_FUNCS=0 -fi - -AC_SUBST(LIBGNUTLS_CFLAGS) -AC_SUBST(LIBGNUTLS_LIBS) - -# ** platform handlers - -VMIME_BUILTIN_PLATFORMS='' -VMIME_DETECT_PLATFORM='' - -case "x${target_os}" in -xwin* | xmingw* | xcygwin*) - VMIME_DETECT_PLATFORM='windows' - ;; -x*) - # Default is POSIX - VMIME_DETECT_PLATFORM='posix' - ;; -esac - -# ** messaging protocols - -VMIME_BUILTIN_MESSAGING_PROTOS='' - -""") - - for proto in libvmime_messaging_proto_sources: - p = proto[0] - - configure_in.write("AC_ARG_ENABLE(messaging-proto-" + p + ",\n") - configure_in.write(" AC_HELP_STRING([--enable-messaging-proto-" + p - + "], [Enable built-in support for protocol '" + p + "'" - + ", default: enabled]),\n") - configure_in.write(' [case "${enableval}" in\n') - configure_in.write(' yes) conf_messaging_proto_' + p + '=yes ;;\n') - configure_in.write(' no) conf_messaging_proto_' + p + '=no ;;\n') - configure_in.write(' *) AC_MSG_ERROR(bad value ${enableval} for ' - + '--enable-messaging-proto-' + p + ') ;;\n') - configure_in.write(' esac],\n') - configure_in.write(' [conf_messaging_proto_' + p + '=yes])\n') - - configure_in.write('if test "x$conf_messaging_proto_' + p + '" = "xyes"; then\n') - - if p == 'sendmail': # sendmail only on POSIX platforms - configure_in.write('if test "x$VMIME_DETECT_PLATFORM" = "xposix"; then\n') - - configure_in.write(' AM_CONDITIONAL(VMIME_BUILTIN_MESSAGING_PROTO_' + string.upper(p) + ', true)\n') - configure_in.write(' VMIME_BUILTIN_MESSAGING_PROTO_' + string.upper(p) + '=1\n') - configure_in.write(' VMIME_BUILTIN_MESSAGING_PROTOS="$VMIME_BUILTIN_MESSAGING_PROTOS ' + p + '"\n') - - if p == 'sendmail': # sendmail only on POSIX platforms - configure_in.write('else\n'); - configure_in.write(' AC_MSG_WARN(' + p +' is only available on POSIX platforms)\n'); - configure_in.write(' AM_CONDITIONAL(VMIME_BUILTIN_MESSAGING_PROTO_' + string.upper(p) + ', false)\n') - configure_in.write(' VMIME_BUILTIN_MESSAGING_PROTO_' + string.upper(p) + '=0\n') - configure_in.write('fi\n'); - - configure_in.write('else\n') - configure_in.write(' AM_CONDITIONAL(VMIME_BUILTIN_MESSAGING_PROTO_' + string.upper(p) + ', false)\n') - configure_in.write(' VMIME_BUILTIN_MESSAGING_PROTO_' + string.upper(p) + '=0\n') - configure_in.write('fi\n\n') - - configure_in.write(""" - - -# -# System mail -# - -AC_PATH_PROG(SENDMAIL, sendmail, /usr/sbin/sendmail, /usr/sbin:/usr/lib) - - -# -# Detect some platform-specific stuff -# - -# -- MLang (Windows) -if test "x$VMIME_DETECT_PLATFORM" = "xwindows"; then - AC_CHECK_HEADER(mlang.h, [VMIME_ADDITIONAL_DEFINES="$VMIME_ADDITIONAL_DEFINES HAVE_MLANG_H"]) -fi - -# -- Link with Winsock (Windows) -if test "x$VMIME_DETECT_PLATFORM" = "xwindows"; then - VMIME_ADDITIONAL_PC_LIBS="$VMIME_ADDITIONAL_PC_LIBS -lws2_32" -fi - -# -- getaddrinfo (POSIX) -if test "x$VMIME_DETECT_PLATFORM" = "xposix"; then - AC_CHECK_HEADERS(netdb.h sys/types.h sys/socket.h,) - AC_CHECK_FUNC(getaddrinfo, [VMIME_ADDITIONAL_DEFINES="$VMIME_ADDITIONAL_DEFINES HAVE_GETADDRINFO"]) -fi - -# -- pthreads (POSIX) - -ACX_PTHREAD([VMIME_ADDITIONAL_DEFINES="$VMIME_ADDITIONAL_DEFINES HAVE_PTHREAD"]) - - -""") - - - for p in libvmime_platforms_sources: - configure_in.write('if test "x$VMIME_DETECT_PLATFORM" = "x' + p + '"; then\n') - configure_in.write(' conf_platform_' + p + '=yes\n') - configure_in.write('else\n') - configure_in.write(' conf_platform_' + p + '=no\n') - configure_in.write('fi\n\n') - - configure_in.write("AC_ARG_ENABLE(platform-" + p + ",\n") - configure_in.write(" AC_HELP_STRING([--enable-platform-" + p - + "], [Compile built-in platform handler for '" + p + "' " - + ", default: disabled, except if default for your platform]),\n") - configure_in.write(' [case "${enableval}" in\n') - configure_in.write(' yes) conf_platform_' + p + '=yes ;;\n') - configure_in.write(' no) conf_platform_' + p + '=no ;;\n') - configure_in.write(' *) AC_MSG_ERROR(bad value ${enableval} for ' - + '--enable-platform-' + p + ') ;;\n') - configure_in.write(' esac],\n') - #configure_in.write(' [conf_platform_' + p + '=yes])\n') - configure_in.write(' [])\n') - - configure_in.write('if test "x$conf_platform_' + p + '" = "xyes"; then\n') - configure_in.write(' AM_CONDITIONAL(VMIME_BUILTIN_PLATFORM_' + string.upper(p) + ', true)\n') - configure_in.write(' VMIME_BUILTIN_PLATFORM_' + string.upper(p) + '=1\n') - configure_in.write(' VMIME_BUILTIN_PLATFORMS="$VMIME_BUILTIN_PLATFORMS ' + p + '"\n') - configure_in.write('else\n') - configure_in.write(' AM_CONDITIONAL(VMIME_BUILTIN_PLATFORM_' + string.upper(p) + ', false)\n') - configure_in.write(' VMIME_BUILTIN_PLATFORM_' + string.upper(p) + '=0\n') - configure_in.write('fi\n\n') - - configure_in.write(""" - -# -# Workarounds for some platforms -# - -# -- pkgconfigdir -case "x${target_os}" in -xfreebsd*) - - VMIME_PKGCONFIGDIR='$(prefix)/libdata/pkgconfig' - ;; - -x*) - - VMIME_PKGCONFIGDIR='$(libdir)/pkgconfig' - ;; -esac - -AC_SUBST(VMIME_PKGCONFIGDIR) - -# -- libtool 'CXX' tag -case "x${target_os}" in -xfreebsd*) - # FIXME: temporary hack until I find a better solution - # to make libtool use the C++ tag... - LIBTOOL="$LIBTOOL --tag=CXX" - ;; -esac - - -# -# Flags -# - -LIBRARY_LD_FLAGS="\$(top_builddir)/src/\$(LIBRARY_NAME).la" -AC_SUBST(LIBRARY_LD_FLAGS) - -PKGCONFIG_CFLAGS="" -PKGCONFIG_LIBS="" - -AC_SUBST(PKGCONFIG_CFLAGS) -AC_SUBST(PKGCONFIG_LIBS) - -EXTRA_CFLAGS="$EXTRA_CFLAGS -D_REENTRANT=1 -D_THREAD_SAFE=1 $LIBGNUTLS_CFLAGS" -EXTRA_LIBS="$GSASL_LIBS $LIBGNUTLS_LIBS" - -CFLAGS="" -CXXFLAGS="" - -# -- Debug -if test x$VMIME_DEBUG = x1 ; then - # -g - OLD_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -g" - AC_MSG_CHECKING(whether cc accepts -g) - AC_TRY_COMPILE(,,echo yes,echo no; CXXFLAGS="$OLD_CXXFLAGS") -else - # -O2 - OLD_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -O2" - AC_MSG_CHECKING(whether cc accepts -O2) - AC_TRY_COMPILE(,,echo yes,echo no; CXXFLAGS="$OLD_CXXFLAGS") -fi - -# -- HACK: add -fPIC or -fpic on static library object files -EXTRA_CFLAGS="$EXTRA_CFLAGS $lt_prog_compiler_pic" - - - -# -# Check to see if the compiler can handle some flags -# - -""") - - compilerFlags = [ '-ansi', '-pedantic', '-W', '-Wall', '-Wpointer-arith', '-Wold-style-cast', '-Wconversion' ] - - for f in compilerFlags: - configure_in.write('# ' + f + '\n') - configure_in.write('OLD_EXTRA_CFLAGS="$EXTRA_CFLAGS"\n') - configure_in.write('EXTRA_CFLAGS="$EXTRA_CFLAGS ' + f + '"\n') - configure_in.write('AC_MSG_CHECKING(whether cc accepts ' + f + ')\n') - configure_in.write('AC_TRY_COMPILE(,,echo yes,echo no; EXTRA_CFLAGS="$OLD_EXTRA_CFLAGS")\n\n') - - configure_in.write(""" -#EXTRA_CFLAGS=`echo $EXTRA_CFLAGS | sed -e 's| |\\n|g' | sort | uniq | tr '\\n' ' '` -EXTRA_CFLAGS=`echo $EXTRA_CFLAGS | tr '\\n' ' ' | sort | uniq | tr '\\n' ' '` -EXTRA_LIBS=`echo $EXTRA_LIBS | sed -e 's|^ ||g' | sed -e 's| | |g'` - -AC_SUBST(CFLAGS) -AC_SUBST(CXXFLAGS) - -AC_SUBST(EXTRA_CFLAGS) -AC_SUBST(EXTRA_LIBS) - -AC_SUBST(VMIME_ADDITIONAL_PC_LIBS) - -LIBS=`echo $LIBS | sed -e 's|^ ||g' | sed -e 's| | |g'` - -AC_CONFIG_FILES([ """) - - libvmime_dist_files.append(packageVersionedGenericName + ".pc.in") - - configure_in.write(packageVersionedGenericName + ".pc\n") - - for f in libvmime_dist_files: - if f[-11:] == 'Makefile.in': - configure_in.write("\t" + f[0:len(f) - 3] + "\n") - - configure_in.write("\t])") - configure_in.write(""" -AC_OUTPUT - - -# -# Generate vmime/config.hpp -# - -echo " -// -// This file was automatically generated by configuration script. -// - -#ifndef VMIME_CONFIG_HPP_INCLUDED -#define VMIME_CONFIG_HPP_INCLUDED - - -// Name of package -#define VMIME_PACKAGE """ + '\\"' + packageName + '\\"' + """ - -// Version number of package -#define VMIME_VERSION """ + '\\"' + packageVersion + '\\"' + """ -#define VMIME_API """ + '\\"' + packageAPI + '\\"' + """ - -// Target OS and architecture -#define VMIME_TARGET_ARCH \\"${VMIME_TARGET_ARCH}\\" -#define VMIME_TARGET_OS \\"${VMIME_TARGET_OS}\\" - -// Set to 1 if debugging should be activated -#define VMIME_DEBUG ${VMIME_DEBUG} - -// Byte order (set one or the other, but not both!) -#define VMIME_BYTE_ORDER_BIG_ENDIAN ${VMIME_BYTE_ORDER_BIG_ENDIAN} -#define VMIME_BYTE_ORDER_LITTLE_ENDIAN ${VMIME_BYTE_ORDER_LITTLE_ENDIAN} - -// Generic types -// -- 8-bit -typedef signed ${VMIME_TYPE_INT8} vmime_int8; -typedef unsigned ${VMIME_TYPE_INT8} vmime_uint8; -// -- 16-bit -typedef signed ${VMIME_TYPE_INT16} vmime_int16; -typedef unsigned ${VMIME_TYPE_INT16} vmime_uint16; -// -- 32-bit -typedef signed ${VMIME_TYPE_INT32} vmime_int32; -typedef unsigned ${VMIME_TYPE_INT32} vmime_uint32; - -// Options -// -- File-system support -#define VMIME_HAVE_FILESYSTEM_FEATURES 1 -// -- SASL support -#define VMIME_HAVE_SASL_SUPPORT ${VMIME_HAVE_SASL_SUPPORT} -// -- TLS support -#define VMIME_HAVE_TLS_SUPPORT ${VMIME_HAVE_TLS_SUPPORT} -#define HAVE_GNUTLS_PRIORITY_FUNCS ${HAVE_GNUTLS_PRIORITY_FUNCS} -// -- Messaging support -#define VMIME_HAVE_MESSAGING_FEATURES ${VMIME_HAVE_MESSAGING_FEATURES} -""") - - # Messaging protocols - configure_in.write('// -- Built-in messaging protocols\n') - configure_in.write('#define VMIME_BUILTIN_MESSAGING_PROTOS \\"$VMIME_BUILTIN_MESSAGING_PROTOS\\"\n') - - for p in libvmime_messaging_proto_sources: - p = string.upper(p[0]) - configure_in.write("#define VMIME_BUILTIN_MESSAGING_PROTO_" + p - + " $VMIME_BUILTIN_MESSAGING_PROTO_" + p + "\n") - - # Platform handlers - configure_in.write('// -- Built-in platform handlers\n') - configure_in.write('#define VMIME_BUILTIN_PLATFORMS \\"$VMIME_BUILTIN_PLATFORMS\\"\n') - - for p in libvmime_platforms_sources: - p = string.upper(p) - configure_in.write('#define VMIME_BUILTIN_PLATFORM_' + p - + " $VMIME_BUILTIN_PLATFORM_" + p + " \n") - - configure_in.write(""" -" > vmime/config.hpp - -# Miscellaneous flags -echo "// Miscellaneous flags" >> vmime/config.hpp -echo "#define VMIME_SENDMAIL_PATH \\"$SENDMAIL\\"" >> vmime/config.hpp -echo "" >> vmime/config.hpp - -# Additional defines -echo "// Additional defines" >> vmime/config.hpp - -for d in $VMIME_ADDITIONAL_DEFINES ; do - echo "#define VMIME_$d 1" >> vmime/config.hpp -done - - -echo "" >> vmime/config.hpp -echo "#endif // VMIME_CONFIG_HPP_INCLUDED" >> vmime/config.hpp - - -AC_MSG_RESULT([ -+=================+ -| CONFIGURATION | -+=================+ - -Installation prefix : $prefix -Debugging mode : $conf_debug -Messaging support : $conf_messaging - * protocols :$VMIME_BUILTIN_MESSAGING_PROTOS -File-system support : yes -Platform handlers :$VMIME_BUILTIN_PLATFORMS -SASL support : $conf_sasl -TLS/SSL support : $conf_tls - -Please check 'vmime/config.hpp' to ensure the configuration is correct. -]) -""") - - configure_in.close() - - os.system('bash bootstrap') - - return None - - -# Custom builder for generating autotools scripts -autotoolsBuilder = Builder(action = generateAutotools) -env.Append(BUILDERS = { 'GenerateAutoTools' : autotoolsBuilder }) - -env.Alias('autotools', env.GenerateAutoTools('foo_autotools', 'SConstruct')) - - - -################################ -# Generate MSVC project files # -################################ - -MSVC_filesDone = [] -MSVC_dupCounter = 1 # counter for duplicate file names - -def generateMSVC(target, source, env): - # vmime.sln - vmime_sln = open("vmime.sln", 'w') - vmime_sln.write("""Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vmime", "vmime.vcproj", "{B2B47E11-DB57-49E1-8895-F03BDF78A221}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {B2B47E11-DB57-49E1-8895-F03BDF78A221}.Debug.ActiveCfg = Debug|Win32 - {B2B47E11-DB57-49E1-8895-F03BDF78A221}.Debug.Build.0 = Debug|Win32 - {B2B47E11-DB57-49E1-8895-F03BDF78A221}.Release.ActiveCfg = Release|Win32 - {B2B47E11-DB57-49E1-8895-F03BDF78A221}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal -""") - vmime_sln.close(); - - # vmime.vcproj - vmime_vcproj = open("vmime.vcproj", 'w') - vmime_vcproj.write(""" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -""") - - # Source files - all_sources = libvmime_sel_sources - - # -- Remove all platform files and re-add files for "windows" only - for i in range(len(all_sources)): - if string.find(all_sources[i], 'platforms/') != -1: - all_sources[i] = '' - - for f in libvmime_platforms_sources['windows']: - all_sources.append(f) - - # -- Prepend with 'src' (for source files) or 'vmime' (for includes) - for i in range(len(all_sources)): - f = all_sources[i] - if f[-4:] == '.cpp': - all_sources[i] = 'src/' + f - else: - all_sources[i] = 'vmime/' + f - - # -- Replace '/' with '\' - for i in range(len(all_sources)): - all_sources[i] = string.replace(all_sources[i], '/', '\\') - - all_sources.sort() - - # -- Sort by directory - filesInDir = {} - - for f in all_sources: - if len(f) != 0: - comps = re.split('\\\\', f) - l = len(comps) - 1 - - tmp = filesInDir - - for i in range(len(comps) - 1): - d = '*' + comps[i] - - if not tmp.has_key(d): - tmp[d] = {} - - tmp = tmp[d] - - tmp['file%i' % len(tmp)] = f - - # -- Output files in filters - vmime_vcproj.write(""" - - -""") - - def MSVC_OutputFiles(filesInDir): - global MSVC_filesDone, MSVC_dupCounter - - for k in filesInDir.keys(): - f = filesInDir[k] - - # Directory - if k[0] == '*': - vmime_vcproj.write('\n') - MSVC_OutputFiles(f) - vmime_vcproj.write('\n') - # File - else: - fn = f[string.rfind(f, '\\') + 1:] - - if len(fn) != 0: - if fn in MSVC_filesDone: - # File (duplicate filename) - vmime_vcproj.write('\n') - vmime_vcproj.write(""" - - - - - -""") - vmime_vcproj.write('') - MSVC_dupCounter = MSVC_dupCounter + 1 - else: - # File - vmime_vcproj.write('\n') - MSVC_filesDone.append(fn) - - - MSVC_OutputFiles(filesInDir) - - vmime_vcproj.write(""" - - - - -""") - vmime_vcproj.close(); - - # config.hpp.msvc - config_hpp_msvc = open("config.hpp.msvc", 'w') - config_hpp_msvc.write(""" -// -// This file was automatically generated by configuration script. -// - -#ifndef VMIME_CONFIG_HPP_INCLUDED -#define VMIME_CONFIG_HPP_INCLUDED - - -// Name of package -#define VMIME_PACKAGE """ + '"' + packageName + '"' + """ - -// Version number of package -#define VMIME_VERSION """ + '"' + packageVersion + '"' + """ -#define VMIME_API """ + '"' + packageAPI + '"' + """ - -// Target OS and architecture -#define VMIME_TARGET_ARCH "i686" -#define VMIME_TARGET_OS "windows" - -// Set to 1 if debugging should be activated -#ifdef _DEBUG -# define VMIME_DEBUG 1 -#else -# define VMIME_DEBUG 0 -#endif - -// Byte order (set one or the other, but not both!) -#define VMIME_BYTE_ORDER_BIG_ENDIAN 0 -#define VMIME_BYTE_ORDER_LITTLE_ENDIAN 1 - -// Generic types -// -- 8-bit -typedef signed char vmime_int8; -typedef unsigned char vmime_uint8; -// -- 16-bit -typedef signed short vmime_int16; -typedef unsigned short vmime_uint16; -// -- 32-bit -typedef signed int vmime_int32; -typedef unsigned int vmime_uint32; - - -// Options -// -- File-system support -#define VMIME_HAVE_FILESYSTEM_FEATURES 1 -// -- SASL support -#define VMIME_HAVE_SASL_SUPPORT 1 -// -- TLS/SSL support -#define VMIME_HAVE_TLS_SUPPORT 1 -// -- Messaging support -#define VMIME_HAVE_MESSAGING_FEATURES 1 -// -- Built-in messaging protocols -#define VMIME_BUILTIN_MESSAGING_PROTOS "pop3 smtp imap maildir" -#define VMIME_BUILTIN_MESSAGING_PROTO_POP3 1 -#define VMIME_BUILTIN_MESSAGING_PROTO_SMTP 1 -#define VMIME_BUILTIN_MESSAGING_PROTO_IMAP 1 -#define VMIME_BUILTIN_MESSAGING_PROTO_MAILDIR 1 -// -- Built-in platform handlers -#define VMIME_BUILTIN_PLATFORMS "windows" -#define VMIME_BUILTIN_PLATFORM_WINDOWS 1 - -// Miscellaneous -#define VMIME_INLINE_TEMPLATE_SPECIALIZATION 1 -#define VMIME_NO_MULTIPLE_INHERITANCE 1 -""") - - for p in libvmime_platforms_sources: - if not (p == 'windows'): - p = string.upper(p) - config_hpp_msvc.write('#define VMIME_BUILTIN_PLATFORM_' + p + ' 0\n') - - config_hpp_msvc.write(""" - -#endif // VMIME_CONFIG_HPP_INCLUDED -""") - config_hpp_msvc.close() - - libvmime_dist_files.append("vmime.sln") - libvmime_dist_files.append("vmime.vcproj") - libvmime_dist_files.append("config.hpp.msvc") - - return None - - - -# Custom builder for generating MSVC project files -msvcBuilder = Builder(action = generateMSVC) -env.Append(BUILDERS = { 'GenerateMSVC' : msvcBuilder }) - -env.Alias('msvc', env.GenerateMSVC('foo_msvc', 'SConstruct')) - - - -##################### -# Packaging rules # -##################### - -def appendAdditionalDistFiles(): - # Generate autotools-related files - generateAutotools([], [], env) - # Generate MSVC-related files - generateMSVC([], [], env) - - -# 'tar' is not available under Windows... -if not (os.name == 'win32' or os.name == 'nt'): - def createPackage(target, source, env): - packageFullName = packageName + '-' + packageVersion - packageFile = packageFullName + '.tar.bz2' - - appendAdditionalDistFiles() - - distFiles = [] - distFilesStr = '' - - for f in libvmime_dist_files: - distFiles.append(packageFullName + '/' + f) - distFilesStr = distFilesStr + packageFullName + '/' + f + ' ' - print f - - os.system('ln -s . ' + packageFullName) - os.system('tar jcf ' + packageFile + ' ' + distFilesStr) - os.system('rm -f ' + packageFullName) - - return None - - # Custom builder for creating package - createPackageBuilder = Builder(action = createPackage) - env.Append(BUILDERS = { 'CreatePackage' : createPackageBuilder }) - - env.Alias('dist', env.CreatePackage('foo_tar', 'SConstruct')) - - ################### # Documentation # ################### diff --git a/cmake/FindCppUnit.cmake b/cmake/FindCppUnit.cmake new file mode 100644 index 00000000..d74a4f3a --- /dev/null +++ b/cmake/FindCppUnit.cmake @@ -0,0 +1,34 @@ +# +# http://root.cern.ch/viewvc/trunk/cint/reflex/cmake/modules/FindCppUnit.cmake +# +# - Find CppUnit +# This module finds an installed CppUnit package. +# +# It sets the following variables: +# CPPUNIT_FOUND - Set to false, or undefined, if CppUnit isn't found. +# CPPUNIT_INCLUDE_DIR - The CppUnit include directory. +# CPPUNIT_LIBRARY - The CppUnit library to link against. + +FIND_PATH(CPPUNIT_INCLUDE_DIR cppunit/Test.h) +FIND_LIBRARY(CPPUNIT_LIBRARY NAMES cppunit) + +IF (CPPUNIT_INCLUDE_DIR AND CPPUNIT_LIBRARY) + SET(CPPUNIT_FOUND TRUE) +ENDIF (CPPUNIT_INCLUDE_DIR AND CPPUNIT_LIBRARY) + +IF (CPPUNIT_FOUND) + + # show which CppUnit was found only if not quiet + IF (NOT CppUnit_FIND_QUIETLY) + MESSAGE(STATUS "Found CppUnit: ${CPPUNIT_LIBRARY}") + ENDIF (NOT CppUnit_FIND_QUIETLY) + +ELSE (CPPUNIT_FOUND) + + # fatal error if CppUnit is required but not found + IF (CppUnit_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find CppUnit") + ENDIF (CppUnit_FIND_REQUIRED) + +ENDIF (CPPUNIT_FOUND) + diff --git a/cmake/FindGSasl.cmake b/cmake/FindGSasl.cmake new file mode 100644 index 00000000..31890a23 --- /dev/null +++ b/cmake/FindGSasl.cmake @@ -0,0 +1,51 @@ +# - Try to find the GNU sasl library (gsasl) +# +# Once done this will define +# +# GNUTLS_FOUND - System has gnutls +# GNUTLS_INCLUDE_DIR - The gnutls include directory +# GNUTLS_LIBRARIES - The libraries needed to use gnutls +# GNUTLS_DEFINITIONS - Compiler switches required for using gnutls + +# Adapted from FindGnuTLS.cmake, which is: +# Copyright 2009, Brad Hards, +# +# Changes are Copyright 2009, Michele Caini, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +IF (GSASL_INCLUDE_DIR AND GSASL_LIBRARIES) + # in cache already + SET(GSasl_FIND_QUIETLY TRUE) +ENDIF (GSASL_INCLUDE_DIR AND GSASL_LIBRARIES) + +IF (NOT WIN32) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + find_package(PkgConfig) + pkg_check_modules(PC_GSASL libgsasl) + SET(GSASL_DEFINITIONS ${PC_GSASL_CFLAGS_OTHER}) +ENDIF (NOT WIN32) + +FIND_PATH(GSASL_INCLUDE_DIR gsasl.h + HINTS + ${PC_GSASL_INCLUDEDIR} + ${PC_GSASL_INCLUDE_DIRS} + PATH_SUFFIXES gsasl + ) + +FIND_LIBRARY(GSASL_LIBRARIES NAMES gsasl libgsasl + HINTS + ${PC_GSASL_LIBDIR} + ${PC_GSASL_LIBRARY_DIRS} + ) + +INCLUDE(FindPackageHandleStandardArgs) + +# handle the QUIETLY and REQUIRED arguments and set GSASL_FOUND to TRUE if +# all listed variables are TRUE +FIND_PACKAGE_HANDLE_STANDARD_ARGS(GSASL DEFAULT_MSG GSASL_LIBRARIES GSASL_INCLUDE_DIR) + +MARK_AS_ADVANCED(GSASL_INCLUDE_DIR GSASL_LIBRARIES) diff --git a/cmake/FindIconv.cmake b/cmake/FindIconv.cmake new file mode 100644 index 00000000..62336576 --- /dev/null +++ b/cmake/FindIconv.cmake @@ -0,0 +1,61 @@ +# - Try to find Iconv +# Once done this will define +# +# ICONV_FOUND - system has Iconv +# ICONV_INCLUDE_DIR - the Iconv include directory +# ICONV_LIBRARIES - Link these to use Iconv +# ICONV_SECOND_ARGUMENT_IS_CONST - the second argument for iconv() is const +# +include(CheckCXXSourceCompiles) + +IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + # Already in cache, be silent + SET(ICONV_FIND_QUIETLY TRUE) +ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + +FIND_PATH(ICONV_INCLUDE_DIR iconv.h) + +IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c HINTS "/opt/local/lib") +ELSE() + FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c) +ENDIF() + +IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + SET(ICONV_FOUND TRUE) +ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + +set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) +set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) +IF(ICONV_FOUND) + check_cxx_source_compiles(" + #include + int main(){ + iconv_t conv = 0; + const char* in = 0; + size_t ilen = 0; + char* out = 0; + size_t olen = 0; + iconv(conv, &in, &ilen, &out, &olen); + return 0; + } +" ICONV_SECOND_ARGUMENT_IS_CONST ) +ENDIF(ICONV_FOUND) +set(CMAKE_REQUIRED_INCLUDES) +set(CMAKE_REQUIRED_LIBRARIES) + +IF(ICONV_FOUND) + IF(NOT ICONV_FIND_QUIETLY) + MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}") + ENDIF(NOT ICONV_FIND_QUIETLY) +ELSE(ICONV_FOUND) + IF(Iconv_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find Iconv") + ENDIF(Iconv_FIND_REQUIRED) +ENDIF(ICONV_FOUND) + +MARK_AS_ADVANCED( + ICONV_INCLUDE_DIR + ICONV_LIBRARIES + ICONV_SECOND_ARGUMENT_IS_CONST +) diff --git a/cmake/TargetArch.cmake b/cmake/TargetArch.cmake new file mode 100644 index 00000000..df038f73 --- /dev/null +++ b/cmake/TargetArch.cmake @@ -0,0 +1,136 @@ +# https://github.com/petroules/solar-cmake +# +# Based on the Qt 5 processor detection code, so should be very accurate +# https://qt.gitorious.org/qt/qtbase/blobs/master/src/corelib/global/qprocessordetection.h +# Currently handles arm (v5, v6, v7), x86 (32/64), ia64, and ppc (32/64) + +# Regarding POWER/PowerPC, just as is noted in the Qt source, +# "There are many more known variants/revisions that we do not handle/detect." + +set(archdetect_c_code " +#if defined(__arm__) || defined(__TARGET_ARCH_ARM) + #if defined(__ARM_ARCH_7__) \\ + || defined(__ARM_ARCH_7A__) \\ + || defined(__ARM_ARCH_7R__) \\ + || defined(__ARM_ARCH_7M__) \\ + || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 7) + #error cmake_ARCH armv7 + #elif defined(__ARM_ARCH_6__) \\ + || defined(__ARM_ARCH_6J__) \\ + || defined(__ARM_ARCH_6T2__) \\ + || defined(__ARM_ARCH_6Z__) \\ + || defined(__ARM_ARCH_6K__) \\ + || defined(__ARM_ARCH_6ZK__) \\ + || defined(__ARM_ARCH_6M__) \\ + || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 6) + #error cmake_ARCH armv6 + #elif defined(__ARM_ARCH_5TEJ__) \\ + || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 5) + #error cmake_ARCH armv5 + #else + #error cmake_ARCH arm + #endif +#elif defined(__i386) || defined(__i386__) || defined(_M_IX86) + #error cmake_ARCH i386 +#elif defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64) + #error cmake_ARCH x86_64 +#elif defined(__ia64) || defined(__ia64__) || defined(_M_IA64) + #error cmake_ARCH ia64 +#elif defined(__ppc__) || defined(__ppc) || defined(__powerpc__) \\ + || defined(_ARCH_COM) || defined(_ARCH_PWR) || defined(_ARCH_PPC) \\ + || defined(_M_MPPC) || defined(_M_PPC) + #if defined(__ppc64__) || defined(__powerpc64__) || defined(__64BIT__) + #error cmake_ARCH ppc64 + #else + #error cmake_ARCH ppc + #endif +#endif + +#error cmake_ARCH unknown +") + +# Set ppc_support to TRUE before including this file or ppc and ppc64 +# will be treated as invalid architectures since they are no longer supported by Apple + +function(target_architecture output_var) + if(APPLE AND CMAKE_OSX_ARCHITECTURES) + # On OS X we use CMAKE_OSX_ARCHITECTURES *if* it was set + # First let's normalize the order of the values + + # Note that it's not possible to compile PowerPC applications if you are using + # the OS X SDK version 10.6 or later - you'll need 10.4/10.5 for that, so we + # disable it by default + # See this page for more information: + # http://stackoverflow.com/questions/5333490/how-can-we-restore-ppc-ppc64-as-well-as-full-10-4-10-5-sdk-support-to-xcode-4 + + # Architecture defaults to i386 or ppc on OS X 10.5 and earlier, depending on the CPU type detected at runtime. + # On OS X 10.6+ the default is x86_64 if the CPU supports it, i386 otherwise. + + foreach(osx_arch ${CMAKE_OSX_ARCHITECTURES}) + if("${osx_arch}" STREQUAL "ppc" AND ppc_support) + set(osx_arch_ppc TRUE) + elseif("${osx_arch}" STREQUAL "i386") + set(osx_arch_i386 TRUE) + elseif("${osx_arch}" STREQUAL "x86_64") + set(osx_arch_x86_64 TRUE) + elseif("${osx_arch}" STREQUAL "ppc64" AND ppc_support) + set(osx_arch_ppc64 TRUE) + else() + message(FATAL_ERROR "Invalid OS X arch name: ${osx_arch}") + endif() + endforeach() + + # Now add all the architectures in our normalized order + if(osx_arch_ppc) + list(APPEND ARCH ppc) + endif() + + if(osx_arch_i386) + list(APPEND ARCH i386) + endif() + + if(osx_arch_x86_64) + list(APPEND ARCH x86_64) + endif() + + if(osx_arch_ppc64) + list(APPEND ARCH ppc64) + endif() + else() + file(WRITE "${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/arch.c" "${archdetect_c_code}") + + enable_language(C) + + # Detect the architecture in a rather creative way... + # This compiles a small C program which is a series of ifdefs that selects a + # particular #error preprocessor directive whose message string contains the + # target architecture. The program will always fail to compile (both because + # file is not a valid C program, and obviously because of the presence of the + # #error preprocessor directives... but by exploiting the preprocessor in this + # way, we can detect the correct target architecture even when cross-compiling, + # since the program itself never needs to be run (only the compiler/preprocessor) + try_run( + run_result_unused + compile_result_unused + "${CMAKE_BINARY_DIR}" + "${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/arch.c" + COMPILE_OUTPUT_VARIABLE ARCH + CMAKE_FLAGS CMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} + ) + + # Parse the architecture name from the compiler output + string(REGEX MATCH "cmake_ARCH ([a-zA-Z0-9_]+)" ARCH "${ARCH}") + + # Get rid of the value marker leaving just the architecture name + string(REPLACE "cmake_ARCH " "" ARCH "${ARCH}") + + # If we are compiling with an unknown architecture this variable should + # already be set to "unknown" but in the case that it's empty (i.e. due + # to a typo in the code), then set it to unknown + if (NOT ARCH) + set(ARCH unknown) + endif() + endif() + + set(${output_var} "${ARCH}" PARENT_SCOPE) +endfunction() diff --git a/cmake/Utils.cmake b/cmake/Utils.cmake new file mode 100644 index 00000000..0abf5155 --- /dev/null +++ b/cmake/Utils.cmake @@ -0,0 +1,13 @@ + +# Installing headers and preserving the directory structure +# Found here: http://www.semipol.de/archives/251 +MACRO(INSTALL_HEADERS_WITH_DIRECTORY HEADER_LIST COMPONENT_NAME) + + FOREACH(HEADER ${${HEADER_LIST}}) + STRING(REGEX MATCH "(.*)[/\\]" DIR ${HEADER}) + STRING(REPLACE "${CMAKE_SOURCE_DIR}/" "" DIR ${DIR}) + INSTALL(FILES ${HEADER} DESTINATION include/${DIR} COMPONENT ${COMPONENT_NAME}) + ENDFOREACH(HEADER) + +ENDMACRO(INSTALL_HEADERS_WITH_DIRECTORY) + diff --git a/cmake/config.hpp.cmake b/cmake/config.hpp.cmake new file mode 100644 index 00000000..66c26b6c --- /dev/null +++ b/cmake/config.hpp.cmake @@ -0,0 +1,66 @@ +// +// This file was automatically generated by CMake. +// + +#ifndef VMIME_CONFIG_HPP_INCLUDED +#define VMIME_CONFIG_HPP_INCLUDED + + +// Name of package +#define VMIME_PACKAGE "@PROJECT_NAME@" + +// Version number of package +#define VMIME_VERSION "@VMIME_VERSION@" +#define VMIME_API "@VMIME_API_VERSION@" + +// Target OS and architecture +#define VMIME_TARGET_ARCH "@CMAKE_TARGET_ARCHITECTURES@" +#define VMIME_TARGET_OS "@CMAKE_SYSTEM_NAME@" + +// Set to 1 if debugging should be activated +#define VMIME_DEBUG @VMIME_DEBUG@ + +// Byte order (set one or the other, but not both!) +#define VMIME_BYTE_ORDER_BIG_ENDIAN @VMIME_BYTE_ORDER_BIG_ENDIAN@ +#define VMIME_BYTE_ORDER_LITTLE_ENDIAN @VMIME_BYTE_ORDER_LITTLE_ENDIAN@ + +// Generic types +// -- 8-bit +typedef signed @VMIME_8BIT_TYPE@ vmime_int8; +typedef unsigned @VMIME_8BIT_TYPE@ vmime_uint8; +// -- 16-bit +typedef signed @VMIME_16BIT_TYPE@ vmime_int16; +typedef unsigned @VMIME_16BIT_TYPE@ vmime_uint16; +// -- 32-bit +typedef signed @VMIME_32BIT_TYPE@ vmime_int32; +typedef unsigned @VMIME_32BIT_TYPE@ vmime_uint32; + +// Options +// -- File-system support +#cmakedefine01 VMIME_HAVE_FILESYSTEM_FEATURES +// -- SASL support +#cmakedefine01 VMIME_HAVE_SASL_SUPPORT +// -- TLS/SSL support +#cmakedefine01 VMIME_HAVE_TLS_SUPPORT +#cmakedefine01 VMIME_TLS_SUPPORT_LIB_IS_GNUTLS +#define VMIME_HAVE_GNUTLS_PRIORITY_FUNCS @VMIME_HAVE_GNUTLS_PRIORITY_FUNCS@ +// -- Messaging support +#cmakedefine01 VMIME_HAVE_MESSAGING_FEATURES +// -- Messaging protocols +#cmakedefine01 VMIME_HAVE_MESSAGING_PROTO_POP3 +#cmakedefine01 VMIME_HAVE_MESSAGING_PROTO_SMTP +#cmakedefine01 VMIME_HAVE_MESSAGING_PROTO_IMAP +#cmakedefine01 VMIME_HAVE_MESSAGING_PROTO_MAILDIR +#cmakedefine01 VMIME_HAVE_MESSAGING_PROTO_SENDMAIL +// -- Platform-specific code +#cmakedefine01 VMIME_PLATFORM_IS_POSIX +#cmakedefine01 VMIME_PLATFORM_IS_WINDOWS +#cmakedefine01 VMIME_HAVE_PTHREAD +#cmakedefine01 VMIME_HAVE_GETADDRINFO + + +#define VMIME_SENDMAIL_PATH "@VMIME_SENDMAIL_PATH@" + + +#endif // VMIME_CONFIG_HPP_INCLUDED + diff --git a/src/exception.cpp b/src/exception.cpp index 60ec95b4..fd223b2a 100644 --- a/src/exception.cpp +++ b/src/exception.cpp @@ -334,6 +334,18 @@ exception* system_error::clone() const { return new system_error(*this); } const char* system_error::name() const throw() { return "system_error"; } +// +// malformed_url +// + +malformed_url::~malformed_url() throw() {} +malformed_url::malformed_url(const string& error, const exception& other) + : exception("Malformed URL: " + error + ".", other) {} + +exception* malformed_url::clone() const { return new malformed_url(*this); } +const char* malformed_url::name() const throw() { return "malformed_url"; } + + #if VMIME_HAVE_MESSAGING_FEATURES @@ -609,18 +621,6 @@ exception* partial_fetch_not_supported::clone() const { return new partial_fetch const char* partial_fetch_not_supported::name() const throw() { return "partial_fetch_not_supported"; } -// -// malformed_url -// - -malformed_url::~malformed_url() throw() {} -malformed_url::malformed_url(const string& error, const exception& other) - : net_exception("Malformed URL: " + error + ".", other) {} - -exception* malformed_url::clone() const { return new malformed_url(*this); } -const char* malformed_url::name() const throw() { return "malformed_url"; } - - // // invalid_folder_name // diff --git a/src/fileAttachment.cpp b/src/fileAttachment.cpp index cb23cd04..6f9a72bf 100644 --- a/src/fileAttachment.cpp +++ b/src/fileAttachment.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_FILESYSTEM_FEATURES + + #include #include @@ -211,3 +217,7 @@ void fileAttachment::fileInfo::setSize(const unsigned int& size) { if (m_size) { } // vmime + + +#endif // VMIME_HAVE_FILESYSTEM_FEATURES + diff --git a/src/net/builtinServices.inl b/src/net/builtinServices.inl index 4a6ac873..aba4cd3a 100644 --- a/src/net/builtinServices.inl +++ b/src/net/builtinServices.inl @@ -29,7 +29,7 @@ #ifndef VMIME_BUILDING_DOC -#if VMIME_BUILTIN_MESSAGING_PROTO_POP3 +#if VMIME_HAVE_MESSAGING_PROTO_POP3 #include "vmime/net/pop3/POP3Store.hpp" REGISTER_SERVICE(pop3::POP3Store, pop3, TYPE_STORE); @@ -40,7 +40,7 @@ #endif -#if VMIME_BUILTIN_MESSAGING_PROTO_SMTP +#if VMIME_HAVE_MESSAGING_PROTO_SMTP #include "vmime/net/smtp/SMTPTransport.hpp" REGISTER_SERVICE(smtp::SMTPTransport, smtp, TYPE_TRANSPORT); @@ -51,7 +51,7 @@ #endif -#if VMIME_BUILTIN_MESSAGING_PROTO_IMAP +#if VMIME_HAVE_MESSAGING_PROTO_IMAP #include "vmime/net/imap/IMAPStore.hpp" REGISTER_SERVICE(imap::IMAPStore, imap, TYPE_STORE); @@ -62,12 +62,12 @@ #endif -#if VMIME_BUILTIN_MESSAGING_PROTO_MAILDIR +#if VMIME_HAVE_MESSAGING_PROTO_MAILDIR #include "vmime/net/maildir/maildirStore.hpp" REGISTER_SERVICE(maildir::maildirStore, maildir, TYPE_STORE); #endif -#if VMIME_BUILTIN_MESSAGING_PROTO_SENDMAIL +#if VMIME_HAVE_MESSAGING_PROTO_SENDMAIL #include "vmime/net/sendmail/sendmailTransport.hpp" REGISTER_SERVICE(sendmail::sendmailTransport, sendmail, TYPE_TRANSPORT); #endif diff --git a/src/net/defaultConnectionInfos.cpp b/src/net/defaultConnectionInfos.cpp index 41f1e0fd..6c699f23 100644 --- a/src/net/defaultConnectionInfos.cpp +++ b/src/net/defaultConnectionInfos.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES + + #include "vmime/net/defaultConnectionInfos.hpp" @@ -50,3 +56,5 @@ port_t defaultConnectionInfos::getPort() const } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES + diff --git a/src/net/events.cpp b/src/net/events.cpp index 52c13eef..32ab2cfb 100644 --- a/src/net/events.cpp +++ b/src/net/events.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES + + #include "vmime/net/events.hpp" #include "vmime/net/folder.hpp" @@ -113,3 +119,7 @@ void folderEvent::dispatch(folderListener* listener) const } // events } // net } // vmime + + +#endif // VMIME_HAVE_MESSAGING_FEATURES + diff --git a/src/net/folder.cpp b/src/net/folder.cpp index 47ec3170..e4b7cdd0 100644 --- a/src/net/folder.cpp +++ b/src/net/folder.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES + + #include "vmime/net/folder.hpp" #include @@ -98,3 +104,7 @@ void folder::notifyFolder(const events::folderEvent& event) } // net } // vmime + + +#endif // VMIME_HAVE_MESSAGING_FEATURES + diff --git a/src/net/imap/IMAPConnection.cpp b/src/net/imap/IMAPConnection.cpp index e2b60ed9..9cb81d8c 100644 --- a/src/net/imap/IMAPConnection.cpp +++ b/src/net/imap/IMAPConnection.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + + #include "vmime/net/imap/IMAPTag.hpp" #include "vmime/net/imap/IMAPConnection.hpp" #include "vmime/net/imap/IMAPUtils.hpp" @@ -727,3 +733,7 @@ ref IMAPConnection::getSocket() const } // imap } // net } // vmime + + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + diff --git a/src/net/imap/IMAPFolder.cpp b/src/net/imap/IMAPFolder.cpp index 3d8c17ea..8eac9eae 100644 --- a/src/net/imap/IMAPFolder.cpp +++ b/src/net/imap/IMAPFolder.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + + #include "vmime/net/imap/IMAPFolder.hpp" #include "vmime/net/imap/IMAPStore.hpp" @@ -1936,3 +1942,7 @@ std::vector IMAPFolder::getMessageNumbersStartingOnUID(const message::uid& } // imap } // net } // vmime + + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + diff --git a/src/net/imap/IMAPMessage.cpp b/src/net/imap/IMAPMessage.cpp index 808f7d1d..45d4699b 100644 --- a/src/net/imap/IMAPMessage.cpp +++ b/src/net/imap/IMAPMessage.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + + #include "vmime/net/imap/IMAPParser.hpp" #include "vmime/net/imap/IMAPMessage.hpp" #include "vmime/net/imap/IMAPFolder.hpp" @@ -316,7 +322,7 @@ void IMAPMessage::extractImpl(ref p, utility::outputStream& os, // header + body if ((extractFlags & EXTRACT_HEADER) && (extractFlags & EXTRACT_BODY)) - *((int *) 0)=42;//throw exceptions::operation_not_supported(); + throw exceptions::operation_not_supported(); // body only else if (extractFlags & EXTRACT_BODY) command << ".TEXT"; @@ -745,3 +751,6 @@ ref IMAPMessage::getParsedMessage() } // net } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + diff --git a/src/net/imap/IMAPMessagePartContentHandler.cpp b/src/net/imap/IMAPMessagePartContentHandler.cpp index c2cd6479..1f16c698 100644 --- a/src/net/imap/IMAPMessagePartContentHandler.cpp +++ b/src/net/imap/IMAPMessagePartContentHandler.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + + #include "vmime/net/imap/IMAPMessagePartContentHandler.hpp" #include "vmime/utility/outputStreamAdapter.hpp" @@ -186,3 +192,6 @@ bool IMAPMessagePartContentHandler::isBuffered() const } // net } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + diff --git a/src/net/imap/IMAPPart.cpp b/src/net/imap/IMAPPart.cpp index 32021e83..13de4d77 100644 --- a/src/net/imap/IMAPPart.cpp +++ b/src/net/imap/IMAPPart.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + + #include "vmime/net/imap/IMAPPart.hpp" #include "vmime/net/imap/IMAPStructure.hpp" @@ -150,3 +156,6 @@ header& IMAPPart::getOrCreateHeader() } // net } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + diff --git a/src/net/imap/IMAPSStore.cpp b/src/net/imap/IMAPSStore.cpp index 9e92f92c..74f3fe18 100644 --- a/src/net/imap/IMAPSStore.cpp +++ b/src/net/imap/IMAPSStore.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + + #include "vmime/net/imap/IMAPSStore.hpp" @@ -67,3 +73,7 @@ const serviceInfos& IMAPSStore::getInfos() const } // imap } // net } // vmime + + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + diff --git a/src/net/imap/IMAPServiceInfos.cpp b/src/net/imap/IMAPServiceInfos.cpp index 33898f43..9cbb930e 100644 --- a/src/net/imap/IMAPServiceInfos.cpp +++ b/src/net/imap/IMAPServiceInfos.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + + #include "vmime/net/imap/IMAPServiceInfos.hpp" @@ -126,3 +132,6 @@ const std::vector IMAPServiceInfos::getAvailablePropert } // net } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + diff --git a/src/net/imap/IMAPStore.cpp b/src/net/imap/IMAPStore.cpp index f260e55a..0d2adc16 100644 --- a/src/net/imap/IMAPStore.cpp +++ b/src/net/imap/IMAPStore.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + + #include "vmime/net/imap/IMAPStore.hpp" #include "vmime/net/imap/IMAPFolder.hpp" #include "vmime/net/imap/IMAPConnection.hpp" @@ -237,3 +243,7 @@ const serviceInfos& IMAPStore::getInfos() const } // imap } // net } // vmime + + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + diff --git a/src/net/imap/IMAPStructure.cpp b/src/net/imap/IMAPStructure.cpp index 357febe3..a0bd98bb 100644 --- a/src/net/imap/IMAPStructure.cpp +++ b/src/net/imap/IMAPStructure.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + + #include "vmime/net/imap/IMAPStructure.hpp" #include "vmime/net/imap/IMAPPart.hpp" @@ -83,3 +89,6 @@ ref IMAPStructure::emptyStructure() } // net } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + diff --git a/src/net/imap/IMAPTag.cpp b/src/net/imap/IMAPTag.cpp index abb79249..45606f0a 100644 --- a/src/net/imap/IMAPTag.cpp +++ b/src/net/imap/IMAPTag.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + + #include "vmime/net/imap/IMAPTag.hpp" @@ -101,3 +107,7 @@ void IMAPTag::generate() } // imap } // net } // vmime + + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + diff --git a/src/net/imap/IMAPUtils.cpp b/src/net/imap/IMAPUtils.cpp index eceac16b..3f1c704b 100644 --- a/src/net/imap/IMAPUtils.cpp +++ b/src/net/imap/IMAPUtils.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + + #include "vmime/net/imap/IMAPUtils.hpp" #include "vmime/net/message.hpp" #include "vmime/net/folder.hpp" @@ -785,3 +791,7 @@ const message::uid IMAPUtils::makeGlobalUID(const unsigned int UIDValidity, cons } // imap } // net } // vmime + + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + diff --git a/src/net/maildir/format/courierMaildirFormat.cpp b/src/net/maildir/format/courierMaildirFormat.cpp index 721517e8..033951a1 100644 --- a/src/net/maildir/format/courierMaildirFormat.cpp +++ b/src/net/maildir/format/courierMaildirFormat.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + + #include "vmime/net/maildir/format/courierMaildirFormat.hpp" #include "vmime/net/maildir/maildirStore.hpp" @@ -531,3 +537,6 @@ bool courierMaildirFormat::supports() const } // net } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + diff --git a/src/net/maildir/format/kmailMaildirFormat.cpp b/src/net/maildir/format/kmailMaildirFormat.cpp index a21d1061..606f2d08 100644 --- a/src/net/maildir/format/kmailMaildirFormat.cpp +++ b/src/net/maildir/format/kmailMaildirFormat.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + + #include "vmime/net/maildir/format/kmailMaildirFormat.hpp" #include "vmime/net/maildir/maildirStore.hpp" @@ -308,3 +314,6 @@ bool kmailMaildirFormat::supports() const } // net } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + diff --git a/src/net/maildir/maildirFolder.cpp b/src/net/maildir/maildirFolder.cpp index b606cda0..cbea38ee 100644 --- a/src/net/maildir/maildirFolder.cpp +++ b/src/net/maildir/maildirFolder.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + + #include "vmime/net/maildir/maildirFolder.hpp" #include "vmime/net/maildir/maildirStore.hpp" @@ -1387,3 +1393,7 @@ std::vector maildirFolder::getMessageNumbersStartingOnUID(const message::u } // maildir } // net } // vmime + + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + diff --git a/src/net/maildir/maildirFormat.cpp b/src/net/maildir/maildirFormat.cpp index 78445428..d7cddb5e 100644 --- a/src/net/maildir/maildirFormat.cpp +++ b/src/net/maildir/maildirFormat.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + + #include "vmime/net/maildir/maildirFormat.hpp" #include "vmime/net/maildir/maildirStore.hpp" @@ -98,3 +104,6 @@ ref maildirFormat::detect(ref store) } // net } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + diff --git a/src/net/maildir/maildirMessage.cpp b/src/net/maildir/maildirMessage.cpp index 4ab75e75..dd38cbd8 100644 --- a/src/net/maildir/maildirMessage.cpp +++ b/src/net/maildir/maildirMessage.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + + #include "vmime/net/maildir/maildirMessage.hpp" #include "vmime/net/maildir/maildirFolder.hpp" #include "vmime/net/maildir/maildirUtils.hpp" @@ -543,3 +549,7 @@ ref maildirMessage::getParsedMessage() } // maildir } // net } // vmime + + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + diff --git a/src/net/maildir/maildirServiceInfos.cpp b/src/net/maildir/maildirServiceInfos.cpp index 55ba64ea..3c79e417 100644 --- a/src/net/maildir/maildirServiceInfos.cpp +++ b/src/net/maildir/maildirServiceInfos.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + + #include "vmime/net/maildir/maildirServiceInfos.hpp" @@ -66,3 +72,6 @@ const std::vector maildirServiceInfos::getAvailableProp } // net } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + diff --git a/src/net/maildir/maildirStore.cpp b/src/net/maildir/maildirStore.cpp index 26f4593a..3e2659f6 100644 --- a/src/net/maildir/maildirStore.cpp +++ b/src/net/maildir/maildirStore.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + + #include "vmime/net/maildir/maildirStore.hpp" #include "vmime/net/maildir/maildirFolder.hpp" @@ -260,3 +266,7 @@ const serviceInfos& maildirStore::getInfos() const } // maildir } // net } // vmime + + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + diff --git a/src/net/maildir/maildirUtils.cpp b/src/net/maildir/maildirUtils.cpp index 3430d1f8..4a9a67e2 100644 --- a/src/net/maildir/maildirUtils.cpp +++ b/src/net/maildir/maildirUtils.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + + #include "vmime/net/maildir/maildirUtils.hpp" #include "vmime/net/maildir/maildirStore.hpp" @@ -142,7 +148,7 @@ const utility::file::path::component maildirUtils::buildFilename (const utility::file::path::component& id, const utility::file::path::component& flags) { -#if VMIME_BUILTIN_PLATFORM_WINDOWS +#if VMIME_PLATFORM_IS_WINDOWS static const char DELIMITER[] = "-"; #else static const char DELIMITER[] = ":"; @@ -229,3 +235,7 @@ bool maildirUtils::messageIdComparator::operator() } // maildir } // net } // vmime + + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + diff --git a/src/net/message.cpp b/src/net/message.cpp index 9a548097..b8624330 100644 --- a/src/net/message.cpp +++ b/src/net/message.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES + + #include "vmime/net/message.hpp" @@ -48,3 +54,7 @@ int part::getPartCount() const } // net } // vmime + + +#endif // VMIME_HAVE_MESSAGING_FEATURES + diff --git a/src/net/pop3/POP3Folder.cpp b/src/net/pop3/POP3Folder.cpp index 21e7a8b3..f9a4225f 100644 --- a/src/net/pop3/POP3Folder.cpp +++ b/src/net/pop3/POP3Folder.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_POP3 + + #include "vmime/net/pop3/POP3Folder.hpp" #include "vmime/net/pop3/POP3Store.hpp" @@ -864,3 +870,7 @@ std::vector POP3Folder::getMessageNumbersStartingOnUID(const message::uid& } // pop3 } // net } // vmime + + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_POP3 + diff --git a/src/net/pop3/POP3Message.cpp b/src/net/pop3/POP3Message.cpp index 69ef004c..1c3b3408 100644 --- a/src/net/pop3/POP3Message.cpp +++ b/src/net/pop3/POP3Message.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_POP3 + + #include "vmime/net/pop3/POP3Message.hpp" #include "vmime/net/pop3/POP3Folder.hpp" #include "vmime/net/pop3/POP3Store.hpp" @@ -237,3 +243,7 @@ ref POP3Message::getParsedMessage() } // pop3 } // net } // vmime + + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_POP3 + diff --git a/src/net/pop3/POP3SStore.cpp b/src/net/pop3/POP3SStore.cpp index 59aacb8e..8a21469b 100644 --- a/src/net/pop3/POP3SStore.cpp +++ b/src/net/pop3/POP3SStore.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_POP3 + + #include "vmime/net/pop3/POP3SStore.hpp" @@ -68,3 +74,6 @@ const serviceInfos& POP3SStore::getInfos() const } // net } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_POP3 + diff --git a/src/net/pop3/POP3ServiceInfos.cpp b/src/net/pop3/POP3ServiceInfos.cpp index 77faa5fd..07922eff 100644 --- a/src/net/pop3/POP3ServiceInfos.cpp +++ b/src/net/pop3/POP3ServiceInfos.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_POP3 + + #include "vmime/net/pop3/POP3ServiceInfos.hpp" @@ -132,3 +138,6 @@ const std::vector POP3ServiceInfos::getAvailablePropert } // net } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_POP3 + diff --git a/src/net/pop3/POP3Store.cpp b/src/net/pop3/POP3Store.cpp index 793112a7..51181ece 100644 --- a/src/net/pop3/POP3Store.cpp +++ b/src/net/pop3/POP3Store.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_POP3 + + #include "vmime/net/pop3/POP3Store.hpp" #include "vmime/net/pop3/POP3Folder.hpp" @@ -1006,3 +1012,6 @@ const serviceInfos& POP3Store::getInfos() const } // net } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_POP3 + diff --git a/src/net/pop3/POP3Utils.cpp b/src/net/pop3/POP3Utils.cpp index de70dfed..f75d338e 100644 --- a/src/net/pop3/POP3Utils.cpp +++ b/src/net/pop3/POP3Utils.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_POP3 + + #include "vmime/net/pop3/POP3Utils.hpp" #include @@ -72,3 +78,6 @@ void POP3Utils::parseMultiListOrUidlResponse(const string& response, std::map sendmailServiceInfos::getAvailablePro } // vmime -#endif // VMIME_BUILTIN_PLATFORM_POSIX +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_SENDMAIL diff --git a/src/net/sendmail/sendmailTransport.cpp b/src/net/sendmail/sendmailTransport.cpp index e7762ccc..e52e16d5 100644 --- a/src/net/sendmail/sendmailTransport.cpp +++ b/src/net/sendmail/sendmailTransport.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_SENDMAIL + + #include "vmime/net/sendmail/sendmailTransport.hpp" #include "vmime/exception.hpp" @@ -48,9 +54,6 @@ dynamic_cast (getInfos()).getProperties().prop)) -#if VMIME_BUILTIN_PLATFORM_POSIX - - namespace vmime { namespace net { namespace sendmail { @@ -219,4 +222,5 @@ const serviceInfos& sendmailTransport::getInfos() const } // vmime -#endif // VMIME_BUILTIN_PLATFORM_POSIX +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_SENDMAIL + diff --git a/src/net/service.cpp b/src/net/service.cpp index f12c78f0..64c243c5 100644 --- a/src/net/service.cpp +++ b/src/net/service.cpp @@ -22,6 +22,11 @@ // #include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES + + #include "vmime/net/service.hpp" #include "vmime/platform.hpp" @@ -141,3 +146,7 @@ ref service::getTimeoutHandlerFactory() } // net } // vmime + + +#endif // VMIME_HAVE_MESSAGING_FEATURES + diff --git a/src/net/serviceFactory.cpp b/src/net/serviceFactory.cpp index 65f9aa1d..71b7efea 100644 --- a/src/net/serviceFactory.cpp +++ b/src/net/serviceFactory.cpp @@ -21,11 +21,16 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES + + #include "vmime/net/serviceFactory.hpp" #include "vmime/net/service.hpp" #include "vmime/exception.hpp" -#include "vmime/config.hpp" #include "src/net/builtinServices.inl" @@ -134,3 +139,7 @@ void serviceFactory::registerService(ref reg) } // net } // vmime + + +#endif // VMIME_HAVE_MESSAGING_FEATURES + diff --git a/src/net/serviceInfos.cpp b/src/net/serviceInfos.cpp index 069d9e10..ab3a39bd 100644 --- a/src/net/serviceInfos.cpp +++ b/src/net/serviceInfos.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES + + #include "vmime/net/serviceInfos.hpp" @@ -156,3 +162,6 @@ int serviceInfos::property::getFlags() const } // net } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES + diff --git a/src/net/session.cpp b/src/net/session.cpp index 3898a8da..308b2989 100644 --- a/src/net/session.cpp +++ b/src/net/session.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES + + #include "vmime/net/session.hpp" #include "vmime/net/serviceFactory.hpp" @@ -132,3 +138,7 @@ propertySet& session::getProperties() } // net } // vmime + + +#endif // VMIME_HAVE_MESSAGING_FEATURES + diff --git a/src/net/smtp/SMTPResponse.cpp b/src/net/smtp/SMTPResponse.cpp index 03c199ba..e1ac2af6 100644 --- a/src/net/smtp/SMTPResponse.cpp +++ b/src/net/smtp/SMTPResponse.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_SMTP + + #include "vmime/net/smtp/SMTPResponse.hpp" #include "vmime/platform.hpp" @@ -249,3 +255,6 @@ const string SMTPResponse::responseLine::getText() const } // net } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_SMTP + diff --git a/src/net/smtp/SMTPSTransport.cpp b/src/net/smtp/SMTPSTransport.cpp index db7fc6ff..73d511f9 100644 --- a/src/net/smtp/SMTPSTransport.cpp +++ b/src/net/smtp/SMTPSTransport.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_SMTP + + #include "vmime/net/smtp/SMTPSTransport.hpp" @@ -68,3 +74,6 @@ const serviceInfos& SMTPSTransport::getInfos() const } // net } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_SMTP + diff --git a/src/net/smtp/SMTPServiceInfos.cpp b/src/net/smtp/SMTPServiceInfos.cpp index d2d0dcc2..5fe8dae2 100644 --- a/src/net/smtp/SMTPServiceInfos.cpp +++ b/src/net/smtp/SMTPServiceInfos.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_SMTP + + #include "vmime/net/smtp/SMTPServiceInfos.hpp" @@ -129,3 +135,6 @@ const std::vector SMTPServiceInfos::getAvailablePropert } // net } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_SMTP + diff --git a/src/net/smtp/SMTPTransport.cpp b/src/net/smtp/SMTPTransport.cpp index bbbea755..64028d1c 100644 --- a/src/net/smtp/SMTPTransport.cpp +++ b/src/net/smtp/SMTPTransport.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_SMTP + + #include "vmime/net/smtp/SMTPTransport.hpp" #include "vmime/net/smtp/SMTPResponse.hpp" @@ -654,3 +660,7 @@ const serviceInfos& SMTPTransport::getInfos() const } // smtp } // net } // vmime + + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_SMTP + diff --git a/src/net/tls/TLSSecuredConnectionInfos.cpp b/src/net/tls/TLSSecuredConnectionInfos.cpp index 2a37069a..2d98f913 100644 --- a/src/net/tls/TLSSecuredConnectionInfos.cpp +++ b/src/net/tls/TLSSecuredConnectionInfos.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_TLS_SUPPORT + + #include "vmime/net/tls/TLSSecuredConnectionInfos.hpp" #include "vmime/net/tls/TLSSession.hpp" @@ -61,3 +67,6 @@ ref TLSSecuredConnectionInfos::getPeerC } // net } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_TLS_SUPPORT + diff --git a/src/net/tls/TLSSession.cpp b/src/net/tls/TLSSession.cpp index 06068085..31149396 100644 --- a/src/net/tls/TLSSession.cpp +++ b/src/net/tls/TLSSession.cpp @@ -21,12 +21,17 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_TLS_SUPPORT && VMIME_TLS_SUPPORT_LIB_IS_GNUTLS + + #include #if GNUTLS_VERSION_NUMBER < 0x030000 #include #endif -#include "vmime/config.hpp" // Dependency on gcrypt is not needed since GNU TLS version 2.12. // See here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=638651 @@ -138,7 +143,7 @@ TLSSession::TLSSession(ref cv) // Sets some default priority on the ciphers, key exchange methods, // macs and compression methods. -#if HAVE_GNUTLS_PRIORITY_FUNCS +#if VMIME_HAVE_GNUTLS_PRIORITY_FUNCS gnutls_dh_set_prime_bits(*m_gnutlsSession, 128); if ((res = gnutls_priority_set_direct @@ -152,7 +157,7 @@ TLSSession::TLSSession(ref cv) } } -#else // !HAVE_GNUTLS_PRIORITY_FUNCS +#else // !VMIME_HAVE_GNUTLS_PRIORITY_FUNCS gnutls_set_default_priority(*m_gnutlsSession); @@ -228,7 +233,7 @@ TLSSession::TLSSession(ref cv) gnutls_compression_set_priority(*m_gnutlsSession, compressionPriority); -#endif // !HAVE_GNUTLS_PRIORITY_FUNCS +#endif // !VMIME_HAVE_GNUTLS_PRIORITY_FUNCS // Initialize credentials gnutls_credentials_set(*m_gnutlsSession, @@ -288,3 +293,6 @@ void TLSSession::throwTLSException(const string& fname, const int code) } // net } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_TLS_SUPPORT && VMIME_TLS_SUPPORT_LIB_IS_GNUTLS + diff --git a/src/net/tls/TLSSocket.cpp b/src/net/tls/TLSSocket.cpp index 3cccc1e9..6fa8d02d 100644 --- a/src/net/tls/TLSSocket.cpp +++ b/src/net/tls/TLSSocket.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_TLS_SUPPORT && VMIME_TLS_SUPPORT_LIB_IS_GNUTLS + + #include #include @@ -406,3 +412,6 @@ void TLSSocket::internalThrow() } // net } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_TLS_SUPPORT && VMIME_TLS_SUPPORT_LIB_IS_GNUTLS + diff --git a/src/net/transport.cpp b/src/net/transport.cpp index f8ca7b7a..9349e750 100644 --- a/src/net/transport.cpp +++ b/src/net/transport.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES + + #include "vmime/net/transport.hpp" #include "vmime/utility/stream.hpp" @@ -135,3 +141,6 @@ transport::Type transport::getType() const } // net } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES + diff --git a/src/platform.cpp b/src/platform.cpp index d1d23de0..ff6a9965 100644 --- a/src/platform.cpp +++ b/src/platform.cpp @@ -22,6 +22,10 @@ // #include "vmime/platform.hpp" +#include "vmime/config.hpp" + +#include "vmime/platforms/posix/posixHandler.hpp" +#include "vmime/platforms/windows/windowsHandler.hpp" namespace vmime @@ -36,4 +40,40 @@ platform::handler::~handler() } +// static +ref platform::getDefaultHandler() +{ + +#if VMIME_PLATFORM_IS_WINDOWS + return vmime::create (); +#elif VMIME_PLATFORM_IS_POSIX + return vmime::create (); +#else + return NULL; +#endif + +} + + +// static +ref platform::getHandler() +{ + // If a custom platform handler is installed, return it + if (sm_handler) + return sm_handler; + + // Else, use the default handler for this platform + ref defaultHandler = getDefaultHandler(); + + if (defaultHandler) + { + sm_handler = defaultHandler; + return sm_handler; + } + + // Oops... no platform handler! + throw exceptions::no_platform_handler(); +} + + } // vmime diff --git a/src/platforms/posix/posixChildProcess.cpp b/src/platforms/posix/posixChildProcess.cpp index 68ef021e..a05942da 100644 --- a/src/platforms/posix/posixChildProcess.cpp +++ b/src/platforms/posix/posixChildProcess.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_PLATFORM_IS_POSIX && VMIME_HAVE_FILESYSTEM_FEATURES + + #include "vmime/platforms/posix/posixChildProcess.hpp" #include "vmime/platforms/posix/posixFile.hpp" @@ -394,3 +400,6 @@ void posixChildProcess::waitForFinish() } // platforms } // vmime + +#endif // VMIME_PLATFORM_IS_POSIX && VMIME_HAVE_FILESYSTEM_FEATURES + diff --git a/src/platforms/posix/posixFile.cpp b/src/platforms/posix/posixFile.cpp index 4087a21f..2f67a2be 100644 --- a/src/platforms/posix/posixFile.cpp +++ b/src/platforms/posix/posixFile.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_PLATFORM_IS_POSIX && VMIME_HAVE_FILESYSTEM_FEATURES + + #include "vmime/platforms/posix/posixFile.hpp" #include @@ -38,9 +44,6 @@ #include "vmime/exception.hpp" -#if VMIME_HAVE_FILESYSTEM_FEATURES - - namespace vmime { namespace platforms { namespace posix { @@ -621,4 +624,4 @@ void posixFileSystemFactory::reportError(const vmime::utility::path& path, const } // vmime -#endif // VMIME_HAVE_FILESYSTEM_FEATURES +#endif // VMIME_PLATFORM_IS_POSIX && VMIME_HAVE_FILESYSTEM_FEATURES diff --git a/src/platforms/posix/posixHandler.cpp b/src/platforms/posix/posixHandler.cpp index 2c113072..8629b1e2 100644 --- a/src/platforms/posix/posixHandler.cpp +++ b/src/platforms/posix/posixHandler.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_PLATFORM_IS_POSIX + + #include "vmime/platforms/posix/posixHandler.hpp" #include @@ -258,3 +264,6 @@ void posixHandler::wait() const } // posix } // platforms } // vmime + + +#endif // VMIME_PLATFORM_IS_POSIX diff --git a/src/platforms/posix/posixSocket.cpp b/src/platforms/posix/posixSocket.cpp index f280dadc..6fcbd118 100644 --- a/src/platforms/posix/posixSocket.cpp +++ b/src/platforms/posix/posixSocket.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_PLATFORM_IS_POSIX && VMIME_HAVE_MESSAGING_FEATURES + + #include "vmime/platforms/posix/posixSocket.hpp" #include "vmime/platforms/posix/posixHandler.hpp" @@ -37,9 +43,6 @@ #include "vmime/exception.hpp" -#if VMIME_HAVE_MESSAGING_FEATURES - - namespace vmime { namespace platforms { namespace posix { @@ -493,4 +496,4 @@ ref posixSocketFactory::create(ref @@ -30,9 +36,6 @@ #include "vmime/utility/stringUtils.hpp" -#if VMIME_HAVE_FILESYSTEM_FEATURES - - namespace vmime { namespace platforms { namespace windows { @@ -546,4 +549,5 @@ void windowsFileWriterOutputStream::flush() } // vmime -#endif // VMIME_HAVE_FILESYSTEM_FEATURES +#endif // VMIME_PLATFORM_IS_WINDOWS && VMIME_HAVE_FILESYSTEM_FEATURES + diff --git a/src/platforms/windows/windowsHandler.cpp b/src/platforms/windows/windowsHandler.cpp index 1a37c839..1ed4025b 100644 --- a/src/platforms/windows/windowsHandler.cpp +++ b/src/platforms/windows/windowsHandler.cpp @@ -21,9 +21,14 @@ // the GNU General Public License cover the whole combination. // -#include "vmime/platforms/windows/windowsHandler.hpp" #include "vmime/config.hpp" + +#if VMIME_PLATFORM_IS_WINDOWS + + +#include "vmime/platforms/windows/windowsHandler.hpp" + #include #include #include @@ -270,3 +275,7 @@ void windowsHandler::wait() const } // posix } // platforms } // vmime + + +#endif // VMIME_PLATFORM_IS_WINDOWS + diff --git a/src/platforms/windows/windowsSocket.cpp b/src/platforms/windows/windowsSocket.cpp index 430c8ea0..27cbcaa7 100644 --- a/src/platforms/windows/windowsSocket.cpp +++ b/src/platforms/windows/windowsSocket.cpp @@ -21,13 +21,18 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_PLATFORM_IS_WINDOWS && VMIME_HAVE_MESSAGING_FEATURES + + #pragma warning(disable: 4267) #include "vmime/platforms/windows/windowsSocket.hpp" #include "vmime/exception.hpp" -#if VMIME_HAVE_MESSAGING_FEATURES namespace vmime { namespace platforms { @@ -193,4 +198,5 @@ ref windowsSocketFactory::create(ref defaultAuthenticator::getService() const } // security } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES + diff --git a/src/security/sasl/SASLContext.cpp b/src/security/sasl/SASLContext.cpp index 4bb33c14..8c623124 100644 --- a/src/security/sasl/SASLContext.cpp +++ b/src/security/sasl/SASLContext.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + + #include #include @@ -197,3 +203,6 @@ const string SASLContext::getErrorMessage(const string& fname, const int code) } // security } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + diff --git a/src/security/sasl/SASLMechanismFactory.cpp b/src/security/sasl/SASLMechanismFactory.cpp index 285d6d36..00632fb8 100644 --- a/src/security/sasl/SASLMechanismFactory.cpp +++ b/src/security/sasl/SASLMechanismFactory.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + + #include #include @@ -133,3 +139,6 @@ bool SASLMechanismFactory::isMechanismSupported(const string& name) const } // security } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + diff --git a/src/security/sasl/SASLSession.cpp b/src/security/sasl/SASLSession.cpp index c1688b78..dcf53452 100644 --- a/src/security/sasl/SASLSession.cpp +++ b/src/security/sasl/SASLSession.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + + #include #include @@ -181,3 +187,6 @@ int SASLSession::gsaslCallback } // security } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + diff --git a/src/security/sasl/SASLSocket.cpp b/src/security/sasl/SASLSocket.cpp index d88153e4..28f5f6f6 100644 --- a/src/security/sasl/SASLSocket.cpp +++ b/src/security/sasl/SASLSocket.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + + #include "vmime/security/sasl/SASLSocket.hpp" #include "vmime/security/sasl/SASLSession.hpp" @@ -175,3 +181,6 @@ void SASLSocket::sendRaw(const char* buffer, const size_type count) } // security } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + diff --git a/src/security/sasl/builtinSASLMechanism.cpp b/src/security/sasl/builtinSASLMechanism.cpp index 767caf96..9501fb4b 100644 --- a/src/security/sasl/builtinSASLMechanism.cpp +++ b/src/security/sasl/builtinSASLMechanism.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + + #include #include "vmime/security/sasl/builtinSASLMechanism.hpp" @@ -184,3 +190,6 @@ void builtinSASLMechanism::decode } // security } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + diff --git a/src/security/sasl/defaultSASLAuthenticator.cpp b/src/security/sasl/defaultSASLAuthenticator.cpp index 4eae4e39..eba703b2 100644 --- a/src/security/sasl/defaultSASLAuthenticator.cpp +++ b/src/security/sasl/defaultSASLAuthenticator.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + + #include "vmime/security/sasl/defaultSASLAuthenticator.hpp" #include "vmime/security/sasl/SASLMechanism.hpp" @@ -141,3 +147,6 @@ ref defaultSASLAuthenticator::getSASLMechanism() const } // security } // vmime + +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + diff --git a/src/utility/encoder/uuEncoder.cpp b/src/utility/encoder/uuEncoder.cpp index d2974e63..0ddfbac6 100644 --- a/src/utility/encoder/uuEncoder.cpp +++ b/src/utility/encoder/uuEncoder.cpp @@ -116,8 +116,8 @@ utility::stream::size_type uuEncoder::encode(utility::inputStream& in, const unsigned char c3 = static_cast (inBuffer[i + 2]); outBuffer[j] = UUENCODE(c1 >> 2); - outBuffer[j + 1] = UUENCODE((c1 << 4) & 060 | (c2 >> 4) & 017); - outBuffer[j + 2] = UUENCODE((c2 << 2) & 074 | (c3 >> 6) & 03); + outBuffer[j + 1] = UUENCODE(((c1 << 4) & 060) | ((c2 >> 4) & 017)); + outBuffer[j + 2] = UUENCODE(((c2 << 2) & 074) | ((c3 >> 6) & 03)); outBuffer[j + 3] = UUENCODE(c3 & 077); } @@ -173,7 +173,7 @@ utility::stream::size_type uuEncoder::decode(utility::inputStream& in, const utility::stream::size_type outLength = UUDECODE(lengthChar); const utility::stream::size_type inLength = std::min((outLength * 4) / 3, static_cast (64)); - utility::stream::value_type inPos = 0; + utility::stream::size_type inPos = 0; switch (lengthChar) { @@ -302,9 +302,9 @@ utility::stream::size_type uuEncoder::decode(utility::inputStream& in, switch (n) { default: - case 3: outBuffer[j + 2] = UUDECODE(c3) << 6 | UUDECODE(c4); - case 2: outBuffer[j + 1] = UUDECODE(c2) << 4 | UUDECODE(c3) >> 2; - case 1: outBuffer[j] = UUDECODE(c1) << 2 | UUDECODE(c2) >> 4; + case 3: outBuffer[j + 2] = static_cast (UUDECODE(c3) << 6 | UUDECODE(c4)); + case 2: outBuffer[j + 1] = static_cast (UUDECODE(c2) << 4 | UUDECODE(c3) >> 2); + case 1: outBuffer[j] = static_cast (UUDECODE(c1) << 2 | UUDECODE(c2) >> 4); case 0: break; } diff --git a/vmime.doxygen b/vmime.doxygen deleted file mode 100644 index 50960e13..00000000 --- a/vmime.doxygen +++ /dev/null @@ -1,1043 +0,0 @@ -# -# Doxygen settings for VMime -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") -# - -#--------------------------------------------------------------------------- -# General configuration options -#--------------------------------------------------------------------------- - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = VMime - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = ./doc/ - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, -# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en -# (Japanese with english messages), Korean, Norwegian, Polish, Portuguese, -# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish and Ukrainian. - -OUTPUT_LANGUAGE = English - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these class will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = YES - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -#HIDE_IN_BODY_DOCS = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = NO - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited -# members of a class in the documentation of that class as if those members were -# ordinary class members. Constructors, destructors and assignment operators of -# the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. It is allowed to use relative paths in the argument list. - -STRIP_FROM_PATH = - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower case letters. If set to YES upper case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# users are adviced to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = YES - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explict @brief command for a brief description. - -JAVADOC_AUTOBRIEF = YES - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# reimplements. - -INHERIT_DOCS = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = NO - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 4 - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consist of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. -# For instance some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources -# only. Doxygen will then generate output that is more tailored for Java. -# For instance namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = YES - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -#WARN_IF_DOC_ERROR = YES - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = ./src/ ./vmime/ - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp -# *.h++ *.idl *.odl - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories -# that are symbolic links (a Unix filesystem feature) are excluded from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. - -EXCLUDE_PATTERNS = */config.hpp */IMAPTag* */IMAPParser* */IMAPUtils* */IMAPConnection* */md5* */smartPtr* */authHelper* */maildirUtils* - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. - -INPUT_FILTER = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. - -SOURCE_BROWSER = NO -# YES --> sources visibles - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 1 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output dir. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non empty doxygen will try to run -# the html help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the Html help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript and frames is required (for instance Mozilla, Netscape 4.0+, -# or Internet explorer 4.0+). Note that for large projects the tree generation -# can take a very long time. In such cases it is better to disable this feature. -# Windows users are probably better off using the HTML help feature. - -GENERATE_TREEVIEW = YES - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 300 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimised for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assigments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_XML = NO - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -#GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -#PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -#PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -#PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = YES - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_PREDEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. - -PREDEFINED = VMIME_BUILDING_DOC VMIME_HAVE_SASL_SUPPORT VMIME_HAVE_TLS_SUPPORT - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse the -# parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::addtions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES tag can be used to specify one or more tagfiles. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or -# super classes. Setting the tag to NO turns the diagrams off. Note that this -# option is superceded by the HAVE_DOT option below. This is only a fallback. It is -# recommended to install and use dot, since it yield more powerful graphs. - -CLASS_DIAGRAMS = YES - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = YES - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found on the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_WIDTH = 1024 - -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermedate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::addtions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO - -# The CGI_NAME tag should be the name of the CGI script that -# starts the search engine (doxysearch) with the correct parameters. -# A script with this name will be generated by doxygen. - -#CGI_NAME = search.cgi - -# The CGI_URL tag should be the absolute URL to the directory where the -# cgi binaries are located. See the documentation of your http daemon for -# details. - -#CGI_URL = - -# The DOC_URL tag should be the absolute URL to the directory where the -# documentation is located. If left blank the absolute path to the -# documentation, with file:// prepended to it, will be used. - -#DOC_URL = - -# The DOC_ABSPATH tag should be the absolute path to the directory where the -# documentation is located. If left blank the directory on the local machine -# will be used. - -#DOC_ABSPATH = - -# The BIN_ABSPATH tag must point to the directory where the doxysearch binary -# is installed. - -#BIN_ABSPATH = /usr/local/bin/ - -# The EXT_DOC_PATHS tag can be used to specify one or more paths to -# documentation generated for other projects. This allows doxysearch to search -# the documentation for these projects as well. - -#EXT_DOC_PATHS = - diff --git a/vmime/base.hpp b/vmime/base.hpp index 957793d3..b1bf7aca 100644 --- a/vmime/base.hpp +++ b/vmime/base.hpp @@ -78,7 +78,7 @@ namespace vmime } template - inline size_t count(T const (&array)[N]) + inline size_t count(T const (&/* array */)[N]) { return (N); } diff --git a/vmime/exception.hpp b/vmime/exception.hpp index 5b68bd7e..fe96fb7e 100644 --- a/vmime/exception.hpp +++ b/vmime/exception.hpp @@ -362,6 +362,21 @@ public: }; +/** The URL is malformed. + */ + +class malformed_url : public vmime::exception +{ +public: + + malformed_url(const string& error, const exception& other = NO_EXCEPTION); + ~malformed_url() throw(); + + exception* clone() const; + const char* name() const throw(); +}; + + #if VMIME_HAVE_MESSAGING_FEATURES @@ -727,21 +742,6 @@ public: }; -/** The URL is malformed. - */ - -class malformed_url : public net_exception -{ -public: - - malformed_url(const string& error, const exception& other = NO_EXCEPTION); - ~malformed_url() throw(); - - exception* clone() const; - const char* name() const throw(); -}; - - /** Folder name is invalid. */ diff --git a/vmime/fileAttachment.hpp b/vmime/fileAttachment.hpp index 1516a9da..d75e36fe 100644 --- a/vmime/fileAttachment.hpp +++ b/vmime/fileAttachment.hpp @@ -25,8 +25,13 @@ #define VMIME_FILEATTACHMENT_HPP_INCLUDED -#include "vmime/defaultAttachment.hpp" +#include "vmime/config.hpp" + + +#if VMIME_HAVE_FILESYSTEM_FEATURES + +#include "vmime/defaultAttachment.hpp" #include "vmime/dateTime.hpp" @@ -185,4 +190,6 @@ private: } // vmime +#endif // VMIME_HAVE_FILESYSTEM_FEATURES + #endif // VMIME_FILEATTACHMENT_HPP_INCLUDED diff --git a/vmime/net/connectionInfos.hpp b/vmime/net/connectionInfos.hpp index 03f01b90..68ecf3e2 100644 --- a/vmime/net/connectionInfos.hpp +++ b/vmime/net/connectionInfos.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_CONNECTIONINFOS_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES + + #include "vmime/object.hpp" @@ -56,5 +62,7 @@ public: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES + #endif // VMIME_NET_CONNECTIONINFOS_HPP_INCLUDED diff --git a/vmime/net/defaultConnectionInfos.hpp b/vmime/net/defaultConnectionInfos.hpp index 518b4bcd..eaf966e9 100644 --- a/vmime/net/defaultConnectionInfos.hpp +++ b/vmime/net/defaultConnectionInfos.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_DEFAULTCONNECTIONINFOS_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES + + #include "vmime/net/connectionInfos.hpp" @@ -54,5 +60,7 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES + #endif // VMIME_NET_DEFAULTCONNECTIONINFOS_HPP_INCLUDED diff --git a/vmime/net/events.hpp b/vmime/net/events.hpp index be05c6e2..6b9e7f00 100644 --- a/vmime/net/events.hpp +++ b/vmime/net/events.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_EVENTS_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES + + #include #include "vmime/utility/path.hpp" @@ -230,4 +236,6 @@ public: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES + #endif // VMIME_NET_EVENTS_HPP_INCLUDED diff --git a/vmime/net/folder.hpp b/vmime/net/folder.hpp index a50ee0e5..56214299 100644 --- a/vmime/net/folder.hpp +++ b/vmime/net/folder.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_FOLDER_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES + + #include #include "vmime/types.hpp" @@ -434,4 +440,6 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES + #endif // VMIME_NET_FOLDER_HPP_INCLUDED diff --git a/vmime/net/imap/IMAPConnection.hpp b/vmime/net/imap/IMAPConnection.hpp index 820987b3..f766e95e 100644 --- a/vmime/net/imap/IMAPConnection.hpp +++ b/vmime/net/imap/IMAPConnection.hpp @@ -27,6 +27,10 @@ #include "vmime/config.hpp" + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + + #include "vmime/net/socket.hpp" #include "vmime/net/timeoutHandler.hpp" #include "vmime/net/session.hpp" @@ -141,4 +145,6 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + #endif // VMIME_NET_IMAP_IMAPCONNECTION_HPP_INCLUDED diff --git a/vmime/net/imap/IMAPFolder.hpp b/vmime/net/imap/IMAPFolder.hpp index 33378581..5471ac49 100644 --- a/vmime/net/imap/IMAPFolder.hpp +++ b/vmime/net/imap/IMAPFolder.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_IMAP_IMAPFOLDER_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + + #include #include @@ -167,4 +173,6 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + #endif // VMIME_NET_IMAP_IMAPFOLDER_HPP_INCLUDED diff --git a/vmime/net/imap/IMAPMessage.hpp b/vmime/net/imap/IMAPMessage.hpp index 06f80919..3be8edb9 100644 --- a/vmime/net/imap/IMAPMessage.hpp +++ b/vmime/net/imap/IMAPMessage.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_IMAP_IMAPMESSAGE_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + + #include "vmime/net/message.hpp" #include "vmime/net/folder.hpp" @@ -137,4 +143,6 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + #endif // VMIME_NET_IMAP_IMAPMESSAGE_HPP_INCLUDED diff --git a/vmime/net/imap/IMAPMessagePartContentHandler.hpp b/vmime/net/imap/IMAPMessagePartContentHandler.hpp index 75a03afd..a251bb13 100644 --- a/vmime/net/imap/IMAPMessagePartContentHandler.hpp +++ b/vmime/net/imap/IMAPMessagePartContentHandler.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_IMAP_IMAPMESSAGEPARTCONTENTHANDLER_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + + #include "vmime/contentHandler.hpp" #include "vmime/net/imap/IMAPMessage.hpp" @@ -71,5 +77,7 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + #endif // VMIME_NET_IMAP_IMAPMESSAGEPARTCONTENTHANDLER_HPP_INCLUDED diff --git a/vmime/net/imap/IMAPParser.hpp b/vmime/net/imap/IMAPParser.hpp index f4305103..dd220c73 100644 --- a/vmime/net/imap/IMAPParser.hpp +++ b/vmime/net/imap/IMAPParser.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_IMAP_IMAPPARSER_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + + #include "vmime/base.hpp" #include "vmime/dateTime.hpp" #include "vmime/charset.hpp" @@ -5200,4 +5206,6 @@ public: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + #endif // VMIME_NET_IMAP_IMAPPARSER_HPP_INCLUDED diff --git a/vmime/net/imap/IMAPPart.hpp b/vmime/net/imap/IMAPPart.hpp index d84db1bd..a0625f55 100644 --- a/vmime/net/imap/IMAPPart.hpp +++ b/vmime/net/imap/IMAPPart.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_IMAP_IMAPPART_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + + #include "vmime/net/message.hpp" #include "vmime/net/imap/IMAPParser.hpp" @@ -84,5 +90,7 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + #endif // VMIME_NET_IMAP_IMAPPART_HPP_INCLUDED diff --git a/vmime/net/imap/IMAPSStore.hpp b/vmime/net/imap/IMAPSStore.hpp index 5772ad96..b9b83f7a 100644 --- a/vmime/net/imap/IMAPSStore.hpp +++ b/vmime/net/imap/IMAPSStore.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_IMAP_IMAPSSTORE_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + + #include "vmime/net/imap/IMAPStore.hpp" @@ -59,5 +65,7 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + #endif // VMIME_NET_IMAP_IMAPSSTORE_HPP_INCLUDED diff --git a/vmime/net/imap/IMAPServiceInfos.hpp b/vmime/net/imap/IMAPServiceInfos.hpp index 7286b3a8..70c23d14 100644 --- a/vmime/net/imap/IMAPServiceInfos.hpp +++ b/vmime/net/imap/IMAPServiceInfos.hpp @@ -26,6 +26,11 @@ #include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + + #include "vmime/net/serviceInfos.hpp" @@ -80,5 +85,7 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + #endif // VMIME_NET_IMAP_IMAPSERVICEINFOS_HPP_INCLUDED diff --git a/vmime/net/imap/IMAPStore.hpp b/vmime/net/imap/IMAPStore.hpp index ebff2e66..3964e35b 100644 --- a/vmime/net/imap/IMAPStore.hpp +++ b/vmime/net/imap/IMAPStore.hpp @@ -27,6 +27,10 @@ #include "vmime/config.hpp" + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + + #include "vmime/net/store.hpp" #include "vmime/net/socket.hpp" #include "vmime/net/folder.hpp" @@ -110,4 +114,6 @@ protected: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + #endif // VMIME_NET_IMAP_IMAPSTORE_HPP_INCLUDED diff --git a/vmime/net/imap/IMAPStructure.hpp b/vmime/net/imap/IMAPStructure.hpp index e43676c8..abf76bba 100644 --- a/vmime/net/imap/IMAPStructure.hpp +++ b/vmime/net/imap/IMAPStructure.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_IMAP_IMAPSTRUCTURE_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + + #include "vmime/net/message.hpp" #include "vmime/net/imap/IMAPParser.hpp" @@ -63,5 +69,7 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + #endif // VMIME_NET_IMAP_IMAPSTRUCTURE_HPP_INCLUDED diff --git a/vmime/net/imap/IMAPTag.hpp b/vmime/net/imap/IMAPTag.hpp index cab2d480..05d374fb 100644 --- a/vmime/net/imap/IMAPTag.hpp +++ b/vmime/net/imap/IMAPTag.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_IMAP_IMAPTAG_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + + #include "vmime/types.hpp" @@ -67,4 +73,6 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + #endif // VMIME_NET_IMAP_IMAPTAG_HPP_INCLUDED diff --git a/vmime/net/imap/IMAPUtils.hpp b/vmime/net/imap/IMAPUtils.hpp index 9c9c4205..356c60ff 100644 --- a/vmime/net/imap/IMAPUtils.hpp +++ b/vmime/net/imap/IMAPUtils.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_IMAP_IMAPUTILS_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + + #include "vmime/types.hpp" #include "vmime/dateTime.hpp" @@ -146,4 +152,6 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_IMAP + #endif // VMIME_NET_IMAP_IMAPUTILS_HPP_INCLUDED diff --git a/vmime/net/maildir/format/courierMaildirFormat.hpp b/vmime/net/maildir/format/courierMaildirFormat.hpp index e8036d51..ab040bc5 100644 --- a/vmime/net/maildir/format/courierMaildirFormat.hpp +++ b/vmime/net/maildir/format/courierMaildirFormat.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_MAILDIR_FORMAT_COURIERMAILDIRFORMAT_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + + #include "vmime/net/maildir/maildirFormat.hpp" @@ -109,5 +115,7 @@ protected: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + #endif // VMIME_NET_MAILDIR_FORMAT_COURIERMAILDIRFORMAT_HPP_INCLUDED diff --git a/vmime/net/maildir/format/kmailMaildirFormat.hpp b/vmime/net/maildir/format/kmailMaildirFormat.hpp index e5f72223..cb218d17 100644 --- a/vmime/net/maildir/format/kmailMaildirFormat.hpp +++ b/vmime/net/maildir/format/kmailMaildirFormat.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_MAILDIR_FORMAT_KMAILMAILDIRFORMAT_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + + #include "vmime/net/maildir/maildirFormat.hpp" @@ -96,5 +102,8 @@ protected: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + + #endif // VMIME_NET_MAILDIR_FORMAT_KMAILMAILDIRFORMAT_HPP_INCLUDED diff --git a/vmime/net/maildir/maildirFolder.hpp b/vmime/net/maildir/maildirFolder.hpp index c9ba8996..f13f2782 100644 --- a/vmime/net/maildir/maildirFolder.hpp +++ b/vmime/net/maildir/maildirFolder.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_MAILDIR_MAILDIRFOLDER_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + + #include #include @@ -187,4 +193,6 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + #endif // VMIME_NET_MAILDIR_MAILDIRFOLDER_HPP_INCLUDED diff --git a/vmime/net/maildir/maildirFormat.hpp b/vmime/net/maildir/maildirFormat.hpp index 09406966..cd6c58f2 100644 --- a/vmime/net/maildir/maildirFormat.hpp +++ b/vmime/net/maildir/maildirFormat.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_MAILDIR_FORMAT_MAILDIRFORMAT_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + + #include "vmime/net/folder.hpp" #include "vmime/utility/file.hpp" @@ -183,5 +189,7 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + #endif // VMIME_NET_MAILDIR_FORMAT_MAILDIRFORMAT_HPP_INCLUDED diff --git a/vmime/net/maildir/maildirMessage.hpp b/vmime/net/maildir/maildirMessage.hpp index cd66d43c..f680a20d 100644 --- a/vmime/net/maildir/maildirMessage.hpp +++ b/vmime/net/maildir/maildirMessage.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_MAILDIR_MAILDIRMESSAGE_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + + #include "vmime/net/message.hpp" #include "vmime/net/folder.hpp" @@ -106,4 +112,6 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + #endif // VMIME_NET_MAILDIR_MAILDIRMESSAGE_HPP_INCLUDED diff --git a/vmime/net/maildir/maildirServiceInfos.hpp b/vmime/net/maildir/maildirServiceInfos.hpp index f3b0df81..046cd2e1 100644 --- a/vmime/net/maildir/maildirServiceInfos.hpp +++ b/vmime/net/maildir/maildirServiceInfos.hpp @@ -26,6 +26,11 @@ #include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + + #include "vmime/net/serviceInfos.hpp" @@ -60,5 +65,7 @@ public: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + #endif // VMIME_NET_MAILDIR_MAILDIRSERVICEINFOS_HPP_INCLUDED diff --git a/vmime/net/maildir/maildirStore.hpp b/vmime/net/maildir/maildirStore.hpp index 40ecec3f..99564f7d 100644 --- a/vmime/net/maildir/maildirStore.hpp +++ b/vmime/net/maildir/maildirStore.hpp @@ -27,6 +27,10 @@ #include "vmime/config.hpp" + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + + #include "vmime/net/store.hpp" #include "vmime/net/socket.hpp" #include "vmime/net/folder.hpp" @@ -111,4 +115,6 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + #endif // VMIME_NET_MAILDIR_MAILDIRSTORE_HPP_INCLUDED diff --git a/vmime/net/maildir/maildirUtils.hpp b/vmime/net/maildir/maildirUtils.hpp index c4aa0b66..2b155730 100644 --- a/vmime/net/maildir/maildirUtils.hpp +++ b/vmime/net/maildir/maildirUtils.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_MAILDIR_MAILDIRUTILS_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + + #include "vmime/utility/file.hpp" #include "vmime/utility/path.hpp" @@ -131,4 +137,6 @@ public: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_MAILDIR + #endif // VMIME_NET_MAILDIR_MAILDIRUTILS_HPP_INCLUDED diff --git a/vmime/net/message.hpp b/vmime/net/message.hpp index 1fbd008d..e25e8cd2 100644 --- a/vmime/net/message.hpp +++ b/vmime/net/message.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_MESSAGE_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES + + #include "vmime/header.hpp" #include "vmime/mediaType.hpp" @@ -306,4 +312,6 @@ public: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES + #endif // VMIME_NET_MESSAGE_HPP_INCLUDED diff --git a/vmime/net/pop3/POP3Folder.hpp b/vmime/net/pop3/POP3Folder.hpp index 090f948b..88e42e9b 100644 --- a/vmime/net/pop3/POP3Folder.hpp +++ b/vmime/net/pop3/POP3Folder.hpp @@ -25,10 +25,15 @@ #define VMIME_NET_POP3_POP3FOLDER_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_POP3 + + #include #include -#include "vmime/config.hpp" #include "vmime/types.hpp" #include "vmime/net/folder.hpp" @@ -155,4 +160,6 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_POP3 + #endif // VMIME_NET_POP3_POP3FOLDER_HPP_INCLUDED diff --git a/vmime/net/pop3/POP3Message.hpp b/vmime/net/pop3/POP3Message.hpp index 337cc5d5..5c7209f3 100644 --- a/vmime/net/pop3/POP3Message.hpp +++ b/vmime/net/pop3/POP3Message.hpp @@ -27,6 +27,10 @@ #include "vmime/config.hpp" + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_POP3 + + #include "vmime/net/message.hpp" #include "vmime/net/folder.hpp" @@ -101,4 +105,6 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_POP3 + #endif // VMIME_NET_POP3_POP3MESSAGE_HPP_INCLUDED diff --git a/vmime/net/pop3/POP3SStore.hpp b/vmime/net/pop3/POP3SStore.hpp index 1f98bfaf..ca1200ec 100644 --- a/vmime/net/pop3/POP3SStore.hpp +++ b/vmime/net/pop3/POP3SStore.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_POP3_POP3SSTORE_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_POP3 + + #include "vmime/net/pop3/POP3Store.hpp" @@ -59,5 +65,7 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_POP3 + #endif // VMIME_NET_POP3_POP3SSTORE_HPP_INCLUDED diff --git a/vmime/net/pop3/POP3ServiceInfos.hpp b/vmime/net/pop3/POP3ServiceInfos.hpp index d2dff587..def58670 100644 --- a/vmime/net/pop3/POP3ServiceInfos.hpp +++ b/vmime/net/pop3/POP3ServiceInfos.hpp @@ -26,6 +26,11 @@ #include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_POP3 + + #include "vmime/net/serviceInfos.hpp" @@ -82,5 +87,7 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_POP3 + #endif // VMIME_NET_POP3_POP3SERVICEINFOS_HPP_INCLUDED diff --git a/vmime/net/pop3/POP3Store.hpp b/vmime/net/pop3/POP3Store.hpp index 16fcce47..816e16c3 100644 --- a/vmime/net/pop3/POP3Store.hpp +++ b/vmime/net/pop3/POP3Store.hpp @@ -26,6 +26,11 @@ #include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_POP3 + + #include "vmime/messageId.hpp" #include "vmime/net/store.hpp" @@ -142,4 +147,6 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_POP3 + #endif // VMIME_NET_POP3_POP3STORE_HPP_INCLUDED diff --git a/vmime/net/pop3/POP3Utils.hpp b/vmime/net/pop3/POP3Utils.hpp index 2640c0e6..65d5043d 100644 --- a/vmime/net/pop3/POP3Utils.hpp +++ b/vmime/net/pop3/POP3Utils.hpp @@ -25,9 +25,14 @@ #define VMIME_NET_POP3_POP3UTILS_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_POP3 + + #include -#include "vmime/config.hpp" #include "vmime/types.hpp" @@ -63,5 +68,7 @@ public: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_POP3 + #endif // VMIME_NET_POP3_POP3UTILS_HPP_INCLUDED diff --git a/vmime/net/securedConnectionInfos.hpp b/vmime/net/securedConnectionInfos.hpp index b27d30bd..d3bbf003 100644 --- a/vmime/net/securedConnectionInfos.hpp +++ b/vmime/net/securedConnectionInfos.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_SECUREDCONNECTIONINFOS_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES + + #include "vmime/net/connectionInfos.hpp" @@ -43,5 +49,7 @@ class securedConnectionInfos : public connectionInfos } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES + #endif // VMIME_NET_SECUREDCONNECTIONINFOS_HPP_INCLUDED diff --git a/vmime/net/sendmail/sendmailServiceInfos.hpp b/vmime/net/sendmail/sendmailServiceInfos.hpp index a86a4dd4..1b2c57d4 100644 --- a/vmime/net/sendmail/sendmailServiceInfos.hpp +++ b/vmime/net/sendmail/sendmailServiceInfos.hpp @@ -26,10 +26,12 @@ #include "vmime/config.hpp" -#include "vmime/net/serviceInfos.hpp" -#if VMIME_BUILTIN_PLATFORM_POSIX +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_SENDMAIL + + +#include "vmime/net/serviceInfos.hpp" namespace vmime { @@ -63,8 +65,7 @@ public: } // vmime -#endif // VMIME_BUILTIN_PLATFORM_POSIX - +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_SENDMAIL #endif // VMIME_NET_SENDMAIL_SENDMAILSERVICEINFOS_HPP_INCLUDED diff --git a/vmime/net/sendmail/sendmailTransport.hpp b/vmime/net/sendmail/sendmailTransport.hpp index 5ff8cf2a..eefb46ac 100644 --- a/vmime/net/sendmail/sendmailTransport.hpp +++ b/vmime/net/sendmail/sendmailTransport.hpp @@ -27,6 +27,10 @@ #include "vmime/config.hpp" + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_SENDMAIL + + #include "vmime/net/transport.hpp" #include "vmime/net/socket.hpp" #include "vmime/net/timeoutHandler.hpp" @@ -34,9 +38,6 @@ #include "vmime/net/sendmail/sendmailServiceInfos.hpp" -#if VMIME_BUILTIN_PLATFORM_POSIX - - namespace vmime { namespace net { namespace sendmail { @@ -91,7 +92,6 @@ private: } // vmime -#endif // VMIME_BUILTIN_PLATFORM_POSIX - +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_SENDMAIL #endif // VMIME_NET_SENDMAIL_SENDMAILTRANSPORT_HPP_INCLUDED diff --git a/vmime/net/service.hpp b/vmime/net/service.hpp index 5205feea..8c1d1059 100644 --- a/vmime/net/service.hpp +++ b/vmime/net/service.hpp @@ -26,6 +26,11 @@ #include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES + + #include "vmime/types.hpp" #include "vmime/net/session.hpp" @@ -223,4 +228,6 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES + #endif // VMIME_NET_SERVICE_HPP_INCLUDED diff --git a/vmime/net/serviceFactory.hpp b/vmime/net/serviceFactory.hpp index 0362b472..e752004c 100644 --- a/vmime/net/serviceFactory.hpp +++ b/vmime/net/serviceFactory.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_SERVICEFACTORY_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES + + #include #include "vmime/types.hpp" @@ -157,4 +163,6 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES + #endif // VMIME_NET_SERVICEFACTORY_HPP_INCLUDED diff --git a/vmime/net/serviceInfos.hpp b/vmime/net/serviceInfos.hpp index eac77a1d..6a973627 100644 --- a/vmime/net/serviceInfos.hpp +++ b/vmime/net/serviceInfos.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_SERVICEINFOS_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES + + #include #include "vmime/types.hpp" @@ -235,4 +241,6 @@ public: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES + #endif // VMIME_NET_SERVICEINFOS_HPP_INCLUDED diff --git a/vmime/net/session.hpp b/vmime/net/session.hpp index 426fe7a5..3aa5ef93 100644 --- a/vmime/net/session.hpp +++ b/vmime/net/session.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_SESSION_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES + + #include "vmime/security/authenticator.hpp" #include "vmime/utility/url.hpp" @@ -145,4 +151,6 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES + #endif // VMIME_NET_SESSION_HPP_INCLUDED diff --git a/vmime/net/smtp/SMTPResponse.hpp b/vmime/net/smtp/SMTPResponse.hpp index 5ef4f09b..265e16fe 100644 --- a/vmime/net/smtp/SMTPResponse.hpp +++ b/vmime/net/smtp/SMTPResponse.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_SMTP_SMTPRESPONSE_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_SMTP + + #include "vmime/object.hpp" #include "vmime/base.hpp" @@ -138,5 +144,7 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_SMTP + #endif // VMIME_NET_SMTP_SMTPRESPONSE_HPP_INCLUDED diff --git a/vmime/net/smtp/SMTPSTransport.hpp b/vmime/net/smtp/SMTPSTransport.hpp index 393a4f58..cb26fb26 100644 --- a/vmime/net/smtp/SMTPSTransport.hpp +++ b/vmime/net/smtp/SMTPSTransport.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_SMTP_SMTPSSTORE_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_SMTP + + #include "vmime/net/smtp/SMTPTransport.hpp" @@ -59,5 +65,7 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_SMTP + #endif // VMIME_NET_SMTP_SMTPSSTORE_HPP_INCLUDED diff --git a/vmime/net/smtp/SMTPServiceInfos.hpp b/vmime/net/smtp/SMTPServiceInfos.hpp index 61f5aa8b..db6abc25 100644 --- a/vmime/net/smtp/SMTPServiceInfos.hpp +++ b/vmime/net/smtp/SMTPServiceInfos.hpp @@ -26,6 +26,11 @@ #include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_SMTP + + #include "vmime/net/serviceInfos.hpp" @@ -81,5 +86,7 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_SMTP + #endif // VMIME_NET_SMTP_SMTPSERVICEINFOS_HPP_INCLUDED diff --git a/vmime/net/smtp/SMTPTransport.hpp b/vmime/net/smtp/SMTPTransport.hpp index 050fedde..a8b4558b 100644 --- a/vmime/net/smtp/SMTPTransport.hpp +++ b/vmime/net/smtp/SMTPTransport.hpp @@ -27,6 +27,10 @@ #include "vmime/config.hpp" + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_SMTP + + #include "vmime/net/transport.hpp" #include "vmime/net/socket.hpp" #include "vmime/net/timeoutHandler.hpp" @@ -109,4 +113,6 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_MESSAGING_PROTO_SMTP + #endif // VMIME_NET_SMTP_SMTPTRANSPORT_HPP_INCLUDED diff --git a/vmime/net/socket.hpp b/vmime/net/socket.hpp index b3946494..0fac6514 100644 --- a/vmime/net/socket.hpp +++ b/vmime/net/socket.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_SOCKET_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES + + #include "vmime/base.hpp" #include "vmime/net/timeoutHandler.hpp" @@ -138,4 +144,6 @@ public: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES + #endif // VMIME_NET_SOCKET_HPP_INCLUDED diff --git a/vmime/net/store.hpp b/vmime/net/store.hpp index 1c9ac1cb..f1f16bdb 100644 --- a/vmime/net/store.hpp +++ b/vmime/net/store.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_STORE_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES + + #include "vmime/net/service.hpp" #include "vmime/net/folder.hpp" @@ -103,4 +109,6 @@ public: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES + #endif // VMIME_NET_STORE_HPP_INCLUDED diff --git a/vmime/net/timeoutHandler.hpp b/vmime/net/timeoutHandler.hpp index 6a206658..58d14b40 100644 --- a/vmime/net/timeoutHandler.hpp +++ b/vmime/net/timeoutHandler.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_TIMEOUTHANDLER_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES + + #include "vmime/types.hpp" @@ -78,4 +84,6 @@ public: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES + #endif // VMIME_NET_TIMEOUTHANDLER_HPP_INCLUDED diff --git a/vmime/net/tls/TLSSecuredConnectionInfos.hpp b/vmime/net/tls/TLSSecuredConnectionInfos.hpp index d0e40870..eb94dbfc 100644 --- a/vmime/net/tls/TLSSecuredConnectionInfos.hpp +++ b/vmime/net/tls/TLSSecuredConnectionInfos.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_TLSSECUREDCONNECTIONINFOS_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_TLS_SUPPORT + + #include "vmime/net/securedConnectionInfos.hpp" #include "vmime/security/cert/certificateChain.hpp" @@ -72,5 +78,7 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_TLS_SUPPORT + #endif // VMIME_NET_TLSSECUREDCONNECTIONINFOS_HPP_INCLUDED diff --git a/vmime/net/tls/TLSSession.hpp b/vmime/net/tls/TLSSession.hpp index e6bd64fd..75241c8c 100644 --- a/vmime/net/tls/TLSSession.hpp +++ b/vmime/net/tls/TLSSession.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_TLS_TLSSESSION_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_TLS_SUPPORT && VMIME_TLS_SUPPORT_LIB_IS_GNUTLS + + #include "vmime/types.hpp" #include "vmime/net/tls/TLSSocket.hpp" @@ -91,5 +97,7 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_TLS_SUPPORT && VMIME_TLS_SUPPORT_LIB_IS_GNUTLS + #endif // VMIME_NET_TLS_TLSSESSION_HPP_INCLUDED diff --git a/vmime/net/tls/TLSSocket.hpp b/vmime/net/tls/TLSSocket.hpp index 7c389702..e88d424c 100644 --- a/vmime/net/tls/TLSSocket.hpp +++ b/vmime/net/tls/TLSSocket.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_TLS_TLSSOCKET_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_TLS_SUPPORT && VMIME_TLS_SUPPORT_LIB_IS_GNUTLS + + #include "vmime/exception.hpp" #include "vmime/net/socket.hpp" @@ -123,5 +129,7 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_TLS_SUPPORT && VMIME_TLS_SUPPORT_LIB_IS_GNUTLS + #endif // VMIME_NET_TLS_TLSSOCKET_HPP_INCLUDED diff --git a/vmime/net/transport.hpp b/vmime/net/transport.hpp index 45dc5a51..f0b8e2dd 100644 --- a/vmime/net/transport.hpp +++ b/vmime/net/transport.hpp @@ -25,6 +25,12 @@ #define VMIME_NET_TRANSPORT_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES + + #include "vmime/net/service.hpp" #include "vmime/utility/stream.hpp" @@ -78,4 +84,6 @@ public: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES + #endif // VMIME_NET_TRANSPORT_HPP_INCLUDED diff --git a/vmime/platform.hpp b/vmime/platform.hpp index 02815542..2063268e 100644 --- a/vmime/platform.hpp +++ b/vmime/platform.hpp @@ -52,7 +52,7 @@ class platform { public: - /** Handles all platform-dependent operations. It offers an interface to + /** Takes care of all platform-dependent operations. It offers an interface to * access platform-dependent objects: sockets, date/time, file system, etc. */ @@ -135,13 +135,8 @@ public: sm_handler = vmime::create (); } - static ref getHandler() - { - if (!sm_handler) - throw exceptions::no_platform_handler(); - - return (sm_handler); - } + static ref getDefaultHandler(); + static ref getHandler(); private: @@ -149,10 +144,6 @@ private: }; -/** Compatibility with older versions of VMime (before 0.8.1). */ -typedef platform platformDependant; - - } // vmime diff --git a/vmime/platforms/posix/posixChildProcess.hpp b/vmime/platforms/posix/posixChildProcess.hpp index c25aaca3..c9d34506 100644 --- a/vmime/platforms/posix/posixChildProcess.hpp +++ b/vmime/platforms/posix/posixChildProcess.hpp @@ -25,6 +25,12 @@ #define VMIME_PLATFORMS_POSIX_POSIXCHILDPROCESS_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_PLATFORM_IS_POSIX && VMIME_HAVE_FILESYSTEM_FEATURES + + #include "vmime/utility/childProcess.hpp" #include @@ -80,5 +86,7 @@ public: } // vmime +#endif // VMIME_PLATFORM_IS_POSIX && VMIME_HAVE_FILESYSTEM_FEATURES + #endif // VMIME_PLATFORMS_POSIX_POSIXCHILDPROCESS_HPP_INCLUDED diff --git a/vmime/platforms/posix/posixFile.hpp b/vmime/platforms/posix/posixFile.hpp index 704b7b00..654764d1 100644 --- a/vmime/platforms/posix/posixFile.hpp +++ b/vmime/platforms/posix/posixFile.hpp @@ -25,11 +25,14 @@ #define VMIME_PLATFORMS_POSIX_FILE_HPP_INCLUDED -#include "vmime/utility/file.hpp" -#include "vmime/utility/seekableInputStream.hpp" +#include "vmime/config.hpp" + +#if VMIME_PLATFORM_IS_POSIX && VMIME_HAVE_FILESYSTEM_FEATURES -#if VMIME_HAVE_FILESYSTEM_FEATURES + +#include "vmime/utility/file.hpp" +#include "vmime/utility/seekableInputStream.hpp" #include @@ -209,6 +212,6 @@ public: } // vmime -#endif // VMIME_HAVE_FILESYSTEM_FEATURES +#endif // VMIME_PLATFORM_IS_POSIX && VMIME_HAVE_FILESYSTEM_FEATURES #endif // VMIME_PLATFORMS_POSIX_FILE_HPP_INCLUDED diff --git a/vmime/platforms/posix/posixHandler.hpp b/vmime/platforms/posix/posixHandler.hpp index 8e572a21..80cfb650 100644 --- a/vmime/platforms/posix/posixHandler.hpp +++ b/vmime/platforms/posix/posixHandler.hpp @@ -26,6 +26,11 @@ #include "vmime/config.hpp" + + +#if VMIME_PLATFORM_IS_POSIX + + #include "vmime/platform.hpp" #if VMIME_HAVE_MESSAGING_FEATURES @@ -90,4 +95,6 @@ private: } // vmime +#endif // VMIME_PLATFORM_IS_POSIX + #endif // VMIME_PLATFORMS_POSIX_HANDLER_HPP_INCLUDED diff --git a/vmime/platforms/posix/posixSocket.hpp b/vmime/platforms/posix/posixSocket.hpp index 7e0c2d39..1332505b 100644 --- a/vmime/platforms/posix/posixSocket.hpp +++ b/vmime/platforms/posix/posixSocket.hpp @@ -25,10 +25,13 @@ #define VMIME_PLATFORMS_POSIX_SOCKET_HPP_INCLUDED -#include "vmime/net/socket.hpp" +#include "vmime/config.hpp" + +#if VMIME_PLATFORM_IS_POSIX && VMIME_HAVE_MESSAGING_FEATURES -#if VMIME_HAVE_MESSAGING_FEATURES + +#include "vmime/net/socket.hpp" namespace vmime { @@ -83,6 +86,6 @@ public: } // vmime -#endif // VMIME_HAVE_MESSAGING_FEATURES +#endif // VMIME_PLATFORM_IS_POSIX && VMIME_HAVE_MESSAGING_FEATURES #endif // VMIME_PLATFORMS_POSIX_SOCKET_HPP_INCLUDED diff --git a/vmime/platforms/windows/windowsFile.hpp b/vmime/platforms/windows/windowsFile.hpp index f4170329..696803d6 100644 --- a/vmime/platforms/windows/windowsFile.hpp +++ b/vmime/platforms/windows/windowsFile.hpp @@ -25,13 +25,17 @@ #define VMIME_PLATFORMS_WINDOWS_FILE_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_PLATFORM_IS_WINDOWS && VMIME_HAVE_FILESYSTEM_FEATURES + + #include "vmime/utility/file.hpp" #include "vmime/utility/seekableInputStream.hpp" #include -#if VMIME_HAVE_FILESYSTEM_FEATURES - namespace vmime { namespace platforms { @@ -209,6 +213,6 @@ private: } // vmime -#endif // VMIME_HAVE_FILESYSTEM_FEATURES +#endif // VMIME_PLATFORM_IS_WINDOWS && VMIME_HAVE_FILESYSTEM_FEATURES #endif // VMIME_PLATFORMS_WINDOWS_FILE_HPP_INCLUDED diff --git a/vmime/platforms/windows/windowsHandler.hpp b/vmime/platforms/windows/windowsHandler.hpp index 53df3636..4f0150f8 100644 --- a/vmime/platforms/windows/windowsHandler.hpp +++ b/vmime/platforms/windows/windowsHandler.hpp @@ -26,6 +26,11 @@ #include "vmime/config.hpp" + + +#if VMIME_PLATFORM_IS_WINDOWS + + #include "vmime/platform.hpp" #if VMIME_HAVE_MESSAGING_FEATURES @@ -88,4 +93,6 @@ private: } // vmime +#endif // VMIME_PLATFORM_IS_WINDOWS + #endif // VMIME_PLATFORMS_WINDOWS_HANDLER_HPP_INCLUDED diff --git a/vmime/platforms/windows/windowsSocket.hpp b/vmime/platforms/windows/windowsSocket.hpp index 1c89aeb5..c41d8bfe 100644 --- a/vmime/platforms/windows/windowsSocket.hpp +++ b/vmime/platforms/windows/windowsSocket.hpp @@ -25,11 +25,14 @@ #define VMIME_PLATFORMS_WINDOWS_SOCKET_HPP_INCLUDED -#include -#include "vmime/net/socket.hpp" +#include "vmime/config.hpp" + +#if VMIME_PLATFORM_IS_WINDOWS && VMIME_HAVE_MESSAGING_FEATURES -#if VMIME_HAVE_MESSAGING_FEATURES + +#include +#include "vmime/net/socket.hpp" namespace vmime { @@ -82,6 +85,6 @@ public: } // vmime -#endif // VMIME_HAVE_MESSAGING_FEATURES +#endif // VMIME_PLATFORM_IS_WINDOWS && VMIME_HAVE_MESSAGING_FEATURES #endif // VMIME_PLATFORMS_WINDOWS_SOCKET_HPP_INCLUDED diff --git a/vmime/security/authenticator.hpp b/vmime/security/authenticator.hpp index a31fc5ef..4664e417 100644 --- a/vmime/security/authenticator.hpp +++ b/vmime/security/authenticator.hpp @@ -25,6 +25,12 @@ #define VMIME_SECURITY_AUTHENTICATOR_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES + + #include "vmime/types.hpp" @@ -116,5 +122,7 @@ public: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES + #endif // VMIME_SECURITY_AUTHENTICATOR_HPP_INCLUDED diff --git a/vmime/security/cert/X509Certificate.hpp b/vmime/security/cert/X509Certificate.hpp index b916cff5..48fc882c 100644 --- a/vmime/security/cert/X509Certificate.hpp +++ b/vmime/security/cert/X509Certificate.hpp @@ -145,7 +145,7 @@ public: private: - class X509CertificateInternalData* m_data; + struct X509CertificateInternalData* m_data; }; diff --git a/vmime/security/defaultAuthenticator.hpp b/vmime/security/defaultAuthenticator.hpp index dfb82983..f9e9a4bf 100644 --- a/vmime/security/defaultAuthenticator.hpp +++ b/vmime/security/defaultAuthenticator.hpp @@ -25,6 +25,12 @@ #define VMIME_SECURITY_DEFAULTAUTHENTICATOR_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES + + #include "vmime/security/authenticator.hpp" @@ -61,5 +67,7 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES + #endif // VMIME_SECURITY_DEFAULTAUTHENTICATOR_HPP_INCLUDED diff --git a/vmime/security/sasl/SASLAuthenticator.hpp b/vmime/security/sasl/SASLAuthenticator.hpp index daa090ac..1573dc20 100644 --- a/vmime/security/sasl/SASLAuthenticator.hpp +++ b/vmime/security/sasl/SASLAuthenticator.hpp @@ -25,6 +25,12 @@ #define VMIME_SECURITY_SASL_SASLAUTHENTICATOR_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + + #include "vmime/types.hpp" #include "vmime/security/authenticator.hpp" @@ -84,5 +90,7 @@ public: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + #endif // VMIME_SECURITY_SASL_SASLAUTHENTICATOR_HPP_INCLUDED diff --git a/vmime/security/sasl/SASLContext.hpp b/vmime/security/sasl/SASLContext.hpp index 7703ab1d..acdb8b5a 100644 --- a/vmime/security/sasl/SASLContext.hpp +++ b/vmime/security/sasl/SASLContext.hpp @@ -25,6 +25,12 @@ #define VMIME_SECURITY_SASL_SASLCONTEXT_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + + #include "vmime/types.hpp" #include "vmime/security/sasl/SASLSession.hpp" @@ -116,5 +122,7 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + #endif // VMIME_SECURITY_SASL_SASLCONTEXT_HPP_INCLUDED diff --git a/vmime/security/sasl/SASLMechanism.hpp b/vmime/security/sasl/SASLMechanism.hpp index dbb7cd28..678a3030 100644 --- a/vmime/security/sasl/SASLMechanism.hpp +++ b/vmime/security/sasl/SASLMechanism.hpp @@ -25,6 +25,12 @@ #define VMIME_SECURITY_SASL_SASLMECHANISM_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + + #include "vmime/types.hpp" @@ -119,5 +125,7 @@ public: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + #endif // VMIME_SECURITY_SASL_SASLMECHANISM_HPP_INCLUDED diff --git a/vmime/security/sasl/SASLMechanismFactory.hpp b/vmime/security/sasl/SASLMechanismFactory.hpp index 7b860613..064637a6 100644 --- a/vmime/security/sasl/SASLMechanismFactory.hpp +++ b/vmime/security/sasl/SASLMechanismFactory.hpp @@ -25,6 +25,12 @@ #define VMIME_SECURITY_SASL_SASLMECHANISMFACTORY_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + + #include "vmime/types.hpp" #include "vmime/base.hpp" @@ -131,5 +137,7 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + #endif // VMIME_SECURITY_SASL_SASLMECHANISMFACTORY_HPP_INCLUDED diff --git a/vmime/security/sasl/SASLSession.hpp b/vmime/security/sasl/SASLSession.hpp index 79acfa92..63645b18 100644 --- a/vmime/security/sasl/SASLSession.hpp +++ b/vmime/security/sasl/SASLSession.hpp @@ -25,6 +25,12 @@ #define VMIME_SECURITY_SASL_SASLSESSION_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + + #include "vmime/types.hpp" #include "vmime/security/sasl/SASLAuthenticator.hpp" @@ -150,5 +156,7 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + #endif // VMIME_SECURITY_SASL_SASLSESSION_HPP_INCLUDED diff --git a/vmime/security/sasl/SASLSocket.hpp b/vmime/security/sasl/SASLSocket.hpp index 03483315..f05ed424 100644 --- a/vmime/security/sasl/SASLSocket.hpp +++ b/vmime/security/sasl/SASLSocket.hpp @@ -25,6 +25,12 @@ #define VMIME_SECURITY_SASL_SASLSOCKET_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + + #include "vmime/types.hpp" #include "vmime/net/socket.hpp" @@ -78,5 +84,7 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + #endif // VMIME_SECURITY_SASL_SASLSOCKET_HPP_INCLUDED diff --git a/vmime/security/sasl/builtinSASLMechanism.hpp b/vmime/security/sasl/builtinSASLMechanism.hpp index ac7421cf..aa6c360c 100644 --- a/vmime/security/sasl/builtinSASLMechanism.hpp +++ b/vmime/security/sasl/builtinSASLMechanism.hpp @@ -25,6 +25,12 @@ #define VMIME_SECURITY_SASL_BUILTINSASLMECHANISM_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + + #include "vmime/security/sasl/SASLMechanism.hpp" @@ -81,5 +87,7 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + #endif // VMIME_SECURITY_SASL_BUILTINSASLMECHANISM_HPP_INCLUDED diff --git a/vmime/security/sasl/defaultSASLAuthenticator.hpp b/vmime/security/sasl/defaultSASLAuthenticator.hpp index 7595de79..aeb9ce47 100644 --- a/vmime/security/sasl/defaultSASLAuthenticator.hpp +++ b/vmime/security/sasl/defaultSASLAuthenticator.hpp @@ -25,6 +25,12 @@ #define VMIME_SECURITY_SASL_DEFAULTSASLAUTHENTICATOR_HPP_INCLUDED +#include "vmime/config.hpp" + + +#if VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + + #include "vmime/security/sasl/SASLAuthenticator.hpp" #include "vmime/security/defaultAuthenticator.hpp" @@ -78,5 +84,7 @@ private: } // vmime +#endif // VMIME_HAVE_MESSAGING_FEATURES && VMIME_HAVE_SASL_SUPPORT + #endif // VMIME_SECURITY_SASL_DEFAULTSASLAUTHENTICATOR_HPP_INCLUDED -- cgit v1.2.3