swt2c / rpms / openbabel

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