Merge branch 'raid-fix'
authorGerd von Egidy <gerd.von.egidy@intra2net.com>
Mon, 23 May 2011 14:51:44 +0000 (16:51 +0200)
committerGerd von Egidy <gerd.von.egidy@intra2net.com>
Mon, 23 May 2011 14:51:44 +0000 (16:51 +0200)
92 files changed:
CMakeLists.txt [new file with mode: 0644]
LICENSE [deleted file]
Makefile.am [deleted file]
Makefile.cvs [deleted file]
acinclude.m4 [deleted file]
configlib/CMakeLists.txt [new file with mode: 0644]
configlib/Makefile.am [deleted file]
configlib/i2n_global_config.cpp
configlib/i2n_global_config.hpp
configure.in [deleted file]
doc/Makefile.am [deleted file]
libi2ncommon.kdevelop [deleted file]
libi2ncommon.pc.in
libi2ncommon.spec
libi2ncommon_utils.pc.in
m4/ax_boost_base.m4 [deleted file]
m4/ax_boost_iostreams.m4 [deleted file]
m4/ax_boost_unit_test_framework.m4 [deleted file]
src/CMakeLists.txt [new file with mode: 0644]
src/Makefile.am [deleted file]
src/cron.cpp
src/cron.hpp
src/daemonfunc.cpp
src/daemonfunc.hpp
src/exception.hxx
src/filefunc.cpp
src/filefunc.hxx
src/i18n.cpp [new file with mode: 0644]
src/i18n.h [new file with mode: 0644]
src/i2n_configdata.hpp
src/i2n_configfile.cpp
src/i2n_configfile.hpp
src/insocketstream.hxx
src/ip_type.hxx
src/ipfunc.cpp
src/ipfunc.hxx
src/log_macros.hpp
src/logfunc.cpp
src/logfunc.hpp
src/logread.cpp
src/logread.hxx
src/oftmpstream.cpp
src/oftmpstream.hxx
src/pidfile.cpp
src/pidfile.hpp
src/pipestream.hxx
src/pointer_func.cpp
src/pointer_func.hpp
src/source_track_basics.cpp
src/source_track_basics.hpp
src/stringfunc.cpp
src/stringfunc.hxx
src/timefunc.cpp
src/timefunc.hxx
src/tmpfstream.cpp
src/tmpfstream.hpp
src/tmpfstream_impl.hpp
src/tracefunc.cpp
src/tracefunc.hpp
src/tribool.cpp
src/tribool.hpp
src/userfunc.cpp
src/userfunc.hpp
src/week.cpp
src/week.hpp
stamp-h.in [deleted file]
templates/cpp [deleted file]
templates/h [deleted file]
test/CMakeLists.txt [new file with mode: 0644]
test/Makefile.am [deleted file]
test/ip_range.cpp
test/stringfunc.cpp
test/stringfunc_imaputf7.cpp [new file with mode: 0644]
test/test_containerfunc.cpp
test/test_cron_interval.cpp
test/test_cron_point.cpp
test/test_filefunc.cpp
test/test_global_config.cpp
test/test_logging.cpp
test/test_pidfile.cpp
test/test_timefunc.cpp
test/test_tmpfstream.cpp
utils/CMakeLists.txt [new file with mode: 0644]
utils/Makefile.am [deleted file]
utils/containerfunc.cpp
utils/containerfunc.hpp
utils/signalfunc.cpp
utils/signalfunc.hpp
xmllib/CMakeLists.txt [new file with mode: 0644]
xmllib/Makefile.am [deleted file]
xmllib/xmlcommon.cpp
xmllib/xmlcommon.hpp

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..5a0282e
--- /dev/null
@@ -0,0 +1,175 @@
+# Project
+project(libi2ncommon)
+
+# Version settings
+set(MAJOR_VERSION 2)
+set(MINOR_VERSION 0)
+set(VERSION 2.0)
+
+SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}")
+
+# CMake
+if("${CMAKE_BUILD_TYPE}" STREQUAL "")
+   set(CMAKE_BUILD_TYPE     Debug)
+endif("${CMAKE_BUILD_TYPE}" STREQUAL "")
+set(CMAKE_COLOR_MAKEFILE ON)
+cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
+
+# Debug build
+message("-- Build type: ${CMAKE_BUILD_TYPE}")
+if(${CMAKE_BUILD_TYPE} STREQUAL Debug)
+   add_definitions(-DDEBUG)
+endif(${CMAKE_BUILD_TYPE} STREQUAL Debug)
+
+# Set components
+set(CPACK_COMPONENTS_ALL sharedlibs staticlibs headers)
+set(CPACK_COMPONENT_SHAREDLIBS_DISPLAY_NAME "Shared libraries")
+set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ Headers")
+
+set(CPACK_COMPONENT_SHAREDLIBS_DESCRIPTION
+"Shared library for general use.")
+set(CPACK_COMPONENT_HEADERS_DESCRIPTION
+"C/C++ header files.")
+
+set(CPACK_COMPONENT_SHAREDLIBS_GROUP "Development")
+set(CPACK_COMPONENT_HEADERS_GROUP    "Development")
+
+# Package information
+set(CPACK_PACKAGE_VERSION              ${VERSION})
+set(CPACK_PACKAGE_CONTACT              "Intra2net AG <libi2ncommon@developer.intra2net.com>")
+set(CPACK_PACKAGE_DESCRIPTION          "libi2ncommon library.")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY  ${CPACK_PACKAGE_DESCRIPTION}
+                                       )
+# Package settings
+set(CPACK_GENERATOR                    "DEB;RPM")
+set(CPACK_CMAKE_GENERATOR              "Unix Makefiles")
+set(CPACK_PACKAGE_NAME                 ${PROJECT_NAME})
+set(CPACK_PACKAGE_FILE_NAME            ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}${PACK_ARCH})
+
+set(CPACK_RESOURCE_FILE_LICENSE        ${CMAKE_SOURCE_DIR}/COPYING.GPL)
+
+set(CPACK_SOURCE_GENERATOR             TGZ)
+set(CPACK_SOURCE_IGNORE_FILES
+    "~$"
+    "\\\\.git"
+    "build"
+    "build-rpm"
+)
+set(CPACK_SOURCE_PACKAGE_FILE_NAME     ${CPACK_PACKAGE_FILE_NAME})
+
+# documentation
+find_package(Doxygen)
+if(DOXYGEN_FOUND)
+   # Set variables
+   set(PACKAGE libi2ncommon)
+   set(top_srcdir ${CMAKE_SOURCE_DIR})
+
+   # Find doxy config
+   message(STATUS "Doxygen found.")
+   set(DOXY_DIR "${CMAKE_SOURCE_DIR}/doc")
+   set(DOXY_CONFIG "${DOXY_DIR}/Doxyfile.in")
+
+   # Copy doxy.config.in
+   configure_file("${DOXY_CONFIG}" "${CMAKE_BINARY_DIR}/doxy.config")
+
+   # Create doc directory
+   add_custom_command(
+   OUTPUT ${CMAKE_BINARY_DIR}/doc
+   COMMAND rm -rf ${CMAKE_BINARY_DIR}/doc/{html,man}
+   COMMAND mkdir -p ${CMAKE_BINARY_DIR}/doc
+   DEPENDS src configlib xmllib utils test
+   )
+
+   # Run doxygen
+   add_custom_command(
+   OUTPUT ${CMAKE_BINARY_DIR}/doc/html/index.html
+   COMMAND ${DOXYGEN_EXECUTABLE} "${CMAKE_BINARY_DIR}/doxy.config"
+   DEPENDS "${CMAKE_BINARY_DIR}/doxy.config" "${CMAKE_BINARY_DIR}/doc"
+   WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/doc
+   )
+
+   add_custom_target(docs ALL DEPENDS ${CMAKE_BINARY_DIR}/doc/html/index.html)
+
+   message(STATUS "Generating API documentation with Doxygen")
+else(DOXYGEN_FOUND)
+   message(STATUS "Not generating API documentation")
+endif(DOXYGEN_FOUND)
+
+# Conditional build itmes
+option(BUILD_XMLLIB "Build xml part of libi2ncommon - needs patched libxml++" OFF)
+if (BUILD_XMLLIB)
+   message(STATUS "Build xml library part")
+else(BUILD_XMLLIB)
+   message(STATUS "NOT building xml library part")
+endif(BUILD_XMLLIB)
+
+option(IMAP_UTF7_SUPPORT "Enable imap modified utf7 support - needs patched libiconv" OFF)
+if (IMAP_UTF7_SUPPORT)
+   message(STATUS "Build imap modified utf7 support")
+else(IMAP_UTF7_SUPPORT)
+   message(STATUS "NOT building imap modified utf7 support")
+endif(IMAP_UTF7_SUPPORT)
+
+# Find external packages
+include(FindPkgConfig)
+
+# Find Boost
+find_package(Boost COMPONENTS iostreams unit_test_framework REQUIRED)
+
+# Find libxml++
+if (BUILD_XMLLIB)
+    pkg_check_modules(XMLPP REQUIRED libxml++-2.6)
+endif(BUILD_XMLLIB)
+
+# Find iconv
+if (IMAP_UTF7_SUPPORT)
+    pkg_check_modules(ICONV REQUIRED libiconv)
+    include_directories($ICONV_INCLUDE_DIRS})
+    link_directories(${ICONV_LIBRARY_DIRS})
+endif(IMAP_UTF7_SUPPORT)
+
+# pkgconfig output
+set(prefix      ${CMAKE_INSTALL_PREFIX})
+set(exec_prefix ${CMAKE_INSTALL_PREFIX}/bin)
+set(includedir  ${CMAKE_INSTALL_PREFIX}/include)
+set(libdir      ${CMAKE_INSTALL_PREFIX}/lib)
+
+# construct ${BOOST_LDADD} from ${Boost_LIBRARIES}
+string(REGEX REPLACE ";" " " BOOST_LDADD "${Boost_IOSTREAMS_LIBRARIES}")
+set(BOOST_LDADD "${BOOST_LDADD}")
+
+# construct ${BOOST_CFLAGS} from ${Boost_INCLUDE_DIRS}
+string(REGEX REPLACE ";" " -I" BOOST_CFLAGS "${Boost_INCLUDE_DIRS}")
+set(BOOST_CFLAGS "-I${BOOST_CFLAGS}")
+
+# construct ${ICONV_CFLAGS} from ${ICONV_INCLUDE_DIRS}
+string(REGEX REPLACE ";" " -I" ICONV_CFLAGS "${ICONV_INCLUDE_DIRS}")
+set(ICONV_CFLAGS "-I${ICONV_CFLAGS}")
+
+configure_file(${CMAKE_SOURCE_DIR}/libi2ncommon.pc.in ${CMAKE_BINARY_DIR}/libi2ncommon.pc @ONLY)
+configure_file(${CMAKE_SOURCE_DIR}/libi2ncommon_config.pc.in ${CMAKE_BINARY_DIR}/libi2ncommon_config.pc @ONLY)
+configure_file(${CMAKE_SOURCE_DIR}/libi2ncommon_utils.pc.in ${CMAKE_BINARY_DIR}/libi2ncommon_utils.pc @ONLY)
+
+install(FILES ${CMAKE_BINARY_DIR}/libi2ncommon.pc
+                     ${CMAKE_BINARY_DIR}/libi2ncommon_config.pc
+                     ${CMAKE_BINARY_DIR}/libi2ncommon_utils.pc
+        DESTINATION lib/pkgconfig)
+
+if (BUILD_XMLLIB)
+    configure_file(${CMAKE_SOURCE_DIR}/libi2ncommon_xml.pc.in ${CMAKE_BINARY_DIR}/libi2ncommon_xml.pc @ONLY)
+    install(FILES ${CMAKE_BINARY_DIR}/libi2ncommon_xml.pc DESTINATION lib/pkgconfig)
+endif(BUILD_XMLLIB)
+
+
+include(CPack)
+
+# Subdirectories
+set(CPACK_SET_DESTDIR "ON")
+
+add_subdirectory(src)
+add_subdirectory(configlib)
+add_subdirectory(utils)
+add_subdirectory(test)
+if (BUILD_XMLLIB)
+    add_subdirectory(xmllib)
+endif(BUILD_XMLLIB)
diff --git a/LICENSE b/LICENSE
deleted file mode 100644 (file)
index 591792d..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,346 +0,0 @@
-Falls nicht anders angegeben steht diese Bibliothek unter dem
-unten stehenden Intranator Software Lizenzvertrag.
-
-Die Bibliothek "libi2ncommon-utils" im "utils" Verzeichnis
-steht unter GPL version 2 + linking exception. Siehe COPYING.GPL
-sowie diesen Text:
-
-*************** Linking exception begin ***************
-As a special exception, if other files instantiate templates or use macros
-or inline functions from this file, or you compile this file and link it
-with other works to produce a work based on this file, this file
-does not by itself cause the resulting work to be covered
-by the GNU General Public License.
-
-However the source code for this file must still be made available
-in accordance with section (3) of the GNU General Public License.
-
-This exception does not invalidate any other reasons why a work based
-on this file might be covered by the GNU General Public License.
-*************** Linking exception end ***************
-
-------------------------------------------------------------------------
-WICHTIG - BITTE SORGFÄLTIG LESEN BEVOR SIE DIE SOFTWARE INSTALLIEREN
-
-Intranator Software Lizenzvertrag
-
-Version 1.2 vom 17.07.2007
-
-Dieser Lizenzvertrag räumt ein nicht ausschließliches Nutzungsrecht an dem von
-der Intra2net AG entwickelten "Intranator System Manager" unter den
-nachfolgenden Lizenzbedingungen ein. Mit der Installation der Software erklären
-Sie sich mit folgenden Lizenzbedingungen einverstanden.
-
-§ 1 Vertragsgegenstand
-
-1) Die "Intranator Software" besteht aus dem "Intranator System Manager", der
-"Linux Open-Source Distribution" sowie dem Virenscanner. Gegenstand dieses
-Lizenzvertrages ist - vorbehaltlich der Regelung in Â§ 2 dieses Vertrags - nur
-der "Intranator System Manager". Die "Linux Open-Source Distribution" und der
-Virenscanner unterliegen eigenen Lizenzbedingungen, die den entsprechenden
-RPM-Paketen beigefügt sind.
-
-2) Der "Intranator System Manager" besteht aus komprimierten Dateien zzgl.
-Installationsprogramm (RPM-Paket), die den lauffähigen Code der von der
-Intra2net AG programmierten Software enthalten. Der "Intranator System Manager"
-wird nicht als Open-Source Software vertrieben. Das Copyright und alle Rechte
-verbleiben bei der Intra2net AG. Die Bestandteile des "Intranator System
-Manager" sind in den RPM Paketen entsprechend gekennzeichnet.
-
-§ 2 andere Lizenzen
-
-1) Zusammen mit dem "Intranator System Manager" erhalten Sie sowohl einen
-Virenscanner, als auch eine Programmkopie einer "Linux Open-Source
-Distribution". Die Intra2net AG Ã¼berlässt Ihnen die Programmkopie der "Linux
-Open-Source Distribution" unentgeltlich, weshalb sich eine Haftung der Intra2net
-AG nach Â§Â§ 521 ff. BGB richtet und folglich auf Vorsatz oder grobe
-Fahrlässigkeit beschränkt ist.
-
-2) Die für eine Benutzung der "Linux Open-Source Distribution" zwingend
-erforderlichen urheberrechtlichen Nutzungsrechte an der Distribution, bekommen
-Sie nicht von der Intra2net AG eingeräumt, sondern direkt von den jeweiligen
-Autoren der entsprechenden Programmteile. Der Umfang Ihrer Nutzungsrechte
-bestimmt sich folglich ausschließlich nach den der "Linux Open-Source
-Distribution" beigefügten Lizenzbedingungen und nicht nach diesem Vertrag.
-
-3) Die Lizenzbedingungen, die den Open-Source Programmpaketen von den jeweiligen
-Autoren zugeordneten wurden, sind vom Nutzer bei der Nutzung der gesamten
-"Intranator Software", neben den Vorschriften dieses Lizenzvertrages, im Rahmen
-eines direkten Nutzungsvertrages mit den jeweiligen Softwareherstellers ohne
-Zwischenschaltung der Intra2net AG zu beachten. Die entsprechenden
-Lizenzbedingungen sind in elektronischer Form der zugehörigen Software
-beigefügt.
-
-4) Soweit Quelltexte der unentgeltlich Ã¼berlassenen "Linux Open-Source
-Distribution" der GNU General Public License (GPL) oder der GNU Lesser General
-Public License (LGPL) unterliegen, bietet Ihnen die Intra2net AG (Intra2net AG,
-Mömpelgarder Weg 8, 72072 Tübingen, Deutschland) hiermit an, diese Quelltexte
-gegen einen Selbstkostenersatz von 10,- EUR zzgl. MwSt. und Porto auf CD an Sie
-zu liefern. Dieses Angebot gilt für 3 Jahre ab Auslieferung der Software durch
-Intra2net.
-
-5) Soweit innerhalb der Ã¼berlassenen Programme Libraries genutzt werden, die
-unter der LGPL lizenziert sind, werden diese entweder als shared libraries
-verwendet, oder Sie können - entsprechend der hierfür vorgesehenen Regelungen in
-der LGPL - die jeweiligen Quellen zu den in 4) genannten Konditionen anfordern.
-
-§ 3 Installation
-
-1) Die "Intranator Software" läuft nicht parallel mit anderen Betriebssystemen
-auf einem System. Insbesondere formatiert die "Intranator Software" bei
-Installation die gesamte Festplatte und löscht alle bestehenden Daten.
-
-2) Die "Intranator Software" arbeitet nur mit dafür vom Lizenzgeber
-freigegebenen Hardwarekomponenten zusammen. Diese sind in der Dokumentation
-sowie auf der Webseite www.intranator.com aufgeführt und werden regelmäßig
-aktualisiert. Der Lizenzgeber hat das Recht, die Freigabe für
-Hardwarekomponenten für zukünftige Versionen zurückzuziehen, z.B. wenn diese von
-zukünftigen Basissystemen nicht mehr mit Gerätetreibern unterstützt werden .
-Alle beim Lizenzgeber registrierten Kunden werden per Email mindestens 3 Monate
-vorher darüber in Kenntnis gesetzt (Abkündigung).
-
-§ 4 Vervielfältigungsrechte und Zugriffsschutz
-
-1) Der Lizenznehmer darf einen nicht modifizierten Originaldatenträger beliebig
-vervielfältigen. Lizenzcodes und Lizenzdateien dürfen nicht vervielfältigt
-werden.
-
-2) Eine Vervielfältigung der installierten Programme und Daten ist nur
-gestattet, soweit die jeweilige Vervielfältigung für die Benutzung des Programms
-notwendig ist. Zu den notwendigen Vervielfältigungen zählen die Installation des
-Programms vom Originaldatenträger auf den Massenspeicher der eingesetzten
-Hardware sowie das Laden des Programms in den Arbeitsspeicher.
-
-3) Ist aus Gründen der Datensicherheit oder der Sicherstellung einer schnellen
-Reaktivierung des Computersystems nach einem Totalausfall die turnusmäßige
-Sicherung des gesamten Datenbestands einschließlich der eingesetzten
-Computerprogramme unerlässlich, darf der Lizenznehmer Sicherungskopien in der
-zwingend erforderlichen Anzahl herstellen. Die betreffenden Datenträger sind
-entsprechend zu kennzeichnen. Die Sicherungskopien dürfen nur zu rein
-archivarischen Zwecken verwendet werden.
-
-4) Der Lizenznehmer ist verpflichtet, den unbefugten Zugriff Dritter auf die
-installierten Programme und Daten durch geeignete Vorkehrungen zu verhindern.
-Die gelieferten Lizenzcodes sind an einem gegen den unberechtigten Zugriff
-Dritter gesicherten Ort aufzubewahren.
-
-5) Die Mitarbeiter des Lizenznehmers sind nachdrücklich auf die Einhaltung der
-vorliegenden Vertragsbedingungen sowie der Bestimmungen des Urheberrechts
-hinzuweisen.
-
-6) Der Lizenzgeber ist berechtigt, Lizenzcodes bei Verdacht auf Verstoß gegen
-diese Lizenz zu sperren, nachdem der rechtmäßige Eigentümer gegen Vorlage des
-Kaufbelegs kostenfrei einen neuen Lizenzcode ausgestellt bekommen hat oder
-innerhalb von 2 Wochen nach entsprechender Information kein Kaufbeleg vorgelegt
-wird.
-
-§ 5 Nutzungsbeschränkungen
-
-1) Der Lizenznehmer darf die Software auf einer ihm zur Verfügung stehenden
-Hardware einsetzen. Wechselt der Lizenznehmer jedoch die Hardware, muss er die
-Software von der bisher verwendeten Hardware löschen.
-
-2) Ein zeitgleiches Einspeichern, Vorrätighalten oder Benutzen ist nur in der
-Zahl der im Lizenzschein angegebenen Anzahl von Instanzen zulässig. Möchte der
-Lizenznehmer die Software in mehr Instanzen zeitgleich einsetzen, muss er eine
-entsprechende Anzahl von weiteren Lizenzen erwerben.
-
-3) Der Lizenznehmer muss eine zeitgleiche Mehrfachnutzung Ã¼ber die Anzahl der
-erworbenen Lizenzen hinaus durch Zugriffsschutzmechanismen unterbinden.
-
-4) Handelt es sich um eine Lizenz mit einer Beschränkung der Benutzeranzahl,
-darf das System nur von der entsprechenden Anzahl an Benutzern genutzt werden.
-
-5) Die Anzahl der Benutzer errechnet sich aus der Summe der Anzahlen von den im
-Menüpunkt "Benutzermanager" angelegten Benutzer, den Benutzerkonten auf
-Zielservern, die für durch das System weitergeleitete Emails genutzt werden,
-sowie den Benutzern, die nicht im Benutzermanager angelegt sind, aber die
-Möglichkeit haben, den Proxy-Server des Systems zu nutzen.
-
-§ 6 Begleitende Dienstleistungen
-
-1) Wurde mit der Lizenz das Recht auf zeitlich beschränkte Dienstleistungen
-(z.B. Update-Service) erworben, so beginnt deren Laufzeit mit Eingabe des
-Lizenzcodes, Registrieren der Software oder der Prüfung auf vorhandene Updates.
-
-2) Wird das Recht auf diese Dienstleistungen verlängert, so beginnt die Laufzeit
-der Verlängerung rückwirkend zum letzten Ablauftermin.
-
-§ 7 Evaluationslizenz
-
-1) Wurde von einem Endkunden keine Lizenz käuflich erworben, erhält er eine
-Evaluationslizenz, d.h. für 30 Tage das Recht, die "Intranator Software" auf
-einer Hardware zu installieren und zu Testzwecken unter diesen Lizenzbedingungen
-zu nutzen. Mit der Eingabe eines nicht selbst erworbenen Lizenzkeys erlischt die
-Evaluationslizenz sofort.
-
-2) Die Evaluationslizenz oder eine andere, zeitlich beschränkte Lizenz darf nur
-für den entsprechenden Zeitraum ab Installation genutzt werden. Die verbleibende
-Zeit wird auf der Bedienungsoberfläche der Software angezeigt.
-
-3) Nach Ablauf dieses Zeitraums stellt die Software die Funktion ein. Der Kunde
-ist dafür verantwortlich, seine Daten rechtzeitig vorher zu sichern.
-
-4) Eine Evaluationslizenz berechtigt nicht zu Gewährleistungsansprüchen, außer
-wenn etwaige Mängel durch die Intra2net AG vorsätzlich oder grob fahrlässig
-verursacht wurden..
-
-§ 8 Dekompilierung und Programmänderungen
-
-1) Die Rückübersetzung des Ã¼berlassenen Programmcodes in andere Codeformen
-(Dekompilierung) sowie sonstige Arten der Rückerschließung der verschiedenen
-Herstellungsstufen der Software (Reverse-Engineering) einschließlich einer
-Programmänderung sind nur in den nachfolgend genannten Fällen zulässig.
-
-2) Die Zustimmung des Rechtsinhabers ist nicht erforderlich, wenn die
-Vervielfältigung des Codes oder die Ãœbersetzung der Codeform unerlässlich ist,
-um entweder a) die Bedingungen der LGPL zu erfüllen oder b) die erforderlichen
-Informationen zur Herstellung der Interoperabilität eines unabhängig
-geschaffenen Computerprogramms mit anderen Programmen zu erhalten, sofern
-folgende Bedingungen erfüllt sind:
-
-   1. Die Handlungen werden von dem Lizenznehmer oder von einer anderen zur
-   Verwendung eines Vervielfältigungsstücks des Programms berechtigten Person oder
-   in deren Namen von einer hierzu ermächtigten Person vorgenommen;
-   2. die für die Herstellung der Interoperabilität notwendigen Informationen sind
-   für die in Nummer 1 genannten Personen noch nicht ohne weiteres zugänglich
-   gemacht;
-   3. die Handlungen beschränken sich auf die Teile des ursprünglichen Programms,
-   die zur Herstellung der Interoperabilität notwendig sind.
-
-Bei unter a) und b) genannten derartigen Handlungen gewonnene Informationen
-dürfen nicht
-
-   1. zu anderen Zwecken als zur Herstellung der Interoperabilität des unabhängig
-   geschaffenen Programms verwendet werden,
-   2. an Dritte weitergegeben werden, es sei denn, dass dies für die
-   Interoperabilität des unabhängig geschaffenen Programms notwendig ist,
-   3. für die Entwicklung, Herstellung oder Vermarktung eines Programms mit im
-   Wesentlichen Ã¤hnlicher Ausdrucksform oder für irgendwelche anderen das
-   Urheberrecht verletzenden Handlungen verwendet werden.
-
-3) Urhebervermerke, Lizenzcodes, Seriennummern sowie sonstige der
-Programmidentifikation dienende Merkmale dürfen auf keinen Fall entfernt oder
-verändert werden.
-
-4) Wird auf dem System Software installiert, die nicht ausdrücklich vom
-Lizenzgeber dafür freigegeben ist, oder wird die installierte Software
-modifiziert, können Gewährleistungs- oder Garantieansprüche nur geltend gemacht
-werden, wenn der Kunde nachweisen kann, dass die Mängel nicht mit den
-Modifikationen in Zusammenhang stehen.
-
-§ 9 Weiterveräußerung und Weitervermietung
-
-1) Der Lizenznehmer darf die Software einschließlich des Benutzerhandbuchs und
-des sonstigen Begleitmaterials auf Dauer an Dritte veräußern oder verschenken,
-vorausgesetzt der erwerbende Dritte erklärt sich mit der Weitergeltung der
-vorliegenden Vertragsbedingungen auch ihm gegenüber einverstanden. Im Falle der
-Weitergabe muss der Lizenznehmer dem neuen Lizenznehmer sämtliche Programmkopien
-einschließlich gegebenenfalls vorhandener Sicherheitskopien Ã¼bergeben oder die
-nicht Ã¼bergebenen Kopien vernichten. Infolge der Weitergabe erlischt das Recht
-des alten Lizenznehmers zur Programmnutzung.
-
-2) Der Lizenznehmer darf die Software einschließlich des Begleitmaterials
-Dritten nicht vermieten.
-
-3) Der Lizenznehmer darf die Software Dritten nicht Ã¼berlassen, wenn der
-begründete Verdacht besteht, der Dritte werde die Vertragsbedingungen verletzen,
-insbesondere unerlaubte Vervielfältigungen herstellen. Dies gilt auch im
-Hinblick auf Mitarbeiter des Lizenznehmers.
-
-§ 10 Gewährleistung
-
-1) Mängel der von der Intra2net AG programmierten Software einschließlich
-zugehöriger Unterlagen werden vom Lizenzgeber innerhalb der Gewährleistungsfrist
-von 24 Monaten gegenüber Verbrauchern bzw. 12 Monaten gegenüber Unternehmern ab
-Lieferung nach entsprechender Mitteilung durch den Lizenznehmer behoben. Dies
-geschieht nach Wahl des Lizenzgebers durch Nachbesserung oder Ersatzlieferung.
-
-2) Bei einem zweimaligen Fehlschlagen der Nachbesserung oder Ersatzlieferung
-kann der Lizenznehmer Wandelung oder Minderung geltend machen.
-
-§ 11 Haftung
-
-1) Für Schäden wegen Rechtsmängeln und Beschaffenheitsgarantien haftet der
-Lizenzgeber unbeschränkt. Die Haftung für anfängliches Unvermögen wird auf das
-Fünffache des Ãœberlassungsentgelts sowie auf solche Schäden begrenzt, mit deren
-Entstehung im Rahmen einer Softwareüberlassung typischerweise gerechnet werden
-muss.
-
-2) Im Ãœbrigen haftet der Lizenzgeber unbeschränkt nur für Vorsatz und grobe
-Fahrlässigkeit auch seiner gesetzlichen Vertreter und Erfüllungsgehilfen.
-
-3) Für leichte Fahrlässigkeit haftet der Lizenzgeber nur, sofern eine Pflicht
-verletzt wird, deren Einhaltung für die Erreichung des Vertragszwecks von
-besonderer Bedeutung ist (Kardinalpflicht). Bei Verletzung einer Kardinalpflicht
-ist die Haftungsbeschränkung für anfängliches Unvermögen nach Abs. 1 dieser
-Haftungsreglung entsprechend heranzuziehen.
-
-4) Die Haftung für Datenverlust wird auf den typischen Wiederherstellungsaufwand
-beschränkt, der bei regelmäßiger und gefahrentsprechender Anfertigung von
-Sicherungskopien eingetreten wäre.
-
-5) Die vorstehenden Regelungen gelten auch zugunsten der Mitarbeiter des
-Lizenzgebers.
-
-6) Die Haftung nach dem Produkthaftungsgesetz bleibt unberührt (§ 14 ProdHG).
-
-7) Für Mängel zusätzlich installierter Software wird eine Haftung nur bei
-Lieferung und Installation durch die Intra2net AG Ã¼bernommen. Auch dann ist
-diese Haftung auf Vorsatz oder grobe Fahrlässigkeit des Lizenzgebers gemäߠ§ 521
-BGB beschränkt.
-
-§ 12 Untersuchungs- und Rügepflicht
-
-1) Der Lizenznehmer wird die gelieferte Software einschließlich der
-Dokumentation innerhalb von 8 Werktagen nach Lieferung untersuchen, insbesondere
-im Hinblick auf die Vollständigkeit der Datenträger und Handbücher sowie der
-Funktionsfähigkeit grundlegender Programmfunktionen. Mängel, die hierbei
-festgestellt werden oder feststellbar sind, müssen dem Lizenzgeber innerhalb
-weiterer 8 Werktage gemeldet werden. Die Mängelrüge muss eine nach Kräften zu
-detaillierende Beschreibung der Mängel beinhalten.
-
-2) Mängel, die im Rahmen der beschriebenen ordnungsgemäßen Untersuchung nicht
-feststellbar sind, müssen innerhalb von 8 Werktagen nach Entdeckung unter
-Einhaltung der dargelegten Rügeanforderungen gerügt werden.
-
-3) Bei einer Verletzung der Untersuchungs- und Rügepflicht gilt die Software in
-Ansehung des betreffenden Mangels als genehmigt.
-
-§ 13 Rücknahmepflicht nach dem ElektroG
-
-Der Kunde Ã¼bernimmt die Pflicht, die gelieferte Ware nach Nutzungsbeendigung auf
-eigene Kosten nach den gesetzlichen Vorschriften ordnungsgemäß zu entsorgen.
-Insbesondere stellt der Kunde die Intra2net AG von den Verpflichtungen nach Â§ 10
-Abs. 2 ElektroG (Rücknahmepflicht der Hersteller) und damit im Zusammenhang
-stehenden Ansprüchen Dritter frei.
-
-§ 14 Schriftform
-
-Sämtliche Vereinbarungen, die eine Ã„nderung, Ergänzung oder Konkretisierung
-dieser Vertragsbedingungen beinhalten, sowie besondere Zusicherungen und
-Abmachungen sind schriftlich niederzulegen. Werden sie von Vertretern oder
-Hilfspersonen des Lizenzgebers erklärt, sind sie nur dann verbindlich, wenn der
-Lizenzgeber hierfür seine schriftliche Zustimmung erteilt.
-
-§ 15 Rechtswahl
-
-Die Parteien vereinbaren im Hinblick auf sämtliche Rechtsbeziehungen aus diesem
-Vertragsverhältnis die Anwendung des Rechts der Bundesrepublik Deutschland unter
-Ausschluss des UN-Kaufrechts.
-
-§ 16 Gerichtsstand
-
-Sofern der Lizenznehmer Vollkaufmann im Sinne des Handelsgesetzbuchs,
-juristische Person des Ã¶ffentlichen Rechts oder Ã¶ffentlich-rechtliches
-Sondervermögen ist, wird für sämtliche Streitigkeiten, die im Rahmen der
-Abwicklung dieses Vertragsverhältnisses entstehen, Tübingen als Gerichtsstand
-vereinbart.
-
-§ 17 Schlussbestimmungen
-
-Sollten einzelne Bestimmungen nichtig, unwirksam oder anfechtbar sein oder
-werden, sind sie so auszulegen bzw. zu ergänzen, dass der beabsichtigte
-wirtschaftliche Zweck in rechtlich zulässiger Weise möglichst genau erreicht
-wird; die Ã¼brigen Bestimmungen bleiben davon unberührt. Sinngemäß gilt dies auch
-für ergänzungsbedürftige Lücken.
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644 (file)
index d8cacae..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-# not a GNU package. You can remove this line, if
-# have all needed files, that a GNU package needs
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_FLAGS = -I m4
-
-SUBDIRS = src configlib xmllib utils doc test
-
-# Install the pkg-config file:
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = libi2ncommon.pc libi2ncommon_config.pc libi2ncommon_xml.pc libi2ncommon_utils.pc
-
-if AUTOCHECK
-all: config.h
-       $(MAKE) $(AM_MAKEFLAGS) all-recursive
-       $(MAKE) $(AM_MAKEFLAGS) check
-endif
-
-EXTRA_DIST = LICENSE COPYING.GPL
diff --git a/Makefile.cvs b/Makefile.cvs
deleted file mode 100644 (file)
index d160702..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-default: all
-
-all:
-       aclocal
-       autoheader
-       automake
-       autoconf
-
diff --git a/acinclude.m4 b/acinclude.m4
deleted file mode 100644 (file)
index 80b33bf..0000000
+++ /dev/null
@@ -1,225 +0,0 @@
-# ===========================================================================
-#             http://autoconf-archive.cryp.to/ax_boost_base.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_BOOST_BASE([MINIMUM-VERSION])
-#
-# DESCRIPTION
-#
-#   Test for the Boost C++ libraries of a particular version (or newer)
-#
-#   If no path to the installed boost library is given the macro searchs
-#   under /usr, /usr/local, /opt and /opt/local and evaluates the
-#   $BOOST_ROOT environment variable. Further documentation is available at
-#   <http://randspringer.de/boost/index.html>.
-#
-#   This macro calls:
-#
-#     AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS)
-#
-#   And sets:
-#
-#     HAVE_BOOST
-#
-# LAST MODIFICATION
-#
-#   2008-04-12
-#
-# COPYLEFT
-#
-#   Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved.
-
-AC_DEFUN([AX_BOOST_BASE],
-[
-AC_ARG_WITH([boost],
-       AS_HELP_STRING([--with-boost@<:@=DIR@:>@], [use boost (default is yes) - it is possible to specify the root directory for boost (optional)]),
-       [
-    if test "$withval" = "no"; then
-               want_boost="no"
-    elif test "$withval" = "yes"; then
-        want_boost="yes"
-        ac_boost_path=""
-    else
-           want_boost="yes"
-        ac_boost_path="$withval"
-       fi
-    ],
-    [want_boost="yes"])
-
-
-AC_ARG_WITH([boost-libdir],
-        AS_HELP_STRING([--with-boost-libdir=LIB_DIR],
-        [Force given directory for boost libraries. Note that this will overwrite library path detection, so use this parameter only if default library detection fails and you know exactly where your boost libraries are located.]),
-        [
-        if test -d $withval
-        then
-                ac_boost_lib_path="$withval"
-        else
-                AC_MSG_ERROR(--with-boost-libdir expected directory name)
-        fi
-        ],
-        [ac_boost_lib_path=""]
-)
-
-if test "x$want_boost" = "xyes"; then
-       boost_lib_version_req=ifelse([$1], ,1.20.0,$1)
-       boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'`
-       boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'`
-       boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
-       boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
-       if test "x$boost_lib_version_req_sub_minor" = "x" ; then
-               boost_lib_version_req_sub_minor="0"
-       fi
-       WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+  $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
-       AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req)
-       succeeded=no
-
-       dnl first we check the system location for boost libraries
-       dnl this location ist chosen if boost libraries are installed with the --layout=system option
-       dnl or if you install boost with RPM
-       if test "$ac_boost_path" != ""; then
-               BOOST_LDFLAGS="-L$ac_boost_path/lib"
-               BOOST_CPPFLAGS="-I$ac_boost_path/include"
-       else
-               for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
-                       if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
-                               BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib"
-                               BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
-                               break;
-                       fi
-               done
-       fi
-
-    dnl overwrite ld flags if we have required special directory with
-    dnl --with-boost-libdir parameter
-    if test "$ac_boost_lib_path" != ""; then
-       BOOST_LDFLAGS="-L$ac_boost_lib_path"
-    fi
-
-       CPPFLAGS_SAVED="$CPPFLAGS"
-       CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
-       export CPPFLAGS
-
-       LDFLAGS_SAVED="$LDFLAGS"
-       LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
-       export LDFLAGS
-
-       AC_LANG_PUSH(C++)
-       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-       @%:@include <boost/version.hpp>
-       ]], [[
-       #if BOOST_VERSION >= $WANT_BOOST_VERSION
-       // Everything is okay
-       #else
-       #  error Boost version is too old
-       #endif
-       ]])],[
-        AC_MSG_RESULT(yes)
-       succeeded=yes
-       found_system=yes
-               ],[
-               ])
-       AC_LANG_POP([C++])
-
-
-
-       dnl if we found no boost with system layout we search for boost libraries
-       dnl built and installed without the --layout=system option or for a staged(not installed) version
-       if test "x$succeeded" != "xyes"; then
-               _version=0
-               if test "$ac_boost_path" != ""; then
-                       if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
-                               for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
-                                       _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
-                                       V_CHECK=`expr $_version_tmp \> $_version`
-                                       if test "$V_CHECK" = "1" ; then
-                                               _version=$_version_tmp
-                                       fi
-                                       VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
-                                       BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
-                               done
-                       fi
-               else
-                       for ac_boost_path in /usr /usr/local /opt /opt/local ; do
-                               if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
-                                       for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
-                                               _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
-                                               V_CHECK=`expr $_version_tmp \> $_version`
-                                               if test "$V_CHECK" = "1" ; then
-                                                       _version=$_version_tmp
-                                                       best_path=$ac_boost_path
-                                               fi
-                                       done
-                               fi
-                       done
-
-                       VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
-                       BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
-            if test "$ac_boost_lib_path" = ""
-            then
-               BOOST_LDFLAGS="-L$best_path/lib"
-            fi
-
-                       if test "x$BOOST_ROOT" != "x"; then
-                               if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/lib" && test -r "$BOOST_ROOT/stage/lib"; then
-                                       version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
-                                       stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
-                                       stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
-                                       V_CHECK=`expr $stage_version_shorten \>\= $_version`
-                    if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then
-                                               AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
-                                               BOOST_CPPFLAGS="-I$BOOST_ROOT"
-                                               BOOST_LDFLAGS="-L$BOOST_ROOT/stage/lib"
-                                       fi
-                               fi
-                       fi
-               fi
-
-               CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
-               export CPPFLAGS
-               LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
-               export LDFLAGS
-
-               AC_LANG_PUSH(C++)
-               AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-               @%:@include <boost/version.hpp>
-               ]], [[
-               #if BOOST_VERSION >= $WANT_BOOST_VERSION
-               // Everything is okay
-               #else
-               #  error Boost version is too old
-               #endif
-               ]])],[
-               AC_MSG_RESULT(yes)
-               succeeded=yes
-               found_system=yes
-                       ],[
-               ])
-               AC_LANG_POP([C++])
-       fi
-
-       if test "$succeeded" != "yes" ; then
-               if test "$_version" = "0" ; then
-                       AC_MSG_NOTICE([[We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option.  If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.]])
-               else
-                       AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).])
-               fi
-        HAVE_BOOST=no
-       else
-               AC_SUBST(BOOST_CPPFLAGS)
-               AC_SUBST(BOOST_LDFLAGS)
-               AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
-        HAVE_BOOST=yes
-       fi
-
-        CPPFLAGS="$CPPFLAGS_SAVED"
-               LDFLAGS="$LDFLAGS_SAVED"
-fi
-
-])
diff --git a/configlib/CMakeLists.txt b/configlib/CMakeLists.txt
new file mode 100644 (file)
index 0000000..db4394e
--- /dev/null
@@ -0,0 +1,22 @@
+include_directories(${CMAKE_SOURCE_DIR}/src)
+
+set(cpp_sources
+    i2n_global_config.cpp
+)
+
+set(cpp_headers
+    i2n_global_config.hpp
+)
+
+add_library(i2ncommon_config SHARED ${cpp_sources} ${cpp_headers})
+
+set_target_properties(i2ncommon_config PROPERTIES VERSION ${VERSION} SOVERSION ${MAJOR_VERSION})
+
+
+install(TARGETS i2ncommon_config
+        LIBRARY DESTINATION lib
+        COMPONENT sharedlibs)
+
+install(FILES ${cpp_headers}
+        DESTINATION include
+        COMPONENT headers)
diff --git a/configlib/Makefile.am b/configlib/Makefile.am
deleted file mode 100644 (file)
index 6b4d54f..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-# set the include path found by configure
-INCLUDES = -I$(top_srcdir)/src $(all_includes) @LIBGETTEXT_CFLAGS@ \
-       @LIBICONV_CFLAGS@ @BOOST_CPPFLAGS@
-
-METASOURCES = AUTO
-
-lib_LTLIBRARIES = libi2ncommon_config.la
-
-include_HEADERS = i2n_global_config.hpp
-
-# Note:  If you specify a:b:c as the version in the next line,
-#  the library that is made has version (a-c).c.b.  In this
-#  example, the version is 2.1.2. (3:2:1)
-
-libi2ncommon_config_la_LDFLAGS = -version-info @LIBI2NCOMMON_LIB_VERSION@ @BOOST_LDFLAGS@
-
-libi2ncommon_config_la_LIBADD =
-libi2ncommon_config_la_SOURCES = i2n_global_config.cpp
index 332ecfb..564c5e6 100644 (file)
@@ -1,10 +1,27 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  *
- * @author Reinhard Pfau \<Reinhard.Pfau@intra2net.com\>
+ * @author Reinhard Pfau
  * 
  * @copyright &copy; Copyright 2008 by Intra2net AG
- * @license commercial
- * @contact info@intra2net.com
  */
 
 #include "i2n_global_config.hpp"
index 82a03ac..f61d099 100644 (file)
@@ -1,11 +1,28 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  * @brief provides config file reading and automatic propagation of the values.
  *
- * @author Reinhard Pfau \<Reinhard.Pfau@intra2net.com\>
+ * @author Reinhard Pfau
  * 
  * @copyright &copy; Copyright 2008 by Intra2net AG
- * @license commercial
- * @contact info@intra2net.com
  *
  * Basic idea of this module is that one need only to declare its config vars of
  * the type Config::Var\< T \> and pass the desired section and key from the
diff --git a/configure.in b/configure.in
deleted file mode 100644 (file)
index 2091fed..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-AC_INIT(configure.in)
-
-AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(libi2ncommon, 1.9)
-
-LIBI2NCOMMON_LIB_VERSION=2:0:0
-
-AC_SUBST(LIBI2NCOMMON_LIB_VERSION)
-
-AC_LANG_CPLUSPLUS
-AC_PROG_CXX
-AM_PROG_LIBTOOL
-
-AC_ARG_WITH(optimize,[  --with-optimize      compile with optimizing],
-[
-    AC_MSG_CHECKING(for optimizing)
-    if test "$withval" != "no"; then
-        CXXFLAGS=" -g -O2 "
-        AC_MSG_RESULT(yes)
-    else
-        CXXFLAGS=" -g -O0 "
-        AC_MSG_RESULT(no)
-    fi
-],[ CXXFLAGS=" -g -O0 "])
-
-AM_CONDITIONAL(AUTOCHECK, test "$enable_autocheck" = yes)
-
-AX_BOOST_BASE([1.33])
-
-PKG_CHECK_MODULES(LIBXMLPP, libxml++-2.6 >= 0.2.1)
-AC_SUBST(LIBXMLPP_CFLAGS)
-AC_SUBST(LIBXMLPP_LIBS)
-
-PKG_CHECK_MODULES(LIBGETTEXT, libgettext >= 0.0.0)
-AC_SUBST(LIBGETTEXT_CFLAGS)
-AC_SUBST(LIBGETTEXT_LIBS)
-
-PKG_CHECK_MODULES(LIBICONV, libiconv >= 0.0.0)
-AC_SUBST(LIBICONV_CFLAGS)
-AC_SUBST(LIBICONV_LIBS)
-
-dnl check for doxygen
-AC_PATH_PROG(DOXYGEN, doxygen)
-AM_CONDITIONAL(HAVE_DOXYGEN, test -n $DOXYGEN)
-
-AX_BOOST_BASE([1.34])
-AX_BOOST_UNIT_TEST_FRAMEWORK
-AX_BOOST_IOSTREAMS
-
-AC_OUTPUT(Doxyfile Makefile doc/Makefile doc/Doxyfile configlib/Makefile xmllib/Makefile utils/Makefile src/Makefile \
-       test/Makefile libi2ncommon.pc libi2ncommon_config.pc libi2ncommon_xml.pc libi2ncommon_utils.pc)
diff --git a/doc/Makefile.am b/doc/Makefile.am
deleted file mode 100644 (file)
index 30aaeeb..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-CLEANFILES = rm -rf html
-
-if HAVE_DOXYGEN
-MANUALS = html/index.html
-else
-MANUALS =
-endif
-
-all: $(MANUALS)
-
-# todo: separate build dir still doesn't work
-html/index.html: Doxyfile $(top_srcdir)/src/*.cpp $(top_srcdir)/src/*.hxx $(top_srcdir)/src/*.hpp \
-                          $(top_srcdir)/configlib/*.cpp $(top_srcdir)/configlib/*.hpp \
-                          $(top_srcdir)/xmllib/*.cpp $(top_srcdir)/xmllib/*.hpp \
-                          $(top_srcdir)/utils/*.cpp $(top_srcdir)/utils/*.hpp
-       $(DOXYGEN)
-
-EXTRA_DIST = Doxyfile.in
diff --git a/libi2ncommon.kdevelop b/libi2ncommon.kdevelop
deleted file mode 100644 (file)
index 83121ff..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-<?xml version = '1.0'?>
-<kdevelop>
-  <general>
-    <author>Gerd v. Egidy</author>
-    <email>info@intra2net.com</email>
-    <version>0.1</version>
-    <projectmanagement>KDevAutoProject</projectmanagement>
-    <primarylanguage>C++</primarylanguage>
-    <keywords>
-      <keyword>C++</keyword>
-      <keyword>Code</keyword>
-    </keywords>
-    <projectname>libi2ncommon</projectname>
-  </general>
-  <kdevautoproject>
-    <general>
-      <activetarget>src/libi2ncommon</activetarget>
-      <useconfiguration>debug</useconfiguration>
-    </general>
-    <run>
-      <mainprogram>src/libi2ncommon</mainprogram>
-      <terminal>true</terminal>
-      <directoryradio>executable</directoryradio>
-      <runarguments>
-        <test/>
-      </runarguments>
-      <debugarguments>
-        <test/>
-      </debugarguments>
-      <cwd>
-        <test>/home/reinhard/source/source/libi2ncommon/debug/./</test>
-      </cwd>
-    </run>
-    <configurations>
-      <optimized>
-        <builddir>optimized</builddir>
-        <ccompiler>kdevgccoptions</ccompiler>
-        <cxxcompiler>kdevgppoptions</cxxcompiler>
-        <f77compiler>kdevg77options</f77compiler>
-        <cxxflags>-O2 -g0</cxxflags>
-      </optimized>
-      <debug>
-        <configargs>--enable-debug=full</configargs>
-        <builddir>debug</builddir>
-        <ccompiler>kdevgccoptions</ccompiler>
-        <cxxcompiler>kdevgppoptions</cxxcompiler>
-        <f77compiler>kdevg77options</f77compiler>
-        <cxxflags>-O0 -g3</cxxflags>
-      </debug>
-    </configurations>
-    <make>
-      <envvars>
-        <envvar value="1" name="WANT_AUTOCONF_2_5" />
-        <envvar value="1" name="WANT_AUTOMAKE_1_6" />
-      </envvars>
-    </make>
-  </kdevautoproject>
-  <kdevdoctreeview>
-    <ignoretocs>
-      <toc>ada</toc>
-      <toc>ada_bugs_gcc</toc>
-      <toc>bash</toc>
-      <toc>bash_bugs</toc>
-      <toc>clanlib</toc>
-      <toc>w3c-dom-level2-html</toc>
-      <toc>fortran_bugs_gcc</toc>
-      <toc>gnome1</toc>
-      <toc>gnustep</toc>
-      <toc>gtk</toc>
-      <toc>gtk_bugs</toc>
-      <toc>haskell</toc>
-      <toc>haskell_bugs_ghc</toc>
-      <toc>java_bugs_gcc</toc>
-      <toc>java_bugs_sun</toc>
-      <toc>kde2book</toc>
-      <toc>opengl</toc>
-      <toc>pascal_bugs_fp</toc>
-      <toc>php</toc>
-      <toc>php_bugs</toc>
-      <toc>perl</toc>
-      <toc>perl_bugs</toc>
-      <toc>python</toc>
-      <toc>python_bugs</toc>
-      <toc>qt-kdev3</toc>
-      <toc>ruby</toc>
-      <toc>ruby_bugs</toc>
-      <toc>sdl</toc>
-      <toc>w3c-svg</toc>
-      <toc>sw</toc>
-      <toc>w3c-uaag10</toc>
-      <toc>wxwindows_bugs</toc>
-    </ignoretocs>
-    <ignoreqt_xml>
-      <toc>Guide to the Qt Translation Tools</toc>
-      <toc>Qt Assistant Manual</toc>
-      <toc>Qt Designer Manual</toc>
-      <toc>Qt Reference Documentation</toc>
-      <toc>qmake User Guide</toc>
-    </ignoreqt_xml>
-    <ignoredoxygen>
-      <toc>KDE Libraries (Doxygen)</toc>
-    </ignoredoxygen>
-  </kdevdoctreeview>
-  <kdevfilecreate>
-    <useglobaltypes>
-      <type ext="cpp" />
-      <type ext="h" />
-    </useglobaltypes>
-  </kdevfilecreate>
-  <kdevfileview>
-    <groups>
-      <group pattern="*.h" name="Header files" />
-      <group pattern="*.cpp" name="Source files" />
-      <hidenonprojectfiles>false</hidenonprojectfiles>
-      <hidenonlocation>false</hidenonlocation>
-    </groups>
-    <tree>
-      <hidepatterns>*.o,*.lo,CVS</hidepatterns>
-      <hidenonprojectfiles>false</hidenonprojectfiles>
-    </tree>
-  </kdevfileview>
-  <kdevcppsupport>
-    <references/>
-    <codecompletion>
-      <includeGlobalFunctions>true</includeGlobalFunctions>
-      <includeTypes>true</includeTypes>
-      <includeEnums>true</includeEnums>
-      <includeTypedefs>false</includeTypedefs>
-      <automaticCodeCompletion>true</automaticCodeCompletion>
-      <automaticArgumentsHint>true</automaticArgumentsHint>
-      <automaticHeaderCompletion>true</automaticHeaderCompletion>
-      <codeCompletionDelay>250</codeCompletionDelay>
-      <argumentsHintDelay>400</argumentsHintDelay>
-      <headerCompletionDelay>250</headerCompletionDelay>
-      <showOnlyAccessibleItems>false</showOnlyAccessibleItems>
-      <completionBoxItemOrder>0</completionBoxItemOrder>
-      <howEvaluationContextMenu>true</howEvaluationContextMenu>
-      <showCommentWithArgumentHint>true</showCommentWithArgumentHint>
-      <statusBarTypeEvaluation>false</statusBarTypeEvaluation>
-      <namespaceAliases>std=_GLIBCXX_STD;__gnu_cxx=std</namespaceAliases>
-      <processPrimaryTypes>true</processPrimaryTypes>
-      <processFunctionArguments>false</processFunctionArguments>
-      <preProcessAllHeaders>false</preProcessAllHeaders>
-      <parseMissingHeadersExperimental>false</parseMissingHeadersExperimental>
-      <resolveIncludePathsUsingMakeExperimental>false</resolveIncludePathsUsingMakeExperimental>
-      <alwaysParseInBackground>true</alwaysParseInBackground>
-      <usePermanentCaching>true</usePermanentCaching>
-      <alwaysIncludeNamespaces>false</alwaysIncludeNamespaces>
-      <includePaths>.;</includePaths>
-    </codecompletion>
-    <qt>
-      <used>false</used>
-      <version>3</version>
-      <includestyle>3</includestyle>
-      <root>/usr/lib64/qt-3.3</root>
-      <designerintegration>EmbeddedKDevDesigner</designerintegration>
-      <qmake>/usr/lib64/qt-3.3/bin/qmake</qmake>
-      <designer>/usr/lib64/qt-3.3/bin/designer</designer>
-      <designerpluginpaths/>
-    </qt>
-  </kdevcppsupport>
-</kdevelop>
index 10fc0b8..c992a88 100644 (file)
@@ -5,7 +5,7 @@ includedir=@includedir@
 
 Name: libi2ncommon
 Description: library with functions common in Intra2net programs
-Requires: libgettext libi2ncommon_utils
+Requires: libi2ncommon_utils
 Version: @VERSION@
-Libs: -L${libdir} -li2ncommon -li2ncommon_utils  @BOOST_LDFLAGS@ @BOOST_IOSTREAMS_LIB@
-Cflags: -I${includedir} @BOOST_CPPFLAGS@
+Libs: -L${libdir} -li2ncommon -li2ncommon_utils @BOOST_LDADD@
+Cflags: -I${includedir} @BOOST_CFLAGS@ @ICONV_CFLAGS@
index 634783f..f90008f 100644 (file)
@@ -1,16 +1,27 @@
+%bcond_with Intra2net
+%bcond_with xmllib
+%bcond_with imap_utf7_support
+
+# Detect Intra2net build environment
+%if %{with Intra2net}
+    %define with_xmllib 1
+    %define with_imap_utf7_support 1
+%endif
+
 Summary:   library with functions common in Intra2net programs
 Name:      libi2ncommon
 Version:   ##VERSION##
 Release:   1
-License:   Intranator License
+License:   GPLv2 + linking exception
 Group:     Intranator
 Vendor:    Intra2net AG
 Source:    %{name}-%{version}.tar.gz
 Buildroot: /tmp/%{name}-%{version}-root
 Prefix:    /usr/intranator
-Requires:  libgettext libi2ncommon-utils = %{version}
+Requires:  libi2ncommon-utils = %{version}
 BuildPrereq: libtool
-BuildRequires: boost-devel >= 1.32.0 libgettext
+BuildRequires: boost-devel >= 1.32.0
+Obsoletes: libgettext
 
 
 %description 
@@ -19,7 +30,7 @@ library with functions common in Intra2net programs
 %package   devel
 Summary:   library with functions common in Intra2net programs
 Group:     Intranator/Development
-Requires:  libi2ncommon = %{version} libgettext
+Requires:  libi2ncommon = %{version}
 Requires: boost-devel >= 1.32.0
 
 
@@ -37,6 +48,7 @@ library with a config module.
 The config module provides a global configuration system with decentralized
 declaration of the config variables.
 
+%if %{with xmllib}
 %package xml
 Summary:    library with a xml module
 Group:      Intranator
@@ -44,6 +56,7 @@ Requires:   libi2ncommon = %{version}
 
 %description xml
 The xml module provides common xml functions.
+%endif
 
 %package utils
 Summary:    library with open source utility modules
@@ -58,13 +71,32 @@ Library with open source utility modules.
 
 %build
 export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/intranator/lib/pkgconfig
-autoreconf --force --install
-./configure $RPM_BUILD_WITH_OPTIMIZE --prefix=%{prefix}
-dmake
 
-dmake check
+mkdir build
+cd build
+
+export CFLAGS="$RPM_OPT_FLAGS"
+export CXXFLAGS="$RPM_OPT_FLAGS"
+
+CMAKE_OPTS=""
+%if %{with xmllib}
+    CMAKE_OPTS="$CMAKE_OPTS -DBUILD_XMLLIB=ON"
+%endif
+%if %{with imap_utf7_support}
+    CMAKE_OPTS="$CMAKE_OPTS -DIMAP_UTF7_SUPPORT=ON"
+%endif
+
+cmake -DCMAKE_INSTALL_PREFIX="%{prefix}" $CMAKE_OPTS ../
+
+make %{?_smp_mflags} VERBOSE=1
+
+%check
+cd build
+make check
 
 %install
+
+cd build
 make DESTDIR=$RPM_BUILD_ROOT install
 
 %clean
@@ -75,26 +107,29 @@ rm -fr $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root)
-%doc LICENSE COPYING.GPL
+%doc COPYING.GPL
 %{prefix}/lib/libi2ncommon.so*
 
 %files devel
 %defattr(-,root,root)
-%{prefix}/lib/*.*a*
+# No static library for now
+#%{prefix}/lib/*.*a*
 %{prefix}/lib/pkgconfig/*.pc
 %{prefix}/include/
 
 %files config
 %defattr(-,root,root)
-%doc LICENSE
+%doc COPYING.GPL
 %{prefix}/lib/libi2ncommon_config.so*
 
+%if %{with xmllib}
 %files xml
 %defattr(-,root,root)
-%doc LICENSE
+%doc COPYING.GPL
 %{prefix}/lib/libi2ncommon_xml.so*
+%endif
 
 %files utils
 %defattr(-,root,root)
-%doc LICENSE COPYING.GPL
+%doc COPYING.GPL
 %{prefix}/lib/libi2ncommon_utils.so*
index 771c287..f554c57 100644 (file)
@@ -7,4 +7,4 @@ Name: libi2ncommon_utils
 Description: library with utility modules common in some Intra2net programs
 Version: @VERSION@
 Libs: -L${libdir} -li2ncommon_utils
-Cflags: -I${includedir}
+Cflags: -I${includedir} @BOOST_CFLAGS@
diff --git a/m4/ax_boost_base.m4 b/m4/ax_boost_base.m4
deleted file mode 100644 (file)
index b2a00b8..0000000
+++ /dev/null
@@ -1,219 +0,0 @@
-# ===========================================================================
-#          http://www.nongnu.org/autoconf-archive/ax_boost_base.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_BOOST_BASE([MINIMUM-VERSION])
-#
-# DESCRIPTION
-#
-#   Test for the Boost C++ libraries of a particular version (or newer)
-#
-#   If no path to the installed boost library is given the macro searchs
-#   under /usr, /usr/local, /opt and /opt/local and evaluates the
-#   $BOOST_ROOT environment variable. Further documentation is available at
-#   <http://randspringer.de/boost/index.html>.
-#
-#   This macro calls:
-#
-#     AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS)
-#
-#   And sets:
-#
-#     HAVE_BOOST
-#
-# LICENSE
-#
-#   Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved.
-
-AC_DEFUN([AX_BOOST_BASE],
-[
-AC_ARG_WITH([boost],
-       AS_HELP_STRING([--with-boost@<:@=DIR@:>@], [use boost (default is yes) - it is possible to specify the root directory for boost (optional)]),
-       [
-    if test "$withval" = "no"; then
-               want_boost="no"
-    elif test "$withval" = "yes"; then
-        want_boost="yes"
-        ac_boost_path=""
-    else
-           want_boost="yes"
-        ac_boost_path="$withval"
-       fi
-    ],
-    [want_boost="yes"])
-
-
-AC_ARG_WITH([boost-libdir],
-        AS_HELP_STRING([--with-boost-libdir=LIB_DIR],
-        [Force given directory for boost libraries. Note that this will overwrite library path detection, so use this parameter only if default library detection fails and you know exactly where your boost libraries are located.]),
-        [
-        if test -d $withval
-        then
-                ac_boost_lib_path="$withval"
-        else
-                AC_MSG_ERROR(--with-boost-libdir expected directory name)
-        fi
-        ],
-        [ac_boost_lib_path=""]
-)
-
-if test "x$want_boost" = "xyes"; then
-       boost_lib_version_req=ifelse([$1], ,1.20.0,$1)
-       boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'`
-       boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'`
-       boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
-       boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
-       if test "x$boost_lib_version_req_sub_minor" = "x" ; then
-               boost_lib_version_req_sub_minor="0"
-       fi
-       WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+  $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
-       AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req)
-       succeeded=no
-
-       dnl first we check the system location for boost libraries
-       dnl this location ist chosen if boost libraries are installed with the --layout=system option
-       dnl or if you install boost with RPM
-       if test "$ac_boost_path" != ""; then
-               BOOST_LDFLAGS="-L$ac_boost_path/lib"
-               BOOST_CPPFLAGS="-I$ac_boost_path/include"
-       else
-               for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
-                       if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
-                               BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib"
-                               BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
-                               break;
-                       fi
-               done
-       fi
-
-    dnl overwrite ld flags if we have required special directory with
-    dnl --with-boost-libdir parameter
-    if test "$ac_boost_lib_path" != ""; then
-       BOOST_LDFLAGS="-L$ac_boost_lib_path"
-    fi
-
-       CPPFLAGS_SAVED="$CPPFLAGS"
-       CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
-       export CPPFLAGS
-
-       LDFLAGS_SAVED="$LDFLAGS"
-       LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
-       export LDFLAGS
-
-       AC_LANG_PUSH(C++)
-       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-       @%:@include <boost/version.hpp>
-       ]], [[
-       #if BOOST_VERSION >= $WANT_BOOST_VERSION
-       // Everything is okay
-       #else
-       #  error Boost version is too old
-       #endif
-       ]])],[
-        AC_MSG_RESULT(yes)
-       succeeded=yes
-       found_system=yes
-               ],[
-               ])
-       AC_LANG_POP([C++])
-
-
-
-       dnl if we found no boost with system layout we search for boost libraries
-       dnl built and installed without the --layout=system option or for a staged(not installed) version
-       if test "x$succeeded" != "xyes"; then
-               _version=0
-               if test "$ac_boost_path" != ""; then
-                       if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
-                               for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
-                                       _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
-                                       V_CHECK=`expr $_version_tmp \> $_version`
-                                       if test "$V_CHECK" = "1" ; then
-                                               _version=$_version_tmp
-                                       fi
-                                       VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
-                                       BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
-                               done
-                       fi
-               else
-                       for ac_boost_path in /usr /usr/local /opt /opt/local ; do
-                               if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
-                                       for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
-                                               _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
-                                               V_CHECK=`expr $_version_tmp \> $_version`
-                                               if test "$V_CHECK" = "1" ; then
-                                                       _version=$_version_tmp
-                                                       best_path=$ac_boost_path
-                                               fi
-                                       done
-                               fi
-                       done
-
-                       VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
-                       BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
-            if test "$ac_boost_lib_path" = ""
-            then
-               BOOST_LDFLAGS="-L$best_path/lib"
-            fi
-
-                       if test "x$BOOST_ROOT" != "x"; then
-                               if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/lib" && test -r "$BOOST_ROOT/stage/lib"; then
-                                       version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
-                                       stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
-                                       stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
-                                       V_CHECK=`expr $stage_version_shorten \>\= $_version`
-                    if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then
-                                               AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
-                                               BOOST_CPPFLAGS="-I$BOOST_ROOT"
-                                               BOOST_LDFLAGS="-L$BOOST_ROOT/stage/lib"
-                                       fi
-                               fi
-                       fi
-               fi
-
-               CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
-               export CPPFLAGS
-               LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
-               export LDFLAGS
-
-               AC_LANG_PUSH(C++)
-               AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-               @%:@include <boost/version.hpp>
-               ]], [[
-               #if BOOST_VERSION >= $WANT_BOOST_VERSION
-               // Everything is okay
-               #else
-               #  error Boost version is too old
-               #endif
-               ]])],[
-               AC_MSG_RESULT(yes)
-               succeeded=yes
-               found_system=yes
-                       ],[
-               ])
-               AC_LANG_POP([C++])
-       fi
-
-       if test "$succeeded" != "yes" ; then
-               if test "$_version" = "0" ; then
-                       AC_MSG_ERROR([[We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option.  If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.]])
-               else
-                       AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).])
-               fi
-       else
-               AC_SUBST(BOOST_CPPFLAGS)
-               AC_SUBST(BOOST_LDFLAGS)
-               AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
-       fi
-
-        CPPFLAGS="$CPPFLAGS_SAVED"
-               LDFLAGS="$LDFLAGS_SAVED"
-fi
-
-])
diff --git a/m4/ax_boost_iostreams.m4 b/m4/ax_boost_iostreams.m4
deleted file mode 100644 (file)
index d8969e9..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-# ===========================================================================
-#    http://www.gnu.org/software/autoconf-archive/ax_boost_iostreams.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_BOOST_IOSTREAMS
-#
-# DESCRIPTION
-#
-#   Test for IOStreams library from the Boost C++ libraries. The macro
-#   requires a preceding call to AX_BOOST_BASE. Further documentation is
-#   available at <http://randspringer.de/boost/index.html>.
-#
-#   This macro calls:
-#
-#     AC_SUBST(BOOST_IOSTREAMS_LIB)
-#
-#   And sets:
-#
-#     HAVE_BOOST_IOSTREAMS
-#
-# LICENSE
-#
-#   Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved. This file is offered as-is, without any
-#   warranty.
-
-#serial 11
-
-AC_DEFUN([AX_BOOST_IOSTREAMS],
-[
-       AC_ARG_WITH([boost-iostreams],
-       AS_HELP_STRING([--with-boost-iostreams@<:@=special-lib@:>@],
-                   [use the IOStreams library from boost - it is possible to specify a certain library for the linker
-                        e.g. --with-boost-iostreams=boost_iostreams-gcc-mt-d-1_33_1 ]),
-        [
-        if test "$withval" = "no"; then
-                       want_boost="no"
-        elif test "$withval" = "yes"; then
-            want_boost="yes"
-            ax_boost_user_iostreams_lib=""
-        else
-                   want_boost="yes"
-               ax_boost_user_iostreams_lib="$withval"
-               fi
-        ],
-        [want_boost="yes"]
-       )
-
-       if test "x$want_boost" = "xyes"; then
-        AC_REQUIRE([AC_PROG_CC])
-               CPPFLAGS_SAVED="$CPPFLAGS"
-               CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
-               export CPPFLAGS
-
-               LDFLAGS_SAVED="$LDFLAGS"
-               LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
-               export LDFLAGS
-
-        AC_CACHE_CHECK(whether the Boost::IOStreams library is available,
-                                          ax_cv_boost_iostreams,
-        [AC_LANG_PUSH([C++])
-                AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[@%:@include <boost/iostreams/filtering_stream.hpp>
-                                                                                        @%:@include <boost/range/iterator_range.hpp>
-                                                                                       ]],
-                                  [[std::string  input = "Hello World!";
-                                                                        namespace io = boost::iostreams;
-                                                                        io::filtering_istream  in(boost::make_iterator_range(input));
-                                                                        return 0;
-                                   ]]),
-                             ax_cv_boost_iostreams=yes, ax_cv_boost_iostreams=no)
-         AC_LANG_POP([C++])
-               ])
-               if test "x$ax_cv_boost_iostreams" = "xyes"; then
-                       AC_DEFINE(HAVE_BOOST_IOSTREAMS,,[define if the Boost::IOStreams library is available])
-            BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
-            if test "x$ax_boost_user_iostreams_lib" = "x"; then
-                for libextension in `ls $BOOSTLIBDIR/libboost_iostreams*.{so,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_iostreams.*\)\.so.*$;\1;' -e 's;^lib\(boost_iostreams.*\)\.a*$;\1;'` ; do
-                     ax_lib=${libextension}
-                                   AC_CHECK_LIB($ax_lib, exit,
-                                 [BOOST_IOSTREAMS_LIB="-l$ax_lib"; AC_SUBST(BOOST_IOSTREAMS_LIB) link_iostreams="yes"; break],
-                                 [link_iostreams="no"])
-                               done
-                if test "x$link_iostreams" != "xyes"; then
-                for libextension in `ls $BOOSTLIBDIR/boost_iostreams*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_iostreams.*\)\.dll.*$;\1;' -e 's;^\(boost_iostreams.*\)\.a*$;\1;'` ; do
-                     ax_lib=${libextension}
-                                   AC_CHECK_LIB($ax_lib, exit,
-                                 [BOOST_IOSTREAMS_LIB="-l$ax_lib"; AC_SUBST(BOOST_IOSTREAMS_LIB) link_iostreams="yes"; break],
-                                 [link_iostreams="no"])
-                               done
-                fi
-
-            else
-               for ax_lib in $ax_boost_user_iostreams_lib boost_iostreams-$ax_boost_user_iostreams_lib; do
-                                     AC_CHECK_LIB($ax_lib, main,
-                                   [BOOST_IOSTREAMS_LIB="-l$ax_lib"; AC_SUBST(BOOST_IOSTREAMS_LIB) link_iostreams="yes"; break],
-                                   [link_iostreams="no"])
-                  done
-
-            fi
-                       if test "x$link_iostreams" != "xyes"; then
-                               AC_MSG_ERROR(Could not link against $ax_lib !)
-                       fi
-               fi
-
-               CPPFLAGS="$CPPFLAGS_SAVED"
-       LDFLAGS="$LDFLAGS_SAVED"
-       fi
-])
diff --git a/m4/ax_boost_unit_test_framework.m4 b/m4/ax_boost_unit_test_framework.m4
deleted file mode 100644 (file)
index 5333da3..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-# ===========================================================================
-#  http://www.nongnu.org/autoconf-archive/ax_boost_unit_test_framework.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_BOOST_UNIT_TEST_FRAMEWORK
-#
-# DESCRIPTION
-#
-#   Test for Unit_Test_Framework library from the Boost C++ libraries. The
-#   macro requires a preceding call to AX_BOOST_BASE. Further documentation
-#   is available at <http://randspringer.de/boost/index.html>.
-#
-#   This macro calls:
-#
-#     AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB)
-#
-#   And sets:
-#
-#     HAVE_BOOST_UNIT_TEST_FRAMEWORK
-#
-# LICENSE
-#
-#   Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved.
-
-AC_DEFUN([AX_BOOST_UNIT_TEST_FRAMEWORK],
-[
-       AC_ARG_WITH([boost-unit-test-framework],
-       AS_HELP_STRING([--with-boost-unit-test-framework@<:@=special-lib@:>@],
-                   [use the Unit_Test_Framework library from boost - it is possible to specify a certain library for the linker
-                        e.g. --with-boost-unit-test-framework=boost_unit_test_framework-gcc ]),
-        [
-        if test "$withval" = "no"; then
-                       want_boost="no"
-        elif test "$withval" = "yes"; then
-            want_boost="yes"
-            ax_boost_user_unit_test_framework_lib=""
-        else
-                   want_boost="yes"
-               ax_boost_user_unit_test_framework_lib="$withval"
-               fi
-        ],
-        [want_boost="yes"]
-       )
-
-       if test "x$want_boost" = "xyes"; then
-        AC_REQUIRE([AC_PROG_CC])
-               CPPFLAGS_SAVED="$CPPFLAGS"
-               CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
-               export CPPFLAGS
-
-               LDFLAGS_SAVED="$LDFLAGS"
-               LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
-               export LDFLAGS
-
-        AC_CACHE_CHECK(whether the Boost::Unit_Test_Framework library is available,
-                                          ax_cv_boost_unit_test_framework,
-        [AC_LANG_PUSH([C++])
-                        AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[@%:@include <boost/test/unit_test.hpp>]],
-                                    [[using boost::unit_test::test_suite;
-                                                        test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" ); return 0;]]),
-                   ax_cv_boost_unit_test_framework=yes, ax_cv_boost_unit_test_framework=no)
-         AC_LANG_POP([C++])
-               ])
-               if test "x$ax_cv_boost_unit_test_framework" = "xyes"; then
-                       AC_DEFINE(HAVE_BOOST_UNIT_TEST_FRAMEWORK,,[define if the Boost::Unit_Test_Framework library is available])
-            BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
-
-            if test "x$ax_boost_user_unit_test_framework_lib" = "x"; then
-                       saved_ldflags="${LDFLAGS}"
-                for monitor_library in `ls $BOOSTLIBDIR/libboost_unit_test_framework*.{so,a}* 2>/dev/null` ; do
-                    if test -r $monitor_library ; then
-                       libextension=`echo $monitor_library | sed 's,.*/,,' | sed -e 's;^lib\(boost_unit_test_framework.*\)\.so.*$;\1;' -e 's;^lib\(boost_unit_test_framework.*\)\.a*$;\1;'`
-                       ax_lib=${libextension}
-                       link_unit_test_framework="yes"
-                    else
-                       link_unit_test_framework="no"
-                    fi
-
-                           if test "x$link_unit_test_framework" = "xyes"; then
-                      BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib"
-                      AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB)
-                                         break
-                                   fi
-                done
-                if test "x$link_unit_test_framework" != "xyes"; then
-                for libextension in `ls $BOOSTLIBDIR/boost_unit_test_framework*.{dll,a}* 2>/dev/null  | sed 's,.*/,,' | sed -e 's;^\(boost_unit_test_framework.*\)\.dll.*$;\1;' -e 's;^\(boost_unit_test_framework.*\)\.a*$;\1;'` ; do
-                     ax_lib=${libextension}
-                                   AC_CHECK_LIB($ax_lib, exit,
-                                 [BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib"; AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB) link_unit_test_framework="yes"; break],
-                                 [link_unit_test_framework="no"])
-                               done
-                fi
-            else
-                link_unit_test_framework="no"
-                       saved_ldflags="${LDFLAGS}"
-                for ax_lib in boost_unit_test_framework-$ax_boost_user_unit_test_framework_lib $ax_boost_user_unit_test_framework_lib ; do
-                   if test "x$link_unit_test_framework" = "xyes"; then
-                      break;
-                   fi
-                   for unittest_library in `ls $BOOSTLIBDIR/lib${ax_lib}.{so,a}* 2>/dev/null` ; do
-                   if test -r $unittest_library ; then
-                       libextension=`echo $unittest_library | sed 's,.*/,,' | sed -e 's;^lib\(boost_unit_test_framework.*\)\.so.*$;\1;' -e 's;^lib\(boost_unit_test_framework.*\)\.a*$;\1;'`
-                       ax_lib=${libextension}
-                       link_unit_test_framework="yes"
-                    else
-                       link_unit_test_framework="no"
-                    fi
-
-                               if test "x$link_unit_test_framework" = "xyes"; then
-                        BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib"
-                        AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB)
-                                           break
-                                   fi
-                  done
-               done
-            fi
-                       if test "x$link_unit_test_framework" != "xyes"; then
-                               AC_MSG_ERROR(Could not link against $ax_lib !)
-                       fi
-               fi
-
-               CPPFLAGS="$CPPFLAGS_SAVED"
-       LDFLAGS="$LDFLAGS_SAVED"
-       fi
-])
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644 (file)
index 0000000..a29c7a3
--- /dev/null
@@ -0,0 +1,70 @@
+include_directories(
+    ${CMAKE_SOURCE_DIR}/src
+    ${CMAKE_SOURCE_DIR}/utils
+    ${ICONV_INCLUDE_DIRS}
+)
+
+SET(cpp_sources
+   cron.cpp
+   daemonfunc.cpp
+   filefunc.cpp
+   i18n.cpp
+   i2n_configfile.cpp
+   ipfunc.cpp
+   logfunc.cpp
+   logread.cpp
+   oftmpstream.cpp
+   pidfile.cpp
+   pointer_func.cpp
+   source_track_basics.cpp
+   stringfunc.cpp
+   timefunc.cpp
+   tmpfstream.cpp
+   tracefunc.cpp
+   tribool.cpp
+   userfunc.cpp
+   week.cpp
+)
+
+SET(cpp_headers
+    cron.hpp
+    daemonfunc.hpp
+    exception.hxx
+    filefunc.hxx
+    i18n.h
+    i2n_configdata.hpp
+    i2n_configfile.hpp
+    insocketstream.hxx
+    ip_type.hxx
+    ipfunc.hxx
+    log_macros.hpp
+    logfunc.hpp
+    logread.hxx
+    oftmpstream.hxx
+    pidfile.hpp
+    pipestream.hxx
+    pointer_func.hpp
+    source_track_basics.hpp
+    stringfunc.hxx
+    timefunc.hxx
+    tmpfstream.hpp
+    tmpfstream_impl.hpp
+    tracefunc.hpp
+    tribool.hpp
+    userfunc.hpp
+    week.hpp
+)
+
+add_library(i2ncommon SHARED ${cpp_sources} ${cpp_headers})
+
+target_link_libraries(i2ncommon ${Boost_IOSTREAMS_LIBRARIES} ${ICONV_LIBRARIES})
+
+set_target_properties(i2ncommon PROPERTIES VERSION ${VERSION} SOVERSION ${MAJOR_VERSION})
+
+install(TARGETS i2ncommon
+        LIBRARY DESTINATION lib
+        COMPONENT sharedlibs)
+
+install(FILES ${cpp_headers}
+        DESTINATION include
+        COMPONENT headers)
diff --git a/src/Makefile.am b/src/Makefile.am
deleted file mode 100644 (file)
index 1a7a023..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-
-# set the include path found by configure
-INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/utils @LIBGETTEXT_CFLAGS@ @LIBICONV_CFLAGS@ @BOOST_CPPFLAGS@ $(all_includes)
-
-# the library search path.
-lib_LTLIBRARIES = libi2ncommon.la
-include_HEADERS = cron.hpp daemonfunc.hpp exception.hxx filefunc.hxx \
-       i2n_configdata.hpp i2n_configfile.hpp insocketstream.hxx ip_type.hxx ipfunc.hxx \
-       log_macros.hpp logfunc.hpp logread.hxx oftmpstream.hxx pidfile.hpp pipestream.hxx \
-       pointer_func.hpp source_track_basics.hpp stringfunc.hxx timefunc.hxx tmpfstream.hpp \
-       tmpfstream_impl.hpp tracefunc.hpp userfunc.hpp week.hpp tribool.hpp
-       
-libi2ncommon_la_SOURCES = cron.cpp daemonfunc.cpp filefunc.cpp \
-       i2n_configfile.cpp ipfunc.cpp logfunc.cpp logread.cpp oftmpstream.cpp pidfile.cpp \
-       pointer_func.cpp source_track_basics.cpp stringfunc.cpp timefunc.cpp tmpfstream.cpp \
-       tracefunc.cpp userfunc.cpp week.cpp tribool.cpp
-
-# Note:  If you specify a:b:c as the version in the next line,
-#  the library that is made has version (a-c).c.b.  In this
-#  example, the version is 2.1.2. (3:2:1)
-
-libi2ncommon_la_LDFLAGS = -version-info @LIBI2NCOMMON_LIB_VERSION@ @BOOST_LDFLAGS@
-
-libi2ncommon_la_LIBADD =  @LIBGETTEXT_LIBS@ @LIBICONV_LIBS@ @BOOST_IOSTREAMS_LIB@
index 0b2e8fc..e2d3508 100644 (file)
@@ -1,10 +1,26 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
 
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  * @brief repeating time-points and intervals 
  *
  * @copyright Copyright &copy; 2009 by Intra2net AG
- * @license commercial
- * @contact info@intra2net.com
  *
  */
 #include <time.h>
index 22595f8..9e392fe 100644 (file)
@@ -1,9 +1,26 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  * @brief repeating time-points and intervals 
  *
  * @copyright Copyright &copy; 2009 by Intra2net AG
- * @license commercial
- * @contact info@intra2net.com
  *
  */
 
index 170bf67..ab541cd 100644 (file)
@@ -1,7 +1,24 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /***************************************************************************
  *   Copyright (C) 2008 by Intra2net AG - Thomas Jarosch                   *
- *   thomas.jarosch@intra2net.com                                          *
- *   http://www.intra2net.com                                              *
  ***************************************************************************/
 #include <sys/types.h>
 #include <unistd.h>
index 8d402bf..f6f77a3 100644 (file)
@@ -1,7 +1,24 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /***************************************************************************
  *   Copyright (C) 2008 by Intra2net AG - Thomas Jarosch                   *
- *   thomas.jarosch@intra2net.com                                          *
- *   http://www.intra2net.com                                              *
  ***************************************************************************/
 #ifndef DAEMONFUNC_H
 #define DAEMONFUNC_H
index cd4f441..b372977 100644 (file)
@@ -1,9 +1,26 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /***************************************************************************
                           exception.hxx  -  exception classes
                              -------------------
-    begin                : Sat Oct 30 1999
-    copyright            : (C) 1999 by STYLETEC
-    email                : service@styletec.de
+    copyright            : (C) 2001 by Intra2net AG
  ***************************************************************************/
 
 #ifndef __EXCEPTION
index b43ef48..6e10ccc 100644 (file)
@@ -1,9 +1,27 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /***************************************************************************
                           escape.cpp  -  escaping of strings
                              -------------------
     begin                : Sun Nov 14 1999
     copyright            : (C) 1999 by Intra2net AG
-    email                : info@intra2net.com
  ***************************************************************************/
 
 #include <list>
index f236246..795b3f2 100644 (file)
@@ -1,6 +1,24 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /***************************************************************************
  *   Copyright (C) 2004-2008 by Intra2net AG                                    *
- *   info@intra2net.com                                                    *
  *                                                                         *
  ***************************************************************************/
 
diff --git a/src/i18n.cpp b/src/i18n.cpp
new file mode 100644 (file)
index 0000000..392e8d3
--- /dev/null
@@ -0,0 +1,216 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
+/***************************************************************************
+                          i18n.cpp  -  description
+                             -------------------
+    begin                : Wed Apr 25 2001
+    copyright            : (C) 2001-2004 by Intra2net AG
+ ***************************************************************************/
+
+#include <sstream>
+#include <string>
+#include <vector>
+#include <iostream>
+#include <fstream>
+
+#include <time.h>
+#include <stdlib.h>
+#include <string.h>
+#include "i18n.h"
+
+#define DEFAULT_LANG "en_EN"
+
+using namespace std;
+
+void i18n_init (const string& domain, const string& path)
+{
+   i18n_set_language (i18n_get_default_language());
+
+   bindtextdomain (domain.c_str(), path.c_str());
+   textdomain (domain.c_str());
+}
+
+void i18n_set_language (const string &lang)
+{
+   string target;
+
+   if (lang.empty())
+      target=DEFAULT_LANG;
+   else
+   {
+      if (lang=="NULL")
+         target="";
+      else
+         target=lang;
+   }
+
+   if (target.empty())
+      setlocale(LC_ALL,"C");
+   else
+      setlocale(LC_ALL,target.c_str());
+
+    // Flush gcc based gettext caching. Code is from the -GNU-
+    // gettext manual in the "being a gettext grok" chapter.
+    {
+        extern int  _nl_msg_cat_cntr;
+        ++_nl_msg_cat_cntr;
+    }
+
+   return;
+}
+
+// empty string returned: no language set
+string i18n_get_current_language(void)
+{
+   string lng;
+   char* env=setlocale(LC_ALL,NULL);
+
+   if (env != NULL)
+   {
+      if (strcmp(env,"C")==0)
+         lng="NULL";
+      else
+         lng=env;
+   }
+   else
+      lng="NULL";
+
+   return lng;
+}
+
+// empty string returned: no language set
+string i18n_get_default_language(void)
+{
+    string lang;
+
+    ifstream in("/usr/intranator/etc/locale");
+    if (in)
+    {
+        getline (in, lang);
+
+        if (lang.empty())
+            lang=DEFAULT_LANG;
+        in.close(); 
+    }
+
+    return lang;
+}
+
+void i18n_get_string(const char *source, string &target, const vector<string> &data) {
+    string src = string (source);
+    i18n_get_string (src, target, data);
+}
+
+string i18n_get_string(const char *source, const vector<string> &data) {
+    string target;
+    string src = string (source);
+    i18n_get_string (src, target, data);
+    return target;
+}
+
+string i18n_get_string(const string &source, const vector<string> &data) {
+    string target;
+    i18n_get_string (source, target, data);
+    return target;
+}
+
+void i18n_get_string(const string &source, string &target, const vector<string> &data)
+{
+       string::size_type p=0, slen=0;
+       string dollar="$";
+
+       // custom vars
+       string text = source;
+
+       target=text;
+
+       while ((p=target.find('$',p))!=string::npos)
+       {
+               const string *ins;
+
+               if (target.size() < p)
+               {
+                       ostringstream os;
+                       os << "i18n syntax error: $ without number at pos ->" << p << "<- in string ->" << text << "<-";
+                       target = os.str();
+                       return;
+               }                       
+
+               // find string to insert (=ins)
+               if (target.at(p+1)=='$')
+               {
+                       ins=&dollar;            
+                       slen=2;
+               }
+               else
+               {
+                       slen=target.find_first_not_of("0123456789",p+1);
+
+                       if (slen==string::npos)
+               slen=target.size();
+
+                       if (slen==p+1)
+                       {
+                               ostringstream os;
+                               os << "i18n syntax error: $ without number at pos ->" << p << "<- in string ->" << text << "<-";
+                               target = os.str();
+                               return;
+                       }                       
+
+                       slen-=p;
+                       istringstream is(target.substr(p+1,slen-1));
+                       unsigned int dnr;
+
+                       is >> dnr;
+
+                       if (is.fail())
+                       {
+                               ostringstream os;
+                               os << "i18n syntax error: error reading number at pos ->" << p << "<- in string ->" << text << "<-";
+                               target = os.str();
+                               return;
+                       }                       
+
+                       if (dnr+1 > data.size())
+                       {
+                               ostringstream os;
+                               os << "i18n parameter error: missing variable ->$" << dnr << "<- in string ->" << text << "<-";
+                               target = os.str();
+                               return;
+                       }                       
+
+                       ins=&(data.at(dnr));
+               }
+
+               target.replace(p,slen,*ins);
+               p=p+ins->size();
+       }
+}
+
+// convert locale to language (de_DE -> de)
+string i18n_locale2language(string locale)
+{
+    // search for "_"
+    string::size_type pos = locale.find("_");
+    if (pos == string::npos)
+        return locale;
+
+    return(locale.substr(0, pos));
+}
diff --git a/src/i18n.h b/src/i18n.h
new file mode 100644 (file)
index 0000000..5d1a699
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
+/***************************************************************************
+                          i18n.h  -  description
+                             -------------------
+    begin                : Wed Apr 25 2001
+    copyright            : (C) 2001-2004 by Intra2net AG
+ ***************************************************************************/
+
+#ifndef intranator_i18n_H
+#define intranator_i18n_H
+
+#include <libintl.h>
+#include <string>
+#include <vector>
+
+#define i18n(String) gettext(String)
+#define i18n_noop(String) (String)
+
+void i18n_init(const std::string& domain, const std::string& path=".");
+void i18n_set_language(const std::string &lang="");
+std::string i18n_get_current_language(void);
+std::string i18n_get_default_language(void);
+
+void i18n_get_string (const char *source, std::string &target, const std::vector<std::string> &data);
+void i18n_get_string (const std::string &source, std::string &target, const std::vector<std::string> &data);
+
+std::string i18n_get_string (const char *source, const std::vector<std::string> &data);
+std::string i18n_get_string (const std::string &source, const std::vector<std::string> &data);
+
+std::string i18n_locale2language(const std::string locale);
+
+#endif
index 8db82ba..9a56deb 100644 (file)
@@ -1,11 +1,27 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  *
- * @author Reinhard Pfau \<Reinhard.Pfau@intra2net.com\>
+ * @author Reinhard Pfau
  * 
  * @copyright &copy; Copyright 2007-2008 by Intra2net AG
- * @license commercial
- *
- * info@intra2net.com
  */
 
 #ifndef __I2N_CONFIGDATA_HPP__
index 5e74417..c246ebc 100644 (file)
@@ -1,11 +1,27 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  *
- * @author Reinhard Pfau \<Reinhard.Pfau@intra2net.com\>
+ * @author Reinhard Pfau
  * 
  * @copyright &copy; Copyright 2007-2008 by Intra2net AG
- * @license commercial
- *
- * info@intra2net.com
  */
 
 //#define NOISEDEBUG
index e4dbb61..afbfc85 100644 (file)
@@ -1,13 +1,29 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  *
  * contains stuff for simple config files.
  *
- * @author Reinhard Pfau \<Reinhard.Pfau@intra2net.com\>
+ * @author Reinhard Pfau
  * 
  * @copyright &copy; Copyright 2007-2008 by Intra2net AG
- * @license commercial
- *
- * info@intra2net.com
  */
 
 #ifndef __I2N_CONFIGFILE_HPP__
index bbd58c6..6405647 100644 (file)
@@ -1,9 +1,27 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /***************************************************************************
               insocketstream.hxx  -  C++ streambuffer wrapper 
                              -------------------
     begin                : Sun Nov 10 2002
     copyright            : (C) 2002 by Intra2net AG
-    email                : intranator@intra2net.com
  ***************************************************************************/
 
 #ifndef _INSOCKETSTREAM
index d13d87d..ec46f95 100644 (file)
@@ -1,6 +1,24 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /***************************************************************************
  *   Copyright (C) 2004 by Intra2net AG                                    *
- *   info@intra2net.com                                                    *
  ***************************************************************************/
 
 #ifndef __IP_TYPE
index 6d43bf7..7c917ec 100644 (file)
@@ -1,9 +1,27 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /***************************************************************************
                        ip_functions.cpp  -  description
                              -------------------
     begin                : Sat Feb 07 2004
     copyright            : (C) 2004 by Intra2net AG
-    email                : info@intra2net.com
  ***************************************************************************/
 
 #include <string>
index 06cef4c..a52cae5 100644 (file)
@@ -1,9 +1,27 @@
+ /*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /***************************************************************************
                         ip_functions.hxx -  description
                              -------------------
     begin                : Sat Feb 07 2004
     copyright          : (C) 2004 by Intra2net AG
-    email                : info@intra2net.com
  ***************************************************************************/
 
 #ifndef __IPFUNC_HXX
index 931990f..09665a5 100644 (file)
@@ -1,3 +1,22 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  * @brief macros to ease some common logging cases.
  *
@@ -6,12 +25,9 @@
  * (Not everyone like macros...)
  * 
  *
- * @author Reinhard Pfau \<reinhard.pfau@intra2net.com\>
+ * @author Reinhard Pfau
  *
  * @copyright &copy; Copyright 2008 by Intra2net AG
- * @license commercial
- *
- * info@intra2net.com
  *
  */
 
index 1a719a2..0975130 100644 (file)
@@ -1,10 +1,26 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  * @brief implementaton of logging functions.
  *
  * @copyright &copy; Copyright 2007-2008 by Intra2net AG
- * @license commercial
- *
- * info@intra2net.com
  *
  * @note This module is not thread safe!
  * @todo make this module thread safe (only useful when we can use threads...)
index 563775e..1073f38 100644 (file)
@@ -1,10 +1,26 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  * @brief provides logging functions.
  *
  * @copyright &copy; Copyright 2007-2008 by Intra2net AG
- * @license commercial
- *
- * info@intra2net.com
  */
 
 #ifndef __I2N_COMMON_LOGFUNC_HPP__
index ba32035..6e5d822 100644 (file)
@@ -1,3 +1,22 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 #include <stdlib.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index 7f796d2..389aaa5 100644 (file)
@@ -1,6 +1,24 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /***************************************************************************
- *   Copyright (C) 2006 by Thomas Jarosch                                  *
- *   info@intra2net.com                                                    *
+ *   Copyright (C) 2006 by Intra2net AG                                    *
  *                                                                         *
  ***************************************************************************/
 
index 4d764e3..bf4dda9 100644 (file)
@@ -1,3 +1,22 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
index 6bdd49a..a1feeb7 100644 (file)
@@ -1,3 +1,22 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 #ifndef _OFTMPSTREAM_HXX
 #define _OFTMPSTREAM_HXX
 
index c4bf1f2..87efd5b 100644 (file)
@@ -1,8 +1,26 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /**
    Pid file handling
 
    @copyright Intra2net AG
-   @license commerical
 */
 #include "pidfile.hpp"
 #include <sys/types.h>
index 1941598..b9ae852 100644 (file)
@@ -1,3 +1,22 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 #ifndef PIDFILE_H
 #define PIDFILE_H
 
@@ -7,7 +26,6 @@
 /// Pid file handling
 /**
    @copyright Intra2net AG
-   @license commerical
 */
 class PidFile
 {
index 3dad8b6..211ee5d 100644 (file)
@@ -1,9 +1,27 @@
+ /*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /***************************************************************************
               inpipestream.hxx  -  C++ streambuffer wrapper 
                              -------------------
     begin                : Thu Dec 27 2001
     copyright            : (C) 2001 by Intra2net AG
-    email                : intranator@intra2net.com
  ***************************************************************************/
 
 #ifndef _PIPESTREAM
index eee9f5d..56cbc26 100644 (file)
@@ -1,12 +1,28 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  * @brief 
  *
- * @author Reinhard Pfau \<reinhard.pfau@intra2net.com\>
+ * @author Reinhard Pfau
  *
  * @copyright &copy; Copyright 2008 Intra2Net AG
- * @license commercial
- * @contact info@intra2net.com
- *
  *
  */
 
index 0902ba7..1e394be 100644 (file)
@@ -1,11 +1,28 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  * @brief provides a little base class for classes wich are used in conjunction with shared pointer.
  *
- * @author Reinhard Pfau \<reinhard.pfau@intra2net.com\>
+ * @author Reinhard Pfau
  *
  * @copyright &copy; Copyright 2008 Intra2Net AG
- * @license commercial
- * @contact info@intra2net.com
  *
  */
 
index eb947a6..25ad139 100644 (file)
@@ -1,9 +1,25 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  *
  * @copyright &copy; Copyright 2007-2008 by Intra2net AG
- * @license commercial
- *
- * info@intra2net.com
  */
 
 #include "source_track_basics.hpp"
index 9b06f72..d109e69 100644 (file)
@@ -1,9 +1,25 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  *
  * @copyright &copy; Copyright 2007-2008 by Intra2net AG
- * @license commercial
- *
- * info@intra2net.com
  */
 
 #ifndef __I2N_COMMON_SOURCE_TRACK_BASICS_HPP__
index 995b71f..1b48adf 100644 (file)
@@ -1,8 +1,25 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  *
  * (c) Copyright 2007-2008 by Intra2net AG
- *
- * info@intra2net.com
  */
 
 #include <iostream>
index 3ee7a0b..8b7afab 100644 (file)
@@ -1,3 +1,22 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  * @brief collection of string tools (/ functions).
  *
@@ -10,8 +29,6 @@
  *
  *
  * (c) Copyright 2007-2008 by Intra2net AG
- *
- * info@intra2net.com
  */
 
 #ifndef __STRINGFUNC_HXX
index 327de6c..4f89c58 100644 (file)
@@ -1,13 +1,29 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  * @brief time related functions.
  *
  * @copyright Copyright &copy; 2001-2008 by Intra2net AG
- * @license commercial
- * @contact info@intra2net.com
  *
  */
 
-
 #include <string>
 #include <sstream>
 #include <iostream>
index 308ff80..55eab30 100644 (file)
@@ -1,10 +1,26 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  * @brief time related functions.
  *
  * @copyright Copyright &copy; 2001-2008 by Intra2net AG
- * @license commercial
- * @contact info@intra2net.com
- *
  */
 
 #ifndef __TIMEFUNC_HXX
index d574bff..5d9e2b2 100644 (file)
@@ -1,13 +1,28 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  * @brief fstream which creates files with mkstemp.
  *
  * @author Gerd v. Egidy
  *
  * @copyright &copy; Copyright 2010 by Intra2net AG
- * @license commercial
- *
- * info@intra2net.com
- *
  */
 
 #include <string>
index f73924a..6760ccd 100644 (file)
@@ -1,13 +1,28 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  * @brief fstream which creates files with mkstemp.
  *
  * @author Gerd v. Egidy
  *
  * @copyright &copy; Copyright 2010 by Intra2net AG
- * @license commercial
- *
- * info@intra2net.com
- *
  */
 
 #ifndef __I2N_TMPFSTREAM_HPP__
index 514369b..a87e693 100644 (file)
@@ -1,3 +1,22 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  * @brief fstream which creates files with mkstemp.
  *
@@ -8,10 +27,6 @@
  * @author Gerd v. Egidy
  *
  * @copyright &copy; Copyright 2010 by Intra2net AG
- * @license commercial
- *
- * info@intra2net.com
- *
  */
 
 #ifndef __I2N_TMPFSTREAM_IMPL_HPP__
index c356030..ab1ec5e 100644 (file)
@@ -1,10 +1,26 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  * @brief implementation of tracing functionality.
  *
  * @copyright &copy; Copyright 2008 by Intra2net AG
- * @license commercial
- *
- * info@intra2net.com
  *
  * @note This module is not thread safe!
  * @todo make this module thread safe (only useful when we can use threads...)
index a110313..0d41f0d 100644 (file)
@@ -1,14 +1,29 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  * @brief provides tracing funtionality.
  *
  * Provides a scope tracker 
  *
  * @copyright &copy; Copyright 2008 by Intra2net AG
- * @license commercial
- * 
- * info@intra2net.com
- */
-
+*/
 #ifndef __I2N_COMMON_TRACEFUNC_HPP__
 #define __I2N_COMMON_TRACEFUNC_HPP__
 
index f69e545..403d3c8 100644 (file)
@@ -1,10 +1,27 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  * @brief Implementation of intuitive tristate logic
  *
  * (c) Copyright 2011 by Intra2net AG
  * Written by Erich Willems and Thomas Jarosch
- *
- * info@intra2net.com
  */
 
 #include <tribool.hpp>
index adc3dba..a6469ae 100644 (file)
@@ -1,3 +1,22 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  * @brief Implementation of intuitive tristate logic
  *
@@ -6,8 +25,6 @@
  * 
  * After we had serious trouble with the current boost::logic::tribool implementation
  * overloading the comparison operators, we rolled our own class.
- *
- * info@intra2net.com
  */
 
 namespace I2n
index 9b6196e..eeeeab5 100644 (file)
@@ -1,3 +1,22 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  * @brief provides wrapper and tools for (system) user and group information.
  *
@@ -6,9 +25,6 @@
  * @license commercial
  *
  * (c) Copyright 2007-2008 by Intra2net AG
- *
- * info@intra2net.com
- *
  */
 
 #include "userfunc.hpp"
index 12e6297..a076d9a 100644 (file)
@@ -1,3 +1,22 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  * @brief provides wrapper and tools for (system) user and group information.
  *
@@ -6,9 +25,6 @@
  * @license commercial
  *
  * (c) Copyright 2007-2008 by Intra2net AG
- *
- * info@intra2net.com
- *
  */
 
 #ifndef _I2N_USERFUNC_HPP_
index 4ba244f..ce8a0f6 100644 (file)
@@ -1,3 +1,22 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 #include <week.hpp>
 
 #include <sstream>
index a377ac6..f5363bd 100644 (file)
@@ -1,10 +1,26 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  * @brief time related functions. Week module
  *
  * @copyright Copyright &copy; 2001-2009 by Intra2net AG
- * @license commercial
- * @contact info@intra2net.com
- *
  */
 
 #ifndef __WEEK_HPP
diff --git a/stamp-h.in b/stamp-h.in
deleted file mode 100644 (file)
index 9788f70..0000000
+++ /dev/null
@@ -1 +0,0 @@
-timestamp
diff --git a/templates/cpp b/templates/cpp
deleted file mode 100644 (file)
index 773e908..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-/***************************************************************************
- *   Copyright (C) 2004 by Gerd v. Egidy                                   *
- *   info@intra2net.com                                                    *
- *                                                                         *
- ***************************************************************************/
diff --git a/templates/h b/templates/h
deleted file mode 100644 (file)
index 773e908..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-/***************************************************************************
- *   Copyright (C) 2004 by Gerd v. Egidy                                   *
- *   info@intra2net.com                                                    *
- *                                                                         *
- ***************************************************************************/
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
new file mode 100644 (file)
index 0000000..2fd6fdb
--- /dev/null
@@ -0,0 +1,39 @@
+include_directories(
+    ${CMAKE_SOURCE_DIR}/configlib
+    ${CMAKE_SOURCE_DIR}/src
+    ${CMAKE_SOURCE_DIR}/utils)
+
+########### next target ###############
+
+SET(cpp_sources
+   ip_range.cpp
+   stringfunc.cpp
+   test_containerfunc.cpp
+   test_cron_interval.cpp
+   test_cron_point.cpp
+   test_filefunc.cpp
+   test_global_config.cpp
+   test_logging.cpp
+   test_pidfile.cpp
+   test_timefunc.cpp
+   test_tmpfstream.cpp
+)
+if (IMAP_UTF7_SUPPORT)
+   SET(cpp_sources stringfunc_imaputf7.cpp ${cpp_sources})
+endif (IMAP_UTF7_SUPPORT)
+
+add_executable(test_i2ncommon ${cpp_sources})
+
+# Add custom "make check" target which automatically builds the library
+add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS test_i2ncommon)
+
+# Invocation via "make test"
+enable_testing()
+add_test(test_i2ncommon test_i2ncommon)
+
+target_link_libraries(test_i2ncommon
+    i2ncommon
+    i2ncommon_utils
+    i2ncommon_config
+    ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES}
+)
diff --git a/test/Makefile.am b/test/Makefile.am
deleted file mode 100644 (file)
index 6cf2587..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-INCLUDES = -I$(top_srcdir)/configlib -I$(top_srcdir)/src -I$(top_srcdir)/utils @BOOST_CPPFLAGS@
-METASOURCES = AUTO
-check_PROGRAMS =  test
-test_SOURCES = ip_range.cpp stringfunc.cpp test_containerfunc.cpp \
-       test_cron_interval.cpp test_cron_point.cpp test_filefunc.cpp test_global_config.cpp \
-       test_logging.cpp test_pidfile.cpp test_timefunc.cpp test_tmpfstream.cpp
-test_LDADD = $(top_builddir)/src/libi2ncommon.la $(top_builddir)/utils/libi2ncommon_utils.la \
-       $(top_builddir)/configlib/libi2ncommon_config.la @BOOST_UNIT_TEST_FRAMEWORK_LIB@
-
-TESTS = test
index dce227e..cce628b 100644 (file)
@@ -1,6 +1,24 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /***************************************************************************
  *   Copyright (C) 2004 by Intra2net AG                                    *
- *   info@intra2net.com                                                    *
  *                                                                         *
  ***************************************************************************/
 
index 749db12..f1404a6 100644 (file)
@@ -1,6 +1,24 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /***************************************************************************
- *   Copyright (C) 2006 by Intra2net AG                                    *
- *   info@intra2net.com                                                    *
+ *   Copyright (C) 2006-2011 by Intra2net AG                               *
  *                                                                         *
  ***************************************************************************/
 
@@ -244,24 +262,6 @@ BOOST_AUTO_TEST_CASE(nice_unit_format8)
     BOOST_CHECK_EQUAL(string("8192.0 PB"), output);
 }
 
-
-
-BOOST_AUTO_TEST_CASE(imaputf7_to_utf8)
-{
-    string output = utf7imap_to_utf8("Sp&AOQ-m");
-    BOOST_CHECK_EQUAL(string("Späm"), output);
-}
-
-BOOST_AUTO_TEST_CASE(utf8_to_imaputf7)
-{
-    string output = utf8_to_utf7imap("Späm");
-    BOOST_CHECK_EQUAL(string("Sp&AOQ-m"), output);
-}
-
-/*
-**
-*/
-
 BOOST_AUTO_TEST_CASE(TestTrim)
 {
     std::string s("s1");
diff --git a/test/stringfunc_imaputf7.cpp b/test/stringfunc_imaputf7.cpp
new file mode 100644 (file)
index 0000000..37ba023
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
+/***************************************************************************
+ *   Copyright (C) 2011 by Intra2net AG                                    *
+ *                                                                         *
+ ***************************************************************************/
+
+#include <string>
+
+#define BOOST_TEST_DYN_LINK
+#include <boost/test/unit_test.hpp>
+
+#include <stringfunc.hxx>
+
+using namespace std;
+using namespace I2n;
+
+BOOST_AUTO_TEST_SUITE(stringfunc_imaputf7)
+
+BOOST_AUTO_TEST_CASE(imaputf7_to_utf8)
+{
+    string output = utf7imap_to_utf8("Sp&AOQ-m");
+    BOOST_CHECK_EQUAL(string("Späm"), output);
+}
+
+BOOST_AUTO_TEST_CASE(utf8_to_imaputf7)
+{
+    string output = utf8_to_utf7imap("Späm");
+    BOOST_CHECK_EQUAL(string("Sp&AOQ-m"), output);
+}
+
+BOOST_AUTO_TEST_SUITE_END()
index 5ec6041..9539ae6 100644 (file)
@@ -1,10 +1,27 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  *
  * tests for the module "containerfunc"
  *
  * (c) Copyright 2007-2008 by Intra2net AG
- * 
- * info@intra2net.com
  */
 
 //#define NOISEDEBUG
index 2fb7450..afcbade 100644 (file)
@@ -1,9 +1,26 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  * @brief unit test for cron functions.
  *
  * @copyright Copyright &copy; 2009 by Intra2net AG
- * @license commercial
- * @contact info@intra2net.com
  *
  */
 
index 687ca12..3816670 100644 (file)
@@ -1,9 +1,26 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  * @brief unit test for cron functions.
  *
  * @copyright Copyright &copy; 2009 by Intra2net AG
- * @license commercial
- * @contact info@intra2net.com
  *
  */
 
index f00e0f5..0dc1b3a 100644 (file)
@@ -1,10 +1,27 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  *
  * tests for the modules "filefunc", "daemonfunc"
  *
  * (c) Copyright 2007-2008 by Intra2net AG
- *
- * info@intra2net.com
  */
 
 //#define NOISEDEBUG
@@ -79,7 +96,7 @@ BOOST_FIXTURE_TEST_SUITE(TestFileFunc, TestFileFuncFixture)
 
 BOOST_AUTO_TEST_CASE(StatTest1)
 {
-    I2n::Stat stat("test_filefunc.cpp");
+    I2n::Stat stat("Makefile");
 
     BOOST_CHECK_EQUAL( true, (bool)stat );
     BOOST_CHECK_EQUAL( true, stat.is_regular_file() );
@@ -123,7 +140,7 @@ BOOST_AUTO_TEST_CASE(DirTest1)
     BOOST_CHECK_EQUAL( true, res );
     BOOST_CHECK( ! names.empty() );
 
-    StringVector::iterator it = std::find( names.begin(), names.end(), "test_filefunc.cpp");
+    StringVector::iterator it = std::find( names.begin(), names.end(), "Makefile");
     BOOST_CHECK( it != names.end() );
 
     it = std::find( names.begin(), names.end(), "." );
index 95781c2..7b14b04 100644 (file)
@@ -1,8 +1,25 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  *
  * (c) Copyright 2008 by Intra2net AG
- * 
- * info@intra2net.com
  */
 
 #include <string>
index a45ba46..8708fb6 100644 (file)
@@ -1,9 +1,26 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  * test cases for loggin module.
  *
  * (c) Copyright 2007 by Intra2net AG
- * 
- * info@intra2net.com
  */
 
 //#define NOISEDEBUG
index 198c3ec..50d6843 100644 (file)
@@ -1,8 +1,26 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /**
    Pid file handling unit tests
 
    @copyright Intra2net AG
-   @license commerical
 */
 
 #include <unistd.h>
index 900d587..4a2a04e 100644 (file)
@@ -1,9 +1,26 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  * @brief unit test for time related functions.
  *
  * @copyright Copyright &copy; 2001-2008 by Intra2net AG
- * @license commercial
- * @contact info@intra2net.com
  *
  */
 
index 3bc8a28..e7df227 100644 (file)
@@ -1,10 +1,27 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /** @file
  *
  * tests for the module tmpfstream
  *
  * (c) Copyright 2010 by Intra2net AG
- *
- * info@intra2net.com
  */
 
 //#define NOISEDEBUG
diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt
new file mode 100644 (file)
index 0000000..533a99c
--- /dev/null
@@ -0,0 +1,24 @@
+include_directories(${CMAKE_SOURCE_DIR}/src)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+
+set(cpp_sources
+    containerfunc.cpp
+    signalfunc.cpp
+)
+set(cpp_headers
+    containerfunc.hpp
+    signalfunc.hpp
+)
+
+add_library(i2ncommon_utils SHARED ${cpp_sources} ${cpp_headers})
+
+set_target_properties(i2ncommon_utils PROPERTIES VERSION ${VERSION} SOVERSION ${MAJOR_VERSION})
+
+
+install(TARGETS i2ncommon_utils
+        LIBRARY DESTINATION lib
+        COMPONENT sharedlibs)
+
+install(FILES ${cpp_headers}
+        DESTINATION include
+        COMPONENT headers)
diff --git a/utils/Makefile.am b/utils/Makefile.am
deleted file mode 100644 (file)
index 4535091..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-# set the include path found by configure
-INCLUDES = -I$(top_srcdir)/src @BOOST_CPPFLAGS@ $(all_includes)
-METASOURCES = AUTO
-
-lib_LTLIBRARIES = libi2ncommon_utils.la
-
-include_HEADERS = containerfunc.hpp signalfunc.hpp
-
-# Note:  If you specify a:b:c as the version in the next line,
-#  the library that is made has version (a-c).c.b.  In this
-#  example, the version is 2.1.2. (3:2:1)
-
-libi2ncommon_utils_la_LDFLAGS = -version-info @LIBI2NCOMMON_LIB_VERSION@ @BOOST_LDFLAGS@
-
-libi2ncommon_utils_la_SOURCES = containerfunc.cpp signalfunc.cpp
index 80e3bce..b2a275e 100644 (file)
@@ -20,8 +20,6 @@ on this file might be covered by the GNU General Public License.
 /** @file
  *
  * (c) Copyright 2007-2008 by Intra2net AG
- * 
- * opensource@intra2net.com
  */
 
 #include "containerfunc.hpp"
index 2e61e54..d5b7dbe 100644 (file)
@@ -20,11 +20,9 @@ on this file might be covered by the GNU General Public License.
 /** @file
  * @brief some helper for handling (STL) data structures.
  *
- * @author Reinhard Pfau \<Reinhard.Pfau@intra2net.com\>
+ * @author Reinhard Pfau
  *
  * (c) Copyright 2007-2008 by Intra2net AG
- * 
- * opensource@intra2net.com
  */
 
 #ifndef _I2N_CONTAINERFUNC_HPP_
index 8cad55e..bee98b6 100644 (file)
@@ -21,8 +21,6 @@ on this file might be covered by the GNU General Public License.
  * @brief implementation of wrapper and tools for signal related stuff.
  *
  * @copyright &copy; Copyright 2007-2008 by Intra2net AG
- *
- * opensource@intra2net.com
  */
 
 #include "signalfunc.hpp"
index 00ebd2c..95982fc 100644 (file)
@@ -22,7 +22,6 @@ on this file might be covered by the GNU General Public License.
  *
  *
  * @copyright &copy; Copyright 2007-2008 by Intra2net AG
- * @contact opensource@intra2net.com
  *
  * @bug 
  * Although most stuff should work under most POSIX like systems;
diff --git a/xmllib/CMakeLists.txt b/xmllib/CMakeLists.txt
new file mode 100644 (file)
index 0000000..19dc0b0
--- /dev/null
@@ -0,0 +1,27 @@
+include_directories(${CMAKE_SOURCE_DIR}/src)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+include_directories(${XMLPP_INCLUDE_DIRS})
+
+link_directories(${XMLPP_LIBRARY_DIRS})
+
+set(cpp_sources
+    xmlcommon.cpp
+)
+
+set(cpp_headers
+    xmlcommon.hpp
+)
+
+add_library(i2ncommon_xml SHARED ${cpp_sources} ${cpp_headers})
+
+target_link_libraries(i2ncommon_xml ${Xmlpp_LIBRARIES})
+
+set_target_properties(i2ncommon_xml PROPERTIES VERSION ${VERSION} SOVERSION ${MAJOR_VERSION})
+
+install(TARGETS i2ncommon_xml
+        LIBRARY DESTINATION lib
+        COMPONENT sharedlibs)
+
+install(FILES ${cpp_headers}
+        DESTINATION include
+        COMPONENT headers)
diff --git a/xmllib/Makefile.am b/xmllib/Makefile.am
deleted file mode 100644 (file)
index 4c22119..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-# set the include path found by configure
-INCLUDES = -I$(top_srcdir)/src $(all_includes) @LIBXMLPP_CFLAGS@ @LIBGETTEXT_CFLAGS@
-METASOURCES = AUTO
-
-lib_LTLIBRARIES = libi2ncommon_xml.la
-
-include_HEADERS = xmlcommon.hpp
-
-# Note:  If you specify a:b:c as the version in the next line,
-#  the library that is made has version (a-c).c.b.  In this
-#  example, the version is 2.1.2. (3:2:1)
-
-libi2ncommon_xml_la_LDFLAGS = -version-info @LIBI2NCOMMON_LIB_VERSION@
-
-libi2ncommon_xml_la_LIBADD = @LIBXMLPP_LIBS@
-libi2ncommon_xml_la_SOURCES = xmlcommon.cpp
index 6f53be1..2661b8c 100644 (file)
@@ -1,9 +1,27 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /***************************************************************************
                    xmlcommon.cpp - Common XML functions
                              -------------------
     begin                : Tue Apr 27 2004
     copyright            : (C) 2004 by Intra2net AG
-    email                : info@intra2net.com
  ***************************************************************************/
 
 #include <xmlcommon.hpp>
index b345ff4..3ecab13 100644 (file)
@@ -1,9 +1,27 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
 /***************************************************************************
                    xmlcommon.hxx - Common XML functions
                              -------------------
     begin                : Tue Apr 27 2004
     copyright            : (C) 2004 by Intra2net AG
-    email                : info@intra2net.com
  ***************************************************************************/
 
 #ifndef __XMLCOMMON