diff options
author | Oz Tiram <[email protected]> | 2020-02-07 21:57:10 +0100 |
---|---|---|
committer | Robert Antoni Buj Gelonch <[email protected]> | 2020-06-18 10:48:28 +0200 |
commit | d1f4707aad8a1ecad412295d2ccd3f7aa87b95b0 (patch) | |
tree | 7c842894f3ae039e69f48d6f7c9ad02282908330 /configure.ac | |
parent | eb8a049f0c2d19551397c9701b7c00921c4917c2 (diff) | |
download | atril-d1f4707aad8a1ecad412295d2ccd3f7aa87b95b0.tar.bz2 atril-d1f4707aad8a1ecad412295d2ccd3f7aa87b95b0.tar.xz |
Make synctex optional
Not everyone who reads PDF's is necessarily a LaTeX user.
These changes allow users to install atril without the huge bagage
of tex-live on systems where synctex isn't provided as a stand alone
library.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac index 6fee0ff6..e7a63fee 100644 --- a/configure.ac +++ b/configure.ac @@ -361,15 +361,25 @@ AC_SUBST([GIRTYPELIBDIR]) AM_CONDITIONAL([ENABLE_INTROSPECTION],[test "$enable_introspection" = "yes"]) dnl ================== libsynctex =========================================== +AC_ARG_ENABLE([synctex], + [AS_HELP_STRING([--disable-synctex], [Disable support for synctex])], + [], + [enable_synctex=yes]) -PKG_CHECK_MODULES(SYNCTEX, [synctex >= $SYNCTEX_REQUIRED], has_synctex=yes, has_synctex=no) -dnl not found? use internal code copy. -if test "x$has_synctex" = "xno"; then - AC_MSG_ERROR("SyncTeX support is disabled since library version $SYNCTEX_REQUIRED or newer not found") +if test "$enable_synctex" = "yes"; then + AC_DEFINE([ENABLE_SYNCTEX],[1],[Define if synctex support is enabled]) + PKG_CHECK_MODULES(SYNCTEX, [synctex >= $SYNCTEX_REQUIRED], has_synctex=yes, has_synctex=no) + dnl not found? use internal code copy. + if test "x$has_synctex" = "xno"; then + AC_MSG_ERROR("SyncTeX support is disabled since library version $SYNCTEX_REQUIRED or newer not found") + fi + AC_SUBST(SYNCTEX_LIBS) + AC_SUBST(SYNCTEX_CFLAGS) fi -AC_SUBST(SYNCTEX_LIBS) -AC_SUBST(SYNCTEX_CFLAGS) + +AM_CONDITIONAL([ENABLE_SYNCTEX], [test "$enable_synctex" = "yes"]) + dnl ================== portability checks =========================================== @@ -776,6 +786,7 @@ Configure summary: Tests...............: $enable_tests PDF Backend.........: $enable_pdf + Synctex enabled.....: $enable_synctex PostScript Backend..: $enable_ps TIFF Backend........: $enable_tiff DJVU Backend........: $enable_djvu @@ -784,6 +795,4 @@ Configure summary: Comics Backend......: $enable_comics XPS Backend.........: $enable_xps ePub Backend........: $have_webkit - - SyncTeX.............: $has_synctex " |