[evince] build: Use synctex system library if available
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] build: Use synctex system library if available
- Date: Fri, 25 May 2018 13:14:09 +0000 (UTC)
commit 9edaca5b7b35bbbeeecfaf8d9291a4c092d8be91
Author: Germán Poo-Caamaño <gpoo gnome org>
Date: Fri May 18 22:13:19 2018 -0400
build: Use synctex system library if available
Check if a system synctex is available and use that instead of
bundled version if possible.
Fixes #479
configure.ac | 14 ++++++++++++++
cut-n-paste/Makefile.am | 6 +++++-
libdocument/Makefile.am | 4 ++--
3 files changed, 21 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0f7bc62a..4f93bf43 100644
--- a/configure.ac
+++ b/configure.ac
@@ -536,6 +536,19 @@ fi
GOBJECT_INTROSPECTION_CHECK([1.0])
+dnl ================== libsynctex ===========================================
+
+PKG_CHECK_MODULES(SYNCTEX, [synctex], has_synctex=system, has_synctex=internal)
+
+dnl not found? use internal code copy.
+if test "x$has_synctex" = "xinternal"; then
+ SYNCTEX_LIBS="\$(top_builddir)/cut-n-paste/synctex/libsynctex.la"
+ SYNCTEX_CFLAGS="-I\$(top_srcdir)/cut-n-paste/synctex"
+fi
+AC_SUBST(SYNCTEX_LIBS)
+AC_SUBST(SYNCTEX_CFLAGS)
+AM_CONDITIONAL(USE_INTERNAL_SYNCTEX, test x$has_synctex = xinternal)
+
dnl ================== portability checks ===========================================
dnl for backtrace()
@@ -1033,4 +1046,5 @@ GTK+ Unix Print ..........: $with_gtk_unix_print
Thumbnail cache ..........: $enable_gnome_desktop
Multimedia ...............: $enable_multimedia
Spell Checker.............: $with_gspell
+SyncTeX ..................: $has_synctex
])
diff --git a/cut-n-paste/Makefile.am b/cut-n-paste/Makefile.am
index a049b7fd..039f3aa1 100644
--- a/cut-n-paste/Makefile.am
+++ b/cut-n-paste/Makefile.am
@@ -1,3 +1,7 @@
-SUBDIRS = gimpcellrenderertoggle synctex libgd unarr
+SUBDIRS = gimpcellrenderertoggle libgd unarr
+
+if USE_INTERNAL_SYNCTEX
+SUBDIRS += synctex
+endif
-include $(top_srcdir)/git.mk
diff --git a/libdocument/Makefile.am b/libdocument/Makefile.am
index 32bdfaa4..46cdee4e 100644
--- a/libdocument/Makefile.am
+++ b/libdocument/Makefile.am
@@ -107,7 +107,7 @@ libevdocument3_la_CPPFLAGS = \
libevdocument3_la_CFLAGS = \
$(LIBDOCUMENT_CFLAGS) \
- -I$(top_srcdir)/cut-n-paste/synctex \
+ $(SYNCTEX_CFLAGS) \
$(AM_CFLAGS)
libevdocument3_la_LDFLAGS = \
@@ -117,7 +117,7 @@ libevdocument3_la_LDFLAGS = \
$(AM_LDFLAGS)
libevdocument3_la_LIBADD = \
- $(top_builddir)/cut-n-paste/synctex/libsynctex.la \
+ $(SYNCTEX_LIBS) \
$(LIBDOCUMENT_LIBS) \
$(ZLIB_LIBS) \
$(LIBM)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]