Skip to content

Commit e27a451

Browse files
yetistraveit65
authored andcommitted
show enchant version when configure
1 parent 73e0a82 commit e27a451

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

configure.ac

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ dnl ================================================================
9898
dnl spell plugins checks: enchant and iso-codes
9999
dnl ================================================================
100100

101-
ENCHANT_REQUIRED=1.2.0
101+
ENCHANT_REQUIRED=1.6.0
102102
ISO_CODES_REQUIRED=0.35
103103

104104
AC_ARG_ENABLE([spell],
@@ -107,15 +107,19 @@ AC_ARG_ENABLE([spell],
107107
[enable_enchant=yes])
108108

109109
if test "x$enable_enchant" = "xyes" ; then
110+
ENCHANT_MODNAME=enchant
111+
PKG_CHECK_EXISTS([enchant-2 >= $ENCHANT_REQUIRED], [have_enchant_2=yes], [have_enchant_2=no])
112+
if test "x$have_enchant_2" = "xyes"; then
113+
ENCHANT_MODNAME=enchant-2
114+
fi
110115

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

114-
if test "x$have_enchant_2" = "xno"; then
115-
PKG_CHECK_MODULES(ENCHANT, enchant >= $ENCHANT_REQUIRED, \
116-
have_enchant=yes, have_enchant=no)
117-
fi
118-
if test "x$have_enchant_2" = "xyes" || test "x$have_enchant" = "xyes"; then
120+
PKG_CHECK_MODULES(ENCHANT, [$ENCHANT_MODNAME >= $ENCHANT_REQUIRED], \
121+
have_enchant=yes, have_enchant=no)
122+
if test "x$have_enchant" = "xyes"; then
119123

120124
PKG_CHECK_EXISTS([iso-codes >= $ISO_CODES_REQUIRED],
121125
[have_iso_codes=yes],[have_iso_codes=no])

plugins/spell/pluma-spell-checker.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ pluma_spell_checker_add_word_to_personal (PlumaSpellChecker *spell,
433433
if (len < 0)
434434
len = strlen (word);
435435

436-
enchant_dict_add (spell->dict, word, len);
436+
enchant_dict_add (spell->dict, word, len);
437437

438438

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

0 commit comments

Comments
 (0)