swt2c / rpms / openbabel

Forked from rpms/openbabel 5 years ago
Clone
c0d8ace
diff -up openbabel-2.2.3/configure.in.inchi openbabel-2.2.3/configure.in
c0d8ace
--- openbabel-2.2.3/configure.in.inchi	2009-07-29 03:05:04.000000000 +0200
2a0a8b2
+++ openbabel-2.2.3/configure.in	2009-09-14 01:14:49.000000000 +0200
2a0a8b2
@@ -239,8 +239,11 @@ AC_SUBST(LIBDL)
c0d8ace
 AM_PATH_XML2(2.6.5)
c0d8ace
 AM_CONDITIONAL(BUILD_XML, test x"$XML_LIBS" != "x")
c0d8ace
 
2a0a8b2
+AC_CHECK_LIB(stdinchi, GetStdINCHI, LIBSTDINCHI="-lstdinchi", LIBSTDINCHI="")
2a0a8b2
 AC_CHECK_LIB(inchi, GetINCHI, LIBINCHI="-linchi", LIBINCHI="")
2a0a8b2
-AM_CONDITIONAL(BUILD_INCHI, test x"$LIBINCHI" = "x" -o "$inchi" = "yes")
2a0a8b2
+AM_CONDITIONAL(HAVE_INCHI, test x"$LIBINCHI" != "x" -o x"$LIBSTDINCHI" != "x" -o "$inchi" = "yes")
2a0a8b2
+AM_CONDITIONAL(HAVE_STDINCHI, test x"$LIBSTDINCHI" != "x")
2a0a8b2
+AM_CONDITIONAL(BUILD_INCHI, test "$inchi" = "yes")
c0d8ace
 
c0d8ace
 AC_CHECK_LIB(z, inflateEnd, [zlib_cv_libz=yes], [zlib_cv_libz=no])
2a0a8b2
 AC_CHECK_HEADER(zlib.h, [zlib_cv_zlib_h=yes], [zlib_cv_zlib_h=no])
2a0a8b2
diff -up openbabel-2.2.3/src/formats/Makefile.am.inchi openbabel-2.2.3/src/formats/Makefile.am
2a0a8b2
--- openbabel-2.2.3/src/formats/Makefile.am.inchi	2009-07-09 15:05:02.000000000 +0200
2a0a8b2
+++ openbabel-2.2.3/src/formats/Makefile.am	2009-09-14 01:15:55.000000000 +0200
2a0a8b2
@@ -39,11 +39,17 @@ endif
2a0a8b2
 
2a0a8b2
 if !BUILD_SHARED
2a0a8b2
 noinst_LTLIBRARIES = libformats.la
2a0a8b2
+if HAVE_INCHI
2a0a8b2
 if BUILD_INCHI
2a0a8b2
 libformats_la_LIBADD = inchi102/libinchi.la
2a0a8b2
 else
2a0a8b2
+if HAVE_STDINCHI
2a0a8b2
+libformats_la_LIBADD = -lstdinchi
2a0a8b2
+else
2a0a8b2
 libformats_la_LIBADD = -linchi
2a0a8b2
 endif
2a0a8b2
+endif
2a0a8b2
+endif
2a0a8b2
 libformats_la_SOURCES = \
2a0a8b2
 	APIInterface.cpp MCDLformat.cpp \
2a0a8b2
 	CSRformat.cpp PQSformat.cpp alchemyformat.cpp \
2a0a8b2
@@ -124,7 +130,7 @@ if HAVE_SHARED_POINTER
2a0a8b2
 formats_LTLIBRARIES += chemdrawcdxformat.la chemkinformat.la \
2a0a8b2
                           rxnformat.la rsmiformat.la
2a0a8b2
 endif
2a0a8b2
-if BUILD_INCHI
2a0a8b2
+if HAVE_INCHI
2a0a8b2
 formats_LTLIBRARIES += inchiformat.la
2a0a8b2
 endif
2a0a8b2
 if BUILD_ZLIB
2a0a8b2
@@ -261,12 +267,18 @@ hinformat_la_SOURCES = hinformat.cpp 
2a0a8b2
 hinformat_la_LDFLAGS = -module -avoid-version -no-undefined $(win32ldflags) ../libopenbabel.la 
2a0a8b2
 
2a0a8b2
 inchiformat_la_SOURCES = inchiformat.cpp  getinchi.cpp
2a0a8b2
+if HAVE_INCHI
2a0a8b2
 if BUILD_INCHI
2a0a8b2
 inchiformat_la_LDFLAGS = -module -avoid-version -no-undefined $(win32ldflags) ../libopenbabel.la inchi102/libinchi.la
2a0a8b2
 else
2a0a8b2
 inchiformat_la_LDFLAGS = -module -avoid-version -no-undefined $(win32ldflags) ../libopenbabel.la
2a0a8b2
+if HAVE_STDINCHI
2a0a8b2
+inchiformat_la_LIBADD = -lstdinchi
2a0a8b2
+else
2a0a8b2
 inchiformat_la_LIBADD = -linchi
2a0a8b2
 endif
2a0a8b2
+endif
2a0a8b2
+endif
2a0a8b2
 
2a0a8b2
 jaguarformat_la_SOURCES = jaguarformat.cpp 
2a0a8b2
 jaguarformat_la_LDFLAGS = -module -avoid-version -no-undefined $(win32ldflags) ../libopenbabel.la