diff -up ./src/Makefile.am.orig ./src/Makefile.am --- ./src/Makefile.am.orig 2014-07-06 12:22:10.589534303 +0300 +++ ./src/Makefile.am 2014-07-06 12:22:19.319183252 +0300 @@ -39,7 +39,8 @@ libhocr_la_LDFLAGS = -version-info 0:0:0 libhocr_la_LIBADD = \ $(hspell_LIBS) \ $(tiff_LIBS) \ - $(fftw_LIBS) + $(fftw_LIBS) \ + -lm library_includedir = $(includedir)/libhocr library_include_HEADERS = \ diff -up ./examples/hocr/Makefile.am.orig ./examples/hocr/Makefile.am --- ./examples/hocr/Makefile.am.orig 2014-07-06 11:55:43.880450453 +0300 +++ ./examples/hocr/Makefile.am 2014-07-06 11:57:14.060879862 +0300 @@ -24,6 +24,7 @@ hocr_LDADD= \ $(tiff_LIBS) \ $(fftw_LIBS) \ $(libhocr_la_LIBADD) \ - $(top_builddir)/src/*.o -lm + $(top_builddir)/src/libhocr.la \ + $(top_builddir)/src/libhocrgtk.la endif