[balsa/wip/gtk4: 86/351] Revise configuration of enchant spell-checking lib



commit 9064f7601c4b5bc761ab83bae8cdcb03c5e3488e
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 df65779..9d39989 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 c41cc77..31943b1 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 bcbb2ae..b9bcad4 100644
--- a/meson.build
+++ b/meson.build
@@ -512,7 +512,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]