[balsa] Revise configuration of enchant spell-checking lib



commit 188512becea7dc7fa72a61ac121f773d087ee90b
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Sun Dec 10 15:09:07 2017 -0500

    Revise configuration of enchant spell-checking lib
    
        Version 2.1.3 of enchant is parallel-installable with version
        1.6, so we first check for enchant-2. If that fails, check for
        enchant; we want version <= 1.6.0, to avoid issues with 1.6.1.
    
        * configure.ac: do it.
        * meson.build: ditto.

 ChangeLog    |   11 +++++++++++
 configure.ac |    6 +++++-
 meson.build  |    7 ++++++-
 3 files changed, 22 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 76d0207..93453df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2017-12-10  Peter Bloomfield  <pbloomfield bellsouth net>
+
+       Revise configuration of enchant spell-checking lib
+
+       Version 2.1.3 of enchant is parallel-installable with version
+       1.6, so we first check for enchant-2. If that fails, check for
+       enchant; we want version <= 1.6.0, to avoid issues with 1.6.1.
+
+       * configure.ac: do it.
+       * meson.build: ditto.
+
 2017-12-08  Peter Bloomfield  <pbloomfield bellsouth net>
 
        In glib-2.56, g_object_ref() propagates the type from its argument
diff --git a/configure.ac b/configure.ac
index f6d3dec..52dd337 100644
--- a/configure.ac
+++ b/configure.ac
@@ -588,7 +588,11 @@ case "$use_spell_checker" in
     ;;
     internal)
     AC_MSG_RESULT([configure enchant])
-    PKG_CHECK_MODULES(SPELL, [ enchant ])
+    if $PKG_CONFIG enchant-2 ; then
+        PKG_CHECK_MODULES(SPELL, [ enchant-2 ])
+    else
+        PKG_CHECK_MODULES(SPELL, [ enchant <= 1.6.0 ])
+    fi
     ;;
     *)
     AC_MSG_ERROR([bad option $use_spell_checker])
diff --git a/meson.build b/meson.build
index a3082a2..c6fc2ae 100644
--- a/meson.build
+++ b/meson.build
@@ -524,7 +524,12 @@ elif spell_checker == 'gtkspell'
   conf.set('HAVE_GTKSPELL', 1,
     description : 'Defined when GtkSpell can be used.')
 elif spell_checker == 'internal'
-  spell_dep = dependency('enchant')
+  spell_dep = dependency('enchant-2',
+                         required : false)
+  if not spell_dep.found()
+    spell_dep = dependency('enchant',
+                           version : '<= 1.6.0')
+  endif
 endif
 
 balsa_deps += spell_dep


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