Skip to content

Commit

Permalink
show enchant version when configure
Browse files Browse the repository at this point in the history
  • Loading branch information
yetist authored and raveit65 committed Mar 10, 2019
1 parent 433317a commit edae22f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
20 changes: 12 additions & 8 deletions configure.ac
Expand Up @@ -98,7 +98,7 @@ dnl ================================================================
dnl spell plugins checks: enchant and iso-codes
dnl ================================================================

ENCHANT_REQUIRED=1.2.0
ENCHANT_REQUIRED=1.6.0
ISO_CODES_REQUIRED=0.35

AC_ARG_ENABLE([spell],
Expand All @@ -107,15 +107,19 @@ AC_ARG_ENABLE([spell],
[enable_enchant=yes])

if test "x$enable_enchant" = "xyes" ; then
ENCHANT_MODNAME=enchant
PKG_CHECK_EXISTS([enchant-2 >= $ENCHANT_REQUIRED], [have_enchant_2=yes], [have_enchant_2=no])
if test "x$have_enchant_2" = "xyes"; then
ENCHANT_MODNAME=enchant-2
fi

PKG_CHECK_MODULES(ENCHANT, enchant-2 >= $ENCHANT_REQUIRED, \
have_enchant_2=yes, have_enchant_2=no)
AC_MSG_CHECKING([the version of enchant])
ENCHANT_VERSION=`pkg-config --modversion $ENCHANT_MODNAME`
AC_MSG_RESULT([$ENCHANT_VERSION])

if test "x$have_enchant_2" = "xno"; then
PKG_CHECK_MODULES(ENCHANT, enchant >= $ENCHANT_REQUIRED, \
have_enchant=yes, have_enchant=no)
fi
if test "x$have_enchant_2" = "xyes" || test "x$have_enchant" = "xyes"; then
PKG_CHECK_MODULES(ENCHANT, [$ENCHANT_MODNAME >= $ENCHANT_REQUIRED], \
have_enchant=yes, have_enchant=no)
if test "x$have_enchant" = "xyes"; then

PKG_CHECK_EXISTS([iso-codes >= $ISO_CODES_REQUIRED],
[have_iso_codes=yes],[have_iso_codes=no])
Expand Down
2 changes: 1 addition & 1 deletion plugins/spell/pluma-spell-checker.c
Expand Up @@ -433,7 +433,7 @@ pluma_spell_checker_add_word_to_personal (PlumaSpellChecker *spell,
if (len < 0)
len = strlen (word);

enchant_dict_add (spell->dict, word, len);
enchant_dict_add (spell->dict, word, len);


g_signal_emit (G_OBJECT (spell), signals[ADD_WORD_TO_PERSONAL], 0, word, len);
Expand Down

0 comments on commit edae22f

Please sign in to comment.