diff -Nurd -x'*~' openbabel-2.2.3.orig/Makefile.am openbabel-2.2.3/Makefile.am
--- openbabel-2.2.3.orig/Makefile.am	2008-12-01 12:42:48.000000000 -0500
+++ openbabel-2.2.3/Makefile.am	2015-02-15 23:42:19.000000000 -0500
@@ -1,5 +1,5 @@
 # Use our libtool macros
-ACLOCAL_AMFLAGS='-Iautoconf'
+ACLOCAL_AMFLAGS=-I autoconf
 
 # only build in the scripts subdirectory if possible (perl, python, swig, etc.)
 if BUILD_SCRIPTS
diff -Nurd -x'*~' openbabel-2.2.3.orig/configure.in openbabel-2.2.3/configure.in
--- openbabel-2.2.3.orig/configure.in	2009-07-28 21:05:04.000000000 -0400
+++ openbabel-2.2.3/configure.in	2015-02-16 00:48:53.000000000 -0500
@@ -2,7 +2,7 @@
 AC_INIT([Open Babel], 2.2.3, openbabel-discuss@lists.sourceforge.net, openbabel)
 AC_PREREQ([2.61])
 AC_CONFIG_SRCDIR(src/zipstreamimpl.h)
-AM_INIT_AUTOMAKE([foreign no-define])
+AM_INIT_AUTOMAKE([foreign no-define subdir-objects])
 AM_MAINTAINER_MODE
 AX_MAINTAINER_MODE_AUTO_SILENT
 AM_CONFIG_HEADER(src/config.h)
@@ -239,8 +239,11 @@
 AM_PATH_XML2(2.6.5)
 AM_CONDITIONAL(BUILD_XML, test x"$XML_LIBS" != "x")
 
-AC_CHECK_LIB(inchi, GetINCHI, LIBINCHI="-linchi", LIBINCHI="")
-AM_CONDITIONAL(BUILD_INCHI, test x"$LIBINCHI" = "x" -o "$inchi" = "yes")
+AC_CHECK_LIB(stdinchi, GetStdINCHI, LIBSTDINCHI="-lstdinchi", LIBSTDINCHI="")
+dnl AC_CHECK_LIB(inchi, GetINCHI, LIBINCHI="-linchi", LIBINCHI="")
+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 -Nurd -x'*~' openbabel-2.2.3.orig/src/GUI/Makefile.am openbabel-2.2.3/src/GUI/Makefile.am
--- openbabel-2.2.3.orig/src/GUI/Makefile.am	2008-12-01 12:41:44.000000000 -0500
+++ openbabel-2.2.3/src/GUI/Makefile.am	2015-02-15 23:58:08.000000000 -0500
@@ -1,9 +1,7 @@
 EXTRA_DIST = OBGUI.h optswx.h selformats.h stdwx.h \
 							OpenBabelGUI.html babel.xpm babel2.ico OBGUI.rc
 
-INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/data -I$(top_srcdir)/include
-
-AM_CPPFLAGS =  @WX_CPPFLAGS@
+AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/data -I$(top_srcdir)/include @WX_CPPFLAGS@
 AM_CXXFLAGS =  @WX_CXXFLAGS@
 
 bin_PROGRAMS = wxbabel
diff -Nurd -x'*~' openbabel-2.2.3.orig/src/Makefile.am openbabel-2.2.3/src/Makefile.am
--- openbabel-2.2.3.orig/src/Makefile.am	2009-07-28 21:05:03.000000000 -0400
+++ openbabel-2.2.3/src/Makefile.am	2015-02-15 23:57:45.000000000 -0500
@@ -10,7 +10,8 @@
 SUBDIRS += GUI
 endif
 
-INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/data/ -I$(top_srcdir)/include
+our_includes = -I$(top_builddir)/include -I$(top_srcdir)/data/ -I$(top_srcdir)/include
+AM_CPPFLAGS = $(our_includes)
 
 lib_LTLIBRARIES = libopenbabel.la
 
@@ -51,7 +52,7 @@
 libopenbabel_la_LDFLAGS = -version-info 3:3:0 -no-undefined
 
 if BUILD_SHARED
-AM_CPPFLAGS = -DOB_MODULE_PATH=\"$(pkglibdir)/$(VERSION)\" -DUSING_DYNAMIC_LIBS
+AM_CPPFLAGS += -DOB_MODULE_PATH=\"$(pkglibdir)/$(VERSION)\" -DUSING_DYNAMIC_LIBS
 
 libopenbabel_la_LIBADD = math/libmath.la fingerprints/libfingerprints.la \
 			forcefields/libforcefields.la ops/libops.la \
@@ -65,7 +66,7 @@
 if BUILD_PCH
 BUILT_SOURCES = all.h.gch
 
-PCHFLAGS=-Winvalid-pch -x c++-header $(CPPFLAGS) $(INCLUDES)
+PCHFLAGS=-Winvalid-pch -x c++-header $(CPPFLAGS) $(our_includes)
 all.h.gch: all.h Makefile \
 	$(srcdir)/../include/openbabel/babelconfig.h \
   $(srcdir)/../include/openbabel/base.h \
diff -Nurd -x'*~' openbabel-2.2.3.orig/src/formats/Makefile.am openbabel-2.2.3/src/formats/Makefile.am
--- openbabel-2.2.3.orig/src/formats/Makefile.am	2009-07-09 09:05:02.000000000 -0400
+++ openbabel-2.2.3/src/formats/Makefile.am	2015-02-15 23:59:57.000000000 -0500
@@ -1,4 +1,5 @@
-INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/data -I$(top_srcdir)/include
+our_includes = -I$(top_builddir)/include -I$(top_srcdir)/data -I$(top_srcdir)/include
+AM_CPPFLAGS = $(our_includes)
 
 # KFc.h and ArrayList.h for ADF formats
 EXTRA_DIST = exampleformat.cpp ArrayList.h CMakeLists.txt
@@ -18,7 +19,7 @@
 
 if BUILD_PCH
 BUILT_SOURCES = all.h.gch
-PCHFLAGS=-Winvalid-pch -x c++-header $(CPPFLAGS) $(INCLUDES)
+PCHFLAGS=-Winvalid-pch -x c++-header $(CPPFLAGS) $(our_includes)
 all.h.gch: all.h Makefile \
 	$(srcdir)/../../include/openbabel/babelconfig.h \
     $(srcdir)/../../include/openbabel/base.h \
@@ -39,11 +40,17 @@
 
 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 +131,7 @@
 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 +268,18 @@
 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 
diff -Nurd -x'*~' openbabel-2.2.3.orig/src/formats/inchi102/Makefile.am openbabel-2.2.3/src/formats/inchi102/Makefile.am
--- openbabel-2.2.3.orig/src/formats/inchi102/Makefile.am	2009-06-14 23:05:02.000000000 -0400
+++ openbabel-2.2.3/src/formats/inchi102/Makefile.am	2015-02-16 00:00:04.000000000 -0500
@@ -1,5 +1,5 @@
 EXTRA_DIST = CMakeLists.txt
-INCLUDES = -I$(top_srcdir)/include/inchi102
+AM_CPPFLAGS = -I$(top_srcdir)/include/inchi102
 
 noinst_LTLIBRARIES = libinchi.la
 
@@ -12,4 +12,4 @@
   ichirvr6.c ichirvr7.c ichisort.c ichister.c ichitaut.c \
   ikey_base26.c ikey_dll.c inchi_dll.c inchi_dll_a.c \
 	inchi_dll_a2.c inchi_dll_main.c runichi.c sha2.c \
-	strutil.c util.c
\ No newline at end of file
+	strutil.c util.c
diff -Nurd -x'*~' openbabel-2.2.3.orig/src/formats/xml/Makefile.am openbabel-2.2.3/src/formats/xml/Makefile.am
--- openbabel-2.2.3.orig/src/formats/xml/Makefile.am	2008-12-01 12:42:01.000000000 -0500
+++ openbabel-2.2.3/src/formats/xml/Makefile.am	2015-02-15 23:59:23.000000000 -0500
@@ -1,5 +1,4 @@
-INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include 
-AM_CPPFLAGS =  @XML_CPPFLAGS@
+AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include @XML_CPPFLAGS@
 AM_LDFLAGS = @LIBS@ @XML_LIBS@ ../../libopenbabel.la
 
 if USE_BOOST_FLAGS
diff -Nurd -x'*~' openbabel-2.2.3.orig/test/Makefile.am openbabel-2.2.3/test/Makefile.am
--- openbabel-2.2.3.orig/test/Makefile.am	2009-07-28 19:05:03.000000000 -0400
+++ openbabel-2.2.3/test/Makefile.am	2015-02-16 00:25:25.000000000 -0500
@@ -18,7 +18,7 @@
 else
 # Standard automake tests (if we don't have prove)
 TESTS = cansmi invalidsmarts invalidsmiles smarts rings unitcell \
-	$(top_srcdir)/test/cml.sh $(top_srcdir)/test/test-set.sh
+	test/cml.sh test/test-set.sh
 endif
 
 LDADD = ../src/libopenbabel.la @LIBDL@