diff -u -r -N openbabel-2.1.1-msys/CMakeLists.txt openbabel-2.1.1/CMakeLists.txt --- openbabel-2.1.1-msys/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 +++ openbabel-2.1.1/CMakeLists.txt 2007-11-03 14:06:16.186625000 +0100 @@ -0,0 +1,60 @@ +project(openabel) +set(BABEL_MAJ_VER 2) +set(BABEL_MIN_VER 1) +set(BABEL_PATCH_VER 1) +set(BABEL_VERSION "${BABEL_MAJ_VER}.${BABEL_MIN_VER}.${BABEL_PATCH_VER}") +set(BABEL_DATADIR "{CMAKE_INSTALL_PREFIX}/share/openbabel") + +option(WITH_INCHI "build inchi lib" ON) +option(BUILD_SHARED "enable static build support" ON) +if(BUILD_SHARED) + set(BUILD_TYPE SHARED) +else(BUILD_SHARED) + set(BUILD_TYPE STATIC) +endif(BUILD_SHARED) + +if(WIN32) + set(MODULE_EXTENSION ".dll") +else(WIN32) + set(MODULE_EXTENSION ".so") +endif(WIN32) + +# configure checks +find_package(LibXml2) +find_package(ZLIB) +if(ZLIB_FOUND) + add_definitions(-DHAVE_LIBZ) + include_directories(${ZLIB_INCLUDE_DIR}) +endif(ZLIB_FOUND) + +include(CheckIncludeFile) +include(CheckIncludeFileCXX) +include(CheckSymbolExists) +include(CheckTypeSize) + +check_include_file(conio.h HAVE_CONIO_H) +check_include_file(sys/time.h HAVE_SYS_TIME_H) +check_include_file(time.h HAVE_TIME_H) +check_include_file_cxx(sstream HAVE_SSTREAM) + +check_symbol_exists(rint "math.h" HAVE_RINT) +check_symbol_exists(snprintf "stdio.h" HAVE_SNPRINTF) +check_symbol_exists(sranddev "stdlib.h" HAVE_SRANDDEV) +check_symbol_exists(strcasecmp "string.h" HAVE_STRCASECMP) +check_symbol_exists(strncasecmp "string.h" HAVE_STRNCASECMP) + +set(CMAKE_EXTRA_INCLUDE_FILES time.h) +check_type_size(clock_t CLOCK_T) + +configure_file(${CMAKE_SOURCE_DIR}/src/config.h.cmake ${CMAKE_BINARY_DIR}/include/openbabel/babelconfig.h) +install(FILES ${CMAKE_BINARY_DIR}/include/openbabel/babelconfig.h DESTINATION include/openbabel-2.0/openbabel) + +include_directories(${CMAKE_SOURCE_DIR}/include + ${CMAKE_SOURCE_DIR}/data + ${CMAKE_BINARY_DIR}/include +) + +add_subdirectory(include) +add_subdirectory(data) +add_subdirectory(src) + diff -u -r -N openbabel-2.1.1-msys/data/CMakeLists.txt openbabel-2.1.1/data/CMakeLists.txt --- openbabel-2.1.1-msys/data/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 +++ openbabel-2.1.1/data/CMakeLists.txt 2007-11-03 13:35:54.253000000 +0100 @@ -0,0 +1,11 @@ + +set(to_install + aromatic.txt bondtyp.txt isotope.txt resdata.txt + atomtyp.txt element.txt isotope-small.txt phmodel.txt + patterns.txt torlib.txt types.txt + SMARTS_InteLigand.txt + ghemical.prm + logp.txt psa.txt mr.txt +) + +install(FILES ${to_install} DESTINATION share/openbabel/${BABEL_VERSION}) diff -u -r -N openbabel-2.1.1-msys/include/CMakeLists.txt openbabel-2.1.1/include/CMakeLists.txt --- openbabel-2.1.1-msys/include/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 +++ openbabel-2.1.1/include/CMakeLists.txt 2007-11-03 13:23:40.852625000 +0100 @@ -0,0 +1,7 @@ + +file(GLOB openbabel_headers openbabel/*.h) +file(GLOB math_headers openbabel/math/*.h) + +install(FILES inchi_api.h DESTINATION include/inchi) +install(FILES ${openbabel_headers} DESTINATION include/openbabel-2.0/openbabel) +install(FILES ${math_headers} DESTINATION include/openbabel-2.0/openbabel/math) diff -u -r -N openbabel-2.1.1-msys/Makefile.in openbabel-2.1.1/Makefile.in --- openbabel-2.1.1-msys/Makefile.in 2007-11-03 13:27:41.383875000 +0100 +++ openbabel-2.1.1/Makefile.in 2007-07-01 22:11:22.000000000 +0200 @@ -69,7 +69,7 @@ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = data src include +DIST_SUBDIRS = data src test tools doc include scripts DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -207,7 +207,7 @@ # only build in the scripts subdirectory if possible (perl, python, swig, etc.) @BUILD_SCRIPTS_TRUE@SCRIPT_DIR = scripts -SUBDIRS = data src include +SUBDIRS = data src test tools doc include $(SCRIPT_DIR) EXTRA_DIST = Doxyfile windows-vc2005 AUTOMAKE_OPTIONS = foreign pkgconfigdir = $(libdir)/pkgconfig diff -u -r -N openbabel-2.1.1-msys/src/CMakeLists.txt openbabel-2.1.1/src/CMakeLists.txt --- openbabel-2.1.1-msys/src/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 +++ openbabel-2.1.1/src/CMakeLists.txt 2007-11-03 17:49:07.653500000 +0100 @@ -0,0 +1,172 @@ +if(WITH_INCHI) + add_definitions(-DINCHI_LINK_AS_DLL) + add_subdirectory(formats/inchi) +endif(WITH_INCHI) + +set(fingerprints_srcs + fingerprints/finger2.cpp + fingerprints/finger3.cpp +) + +set(forcefields_srcs + forcefields/forcefieldghemical.cpp +) + +set(formats_srcs + formats/APIInterface.cpp + formats/obmolecformat.cpp + formats/CSRformat.cpp + formats/PQSformat.cpp + formats/alchemyformat.cpp + formats/acrformat.cpp + formats/amberformat.cpp + formats/balstformat.cpp + formats/bgfformat.cpp + formats/boxformat.cpp + formats/cacaoformat.cpp + formats/cacheformat.cpp + formats/carformat.cpp + formats/cccformat.cpp + formats/chem3dformat.cpp + formats/chemdrawct.cpp + formats/chemdrawcdx.cpp + formats/chemtoolformat.cpp + formats/cifformat.cpp + formats/copyformat.cpp + formats/crkformat.cpp + formats/cssrformat.cpp + formats/dmolformat.cpp + formats/fastsearchformat.cpp + formats/fastaformat.cpp + formats/fchkformat.cpp + formats/featformat.cpp + formats/fhformat.cpp + formats/fingerprintformat.cpp + formats/freefracformat.cpp + formats/gamessformat.cpp + formats/gaussformat.cpp + formats/ghemicalformat.cpp + formats/gromos96format.cpp + formats/hinformat.cpp + formats/jaguarformat.cpp + formats/mdlformat.cpp + formats/mmodformat.cpp + formats/mol2format.cpp + formats/molreport.cpp + formats/mopacformat.cpp + formats/mpdformat.cpp + formats/mpqcformat.cpp + formats/nwchemformat.cpp + formats/pcmodelformat.cpp + formats/pdbformat.cpp + formats/povrayformat.cpp + formats/qchemformat.cpp + formats/reportformat.cpp + formats/rxnformat.cpp + formats/shelxformat.cpp + formats/smilesformat.cpp + formats/thermoformat.cpp + formats/tinkerformat.cpp + formats/titleformat.cpp + formats/turbomoleformat.cpp + formats/unichemformat.cpp + formats/viewmolformat.cpp + formats/xedformat.cpp + formats/xyzformat.cpp + formats/yasaraformat.cpp + formats/zindoformat.cpp +) + +if(WITH_INCHI) + set(formats_srcs + ${formats_srcs} + formats/getinchi.cpp + formats/inchiformat.cpp + ) + set(libs ${libs} inchi) +endif(WITH_INCHI) + +if(LIBXML2_FOUND) + include_directories(${LIBXML2_INCLUDE_DIR}) + set(xml_srcs + formats/xml/cdxmlformat.cpp + formats/xml/cmlformat.cpp + formats/xml/cmlreactlformat.cpp + formats/xml/pubchem.cpp + formats/xml/xmlformat.cpp + formats/xml/xml.cpp + ) +endif(LIBXML2_FOUND) + +set(math_srcs + math/matrix3x3.cpp + math/vector3.cpp +) + +set(openbabel_srcs + atom.cpp + base.cpp + bitvec.cpp + bond.cpp + bondtyper.cpp + canon.cpp + chains.cpp + chiral.cpp + data.cpp + fingerprint.cpp + forcefield.cpp + generic.cpp + grid.cpp + kekulize.cpp + matrix.cpp + mol.cpp + molchrg.cpp + obconversion.cpp + oberror.cpp + obiter.cpp + obutil.cpp + parsmart.cpp + patty.cpp + phmodel.cpp + rand.cpp + residue.cpp + ring.cpp + rotor.cpp + rotamer.cpp + tokenst.cpp + typer.cpp + transform.cpp + groupcontrib.cpp +) + +if(BUILD_SHARED) + if(WIN32) + set(openbabel_srcs ${openbabel_srcs} + dlhandler_win32.cpp + ) + else(WIN32) + set(openbabel_srcs ${openbabel_srcs} + dlhandler_unix.cpp + ) + endif(WIN32) +endif(BUILD_SHARED) + +add_library(openbabel-2 ${BUILD_TYPE} + ${openbabel_srcs} + ${fingerprints_srcs} + ${forcefields_srcs} + ${formats_srcs} + ${xml_srcs} + ${math_srcs} +) + +if(NOT WIN32) + set(libs ${libs} m) +endif(NOT WIN32) + +target_link_libraries(openbabel-2 ${libs} ${LIBXML2_LIBRARIES} ${ZLIB_LIBRARY}) +install(TARGETS openbabel-2 + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) diff -u -r -N openbabel-2.1.1-msys/src/config.h.cmake openbabel-2.1.1/src/config.h.cmake --- openbabel-2.1.1-msys/src/config.h.cmake 1970-01-01 01:00:00.000000000 +0100 +++ openbabel-2.1.1/src/config.h.cmake 2007-11-03 17:38:27.101000000 +0100 @@ -0,0 +1,151 @@ +/* src/config.h.in. Generated from configure.in by autoheader. */ + +/* Where the data files are located */ +#define BABEL_DATADIR "@BABEL_DATADIR@" + +/* The version of Open Babel */ +#define BABEL_VERSION "@BABEL_VERSION@" + +/* Used to export symbols for DLL / shared library builds */ +#if defined(WIN32) + #if defined(USING_OBDLL) // e.g. in src/main.cpp + #define EXTERN __declspec(dllimport) extern + #else + #define EXTERN __declspec(dllexport) extern + #endif +#else //Everything else (behaviour as original) + #define EXTERN extern +#endif + +/* The file extension used for shared modules */ +#define MODULE_EXTENSION "@MODULE_EXTENSION@" + +/* Used to export symbols for DLL / shared library builds */ +#if defined(WIN32) + #if defined(USING_OBDLL) // e.g. in src/main.cpp + #define OBAPI __declspec(dllimport) + #else + #define OBAPI __declspec(dllexport) + #endif +#else //Everything else (behaviour as original) + #define OBAPI +#endif + + +/* Used to export symbols for DLL / shared library builds */ +#if defined(WIN32) + #if defined(USING_OBDLL) // e.g. in src/main.cpp + #define OBCOMMON __declspec(dllimport) + #else + #define OBCOMMON __declspec(dllexport) + #endif +#else //Everything else (behaviour as original) + #define OBCOMMON +#endif + + +/* Used to export symbols for DLL / shared library builds */ +#if defined(WIN32) + #if defined(USING_OBDLL) // e.g. in src/main.cpp + #define OBCONV __declspec(dllimport) + #else + #define OBCONV __declspec(dllexport) + #endif +#else //Everything else (behaviour as original) + #define OBCONV +#endif + + +/* Used to export symbols for DLL / shared library builds */ +#if defined(WIN32) + #if defined(USING_OBDLL) // e.g. in src/main.cpp + #define OBERROR __declspec(dllimport) + #else + #define OBERROR __declspec(dllexport) + #endif +#else //Everything else (behaviour as original) + #define OBERROR +#endif + + +/* Used to export symbols for DLL / shared library builds */ +#if defined(WIN32) + #if defined(USING_OBDLL) // e.g. in src/main.cpp + #define OBFPTR __declspec(dllimport) + #else + #define OBFPTR __declspec(dllexport) + #endif +#else //Everything else (behaviour as original) + #define OBFPTR +#endif + +#ifdef _MSC_VER + // Supress warning on deprecated functions + #pragma warning(disable : 4996) + // Supress warning that compiler is ignoring C++ exception specification + #pragma warning( disable : 4290 ) + // Supress warning on signed/unsigned comparison with < or > (harmless, but maybe should be fixed) + #pragma warning( disable : 4018 ) + // Supress warning on unreferenced formal parameter + #pragma warning( disable : 4100 ) + // + #pragma warning( disable : 4251 ) + + + #include + + #ifdef _DEBUG + #define DEBUG_NEW new(_NORMAL_BLOCK, THIS_FILE, __LINE__) + #else + #define DEBUG_NEW new + #endif +#endif // _MSC_VER +/* have */ +#cmakedefine HAVE_CONIO_H 1 + +/* have */ +#cmakedefine HAVE_SYS_TIME_H 1 + +/* have */ +#cmakedefine HAVE_TIME_H 1 + +/* have */ +#cmakedefine HAVE_SSTREAM 1 + +/* have symbol clock_t */ +#cmakedefine HAVE_CLOCK_T 1 + +/* have symbol rint */ +#cmakedefine HAVE_RINT 1 + +/* have symbol snprintf */ +#cmakedefine HAVE_SNPRINTF 1 + +/* have symbol sranddev */ +#cmakedefine HAVE_SRANDDEV 1 + +/* have symbol strcasecmp */ +#cmakedefine HAVE_STRCASECMP 1 + +/* have symbol strncasecmp */ +#cmakedefine HAVE_STRNCASECMP 1 + +/* have struct clock_t */ +#cmakedefine HAVE_CLOCK_T 1 + +#if defined(WIN32) + #ifndef HAVE_SNPRINTF + #define snprintf _snprintf + #define HAVE_SNPRINTF 1 + #endif + + #ifndef HAVE_STRCASECMP + #define strcasecmp _stricmp + #define HAVE_STRCASECMP 1 + #endif + + #ifndef HAVE_STRNCASECMP + #define strncasecmp _strnicmp + #define HAVE_STRNCASECMP 1 + #endif +#endif // WIN32 diff -u -r -N openbabel-2.1.1-msys/src/fingerprints/finger3.cpp openbabel-2.1.1/src/fingerprints/finger3.cpp --- openbabel-2.1.1-msys/src/fingerprints/finger3.cpp 2007-07-05 06:26:18.000000000 +0200 +++ openbabel-2.1.1/src/fingerprints/finger3.cpp 2007-11-02 21:37:02.540500000 +0100 @@ -18,6 +18,11 @@ #include #include +#ifdef HAVE_SSTREAM +#include +#else +#include +#endif #include #include #include diff -u -r -N openbabel-2.1.1-msys/src/formats/inchi/CMakeLists.txt openbabel-2.1.1/src/formats/inchi/CMakeLists.txt --- openbabel-2.1.1-msys/src/formats/inchi/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 +++ openbabel-2.1.1/src/formats/inchi/CMakeLists.txt 2007-11-03 17:48:40.887875000 +0100 @@ -0,0 +1,17 @@ +set(inchi_srcs + ichi_bns.c ichican2.c ichicano.c ichicans.c ichiisot.c + ichilnct.c ichimak2.c ichimake.c ichimap1.c ichimap2.c + ichimap4.c ichinorm.c ichiparm.c ichiprt1.c ichiprt2.c + ichiprt3.c ichiqueu.c ichiread.c ichiring.c ichirvr1.c + ichirvr2.c ichirvr3.c ichirvr4.c ichirvr5.c ichirvr6.c + ichirvr7.c ichisort.c ichister.c ichitaut.c inchi_dll.c + inchi_dll_main.c runichi.c strutil.c util.c +) +include_directories(${CMAKE_SOURCE_DIR}/include/inchi) +add_library(inchi SHARED ${inchi_srcs}) +set_target_properties(inchi PROPERTIES DEFINE_SYMBOL _USRDLL) +install(TARGETS inchi + inchi DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) diff -u -r -N openbabel-2.1.1-msys/src/formats/inchiformat.cpp openbabel-2.1.1/src/formats/inchiformat.cpp --- openbabel-2.1.1-msys/src/formats/inchiformat.cpp 2007-07-07 08:35:54.000000000 +0200 +++ openbabel-2.1.1/src/formats/inchiformat.cpp 2007-11-02 21:44:30.842000000 +0100 @@ -21,7 +21,11 @@ #include #include "inchi_api.h" +#ifdef HAVE_SSTREAM #include +#else +#include +#endif #include #include #include "openbabel/chiral.h" diff -u -r -N openbabel-2.1.1-msys/src/formats/xml/cmlformat.cpp openbabel-2.1.1/src/formats/xml/cmlformat.cpp --- openbabel-2.1.1-msys/src/formats/xml/cmlformat.cpp 2007-04-14 02:34:14.000000000 +0200 +++ openbabel-2.1.1/src/formats/xml/cmlformat.cpp 2007-11-02 21:45:26.607625000 +0100 @@ -23,6 +23,11 @@ #ifdef WIN32 #pragma warning (disable : 4800) #endif +#ifdef HAVE_SSTREAM +#include +#else +#include +#endif using namespace std; namespace OpenBabel