[evince] build: link libdocument against -lm and -lz



commit 19490059654c465484a7c97fd5493a9bc9566677
Author: FrÃdÃric PÃters <fpeters 0d be>
Date:   Wed Aug 31 09:56:10 2011 +0200

    build: link libdocument against -lm and -lz
    
    https://bugzilla.gnome.org/show_bug.cgi?id=657781

 configure.ac            |   16 ++++++++++++++++
 libdocument/Makefile.am |    2 ++
 2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 253694c..30b4cf1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -143,6 +143,22 @@ dnl Check dependencies
 # SHELL_CFLAGS     for shell implementation.
 # SHELL_LIBS
 
+AC_CHECK_LIBM
+AC_SUBST(LIBM)
+
+have_zlib=yes
+AC_CHECK_HEADERS([zlib.h],
+	[AC_CHECK_LIB([z], [inflate],
+		[AC_CHECK_LIB([z], [crc32], [have_zlib=yes], [have_zlib=no])],
+		[have_zlib=no])],
+	[have_zlib=no])
+
+if test x$have_zlib = xno; then
+	AC_MSG_ERROR([No sufficient zlib library found on your system.])
+fi
+
+ZLIB_LIBS=-lz
+AC_SUBST(ZLIB_LIBS)
 
 PKG_CHECK_MODULES(LIBDOCUMENT, gtk+-3.0 >= $GTK_REQUIRED gio-2.0 >= $GLIB_REQUIRED)
 PKG_CHECK_MODULES(LIBVIEW, gtk+-3.0 >= $GTK_REQUIRED gail-3.0 >= $GTK_REQUIRED gthread-2.0 gio-2.0 >= $GLIB_REQUIRED)
diff --git a/libdocument/Makefile.am b/libdocument/Makefile.am
index 2b5604e..063a041 100644
--- a/libdocument/Makefile.am
+++ b/libdocument/Makefile.am
@@ -112,6 +112,8 @@ libevdocument3_la_LDFLAGS = \
 
 libevdocument3_la_LIBADD = \
 	$(LIBDOCUMENT_LIBS)	\
+	$(ZLIB_LIBS)		\
+	$(LIBM)			\
 	$(top_builddir)/cut-n-paste/synctex/libsynctex.la
 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]