summaryrefslogtreecommitdiff
blob: 44df537aa0c83715c6a4965c9a28590778eb2443 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
=== modified file 'configure.in'
--- configure.in	2009-06-21 11:07:49 +0000
+++ configure.in	2011-03-10 12:40:12 +0000
@@ -49,12 +49,14 @@
 AC_CHECK_HEADERS(boost/regex.hpp)
 AC_SUBST(DEPS_CFLAGS)
 AC_SUBST(DEPS_LIBS)
+LIBS="$LIBS $DEPS_LIBS"
 
 dnl Special case for poppler-glib < 0.6
 case $($PKG_CONFIG --modversion poppler-glib) in
 	0.5.*)
 		AC_DEFINE(OLD_POPPLER,"1","Using poppler < 0.6");;
 esac
+AC_CHECK_FUNCS([poppler_page_get_selected_text])
 
 
 dnl I18n

=== modified file 'src/Document.C'
--- src/Document.C	2011-03-10 09:35:05 +0000
+++ src/Document.C	2011-03-10 12:40:12 +0000
@@ -503,7 +503,11 @@
 			textdump += poppler_page_get_text (page, rect);
 		#else
 			#warning Using poppler >= 0.6
-			textdump += poppler_page_get_text (page, POPPLER_SELECTION_GLYPH, rect);
+			#ifdef HAVE_POPPLER_PAGE_GET_SELECTED_TEXT
+				textdump += poppler_page_get_text (page);
+			#else
+				textdump += poppler_page_get_text (page, POPPLER_SELECTION_GLYPH, rect);
+			#endif
 		#endif
 
 		poppler_rectangle_free (rect);