From bca19254976d2aa13cf2d6f2b758eca4821af948 Mon Sep 17 00:00:00 2001
From: Valerio Mariani <valerio.mariani@unibas.ch>
Date: Wed, 4 Jan 2012 14:41:54 +0100
Subject: [PATCH] Added flag for info lib support, which is now optional

---
 CMakeLists.txt                                | 27 ++++++++++++++++---
 modules/config/CMakeLists.txt                 |  6 ++++-
 modules/config/config.hh.in                   |  1 +
 modules/img/base/pymod/export_mask.cc         |  8 +++++-
 modules/img/base/src/CMakeLists.txt           |  6 +++--
 modules/info/CMakeLists.txt                   |  6 +++--
 modules/mol/base/pymod/wrap_mol.cc            |  6 ++++-
 modules/mol/base/src/CMakeLists.txt           |  7 ++++-
 modules/mol/base/src/transform.cc             |  7 ++++-
 modules/mol/base/src/transform.hh             |  5 ++++
 modules/seq/alg/src/CMakeLists.txt            |  5 +++-
 modules/seq/alg/src/subst_weight_matrix.hh    |  6 +++++
 modules/seq/base/pymod/export_sequence.cc     | 11 +++++---
 modules/seq/base/src/CMakeLists.txt           | 13 ++++++---
 modules/seq/base/src/impl/sequence_impl.cc    |  7 ++++-
 modules/seq/base/src/impl/sequence_impl.hh    | 14 ++++++----
 .../seq/base/src/impl/sequence_list_impl.cc   |  5 ++++
 .../seq/base/src/impl/sequence_list_impl.hh   |  2 ++
 modules/seq/base/src/sequence_handle.cc       |  3 +++
 modules/seq/base/src/sequence_handle.hh       |  8 +++++-
 modules/seq/base/src/sequence_list.cc         |  5 ++++
 modules/seq/base/src/sequence_list.hh         |  2 ++
 22 files changed, 132 insertions(+), 28 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 306445073..fe174b1ac 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,6 +26,8 @@ option(ENABLE_GFX "whether graphics support should be enabled"
       ON)
 option(ENABLE_IMG "whether the image processing module should be compiled"
        ON)
+option(ENABLE_INFO "whether openstructure should be compiled with support for the info library"
+       ON)
 option(USE_NUMPY "whether numpy support is added"
       OFF)
 option(USE_DOUBLE_PRECISION "whether to compile in double precision" 
@@ -74,10 +76,20 @@ else()
   set(_DOUBLE_PREC OFF)
 endif()
 
+if (NOT ENABLE_INFO)
+  set(ENABLE_GFX OFF)
+endif()
+
 if (NOT ENABLE_GFX)
   set(ENABLE_GUI OFF)
 endif()
 
+if (ENABLE_INFO)
+  set(_INFO ON)
+else()
+  set(_INFO OFF)
+endif()
+
 if (ENABLE_GUI)
   set(_UI ON)
 else()
@@ -155,9 +167,15 @@ setup_compiler_flags()
 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY)
 
 setup_boost()
-        
-find_package(Qt4 4.5.0 REQUIRED)
-find_package(OpenGL REQUIRED)
+
+if (ENABLE_INFO)        
+  find_package(Qt4 4.5.0 REQUIRED)
+endif()
+
+if (ENABLE_GFX)
+  find_package(OpenGL REQUIRED)
+endif()
+
 find_package(PNG REQUIRED)
 find_package(Eigen 2.0.0 REQUIRED)
 find_package(Python 2.4 REQUIRED)
@@ -231,6 +249,7 @@ message(STATUS
         "OpenStructure will be built with the following options:\n"
         "   Install Prefix                       (-DPREFIX) : ${CMAKE_INSTALL_PREFIX}\n"
         "   RPath in install                  (-DUSE_RPATH) : ${_USE_RPATH}\n"
+        "   Info support                    (-DENABLE_INFO) : ${_INFO}\n"
         "   Graphical interface              (-DENABLE_GUI) : ${_UI}\n"
         "   OpenGL support                   (-DENABLE_GFX) : ${_OPENGL}\n"
         "   Image Processing support         (-DENABLE_IMG) : ${_IMG}\n"
@@ -242,4 +261,4 @@ message(STATUS
         "   Compound Lib                   (-DCOMPOUND_LIB) : ${_COMP_LIB}\n"
         "   TMAlign and TMScore         (-DCOMPILE_TMTOOLS) : ${_TM_TOOLS}\n"
         "   Static Libraries              (-DENABLE_STATIC) : ${ENABLE_STATIC}\n"
-        "   Debian-style 'libexec' (-DDEBIAN_STYLE_LIBEXEC) : ${_DEBIAN_STYLE_LIBEXEC}")
\ No newline at end of file
+        "   Debian-style 'libexec' (-DDEBIAN_STYLE_LIBEXEC) : ${_DEBIAN_STYLE_LIBEXEC}" )
\ No newline at end of file
diff --git a/modules/config/CMakeLists.txt b/modules/config/CMakeLists.txt
index 617aa51c5..1e637d144 100644
--- a/modules/config/CMakeLists.txt
+++ b/modules/config/CMakeLists.txt
@@ -21,7 +21,6 @@ if (USE_NUMPY)
 else()
   set(numpy_support 0)
 endif()
-
 if (PROFILE)
   set(profiling_enabled 1)
 else()
@@ -62,6 +61,11 @@ if (_DEBIAN_STYLE_LIBEXEC)
 else()
   set(debian_style_libexec 0)
 endif()
+if (ENABLE_INFO)
+  set(info_enabled 1)
+else()
+  set(info_enabled 0)
+endif()
 
 set(config_hh_generator "CMake")
 set(CONFIG_HH_FILE "${CMAKE_CURRENT_SOURCE_DIR}/config.hh")
diff --git a/modules/config/config.hh.in b/modules/config/config.hh.in
index a9e33adca..c2242500e 100644
--- a/modules/config/config.hh.in
+++ b/modules/config/config.hh.in
@@ -33,5 +33,6 @@
 #define OST_FFT_USE_THREADS @fftw_use_threads@
 #define OST_NUMPY_SUPPORT_ENABLED @numpy_support@
 #define OST_DEBIAN_STYLE_LIBEXEC @debian_style_libexec@
+#define OST_INFO_ENABLED @info_enabled@
 
 #endif
diff --git a/modules/img/base/pymod/export_mask.cc b/modules/img/base/pymod/export_mask.cc
index 3a5faacf8..40f42e9b0 100644
--- a/modules/img/base/pymod/export_mask.cc
+++ b/modules/img/base/pymod/export_mask.cc
@@ -26,7 +26,10 @@
 using namespace boost::python;
 
 #include <ost/img/mask.hh>
+#include <ost/config.hh>
+#if(OST_INFO_ENABLED)
 #include <ost/img/mask_info_convert.hh>
+#endif
 
 namespace ost { namespace img {
 
@@ -101,7 +104,10 @@ void export_Mask()
   def("Mask",mask2);
   def("Mask",mask3);
   def("Mask",mask4);
+  
+#if(OST_INFO_ENABLED)
   def("InfoToMask",InfoToMask);
   def("MaskToInfo",MaskToInfo);
-
+#endif
+  
 }
diff --git a/modules/img/base/src/CMakeLists.txt b/modules/img/base/src/CMakeLists.txt
index d218ac2ad..b76b74111 100644
--- a/modules/img/base/src/CMakeLists.txt
+++ b/modules/img/base/src/CMakeLists.txt
@@ -29,7 +29,6 @@ extent_mask.cc
 spherical_mask.cc
 mask_op.cc
 circle_mask.cc
-mask_info_convert.cc
 image_list.cc
 physical_units.cc
 progress.cc
@@ -86,13 +85,16 @@ spherical_mask.hh
 mask_op.hh
 mask.hh
 circle_mask.hh
-mask_info_convert.hh
 image_list.hh
 physical_units.hh
 progress.hh
 map.hh
 )
 
+if (ENABLE_INFO)
+  list(APPEND OST_IMG_SOURCES mask_info_convert.cc)
+  list(APPEND OST_IMG_HEADERS mask_info_convert.hh)
+endif()
 
 foreach(fname ${OST_IMG_IMAGE_STATE_SOURCES})
   set(OST_IMG_SOURCES ${OST_IMG_SOURCES} image_state/${fname})
diff --git a/modules/info/CMakeLists.txt b/modules/info/CMakeLists.txt
index 9214aaa38..23eb6ec67 100644
--- a/modules/info/CMakeLists.txt
+++ b/modules/info/CMakeLists.txt
@@ -1,2 +1,4 @@
-add_subdirectory(src)
-add_subdirectory(pymod)
+if (ENABLE_INFO)
+  add_subdirectory(src)
+  add_subdirectory(pymod)
+endif()
\ No newline at end of file
diff --git a/modules/mol/base/pymod/wrap_mol.cc b/modules/mol/base/pymod/wrap_mol.cc
index f29d1377f..33b09e2f2 100644
--- a/modules/mol/base/pymod/wrap_mol.cc
+++ b/modules/mol/base/pymod/wrap_mol.cc
@@ -19,7 +19,9 @@
 #include <boost/python.hpp>
 #include <ost/mol/transform.hh>
 #include <ost/mol/editor_base.hh>
+#if(OST_INFO_ENABLED)
 #include <ost/info/info.hh>
+#endif
 
 using namespace boost::python;
 using namespace ost::mol;
@@ -95,7 +97,9 @@ BOOST_PYTHON_MODULE(_ost_mol)
     .def("ApplyZAxisTranslation",&Transform::ApplyZAxisTranslation)
     .def("ApplyAxisRotation",&Transform::ApplyAxisRotation)
     ;
+#if(OST_INFO_ENABLED)
   def("TransformToInfo", &TransformToInfo);
   def("TransformFromInfo", &TransformFromInfo);
-
+#endif
+  
 }
diff --git a/modules/mol/base/src/CMakeLists.txt b/modules/mol/base/src/CMakeLists.txt
index 1c2649f70..47a5eed91 100644
--- a/modules/mol/base/src/CMakeLists.txt
+++ b/modules/mol/base/src/CMakeLists.txt
@@ -100,7 +100,12 @@ foreach(_impl_src ${OST_MOL_IMPL_SOURCES})
   list(APPEND OST_MOL_SOURCES impl/${_impl_src})
 endforeach()
 
+if(ENABLE_INFO)
+  set (INFO_DEPS ost_info)
+endif()
+
+
 module(NAME mol SOURCES ${OST_MOL_SOURCES}
        HEADERS ${OST_MOL_IMPL_HEADERS} IN_DIR impl
        ${OST_MOL_HEADERS} HEADER_OUTPUT_DIR ost/mol
-       DEPENDS_ON ost_geom ost_base ost_info)
+       DEPENDS_ON ost_geom ost_base ${BOOST_REGEX_LIBRARIES} ${INFO_DEPS})
diff --git a/modules/mol/base/src/transform.cc b/modules/mol/base/src/transform.cc
index ffee262de..c1ffbff6b 100644
--- a/modules/mol/base/src/transform.cc
+++ b/modules/mol/base/src/transform.cc
@@ -16,9 +16,12 @@
 // along with this library; if not, write to the Free Software Foundation, Inc.,
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //------------------------------------------------------------------------------
+
+#include <ost/config.hh>
+#if(OST_INFO_ENABLED)
 #include <ost/info/info.hh>
 #include <ost/info/geom_info_conversion.hh>
-
+#endif
 #include "transform.hh"
 
 namespace ost { 
@@ -193,6 +196,7 @@ void Transform::update_tm()
   ttm_ = Transpose(tm_);
 }
 
+#if(OST_INFO_ENABLED)
 Transform TransformFromInfo(const info::InfoGroup& group)
 {
   if (!group.HasItem("center")) {
@@ -222,5 +226,6 @@ void TransformToInfo(const Transform& transform, info::InfoGroup& group)
   info::InfoGroup rot=group.CreateGroup("rotation");
   info::Mat3ToInfo(transform.GetRot(), rot);
 }
+#endif
 
 }} // ns
diff --git a/modules/mol/base/src/transform.hh b/modules/mol/base/src/transform.hh
index 5c9acd276..1ed33135e 100644
--- a/modules/mol/base/src/transform.hh
+++ b/modules/mol/base/src/transform.hh
@@ -23,8 +23,11 @@
   Author: Ansgar Philippsen
 */
 
+#include <ost/config.hh>
 #include <ost/geom/geom.hh>
+#if(OST_INFO_ENABLED)
 #include <ost/info/info_fw.hh>
+#endif
 #include <ost/mol/module_config.hh>
 
 namespace ost { namespace mol {
@@ -81,6 +84,7 @@ private:
   void update_tm();
 };
 
+#if(OST_INFO_ENABLED)
 /// \brief read transformation from info group
 /// \relates Transform
 Transform DLLEXPORT_OST_MOL TransformFromInfo(const info::InfoGroup& group);
@@ -88,6 +92,7 @@ Transform DLLEXPORT_OST_MOL TransformFromInfo(const info::InfoGroup& group);
 /// \relates Transform
 void DLLEXPORT_OST_MOL TransformToInfo(const Transform& transform,
                                        info::InfoGroup& group);
+#endif
 }} // ns
 
 #endif
diff --git a/modules/seq/alg/src/CMakeLists.txt b/modules/seq/alg/src/CMakeLists.txt
index fe23aa52c..ccffcacf4 100644
--- a/modules/seq/alg/src/CMakeLists.txt
+++ b/modules/seq/alg/src/CMakeLists.txt
@@ -16,10 +16,13 @@ local_align.cc
 global_align.cc
 sequence_identity.cc
 ins_del.cc
-subst_weight_matrix.cc
 conservation.cc
 )
 
+if (ENABLE_INFO)
+  list (APPEND OST_SEQ_ALG_SOURCES subst_weight_matrix.cc)
+endif()
+
 module(NAME seq_alg HEADER_OUTPUT_DIR ost/seq/alg SOURCES ${OST_SEQ_ALG_SOURCES}
        HEADERS ${OST_SEQ_ALG_HEADERS} DEPENDS_ON ost_seq)
 
diff --git a/modules/seq/alg/src/subst_weight_matrix.hh b/modules/seq/alg/src/subst_weight_matrix.hh
index f310893ab..97f0ef825 100644
--- a/modules/seq/alg/src/subst_weight_matrix.hh
+++ b/modules/seq/alg/src/subst_weight_matrix.hh
@@ -21,7 +21,11 @@
 
 #include <ctype.h>
 #include <string.h>
+#include <boost/shared_ptr.hpp>
+#include <ost/config.hh>
+#if(OST_INFO_ENABLED)
 #include <ost/info/info_fw.hh>
+#endif
 #include <ost/seq/alg/module_config.hh>
 
 /*
@@ -86,12 +90,14 @@ private:
   WeightType weights_[ALPHABET_SIZE*ALPHABET_SIZE];
 };
 
+#if(OST_INFO_ENABLED)
 SubstWeightMatrixPtr DLLEXPORT_OST_SEQ_ALG
 SubstWeightMatrixFromInfo(const info::InfoGroup& group);
 
 void DLLEXPORT_OST_SEQ_ALG 
 SubstWeightMatrixToInfo(const SubstWeightMatrixPtr& subst_mat, 
                         info::InfoGroup& group);
+#endif
 
 }}}
 
diff --git a/modules/seq/base/pymod/export_sequence.cc b/modules/seq/base/pymod/export_sequence.cc
index 7b7631041..b278676fd 100644
--- a/modules/seq/base/pymod/export_sequence.cc
+++ b/modules/seq/base/pymod/export_sequence.cc
@@ -25,7 +25,10 @@
 #include <ost/export_helper/pair_to_tuple_conv.hh>
 #include <ost/generic_property.hh>
 #include <ost/export_helper/generic_property_def.hh>
+#include <ost/config.hh>
+#if(OST_INFO_ENABLED)
 #include <ost/info/info.hh>
+#endif
 #include <ost/mol/mol.hh>
 #include <ost/seq/sequence_handle.hh>
 #include <ost/seq/alignment_handle.hh>
@@ -403,13 +406,15 @@ void export_sequence()
   def("CreateSequenceList", &CreateSequenceList);
   def("SequenceFromChain", seq_from_chain_a);
   def("SequenceFromChain", seq_from_chain_b);
+#if(OST_INFO_ENABLED)
   def("SequenceToInfo", &SequenceToInfo);
+  def("SequenceListToInfo", &SequenceListToInfo);
+  def("SequenceFromInfo", &SequenceFromInfo);  
+  def("SequenceListFromInfo", &SequenceListFromInfo);
+#endif
   def("ViewsFromSequences", &ViewsFromSequences, (arg("seq1"), arg("seq2")));
   def("ViewsFromAlignment", &ViewsFromAlignment, 
       (arg("aln"), arg("index1")=0, arg("index2")=1));
-  def("SequenceListToInfo", &SequenceListToInfo);
-  def("SequenceFromInfo", &SequenceFromInfo);
   def("CreateAlignment", &CreateAlignment);
   def("AlignmentFromSequenceList", &AlignmentFromSequenceList);
-  def("SequenceListFromInfo", &SequenceListFromInfo);
 }
diff --git a/modules/seq/base/src/CMakeLists.txt b/modules/seq/base/src/CMakeLists.txt
index 6a22a5ad2..8ef75076e 100644
--- a/modules/seq/base/src/CMakeLists.txt
+++ b/modules/seq/base/src/CMakeLists.txt
@@ -29,8 +29,13 @@ alignment_handle.cc
 sequence_op.cc
 views_from_sequences.cc
 )
-module(NAME seq SOURCES ${OST_SEQ_SOURCES} 
-       HEADERS ${OST_SEQ_IMPL_HEADERS} IN_DIR impl
-               ${OST_SEQ_HEADERS}
-       DEPENDS_ON ost_info ost_mol)
 
+if (ENABLE_INFO)
+  set(INFO_DEPS ost_info)
+endif()
+
+
+module(NAME seq SOURCES ${OST_SEQ_SOURCES} 
+         HEADERS ${OST_SEQ_IMPL_HEADERS} IN_DIR impl
+                 ${OST_SEQ_HEADERS}
+         DEPENDS_ON ost_mol ${INFO_DEPS})
\ No newline at end of file
diff --git a/modules/seq/base/src/impl/sequence_impl.cc b/modules/seq/base/src/impl/sequence_impl.cc
index df8cabe0a..05da39c29 100644
--- a/modules/seq/base/src/impl/sequence_impl.cc
+++ b/modules/seq/base/src/impl/sequence_impl.cc
@@ -21,8 +21,11 @@
  */
 
 #include <boost/format.hpp>
-
+#include <ost/config.hh>
+#if(OST_INFO_ENABLED)
 #include <ost/info/info.hh>
+#endif
+
 #include <ost/integrity_error.hh>
 #include <ost/mol/chain_view.hh>
 
@@ -280,6 +283,7 @@ bool SequenceImpl::HasAttachedView() const
   return attached_view_.IsValid();
 }
 
+#if(OST_INFO_ENABLED)
 void SequenceImplToInfo(const SequenceImplPtr& sequence, info::InfoGroup& group)
 {
   group.SetTextData(sequence->GetString());
@@ -300,6 +304,7 @@ SequenceImplPtr SequenceImplFromInfo(const info::InfoGroup& group)
   sequence->SetOffset(offset);
   return sequence;
 }
+#endif
 
 int SequenceImpl::GetFirstNonGap() const
 {
diff --git a/modules/seq/base/src/impl/sequence_impl.hh b/modules/seq/base/src/impl/sequence_impl.hh
index beae61e03..50f722eae 100644
--- a/modules/seq/base/src/impl/sequence_impl.hh
+++ b/modules/seq/base/src/impl/sequence_impl.hh
@@ -27,7 +27,10 @@
 
 #include <boost/shared_ptr.hpp>
 #include <ost/generic_property.hh>
+#include <ost/config.hh>
+#if(OST_INFO_ENABLED)
 #include <ost/info/info_fw.hh>
+#endif
 #include <ost/mol/residue_prop.hh>
 #include <ost/mol/entity_view.hh>
 #include <ost/mol/residue_view.hh>
@@ -175,14 +178,15 @@ private:
 /// \internal
 typedef std::vector<SequenceImplPtr>  SequenceList;
 
+#if(OST_INFO_ENABLED)
 /// \internal
-void DLLEXPORT_OST_SEQ SequenceImplToInfo(const SequenceImplPtr& sequence,
-                                      info::InfoGroup& group);
-/// \internal
-SequenceImplPtr DLLEXPORT_OST_SEQ 
+SequenceImplPtr DLLEXPORT_OST_SEQ SequenceImplFromInfo(const info::InfoGroup& group);
 
 /// \internal
-SequenceImplFromInfo(const info::InfoGroup& group);
+void DLLEXPORT_OST_SEQ SequenceImplToInfo(const SequenceImplPtr& sequence,
+                                     info::InfoGroup& group);
+#endif
+
 
 }}} //ns
 #endif
diff --git a/modules/seq/base/src/impl/sequence_list_impl.cc b/modules/seq/base/src/impl/sequence_list_impl.cc
index bd332872b..6580aac92 100644
--- a/modules/seq/base/src/impl/sequence_list_impl.cc
+++ b/modules/seq/base/src/impl/sequence_list_impl.cc
@@ -18,7 +18,10 @@
 //------------------------------------------------------------------------------
 #include <limits>
 
+#include <ost/config.hh>
+#if(OST_INFO_ENABLED)
 #include <ost/info/info.hh>
+#endif
 #include <ost/seq/impl/sequence_list_impl.hh>
 
 namespace ost { namespace seq { namespace impl {
@@ -154,6 +157,7 @@ SequenceListImplPtr SequenceListImpl::Copy() const
   return new_ali;
 }
 
+#if(OST_INFO_ENABLED)
 void SequenceListImplToInfo(const SequenceListImplPtr& seq_list,
                             info::InfoGroup& group)
 {
@@ -175,6 +179,7 @@ SequenceListImplPtr SequenceListImplFromInfo(info::InfoGroup& group)
   }
   return seq_list;
 }
+#endif
 
 SequenceListImplPtr SequenceListImpl::Slice(int first, int n) const
 {
diff --git a/modules/seq/base/src/impl/sequence_list_impl.hh b/modules/seq/base/src/impl/sequence_list_impl.hh
index 52443dcd6..cb69e41ea 100644
--- a/modules/seq/base/src/impl/sequence_list_impl.hh
+++ b/modules/seq/base/src/impl/sequence_list_impl.hh
@@ -94,6 +94,7 @@ private:
   std::vector<SequenceImplPtr> list_;
 };
 
+#if(OST_INFO_ENABLED)
 /// \brief export sequence list impl to info
 /// \internal
 void DLLEXPORT_OST_SEQ 
@@ -104,6 +105,7 @@ SequenceListImplToInfo(const SequenceListImplPtr& seq_list,
 /// \internal
 SequenceListImplPtr DLLEXPORT_OST_SEQ 
 SequenceListImplFromInfo(info::InfoGroup& group);
+#endif
 
 }}}
 
diff --git a/modules/seq/base/src/sequence_handle.cc b/modules/seq/base/src/sequence_handle.cc
index acd2b13e7..f14758d80 100644
--- a/modules/seq/base/src/sequence_handle.cc
+++ b/modules/seq/base/src/sequence_handle.cc
@@ -206,6 +206,8 @@ void SequenceHandle::AttachView(const mol::EntityView& view,
   Impl()->AttachView(view, chain_name);   
 }
 
+#if(OST_INFO_ENABLED)
+
 /// \brief export sequence to info
 void  SequenceToInfo(const ConstSequenceHandle& sequence,
                      info::InfoGroup& group)
@@ -218,6 +220,7 @@ SequenceHandle SequenceFromInfo(info::InfoGroup& group)
 {
   return SequenceHandle(impl::SequenceImplFromInfo(group));
 }
+#endif
 
 std::ostream& operator<<(std::ostream& os, const ConstSequenceHandle& sequence)
 {
diff --git a/modules/seq/base/src/sequence_handle.hh b/modules/seq/base/src/sequence_handle.hh
index 1c2cee610..e08c005e4 100644
--- a/modules/seq/base/src/sequence_handle.hh
+++ b/modules/seq/base/src/sequence_handle.hh
@@ -25,7 +25,10 @@
 
 #include <ost/base.hh>
 #include <ost/generic_property.hh>
+#include <ost/config.hh>
+#if(OST_INFO_ENABLED)
 #include <ost/info/info_fw.hh>
+#endif
 #include <ost/seq/module_config.hh>
 
 #include <ost/mol/residue_view.hh>
@@ -295,13 +298,16 @@ private:
 
 SequenceHandle DLLEXPORT_OST_SEQ CreateSequence(const String& name, 
                                                 const String& seq);
-                                                
+
+#if(OST_INFO_ENABLED)
 /// \brief export sequence to info
 void DLLEXPORT_OST_SEQ SequenceToInfo(const ConstSequenceHandle& sequence,
                                       info::InfoGroup& group);
 
 /// \brief create sequence from info
 SequenceHandle DLLEXPORT_OST_SEQ SequenceFromInfo(info::InfoGroup& group);
+#endif
+
 
 DLLEXPORT_OST_SEQ std::ostream& operator<<(std::ostream& os, 
                                            const ConstSequenceHandle& sequence);
diff --git a/modules/seq/base/src/sequence_list.cc b/modules/seq/base/src/sequence_list.cc
index eb45568fd..52474a3d7 100644
--- a/modules/seq/base/src/sequence_list.cc
+++ b/modules/seq/base/src/sequence_list.cc
@@ -22,7 +22,10 @@
  */
 
 #include <ost/invalid_handle.hh> 
+#include <ost/config.hh>
+#if(OST_INFO_ENABLED)
 #include <ost/info/info.hh>
+#endif
 
 #include <ost/seq/impl/sequence_list_impl.hh>
 #include <ost/seq/sequence_list.hh>
@@ -180,6 +183,7 @@ int SequenceList::GetMaxLength() const
   return impl_->GetMaxLength();
 }
 
+#if(OST_INFO_ENABLED)
 /// \brief export sequence list to info
 void SequenceListToInfo(const ConstSequenceList& seq_list, 
                         info::InfoGroup& group)
@@ -192,6 +196,7 @@ SequenceList SequenceListFromInfo(info::InfoGroup& group)
 {
   return SequenceList(impl::SequenceListImplFromInfo(group));
 }
+#endif
 
 SequenceList::operator ConstSequenceList() const
 {
diff --git a/modules/seq/base/src/sequence_list.hh b/modules/seq/base/src/sequence_list.hh
index 71067438d..2e6895c6e 100644
--- a/modules/seq/base/src/sequence_list.hh
+++ b/modules/seq/base/src/sequence_list.hh
@@ -124,12 +124,14 @@ protected:
 SequenceList DLLEXPORT_OST_SEQ CreateSequenceList();
 ConstSequenceList DLLEXPORT_OST_SEQ CreateConstSequenceList();
 
+#if(OST_INFO_ENABLED)
 /// \brief export sequence list to info
 void DLLEXPORT_OST_SEQ SequenceListToInfo(const ConstSequenceList& seq_list,
                                           info::InfoGroup& group);
 
 /// \brief create sequence list object from info
 SequenceList DLLEXPORT_OST_SEQ SequenceListFromInfo(info::InfoGroup& group);
+#endif
 }}
 
 #endif
-- 
GitLab